0
0
Fork 0
mirror of https://github.com/denoland/deno.git synced 2024-10-31 09:14:20 -04:00
Commit graph

7960 commits

Author SHA1 Message Date
David Sherret
c3b04683c5
refactor(cli): consolidate most MainWorker related code to the same place (#15459) 2022-08-11 16:59:12 -04:00
denobot
e4a5f9952f
chore: forward v1.24.3 release commit to main (#15462)
Co-authored-by: David Sherret <dsherret@gmail.com>
2022-08-11 16:47:03 -04:00
Bartek Iwańczuk
10ce2e9e80
refactor(ext/node): remove several TODOs (#15452) 2022-08-11 16:44:01 +02:00
Aapo Alasuutari
2164f6b1eb
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 15:56:56 +02:00
Mathias Lafeldt
883269f1f1
chore: move lint rules to cargo config for better editor integration (#15453) 2022-08-11 19:13:27 +05:30
Nayeem Rahman
25a1cc1b28
refactor(core): unwrap sync ops in rust (#15449) 2022-08-11 11:57:20 +02:00
David Sherret
321a42d1fb
refactor(runtime): split up MainWorker and WebWorker's preload_module method into two separate methods (#15451) 2022-08-10 18:10:51 -04:00
Nayeem Rahman
578f12d531
fix(cli): allow configurations files to also be json modules (#15444)
Closes #15440
2022-08-11 07:33:42 +10:00
David Sherret
d9fae38d1e
feat: add initial internal npm client and dependency resolver (#15446) 2022-08-10 15:23:58 -04:00
Leo Kettmeir
d0ffa0beb5
fix(permissions): ignore empty values (#15447) 2022-08-10 21:13:53 +02:00
Kayla Washburn
08061b60d9
fix: allow setting globalThis.location when no --location is provided (#15448) 2022-08-10 12:57:30 -06:00
Andreu Botella
f16fe44303
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-10 20:04:20 +02:00
sigmaSd
5b2ae25f13
feat(repl): add color to functions for syntax highlighting (#15434) 2022-08-10 12:39:16 -04:00
Cre3per
afc29c28ae
fix(task): subcommand parser skips global args (#15297) 2022-08-10 11:55:34 -04:00
Luca Casonato
bdd8ddbe4c
fix(ext/ffi): unstable op_ffi_unsafe_callback_ref (#15439) 2022-08-10 08:39:45 +05:30
David Sherret
04d402116c
chore: temporarily disable ext/node and use unstable ops (#15438) 2022-08-09 22:09:51 -04:00
David Sherret
d6f789eb05
chore: temporarily disable op_require_read_file (#15433) 2022-08-09 17:28:13 -04:00
Kitson Kelly
1c2ec1f48f
fix: update deno_graph to fix importing config as JSON module (#15388)
Ref: denoland/deno_graph#166
2022-08-10 07:27:22 +10:00
Bartek Iwańczuk
1f54d87789
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-09 21:06:01 +02:00
David Sherret
af618e3b8f
chore: make the start_release workflow go faster (#15416) 2022-08-08 19:31:45 -04:00
Divy Srivastava
daaa509ee5
chore(ext/ffi): remove flaky test (#15426) 2022-08-08 22:45:24 +05:30
David Sherret
102595976f
chore: use gist for release instruction checklist (#15414) 2022-08-06 09:45:34 -04:00
David Sherret
888b26819e
fix: various formatting fixes (#15412) 2022-08-05 19:31:19 -04:00
Aapo Alasuutari
9c594de0ff
feat(ext/ffi): Add static method variants to Deno.UnsafePointerView (#15146) 2022-08-05 21:57:12 +05:30
Aapo Alasuutari
569910856e
fix(ext/ffi): Check CStr for UTF-8 validity on read (#15318)
Co-authored-by: Phosra <phosra@tutanota.com>
2022-08-05 21:56:54 +05:30
SahAssar
6e6912489c
feat(ext/fetch): Add socks proxy support (#15372) 2022-08-05 12:49:25 +02:00
Nayeem Rahman
bfdce3cc35
chore(tools): update wpt setup to new spawn api (#15407) 2022-08-05 12:48:54 +02:00
denobot
cf33720a85
chore: forward v1.24.2 release commit to main (#15410) 2022-08-05 00:10:47 +02:00
Nayeem Rahman
34328690dc
fix(test): output parallel test results independently (#15399) 2022-08-04 12:38:40 -04:00
Leo Kettmeir
e1297b1a28
fix: increase websocket message size (#15406) 2022-08-04 18:29:04 +02:00
David Sherret
8f102e49c1
fix(vendor): existing import map with bare specifier in remote (#15390) 2022-08-04 09:39:14 -04:00
Yongwook Choi
2138b68c24
fix: Update Object.prototype.__proto__ related comments (#15394) 2022-08-04 08:39:16 +05:30
David Sherret
8b03c1e6cc
fix(vendor): error on dynamic imports that fail to load instead of panicking (#15391) 2022-08-03 21:23:45 -04:00
Leo Kettmeir
864af52a1b
fix(ext/webgpu): use correct IDL key name (#15278) 2022-08-04 01:00:51 +02:00
Bartek Iwańczuk
bc4ee59246
chore(compat): update list of supported modules (#15397) 2022-08-03 15:56:48 +02:00
Zach
00b51ca94b
core: remove heapStats type definition (#15393) 2022-08-03 14:41:44 +02:00
Nayeem Rahman
2e2c623882
fix(test): race condition for cancelled tests (#15233) 2022-08-02 10:55:11 -04:00
Kitson Kelly
0b3b2e198d
chore: add perf and needs investigation to stalebot (#15381) 2022-08-02 10:40:14 +10:00
Kitson Kelly
09d14b1b57
fix(lsp): use correct commit chars for completions (#15366)
Fixes: #15252
2022-08-02 08:54:17 +10:00
Outvi V
924aa31fa8
fix(lsp): remove excessive line breaks in status page (#15364)
Fixes #15359
2022-08-02 08:29:05 +10:00
Nayeem Rahman
96290f1a66
refactor(core/error): use evaluated call sites for formatting (#15369) 2022-08-01 17:17:55 +02:00
Bartek Iwańczuk
03377ca1d2
chore: cycle cache key (#15371) 2022-08-01 14:18:34 +02:00
Zicklag
d81c5b51b3
core: Add types for Deno.core.print() (#15283) 2022-07-31 22:15:29 +02:00
David Sherret
2703996dea
refactor(emit/cache): move cli version into emit hash (#15348) 2022-07-30 12:09:12 -04:00
David Sherret
ef5653be98
refactor: reuse FastInsecureHasher in get_check_hash (#15354) 2022-07-30 11:43:03 -04:00
Bartek Iwańczuk
20a89d46c4
fix(core): BorrowMutError in nested error (#15352) 2022-07-30 16:09:42 +02:00
Mathias Lafeldt
3f0dcd3b80
docs: turn bare URLs into clickable links (#15347) 2022-07-30 12:20:29 +02:00
Mathias Lafeldt
9e917834dd
chore: use Rust 1.62.1 (#15346) 2022-07-29 18:21:05 -04:00
David Sherret
b676cab0b4
fix(compat): use mjs extension for stream/promises (#15341) 2022-07-29 15:48:03 -04:00
Colin Ihrig
088bc52db0
Forward 1.24.1 to main (#15333) (#15336)
1.24.1 (#15333)

Co-authored-by: cjihrig <cjihrig@users.noreply.github.com>
2022-07-29 08:44:46 -04:00