summaryrefslogtreecommitdiff
path: root/core/modules.rs
AgeCommit message (Collapse)Author
2020-02-18refactor: cleanup cli/lib.rs (#4006)Bartek Iwańczuk
* rename methods on Worker related to module loading * reorganize cli/lib.rs * remove cli/progress.rs and cli/shell.rs
2020-02-15refactor: replace Arc<Box<..>> with Rc<..> (#3996)Bartek Iwańczuk
2020-02-08refactor: rename ThreadSafeState, use RefCell for mutable state (#3931)Bartek Iwańczuk
* rename ThreadSafeState to State * State stores InnerState wrapped in Rc and RefCell
2020-02-03refactor: Use Tokio's single-threaded runtime (#3844)Ryan Dahl
This change simplifies how we execute V8. Previously V8 Isolates jumped around threads every time they were woken up. This was overly complex and potentially hurting performance in a myriad ways. Now isolates run on their own dedicated thread and never move. - blocking_json spawns a thread and does not use a thread pool - op_host_poll_worker and op_host_resume_worker are non-operational - removes Worker::get_message and Worker::post_message - ThreadSafeState::workers table contains WorkerChannel entries instead of actual Worker instances. - MainWorker and CompilerWorker are no longer Futures. - The multi-threaded version of deno_core_http_bench was removed. - AyncOps no longer need to be Send + Sync This PR is very large and several tests were disabled to speed integration: - installer_test_local_module_run - installer_test_remote_module_run - _015_duplicate_parallel_import - _026_workers
2020-02-01feat: support crate imports in deno_typescript (#3814)Andy Finch
Co-authored-by: Ryan Dahl <ry@tinyclouds.org>
2020-01-25refactor: Modules and Loader trait (#3791)Bartek Iwańczuk
* move is_dyn_import argument from Loader::resolve to Loader::load - it was always kind of strange that resolve() checks permissions. * change argument type from &str to &ModuleSpecifier where applicable
2020-01-08refactor: module loading in EsIsolate (#3615)Bartek Iwańczuk
* refactored RecursiveLoad - it was renamed to RecursiveModuleLoad, it does not take ownership of isolate anymore - a struct implementing Stream that yields SourceCodeInfo * untangled module loading logic between RecursiveLoad and isolate - that logic is encapsulated in EsIsolate and RecursiveModuleLoad, where isolate just consumes modules as they become available - does not require to pass Arc<Mutex<Isolate>> around anymore * removed EsIsolate.mods_ in favor of Modules and moved them inside EsIsolate * EsIsolate now requires "loader" argument during construction - struct that implements Loader trait * rewrite first methods on isolate as async
2020-01-07core: factor out EsIsolate from Isolate (#3613)Bartek Iwańczuk
2020-01-06refactor: remove core/libdeno.rs (#3611)Bartek Iwańczuk
2020-01-06merge libdeno::DenoIsolate into core::Isolate (#3605)Bartek Iwańczuk
2020-01-02Add missing year ranges to copyright notices (#3582)Waldir Pimenta
2020-01-02fix typos (#3573)EnokMan
2019-12-23Upgrades rust to 1.40.0 (#3542)Axetroy
2019-12-08fix isolate tests (#3459)Bartek Iwańczuk
Some tests were silently failing after #3358 and #3434 because pool.spawn_ok was used which doesn't panic on errors. For reference, the failure looked like this: thread '<unnamed>' panicked at 'assertion failed: match isolate.poll_unpin(cx) { Poll::Ready(Ok(_)) => true, _ => false, }', core/isolate.rs:1408:7
2019-11-25better error message for missing module (#3402)Bartek Iwańczuk
2019-11-16Use futures 0.3 API (#3358)Bartek Iwańczuk
2019-10-23refactor DenoPermissions.check_net & resolve_addr (#3182)EnokMan
2019-10-19feat: Allow "deno eval" to run code as module (#3148)Kevin (Kun) "Kassimo" Qian
2019-08-13Dynamic import should respect permissions (#2764)Ryan Dahl
2019-08-09Dynamic import (#2516)Bert Belder
2019-07-31Use system rustfmt instead of fixed binary (#2701)Ryan Dahl
2019-07-11Refactor error to use dynamic dispatch and traitsBert Belder
This is in preperation for dynamic import (#1789), which is more easily implemented when errors are dynamic.
2019-07-08core: clearly define when module lookup is path-based vs URL-basedBert Belder
The rules are now as follows: * In `import` statements, as mandated by the WHATWG specification, the import specifier is always treated as a URL. If it is a relative URL, it must start with either / or ./ or ../ * A script name passed to deno as a command line argument may be either an absolute URL or a local path. - If the name starts with a valid URI scheme followed by a colon, e.g. 'http:', 'https:', 'file:', 'foo+bar:', it always interpreted as a URL (even if Deno doesn't support the indicated protocol). - Otherwise, the script name is interpreted as a local path. The local path may be relative, and operating system semantics determine how it is resolved. Prefixing a relative path with ./ is not required.
2019-06-19Combine CLI Errors (#2487)Kitson Kelly
2019-06-18Add dyn to be rust nightly compatible (#2538)Kitson Kelly
2019-06-12Move ModuleSpecifier to //core (#2509)Bartek Iwańczuk
2019-06-09feat: Import maps (#2360)Bartek Iwańczuk
2019-06-05RecursiveLoad shouldn't own the Isolate (#2453)Ryan Dahl
This patch makes it so that RecursiveLoad doesn't own the Isolate, so Worker::execute_mod_async does not consume itself. Previously Worker implemented Loader, but now ThreadSafeState does. This is necessary preparation work for dynamic import (#1789) and import maps (#1921)
2019-05-09core: Privatize ModuleNameMap SymbolicModule deno_buf (#2324)Bartek Iwańczuk
2019-05-03core,cli: fix clippy warningsBert Belder
2019-04-27core: add Deps::to_json() (#2223)Greg Altman
2019-04-23core: make Isolate concrete, remove Dispatch trait (#2183)Ryan Dahl
Op dispatch is now dynamically dispatched, so slightly less efficient. The immeasurable perf hit is a reasonable trade for the API simplicity that is gained here.
2019-04-19core: test Modules::deps and handle error cases better (#2141)Ryan Dahl
2019-04-19Improve test slow_never_ready_modules (#2145)Ryan Dahl
2019-04-18Fix redirects under async load (#2133)Kevin (Kun) "Kassimo" Qian
2019-04-17Fix clippy warningsBert Belder
2019-04-16Implement async module loading in CLI (#2084)Ryan Dahl
2019-04-09core: Rename Behavior to Dispatch (#2082)Ryan Dahl
And rename IsolateState to ThreadSafeState. Also make ThreadSafeState directly implement Dispatch. This is simpler.
2019-04-02Refactor deno_core::RecursiveLoad to be more idiomatic (#2034)Bert Belder
2019-04-02Add deno_core::RecursiveLoad for async module loading (#2034)Ryan Dahl