summaryrefslogtreecommitdiff
path: root/core
AgeCommit message (Collapse)Author
2022-04-18perf: move Deno.writeTextFile and like functions to Rust (#14221)David Sherret
Co-authored-by: Luca Casonato <hello@lcas.dev>
2022-04-17feat(core): Add initial support for realms (#14019)Andreu Botella
This commit adds tentative support for multiple realms in "deno_core". It adds the "JsRealm" API that adds methods like "JsRuntime"'s "handle_scope", "global_object" and "execute_script" specific to the realm.
2022-04-16feat: Better formatting for AggregateError (#14285)Bartek Iwańczuk
This commit adds "aggregated" field to "deno_core::JsError" that stores instances of "JsError" recursively to properly handle "AggregateError" formatting. Appropriate logics was added to "PrettyJsError" and "console" API to format AggregateErrors. Co-authored-by: Nayeem Rahman <nayeemrmn99@gmail.com>
2022-04-15refactor: Move source map lookups to core (#14274)Nayeem Rahman
The following transformations gradually faced by "JsError" have all been moved up front to "JsError::from_v8_exception()": - finding the first non-"deno:" source line; - moving "JsError::script_resource_name" etc. into the first error stack in case of syntax errors; - source mapping "JsError::script_resource_name" etc. when wrapping the error even though the frame locations are source mapped earlier; - removing "JsError::{script_resource_name,line_number,start_column,end_column}" entirely in favour of "js_error.frames.get(0)". We also no longer pass a js-side callback to "core/02_error.js" from cli. I avoided doing this on previous occasions because the source map lookups were in an awkward place.
2022-04-15feat(test): format user code output (#14271)Bartek Iwańczuk
This commit changes "deno test" to better denote user output coming from test cases. This is done by printing "---- output ----" and "---- output end ----" markers if an output is produced. The output from "console" and "Deno.core.print" is captured, as well as direct writes to "Deno.stdout" and "Deno.stderr". To achieve that new APIs were added to "deno_core" crate, that allow to replace an existing resource with a different one (while keeping resource ids intact). Resources for stdout and stderr are replaced by pipes. Co-authored-by: David Sherret <dsherret@gmail.com>
2022-04-14chore: forward v1.20.6 release commit to main (#14288)David Sherret
2022-04-13refactor(core/error): Clarify JsError message fields (#14269)Nayeem Rahman
2022-04-13feat(ext/web): Add error events for event listener and timer errors (#14159)Nayeem Rahman
- feat: Add handleable error event for even listener errors - feat: Add handleable error event for setTimeout()/setInterval() errors - feat: Add Deno.core.destructureError() - feat: Add Deno.core.terminate() - fix: Don't throw listener errors from dispatchEvent() - fix: Use biased mode when selecting between mod_evaluate() and run_event_loop() results
2022-04-08fix: upgrade to swc_ecmascript 0.143 (#14238)David Sherret
2022-04-08refactor(core): OpCtx (#14228)Aaron O'Mullan
2022-04-07chore: forward v1.20.5 release commit to main (#14232)David Sherret
2022-04-02chore: update tokio, tokio-util and libc dependencies (#14174)Bartek Iwańczuk
2022-04-02feat(serde_v8): DetachedBuffer (#14102)Aaron O'Mullan
2022-04-02feat(ops): #[op(unstable)] (#14124)Aaron O'Mullan
2022-03-311.20.4 (#14168)David Sherret
2022-03-27perf: micro-optimize core.encode (#14120)Divy Srivastava
2022-03-25chore: forward v1.20.3 release commit to main (#14121)Luca Casonato
2022-03-241.20.2Kitson Kelly
2022-03-22chore(core): Remove a note that is no longer relevant. (#14069)Andreu Botella
This note about how `v8::SnapshotCreator::create_blob` must not be called from a `HandleScope` stopped being relevant in #6801, and was now attached to code that had nothing to do with `HandleScope`s.
2022-03-22feat(core): disableable extensions & ops (#14063)Aaron O'Mullan
Streamlines a common middleware pattern and provides foundations for avoiding variably sized v8::ExternalReferences & enabling fully monomorphic op callpaths
2022-03-22feat(core): Add JsRuntime::get_module_namespace to access the namespace ↵Filip Kieres
object of a module (#14026)
2022-03-22feat: upgrade to swc_ecmascript 0.137.0 (#14067)David Sherret
2022-03-22fix(fetch): Fix uncaught rejection panic with ↵Andreu Botella
`WebAssembly.instantiateStreaming` (#13925) When an exception is thrown during the processing of streaming WebAssembly, `op_wasm_streaming_abort` is called. This op calls into V8, which synchronously rejects the promise and calls into the promise rejection handler, if applicable. But calling an op borrows the isolate's `JsRuntimeState` for the duration of the op, which means it is borrowed when V8 calls into `promise_reject_callback`, which tries to borrow it again, panicking. This change changes `op_wasm_streaming_abort` from an op to a binding (`Deno.core.abortWasmStreaming`). Although that binding must borrow the `JsRuntimeState` in order to access the `WasmStreamingResource` stored in the `OpTable`, it also takes ownership of that `WasmStreamingResource` instance, which means it can drop any borrows of the `JsRuntimeState` before calling into V8.
2022-03-21fix(core): variadic opSync/opAsync (#14062)Aaron O'Mullan
2022-03-20cleanup(core): drop op_void_async's state arg (#14045)Aaron O'Mullan
2022-03-20chore(core): update deno_core README (#14042)Divy Srivastava
Co-authored-by: Andreu Botella <andreu@andreubotella.com>
2022-03-19fix(ops): throw TypeError on op return failure (#14033)Aaron O'Mullan
Fixes #14028
2022-03-19chore(core,ext): minor JS optimisations (#13950)Aapo Alasuutari
2022-03-16v1.20.1Ryan Dahl
2022-03-16v1.20.0Ryan Dahl
2022-03-16cleanup(core): recursive get & ensure helpers (#13972)Aaron O'Mullan
2022-03-16feat(ops): optional OpState (#13954)Aaron O'Mullan
2022-03-16perf(web): Optimize `TextDecoder` by adding a new `U16String` type (#13923)Andreu Botella
2022-03-15cleanup(core): OpPair => OpDecl (#13952)Aaron O'Mullan
2022-03-15cleanup(core): remove void_op_a?sync (#13953)Aaron O'Mullan
In favour of `op_void_sync` & `op_void_async`
2022-03-15fix(core): nuke Deno.core.ops pre-snapshot (#13970)Aaron O'Mullan
To avoid OOB & other ExternalReference snapshot serialization issues Co-authored-by: Bert Belder <bertbelder@gmail.com>
2022-03-14feat(ops): custom arity (#13949)Aaron O'Mullan
Also cleanup & drop ignored wildcard op-args
2022-03-14fix(core): Don't override structured clone error messages from V8 (#13942)Andreu Botella
In the implementation of structured serialization in `Deno.core.serialize`, whenever there is a serialization error, an exception will be thrown with the message "Failed to serialize response", even though V8 provides a message to use in such cases. This change instead throws an exception with the V8-provided message, if there is one.
2022-03-14feat(core): codegen ops (#13861)Divy Srivastava
Co-authored-by: Aaron O'Mullan <aaron.omullan@gmail.com>
2022-03-12refactor(core): validate promise id in refOp (#13905)Yoshiya Hinosawa
2022-03-11chore: update rusty_v8 to 0.41.0 (#13909)Divy Srivastava
2022-03-10v1.19.3Yoshiya Hinosawa
2022-03-08feat(core): Event loop middlewares for Extensions (#13816)Divy Srivastava
2022-03-08perf(core): micro-optimize OpsTracker (#13868)Aaron O'Mullan
2022-03-05chore: update deps (#13821)Satya Rohith
2022-03-03chore: bump crate version for 1.19.2 (#13824)Satya Rohith
2022-02-25feat: deno test --trace-ops (#13770)Bartek Iwańczuk
This commit adds "--trace-ops" flag to "deno test" subcommand. This flag enables saving of stack traces for async ops, that before were always saved. While the feature proved to be very useful it comes with a significant performance hit, it's caused by excessive source mapping of stack frames.
2022-02-24chore: upgrade to Rust 1.59 (#13767)David Sherret
2022-02-24chore: bump crate versions for 1.19.1 (#13760)David Sherret
2022-02-24chore: upgrade swc_ecmascript to 0.114 (#13758)David Sherret