summaryrefslogtreecommitdiff
path: root/core
AgeCommit message (Collapse)Author
2019-05-30third_party: upgrade rust cratesBert Belder
2019-05-29v0.7.0Ryan Dahl
2019-05-29TS compiler refactorRyan Dahl
* Compiler no longer has its own Tokio runtime. Compiler handles one message and then exits. * Uses the simpler ts.CompilerHost interface instead of ts.LanguageServiceHost. * avoids recompiling the same module by introducing a hacky but simple `hashset<string>` that stores the module names that have been already compiled. * Removes the CompilerConfig op. * Removes a lot of the mocking stuff in compiler.ts like `this._ts`. It is not useful as we don't even have tests. * Turns off checkJs because it causes fmt_test to die with OOM.
2019-05-20v0.6.0Ryan Dahl
2019-05-20Adjust core/README.md textRyan Dahl
2019-05-16build: add support for rust proc-macro cratesBert Belder
2019-05-11v0.5.0Ryan Dahl
2019-05-11Typo (#2337)Nikola Ristic
2019-05-11third_party: upgrade rust cratesBert Belder
2019-05-11core: make PinnedBuf::Raw -> PinnedBuf conversion actually a moveBert Belder
2019-05-09core: Privatize ModuleNameMap SymbolicModule deno_buf (#2324)Bartek Iwańczuk
2019-05-03v0.4.0Ryan Dahl
2019-05-03v0.3.11Ryan Dahl
2019-05-03core,cli: fix clippy warningsBert Belder
2019-05-02Work around Windows-only V8 concurrent initialization crashBert Belder
This patch provides a work-around for an apparent V8 bug where initializing multiple isolates concurrently leads to a crash on Windows. At the time of writing the cause of this crash is not exactly understood, but it seems to be related to the V8 internal function win64_unwindinfo::RegisterNonABICompliantCodeRange(), which didn't exist in older versions of V8.
2019-05-02core: remove support for moving deno_buf ownership from C++ to JavaScriptBert Belder
The functionality hasn't been in use for a long time. Without this feature, the `alloc_ptr` and `alloc_len` fields are no longer necessary.
2019-05-01core: express op as enum (#2255)Ryan Dahl
2019-05-01Refactor zero-copy buffers for performance and to prevent memory leaksBert Belder
* In order to prevent ArrayBuffers from getting garbage collected by V8, we used to store a v8::Persistent<ArrayBuffer> in a map. This patch introduces a custom ArrayBuffer allocator which doesn't use Persistent handles, but instead stores a pointer to the actual ArrayBuffer data alongside with a reference count. Since creating Persistent handles has quite a bit of overhead, this change significantly increases performance. Various HTTP server benchmarks report about 5-10% more requests per second than before. * Previously the Persistent handle that prevented garbage collection had to be released manually, and this wasn't always done, which was causing memory leaks. This has been resolved by introducing a new `PinnedBuf` type in both Rust and C++ that automatically re-enables garbage collection when it goes out of scope. * Zero-copy buffers are now correctly wrapped in an Option if there is a possibility that they're not present. This clears up a correctness issue where we were creating zero-length slices from a null pointer, which is against the rules.
2019-05-01core: remove unused function StrBufNullAllocPtr()Bert Belder
2019-05-01Rename test targets (#2262)Bartek Iwańczuk
2019-04-27core: add Deps::to_json() (#2223)Greg Altman
2019-04-25v0.3.10Ryan Dahl
2019-04-25v0.3.9Ryan Dahl
2019-04-24core: Add test for snapshotting from Rust (#2197)Ryan Dahl
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-21Fixes #2033, shared queue push bug (#2158)Ryan Dahl
2019-04-21Refactor CLI entry point (#2157)Bartek Iwańczuk
Changes "deno --types" to "deno types" and "deno --prefetch" to "deno prefetch"
2019-04-21Fix link to http_bench example in core README (#2167)Matt Harrison
2019-04-19v0.3.8Ryan Dahl
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-16Move deno_core_http_bench into examples dir (#2127)Ryan Dahl
2019-04-16core: make Isolate use FuturesUnordered to track opsBert Belder
Additionally, instead of polling ops in a loop until none of them are ready, the isolate will now yield to the task system after delivering the first batch of completed ops to the javascript side. Although this makes performance a bit worse (about 15% fewer requests/second on the 'deno_core_http_bench' benchmark), we feel that the advantages are worth it: * It resolves the extremely high worst-case latency that we were seeing on deno_core_http_bench, in particular when using the multi-threaded Tokio runtime, which would sometimes exceed a full second. * Before this patch, the implementation of Isolate::poll() had to loop through all sub-futures and poll each one of them, which doesn't scale well as the number of futures managed by the isolate goes up. This could lead to poor performance when e.g. a server is servicing thousands of connected clients.
2019-04-16core: run isolate tests within a taskBert Belder
This change is made in preparation for using FuturesUnordered to track futures that are spawned by the isolate. FuturesUnordered sets up notififications for every future that it finds to be not ready when polled, which causes a crash if attempted outside of a task context.
2019-04-16core/http_bench: support -D flag to enable loggingBert Belder
2019-04-16Implement async module loading in CLI (#2084)Ryan Dahl
2019-04-15third_party: upgrade rust cratesBert Belder
2019-04-11v0.3.7Ryan 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-08core: poll ops round robinBert Belder
Also use a VecDeque to store pending ops to avoid exponential time complexity when removing completed ops from the list.
2019-04-08core: snapshot improvements (#2052)Ryan Dahl
* Moves how snapshots are supplied to the Isolate. Previously they were given by Behavior::startup_data() but it was only called once at startup. It makes more sense (and simplifies Behavior) to pass it to the constructor of Isolate. * Adds new libdeno type deno_snapshot instead of overloading deno_buf. * Adds new libdeno method to delete snapshot deno_snapshot_delete(). * Renames deno_get_snapshot() to deno_snapshot_new(). * Makes StartupData hold references to snapshots. This was implicit when it previously held a deno_buf but is made explicit now. Note that include_bytes!() returns a &'static [u8] and we want to avoid copying that.
2019-04-04v0.3.6Ryan Dahl
2019-04-04Improve docs in core (#2049)Ryan Dahl
2019-04-04Non-fatal compile_sync failures (#2039)andy finch
And model worker resources as Stream
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
2019-04-02Clippy fixesBert Belder
2019-04-01Add web worker JS API (#1993)andy finch
* Refactored the way worker polling is scheduled and errors are handled. * Share the worker future as a Shared