1
0
Fork 0
mirror of https://github.com/denoland/deno.git synced 2024-11-15 16:43:44 -05:00
Commit graph

207 commits

Author SHA1 Message Date
Ryan Dahl
71efe6f2c5 v0.22.0 2019-10-28 14:12:12 -04:00
Bartek Iwańczuk
029e833075 core: Add ResourceTable (#3150) 2019-10-23 12:32:28 -04:00
EnokMan
7c60ab4664 refactor DenoPermissions.check_net & resolve_addr (#3182) 2019-10-23 10:19:26 -04:00
Bartek Iwańczuk
6257b4044a core: gracefully handle bad op id (#3131) 2019-10-22 10:49:58 -04:00
Ryan Dahl
4e88ba9a11 v0.21.0 2019-10-19 18:46:02 -04:00
Kevin (Kun) "Kassimo" Qian
eff2a27bd0 feat: Allow "deno eval" to run code as module (#3148) 2019-10-19 17:19:19 -04:00
Bartek Iwańczuk
54db12c4d9 perf: fairer ops scheduling (#3128) 2019-10-15 14:12:27 -07:00
Bartek Iwańczuk
4221b90c3f perf: eager poll async ops in Isolate (#3046) 2019-10-14 17:46:27 -04:00
Ryan Dahl
a4b27db21a v0.20.0 2019-10-07 12:57:29 -04:00
Ryan Dahl
bed7034fc4
Upgrade V8 to 7.9.218 (#3067) 2019-10-06 10:08:16 -04:00
Christian Moritz
33e3ff5de8 remove appveyor specific code paths (#3071) 2019-10-05 21:19:00 -04:00
Andy Hayden
f7bbd71e21 Update rust to 1.38.0 (#3030) 2019-10-03 09:16:06 -04:00
Bartek Iwańczuk
a569be861a remove legacy Isolate.set_dispatch API (#3041)
* migrate deno_typescript crate to Isolate.register_op API
* remove dual-dispatch mechanism
* update Isolate tests to new dispatch mechanism
2019-10-02 13:05:48 -04:00
Bartek Iwańczuk
ffbf0c20cc feat: op registration in core (#3002) 2019-09-30 14:59:44 -04:00
Ryan Dahl
3892cf5901 v0.19.0 2019-09-25 10:58:35 -04:00
Ryan Dahl
a497f87b59
Upgrade V8 for top-level-await (#3015) 2019-09-24 18:37:04 -04:00
Ryan Dahl
c9ef182886
Make deno_cli installable via crates.io (#2946)
- Fixes cargo publish on deno_typescript, deno_cli_snapshots, and
  deno_cli.
- Combines cli_snapshots and js into one directory.
- Extracts TS version at compile time rather than runtime
- Bumps version awkwardly - it was necessary to test end-to-end
  publishing. Sorry.
- Adds git submodule deno_typescript/typescript
2019-09-15 18:36:27 -04:00
Christian Moritz
9c282d6a0e
Move GN root into //core/libdeno (#2943) 2019-09-15 22:12:12 +02:00
Ryan Dahl
7e3296dad9 v0.18.0 2019-09-13 16:40:08 -04:00
Bert Belder
ac68f628d2
Upgrade rust crates 2019-09-13 00:38:02 +02:00
Bartek Iwańczuk
c03cdcc939 feat: add bindings to run microtasks from Isolate (#2793) 2019-09-12 15:13:08 -04:00
Bartek Iwańczuk
945dc7b84b fix: panic during fetch (#2925) 2019-09-11 17:34:22 -04:00
Yoshiya Hinosawa
f12acdb50b Update @typescript-eslint/* to v2.1.0 (#2878) 2019-09-07 12:27:18 -04:00
Bert Belder
699d2ae4bb
build: on windows, don't pass -glldb to clang (#2874) 2019-09-06 18:43:48 -07:00
Ryan Dahl
acaff6d056
Remove tools/build.py (#2865)
Testing regression: ASAN build removed.
2019-09-06 20:32:58 -04:00
Ryan Dahl
82588ec09c v0.17.0 2019-09-04 17:15:32 -04:00
Bartek Iwańczuk
5c7c876a71 perf: less aggresive dyn import polling (#2858) 2019-09-04 10:37:21 -04:00
Ryan Dahl
d43b43ca78
Refactor snapshot build (#2825)
Instead of using core/snapshot_creator.rs, instead two crates are
introduced which allow building the snapshot during build.rs.

Rollup is removed and replaced with our own bundler. This removes
the Node build dependency. Modules in //js now use Deno-style imports
with file extensions, rather than Node style extensionless imports.

This improves incremental build time when changes are made to //js files
by about 40 seconds.
2019-09-02 17:07:11 -04:00
Kevin (Kun) "Kassimo" Qian
fdd4252d49 Add window.queueMicrotask (#2844) 2019-08-31 15:16:30 -04:00
Bert Belder
177727d730
third_party: downgrade 'url' crate to version 1.7.2 2019-08-29 10:45:09 -07:00
Ryan Dahl
725eb98105
Clean up various flatbuffer references (#2819) 2019-08-26 22:29:51 -04:00
Bartek Iwańczuk
017f88ee99 fix: shared queue requires aligned buffer (#2816) 2019-08-26 07:48:40 -04:00
Ryan Dahl
0809b06a39 v0.16.0 2019-08-22 15:11:22 -07:00
Bert Belder
7f9c6decc8
third_party: upgrade rust crates 2019-08-22 14:22:25 -07:00
Bartek Iwańczuk
b764d1b8ff fix: dynamic import panic (#2792) 2019-08-21 17:18:39 -04:00
Ryan Dahl
de713e42c8
Upgrade to rust 1.37.0 (#2786) 2019-08-16 20:49:00 -04:00
Ryan Dahl
58f0e9b9b1 v0.15.0 2019-08-13 18:35:04 -04:00
Ryan Dahl
1f8b1a587c
Dynamic import should respect permissions (#2764) 2019-08-13 14:51:15 -04:00
Kevin (Kun) "Kassimo" Qian
286ee1d8b6 Fix dynamic import base path problem for REPL and eval (#2757) 2019-08-09 16:33:59 -07:00
Bert Belder
83d5362f1d
v0.14.0 2019-08-09 03:03:27 +02:00
Bert Belder
6fbf2e9624
Dynamic import (#2516) 2019-08-09 01:19:45 +02:00
Ryan Dahl
e438ac2c74
Add op_id throughout op API (#2734)
Removes the magic number hack to switch between flatbuffers and the
minimal dispatcher.

Adds machinery to pass the op_id through the shared_queue.
2019-08-07 14:02:29 -04:00
Ryan Dahl
43d099c027
Fix incremental 'cargo build' (#2740)
Tip: RUSTC_WRAPPER should be unset for incremental builds to work.
2019-08-06 20:32:54 -04:00
Ryan Dahl
046cccfe17
Remove dispatch optimization (#2732)
Deno.core.dispatch() used to push the "control" buf onto the shared
array buffer before calling into V8, with the idea that it was one less
argument to parse. Turns out there is no more overhead passing the
control ArrayBuffer directly over. Furthermore this optimization was
making the refactors outlined in #2730 more complex. Therefore it is
being removed.
2019-08-05 20:12:15 -04:00
Kevin (Kun) "Kassimo" Qian
ddee2dff14 Provide option to delete Deno namespace in worker (#2717) 2019-08-05 07:23:41 -04:00
Bert Belder
c6861b537e
third_party: upgrade rust crates 2019-08-02 18:59:54 +02:00
Ryan Dahl
3971dcfe10
Use system rustfmt instead of fixed binary (#2701) 2019-07-31 17:11:37 -04:00
Ryan Dahl
b3541c38f5 v0.13.0 2019-07-31 15:09:06 -04:00
Bartek Iwańczuk
ac269beabe feat: add debug info to ModuleResolutionError (#2697) 2019-07-30 14:34:57 +00:00
Bert Belder
1406961d2b
Add error handling for dynamic imports to libdeno (#2678) 2019-07-24 01:57:32 +02:00
andy finch
621af21e6e only use Locker when calling into js (#2665) 2019-07-18 20:23:14 -04:00
andy finch
042484d45a remove v8::Locker from deno_respond (#2664) 2019-07-18 18:40:46 -04:00
andy finch
056c146175 Fix expected dyn before AnyError trait (#2663) 2019-07-18 23:48:44 +02:00
Ryan Dahl
4e248ecda9 v0.12.0 2019-07-16 16:08:50 -04:00
Bert Belder
abe8a113ad Refactor error to use dynamic dispatch and traits
This is in preperation for dynamic import (#1789), which is more easily
implemented when errors are dynamic.
2019-07-11 14:37:00 -04:00
Ryan Dahl
52c0764e4f
Upgrade v8 to 7.7.200 (#2624) 2019-07-09 14:03:06 -04:00
Bartek Iwańczuk
d641782c82 Rewrite snapshot_creator in Rust 2019-07-08 18:18:28 -04:00
Bert Belder
f4c9b31405
core: replace ModuleSpecifier::to_url() by as_url() 2019-07-08 23:04:07 +02:00
Bartek Iwańczuk
72d9045528
cli: refactor deno_dir to use Url instead of String 2019-07-08 13:07:32 +02:00
Bert Belder
9b1997b8b6
core: clearly define when module lookup is path-based vs URL-based
The rules are now as follows:

* In `import` statements, as mandated by the WHATWG specification,
  the import specifier is always treated as a URL.
  If it is a relative URL, it must start with either / or ./ or ../

* A script name passed to deno as a command line argument may be either
  an absolute URL or a local path.
  - If the name starts with a valid URI scheme followed by a colon, e.g.
    'http:', 'https:', 'file:', 'foo+bar:', it always interpreted as a
    URL (even if Deno doesn't support the indicated protocol).
  - Otherwise, the script name is interpreted as a local path. The local
    path may be relative, and operating system semantics determine how
    it is resolved. Prefixing a relative path with ./ is not required.
2019-07-08 13:07:32 +02:00
Ryan Dahl
92ac616708 v0.11.0 2019-07-07 12:17:46 -04:00
Bert Belder
32cde32e54 core: return useful error when import path has no prefix like ./ 2019-06-30 19:46:32 +02:00
Ryan Dahl
c56df45355 v0.10.0 2019-06-25 07:09:46 -07:00
Gurwinder Singh
6fa6828e5f Minor tweaks (#2569)
1. Separate Snapshot and Script StartupData functions based on cfg "no-snapshot-init"
2. Replace deprecated Once::ONCE_INIT with Once::new (https://github.com/rust-lang/rust/pull/61757)
3. Elide lifetime
4. Fix typos
2019-06-23 04:49:49 -07:00
Ryan Dahl
f2c50fae84
Fix silent failure of WebAssembly.instantiate() (#2548)
By making WASM compilation synchronous. We'll have to do more work to
make it properly async.
2019-06-20 09:04:34 -07:00
Kitson Kelly
425df50484 Combine CLI Errors (#2487) 2019-06-19 19:07:01 -07:00
Kitson Kelly
ed390a51ca Add dyn to be rust nightly compatible (#2538) 2019-06-18 06:28:56 -07:00
andy finch
76d51b0f9a refactor dispatch take 2 (#2533) 2019-06-17 18:02:08 -07:00
Ryan Dahl
7b06aa3734 v0.9.0 2019-06-15 09:04:57 -07:00
Bert Belder
77737707e4
third_party: upgrade rust crates 2019-06-15 15:20:02 +02:00
Ryan Dahl
1361e30223 Revert "Refactor dispatch handling (#2452)"
Due to performance regression:
dc60fe9f30 (commitcomment-33943711)

This reverts commit dc60fe9f30.
2019-06-14 13:56:36 -07:00
andy finch
dc60fe9f30 Refactor dispatch handling (#2452)
Promise id is now created in core and passed back to JS.
2019-06-13 20:43:54 -07:00
Bartek Iwańczuk
bca5cc5041 Move ModuleSpecifier to //core (#2509) 2019-06-12 16:55:59 -07:00
Ryan Dahl
2a5138a516
Remove Config struct from core (#2502)
It's unnecessary indirection and is preventing the ability to easily
pass isolate references into the dispatch and dyn_import closures.

Note: this changes how StartupData::Script is executed. It's no longer done
during Isolate::new() but rather lazily on first poll or execution.
2019-06-12 10:53:24 -07:00
Bert Belder
878d092df9
Revert "Work around Windows-only V8 concurrent initialization crash"
This fix is no longer necessary as the underlying V8 bug has been
fixed upstream.

This reverts commit 48bcfce09e.
2019-06-11 23:17:41 +02:00
Ryan Dahl
523ab6a929
Upgrade V8 to 7.7.37 (#2492) 2019-06-10 18:49:30 -04:00
Ryan Dahl
e043697521
Expose dynamic import in core (#2472) 2019-06-10 15:27:34 -04:00
Bartek Iwańczuk
a115340288 feat: Import maps (#2360) 2019-06-09 09:08:20 -04:00
Ryan Dahl
d60bdb6350 v0.8.0 2019-06-08 15:16:34 -04:00
Michał Sabiniarz
9bea576f3e Deno.core.evalContext & Deno.core.print fix (#2465) 2019-06-06 21:51:04 -04:00
Ryan Dahl
cbcb78f188
libdeno: expose dynamic import (#2461) 2019-06-06 19:07:47 -04:00
Ryan Dahl
e152dae006
RecursiveLoad shouldn't own the Isolate (#2453)
This patch makes it so that RecursiveLoad doesn't own the Isolate, so
Worker::execute_mod_async does not consume itself.

Previously Worker implemented Loader, but now ThreadSafeState does.

This is necessary preparation work for dynamic import (#1789) and import
maps (#1921)
2019-06-05 16:35:38 -04:00
Bert Belder
1540b36ce7
third_party: upgrade rust crates 2019-05-30 11:28:05 -07:00
Ryan Dahl
5265bd7cb1 v0.7.0 2019-05-29 18:42:49 -04:00
Ryan Dahl
856c44213b TS compiler refactor
* 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-29 07:53:39 -04:00
Ryan Dahl
22feb74ba1 v0.6.0 2019-05-20 15:22:08 -04:00
Ryan Dahl
9620b20ede Adjust core/README.md text 2019-05-20 15:22:08 -04:00
Bert Belder
3d6f0a85af
build: add support for rust proc-macro crates 2019-05-16 20:33:25 -07:00
Ryan Dahl
23aca36d52 v0.5.0 2019-05-11 17:19:21 -04:00
Nikola Ristic
551b56dd85 Typo (#2337) 2019-05-11 16:10:19 -04:00
Bert Belder
c0341cb1af
third_party: upgrade rust crates 2019-05-11 05:03:03 +02:00
Bert Belder
369a7ec94e
core: make PinnedBuf::Raw -> PinnedBuf conversion actually a move 2019-05-11 03:13:29 +02:00
Bartek Iwańczuk
1fc61f3b6a core: Privatize ModuleNameMap SymbolicModule deno_buf (#2324) 2019-05-09 16:44:30 -04:00
Ryan Dahl
2aae09c2b8 v0.4.0 2019-05-03 19:33:50 -04:00
Ryan Dahl
3b1e2f1ad4 v0.3.11 2019-05-03 18:05:41 -04:00
Bert Belder
8999517421
core,cli: fix clippy warnings 2019-05-03 03:29:42 +02:00
Bert Belder
48bcfce09e
Work around Windows-only V8 concurrent initialization crash
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-02 20:46:56 +02:00
Bert Belder
ae0544b7ce core: remove support for moving deno_buf ownership from C++ to JavaScript
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-02 06:25:44 +02:00
Ryan Dahl
c171813e89
core: express op as enum (#2255) 2019-05-01 18:22:32 -04:00
Bert Belder
41c7e96f1a
Refactor zero-copy buffers for performance and to prevent memory leaks
* 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-01 21:11:09 +02:00