Commit Graph

7707 Commits

Author SHA1 Message Date
denobot
c791270614
1.24.3 (#15460)
Co-authored-by: David Sherret <dsherret@gmail.com>
2022-08-11 14:38:32 -04:00
Bartek Iwańczuk
3c81b86b36 refactor(ext/node): remove several TODOs (#15452) 2022-08-11 13:29:18 -04:00
Aapo Alasuutari
81394482e5 perf(ops): Monomorphic sync op calls (#15337)
Welcome to better optimised op calls! Currently opSync is called with parameters of every type and count. This most definitely makes the call megamorphic. Additionally, it seems that spread params leads to V8 not being able to optimise the calls quite as well (apparently Fast Calls cannot be used with spread params).

Monomorphising op calls should lead to some improved performance. Now that unwrapping of sync ops results is done on Rust side, this is pretty simple:

```
opSync("op_foo", param1, param2);
// -> turns to
ops.op_foo(param1, param2);
```

This means sync op calls are now just directly calling the native binding function. When V8 Fast API Calls are enabled, this will enable those to be called on the optimised path.

Monomorphising async ops likely requires using callbacks and is left as an exercise to the reader.
2022-08-11 13:29:18 -04:00
Mathias Lafeldt
372d222096 chore: move lint rules to cargo config for better editor integration (#15453) 2022-08-11 13:29:18 -04:00
Nayeem Rahman
add6aaa7ae refactor(core): unwrap sync ops in rust (#15449) 2022-08-11 13:29:18 -04:00
David Sherret
3479e7b223 refactor(runtime): split up MainWorker and WebWorker's preload_module method into two separate methods (#15451) 2022-08-11 13:29:18 -04:00
Nayeem Rahman
ae7b6a4ca3 fix(cli): allow configurations files to also be json modules (#15444)
Closes #15440
2022-08-11 13:29:18 -04:00
David Sherret
71cefe1ed8 feat: add initial internal npm client and dependency resolver (#15446) 2022-08-11 13:29:17 -04:00
Leo Kettmeir
a6cc7be5a1 fix(permissions): ignore empty values (#15447) 2022-08-11 13:29:17 -04:00
Kayla Washburn
123e68c380 fix: allow setting globalThis.location when no --location is provided (#15448) 2022-08-11 13:29:17 -04:00
Andreu Botella
1c94d97d79 feat(core): Add support for async ops in realms (#14734)
Pull request #14019 enabled initial support for realms, but it did not
include support for async ops anywhere other than the main realm. The
main issue was that the `js_recv_cb` callback, which resolves promises
corresponding to async ops, was only set for the main realm, so async
ops in other realms would never resolve. Furthermore, promise ID's are
specific to each realm, which meant that async ops from other realms
would result in a wrong promise from the main realm being resolved.

This change creates a `ContextState` struct, similar to
`JsRuntimeState` but stored in a slot of each `v8::Context`, which
contains a `js_recv_cb` callback for each realm. Combined with a new
list of known realms, which stores them as `v8::Weak<v8::Context>`,
and a change in the `#[op]` macro to pass the current context to
`queue_async_op`, this makes it possible to send the results of
promises for different realms to their realm, and prevent the ID's
from getting mixed up.

Additionally, since promise ID's are no longer unique to the isolate,
having a single set of unrefed ops doesn't work. This change therefore
also moves `unrefed_ops` from `JsRuntimeState` to `ContextState`, and
adds the lengths of the unrefed op sets for all known realms to get
the total number of unrefed ops to compare in the event loop.

Co-authored-by: Luis Malheiro <luismalheiro@gmail.com>
2022-08-11 13:29:17 -04:00
Cre3per
473c1a48c9 fix(task): subcommand parser skips global args (#15297) 2022-08-11 13:27:40 -04:00
Luca Casonato
be930a9954 fix(ext/ffi): unstable op_ffi_unsafe_callback_ref (#15439) 2022-08-11 13:27:40 -04:00
David Sherret
962f1a0b0b chore: temporarily disable ext/node and use unstable ops (#15438) 2022-08-11 13:27:39 -04:00
David Sherret
882731b954 chore: temporarily disable op_require_read_file (#15433) 2022-08-11 13:27:39 -04:00
Kitson Kelly
999b36955c fix: update deno_graph to fix importing config as JSON module (#15388)
Ref: denoland/deno_graph#166
2022-08-11 13:27:39 -04:00
Bartek Iwańczuk
bb358c4364 feat: add ext/node for require support (#15362)
This commit adds "ext/node" extension that implementes CommonJS module system.

In the future this extension might be extended to actually contain implementation of
Node compatibility layer in favor of "deno_std/node".

Currently this functionality is not publicly exposed, it is available via "Deno[Deno.internal].require"
namespace and is meant to be used by other functionality to be landed soon.

This is a minimal first pass, things that still don't work:

support for dynamic imports in CJS
conditional exports
2022-08-11 13:27:39 -04:00
David Sherret
b87e231f31 chore: make the start_release workflow go faster (#15416) 2022-08-11 13:27:38 -04:00
Divy Srivastava
001f31d759 chore(ext/ffi): remove flaky test (#15426) 2022-08-11 13:27:38 -04:00
David Sherret
fb1f210bb8 chore: use gist for release instruction checklist (#15414) 2022-08-11 13:27:38 -04:00
David Sherret
35bc8c53ed fix: various formatting fixes (#15412) 2022-08-11 13:27:38 -04:00
Aapo Alasuutari
7ac58719ab feat(ext/ffi): Add static method variants to Deno.UnsafePointerView (#15146) 2022-08-11 13:27:37 -04:00
Aapo Alasuutari
770d1f1715 fix(ext/ffi): Check CStr for UTF-8 validity on read (#15318)
Co-authored-by: Phosra <phosra@tutanota.com>
2022-08-11 13:27:37 -04:00
SahAssar
74b8859c83 feat(ext/fetch): Add socks proxy support (#15372) 2022-08-11 13:27:37 -04:00
Nayeem Rahman
67f75091ca chore(tools): update wpt setup to new spawn api (#15407) 2022-08-11 13:27:37 -04:00
denobot
44ade24fb2
1.24.2 (#15409) 2022-08-04 22:49:24 +02:00
Nayeem Rahman
96702b5e48
fix(test): output parallel test results independently (#15399) 2022-08-04 21:29:55 +02:00
Leo Kettmeir
18b5debc3f
fix: increase websocket message size (#15406) 2022-08-04 21:29:53 +02:00
David Sherret
967b7f8b5b
fix(vendor): existing import map with bare specifier in remote (#15390) 2022-08-04 21:29:40 +02:00
Yongwook Choi
2205d9345e
fix: Update Object.prototype.__proto__ related comments (#15394) 2022-08-04 21:29:36 +02:00
David Sherret
fc04f8a03d
fix(vendor): error on dynamic imports that fail to load instead of panicking (#15391) 2022-08-04 21:28:52 +02:00
Leo Kettmeir
2728c8fdf1
fix(ext/webgpu): use correct IDL key name (#15278) 2022-08-04 21:28:47 +02:00
Bartek Iwańczuk
e7e7119ab6
chore(compat): update list of supported modules (#15397) 2022-08-04 21:28:43 +02:00
Zach
1e7d699eeb
core: remove heapStats type definition (#15393) 2022-08-04 21:28:40 +02:00
Nayeem Rahman
850a98ce25
fix(test): race condition for cancelled tests (#15233) 2022-08-04 21:28:37 +02:00
Kitson Kelly
58409d24bd
chore: add perf and needs investigation to stalebot (#15381) 2022-08-04 21:28:30 +02:00
Kitson Kelly
6305c9ce1f
fix(lsp): use correct commit chars for completions (#15366)
Fixes: #15252
2022-08-04 21:24:36 +02:00
Outvi V
95fc447012
fix(lsp): remove excessive line breaks in status page (#15364)
Fixes #15359
2022-08-04 21:23:45 +02:00
Nayeem Rahman
5ceaecbae4
refactor(core/error): use evaluated call sites for formatting (#15369) 2022-08-04 21:15:21 +02:00
Bartek Iwańczuk
b50088c247
chore: cycle cache key (#15371) 2022-08-04 21:15:17 +02:00
Zicklag
6ed2bf4043
core: Add types for Deno.core.print() (#15283) 2022-08-04 21:15:13 +02:00
David Sherret
14f74e706e
refactor(emit/cache): move cli version into emit hash (#15348) 2022-08-04 21:15:10 +02:00
David Sherret
ef6968116f
refactor: reuse FastInsecureHasher in get_check_hash (#15354) 2022-08-04 21:15:07 +02:00
Bartek Iwańczuk
f3a496214c
fix(core): BorrowMutError in nested error (#15352) 2022-08-04 21:14:59 +02:00
Mathias Lafeldt
f1a80fb212
docs: turn bare URLs into clickable links (#15347) 2022-08-04 21:12:13 +02:00
Mathias Lafeldt
ad5358ca34
chore: use Rust 1.62.1 (#15346) 2022-08-04 21:12:09 +02:00
David Sherret
838e783a93
fix(compat): use mjs extension for stream/promises (#15341) 2022-08-04 21:12:03 +02:00
Divy Srivastava
4d52f092bc
perf(ext/ffi): use fast api calls for 64bit return types (#15313) 2022-08-04 21:11:52 +02:00
Divy Srivastava
a1b989c842
perf(ext/ffi): support Uint8Array in fast calls (#15319) 2022-08-04 21:11:49 +02:00
Aapo Alasuutari
210e1445f2
chore(ext/ffi): Remove unnecessary byte_offset conditional slicing (#15320) 2022-08-04 21:10:43 +02:00