summaryrefslogtreecommitdiff
path: root/core/bindings.rs
AgeCommit message (Collapse)Author
2021-08-25feat: ArrayBuffer in structured clone transfer (#11840)Luca Casonato
2021-08-15refactor(ops): return BadResource errors in ResourceTable calls (#11710)Aaron O'Mullan
* refactor(ops): return BadResource errors in ResourceTable calls Instead of relying on callers to map Options to Results via `.ok_or_else(bad_resource_id)` at over 176 different call sites ...
2021-08-09feat(extensions/web): add structuredClone function (#11572)Leo K
Co-authored-by: Luca Casonato <hello@lcas.dev>
2021-07-30chore: upgrade Rust to 1.54.0 (#11554)Yusuke Tanaka
2021-07-08perf(core): avoid extra alloc in Deno.core.encode() (#11323)Aaron O'Mullan
2021-07-06feat: support SharedArrayBuffer sharing between workers (#11040)Luca Casonato
This commit adds support for sharing SABs between workers.
2021-07-03feat: enable WebAssembly.instantiateStreaming and wasm async compilation ↵Andreu Botella
(#11200) The WebAssembly streaming APIs used to be enabled, but used to take buffer sources as their first argument (see #6154 and #7259). This change re-enables them, requiring a Promise<Response> instead, as well as enabling asynchronous compilation of WebAssembly modules.
2021-06-29fix(core/modules): Fix concurrent loading of dynamic imports (#11089)Nayeem Rahman
This commit changes implementation of module loading in "deno_core" to track all currently fetched modules across all existing module loads. In effect a bug that caused concurrent dynamic imports referencing the same module to fail is fixed.
2021-06-27feat(inspector): pipe console messages between terminal and inspector (#11134)Bartek Iwańczuk
This commit adds support for piping console messages to inspector. This is done by "wrapping" Deno's console implementation with default console provided by V8 by the means of "Deno.core.callConsole" binding. Effectively each call to "console.*" methods calls a method on Deno's console and V8's console.
2021-06-26fix: MessagePort in message for postMessage transfers (#11103)Luca Casonato
2021-06-17chore: upgrade Rust to 1.53.0 (#11021)Yusuke Tanaka
2021-06-06tests: run wpt scripts with Deno.core.evalContext (#10852)Luca Casonato
This means wpts are now run in script context, and there are better stack traces.
2021-05-19refactor(core): move ModuleMap to separate RefCell (#10656)Bartek Iwańczuk
This commit moves bulk of the logic related to module loading from "JsRuntime" to "ModuleMap". Next steps are to rewrite the actual loading logic (represented by "RecursiveModuleLoad") to be a part of "ModuleMap" as well -- that way we will be able to track multiple module loads from within the map which should help me solve the problem of concurrent loads (since all info about currently loading/loaded modules will be contained in the ModuleMap, so we'll be able to know if actually all required modules have been loaded).
2021-05-11feat(runtime/worker): Structured cloning worker message passing (#9323)Tim Ramlot
This commit upgrade "Worker.postMessage()" implementation to use structured clone algorithm instead of non-spec compliant JSON serialization.
2021-05-06refactor(ops): replace `ZeroCopyBuf` arg by 2nd generic deserializable arg ↵Aaron O'Mullan
(#10448)
2021-05-02refactor(core): convert core.print() to a builtin op (#10436)Aaron O'Mullan
2021-05-01fix(core): fix typo in error message of print function (#10456)Aditya Pandit
2021-04-30cleanup(core): use ZeroCopyBuf for serialize & encode bindings (#10435)Aaron O'Mullan
2021-04-30cleanup(core): replace OpResponse with OpResult (#10434)Aaron O'Mullan
Drop the Value/Buffer enum since #10432 allows buffers to be serialized rust => v8
2021-04-23refactor(core): rename send() to opcall() (#10307)Aaron O'Mullan
I think it's a better fit since recv() was killed and opcall <> syscall (send/recv was too reminiscent of request/response and custom payloads)
2021-04-21refactor(core): kill recv() and init() (#10299)Aaron O'Mullan
`init()` was previously needed to init the shared queue, but now that it's gone `init()` only registers the async msg handler which is snapshot safe and constant since the op layer refactor.
2021-04-18refactor(core): remove ZeroCopyBuf's dep on the bindings mod (#10232)Aaron O'Mullan
Also cleanup `bindings::deserialize()/decode()` so they use the `ZeroCopyBuf` abstraction rather than reimplementing it. This cleanup will facilitate moving `ZeroCopyBuf` to `serde_v8` since it's now self contained and there are no other `get_backing_store_slice()` callers.
2021-04-12feat: Add Deno.memoryUsage() (#9986)Aaron O'Mullan
2021-04-11core: avoid async op future reboxing to bundle PromiseId (#10123)Aaron O'Mullan
2021-04-04perf(serde_v8): introduce Serializable boxable object (#9983)Aaron O'Mullan
2021-03-31refactor: new optimized op-layer using serde_v8 (#9843)Aaron O'Mullan
- Improves op performance. - Handle op-metadata (errors, promise IDs) explicitly in the op-layer vs per op-encoding (aka: out-of-payload). - Remove shared queue & custom "asyncHandlers", all async values are returned in batches via js_recv_cb. - The op-layer should be thought of as simple function calls with little indirection or translation besides the conceptually straightforward serde_v8 bijections. - Preserve concepts of json/bin/min as semantic groups of their inputs/outputs instead of their op-encoding strategy, preserving these groups will also facilitate partial transitions over to v8 Fast API for the "min" and "bin" groups
2021-03-26remove macro_use (#9884)Ryan Dahl
2021-03-26refactor(core): simplify heapStats() by using serde_v8 (#9901)Aaron O'Mullan
2021-03-25Introduce serde_v8 (#9722)Aaron O'Mullan
2021-03-23feat(core): Deno.core.heapStats() (#9659)Aaron O'Mullan
This commit implements "Deno.core.heapStats()" function that allows to programatically measure isolate heap-usage.
2021-03-21fix(core): don't panic on invalid arguments for Deno.core.print (#9834)Andrew Mitchell
2021-02-23refactor(core): cleanup module implementation (#9580)Bartek Iwańczuk
* remove "ModuleNameMap", instead define that map inline inside "Modules" struct * remove "dyn_import_id" argument from "mod_instantiate" * rename "Modules" struct to "ModuleMap" * rename "JsRuntime::modules" to "JsRuntime::module_map"
2021-02-23refactor(core): Allow multiple overflown responses in single poll (#9433)Inteon
This commit rewrites "JsRuntime::poll" function to fix a corner case that might caused "overflown_response" to be overwritten by other overflown response. The logic has been changed to allow returning multiple overflown response alongside responses from shared queue.
2021-02-21fix(core/bindings): Add stacks for dynamic import resolution errors (#9562)Nayeem Rahman
2021-02-17Make ModuleSpecifier a type alias, not wrapper struct (#9531)Ryan Dahl
2021-02-16feat: add structured cloning to Deno.core (#9458)Inteon
This commit adds two new "Deno.core" APIs: - "Deno.core.serialize" - "Deno.core.deserialize" These APIs are used to provide structured cloning of values and will be used for further web worker implementation. Co-authored-by: Bartek Iwańczuk <biwanczuk@gmail.com>
2021-02-15refactor(core): Reduce verbosity of binding core functions (#9497)Aaron O'Mullan
2021-02-05upgrade: rusty_v8 0.17.0, v8 9.0.123 (#9413)Bartek Iwańczuk
2021-01-19upgrade: rusty_v8 0.16.0, v8 8.9.255.3 (#9180)Ryan Dahl
2021-01-10update copyright to 2021 (#9081)Ryan Dahl
2021-01-05fix: align encoding APIs to spec using WPT (#9004)Luca Casonato
2020-11-28chore: clippy future cleanups (#8514)Kitson Kelly
2020-11-21refactor(core): don't depend on get_identity_hash for modules (#8354)Bartek Iwańczuk
This commit refactors "deno_core::Modules" structure to not depend on "get_identity_hash" function to identify modules, but instead use default hash implementation.
2020-11-11refactor(core): don't depend on get_identity_hash for promises (#8352)Bartek Iwańczuk
This commit changes how pending promise exceptions are stored in JsRuntime by using global handle to promise instead of its identity hash.
2020-11-03fix(prompt): fix display of non-ASCII characters on Windows (#8199)Yoshiya Hinosawa
2020-10-23refactor(core): remove Deno.core.formatError() (#8091)Bartek Iwańczuk
With recent improvements to REPL implementation, Deno.core.formatError() API is no longer needed.
2020-10-18upgrade rusty_v8 (#8017)Ryan Dahl
2020-09-14Make JsRuntimeState private (#7484)Ryan Dahl
2020-09-15refactor: use the 'anyhow' crate instead of 'ErrBox' (#7476)Bert Belder
2020-09-10Use gotham-like state for ops (#7385)Ryan Dahl
Provides a concrete state type that can be dynamically added. This is necessary for op crates. * renames BasicState to OpState * async ops take `Rc<RefCell<OpState>>` * sync ops take `&mut OpState` * removes `OpRegistry`, `OpRouter` traits * `get_error_class_fn` moved to OpState * ResourceTable moved to OpState