Commit graph

76 commits

Author SHA1 Message Date
Bartek Iwańczuk
459162fc6e add --no-fetch CLI flag to prevent remote downloads (#2213) 2019-05-03 11:09:51 -04:00
Bartek Iwańczuk
bf9b0c8231 Fix: deno --v8-options does not print v8 options (#2277) 2019-05-03 08:59:52 -04:00
Ryan Dahl
00ac871607
Optimize read and write ops (#2259) 2019-05-03 00:06:43 -04:00
Bert Belder
8999517421
core,cli: fix clippy warnings 2019-05-03 03:29:42 +02:00
Kurt Mackey
c05cbc8eac Add Request global constructor (#2253) 2019-05-01 23:56:42 -04:00
Kevin (Kun) "Kassimo" Qian
1dd30f658f doc: add long about messages for subcommands (#2264)
Type deno <subcommand> -h to view descriptions.
2019-05-01 19:15:36 -04: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
Bartek Iwańczuk
8978870808 Rename test targets (#2262) 2019-05-01 09:48:56 -04:00
Kevin (Kun) "Kassimo" Qian
7237e9d34a fs: add Deno.utime/Deno.utimeSync (#2241) 2019-05-01 05:08:11 -04:00
Ryan Dahl
6c137342d7
flags: fix merge error (#2244) 2019-04-29 18:35:25 -07:00
Bartek Iwańczuk
636827a1d5 Rewrite flags.rs::parse_flags (#2237) 2019-04-29 16:43:06 -07:00
Kitson Kelly
1a0f53a807 Add support for custom tsconfig.json (#2089)
Use `--config`
2019-04-29 07:58:31 -07:00
Ryan Dahl
1af02b405e
Revert "recover: #1517 Kill all pending accepts when TCP listener is closed (#2224)" (#2239)
Crashes while running wrk against
js/deps/https/deno.land/std/http/http_bench.ts

This reverts commit 972ac03858.
2019-04-28 14:15:15 -07:00
Yusuke Sakurai
972ac03858 recover: #1517 Kill all pending accepts when TCP listener is closed (#2224) 2019-04-27 11:33:24 -07:00
Bartek Iwańczuk
02596c08bd disable --version flag from deno version (#2226) 2019-04-27 11:19:50 -07:00
Ryan Dahl
40d8ef1ec9 v0.3.10 2019-04-25 13:59:18 -06:00
Bartek Iwańczuk
aa85a4d288 Rename CLI flags to subcommands (#2212) 2019-04-25 12:59:49 -06:00
Ryan Dahl
b426ecce80
compile lib.deno_runtime.d.ts into executable (#2209) 2019-04-25 12:27:30 -06:00
Bartek Iwańczuk
b7d8a0c6f6 Rename deno prefetch to deno fetch (#2210) 2019-04-25 13:47:33 -04:00
Ryan Dahl
e725b26b28 v0.3.9 2019-04-25 17:44:34 +02:00
Ryan Dahl
d68b44b6b2
core: make Isolate concrete, remove Dispatch trait (#2183)
Op dispatch is now dynamically dispatched, so slightly less efficient.
The immeasurable perf hit is a reasonable trade for the API simplicity
that is gained here.
2019-04-23 18:58:00 -04:00
Ryan Dahl
675919e915
Use tokio_threadpool's new panic_handler (#2188) 2019-04-23 16:27:44 -04:00
Bert Belder
6caf865507
third_party: upgrade rust crates 2019-04-23 18:01:57 +02:00
Kevin (Kun) "Kassimo" Qian
1d4b92ac85 Add Deno.kill(pid, signo) and process.kill(signo) (Unix only) (#2177) 2019-04-21 21:26:56 -04:00
Bartek Iwańczuk
cd19da62d9 Refactor CLI entry point (#2157)
Changes "deno --types" to "deno types"
and "deno --prefetch" to "deno prefetch"
2019-04-21 11:34:18 -04:00
Ryan Dahl
0796a8f2f7 v0.3.8 2019-04-19 11:41:13 -04:00
Ryan Dahl
5e5c8553e7
core: test Modules::deps and handle error cases better (#2141) 2019-04-19 11:18:46 -04:00
Kevin (Kun) "Kassimo" Qian
afabb3f833 Fix redirects under async load (#2133) 2019-04-18 21:33:50 -04:00
Bert Belder
8477daa8b9
Fix clippy warnings 2019-04-17 15:35:46 +02:00
Bert Belder
90c2b10f47
Add cli dependency on tokio-rustls 2019-04-17 14:02:20 +02:00
Ryan Dahl
1bfb443369
Implement async module loading in CLI (#2084) 2019-04-16 15:13:42 -04:00
Bert Belder
97f0fe7437
third_party: upgrade rust crates 2019-04-15 18:56:29 +02:00
Ryan Dahl
c7e1f8fabd
Fix silent error, add custom panic handler (#2098)
This is to work around Tokio's panic recovery feature.
Ref https://github.com/tokio-rs/tokio/issues/495
Ref https://github.com/tokio-rs/tokio/issues/209
Ref https://github.com/denoland/deno/issues/1311
Fixes #2097
2019-04-14 16:07:24 -04:00
Yoshiya Hinosawa
635ad2a18e fix absolute path resolution from remote (#2109) 2019-04-13 13:27:27 -04:00
Bartek Iwańczuk
591b5e4a7d Add deno eval subcommand (#2102) 2019-04-13 13:24:15 -04:00
andy finch
d3bd5879c3 better wait for removed_from_resource_table_on_close test (#2104) 2019-04-12 18:39:31 -04:00
Ryan Dahl
8584d80cfd v0.3.7 2019-04-11 15:35:21 -04:00
andy finch
960ee5257a Improve op dispatch (#2088) 2019-04-11 10:58:31 -04:00
Bartek Iwańczuk
1034d9723d fix --v8-options (#2093) 2019-04-11 10:20:07 -04:00
Bert Belder
4ffe1612ff Silence clippy warnings and format source code 2019-04-09 20:05:47 +02:00
Bert Belder
fe2f3ba889 Use correct type for source_bytes when buiding in check-only mode 2019-04-09 20:05:47 +02:00
Ryan Dahl
d2579f4564
core: Rename Behavior to Dispatch (#2082)
And rename IsolateState to ThreadSafeState.

Also make ThreadSafeState directly implement Dispatch. This is simpler.
2019-04-09 13:11:25 -04:00
Ryan Dahl
2debbdacb9
Merge Worker and Isolate types (#2078)
Reduces generics.
2019-04-08 17:10:00 -04:00
Vincent LE GOFF
734cf781c6 Allow high precision performance.now() (#1977) 2019-04-08 16:22:40 -04:00
Ryan Dahl
f7fdb90fd5
core: snapshot improvements (#2052)
* Moves how snapshots are supplied to the Isolate. Previously they were
  given by Behavior::startup_data() but it was only called once at
  startup. It makes more sense (and simplifies Behavior) to pass it to the
  constructor of Isolate.
* Adds new libdeno type deno_snapshot instead of overloading
  deno_buf.
* Adds new libdeno method to delete snapshot deno_snapshot_delete().
* Renames deno_get_snapshot() to deno_snapshot_new().
* Makes StartupData hold references to snapshots. This was implicit when
  it previously held a deno_buf but is made explicit now. Note that
  include_bytes!() returns a &'static [u8] and we want to avoid
  copying that.
2019-04-08 10:12:43 -04:00
Kevin (Kun) "Kassimo" Qian
1746a3ac69 Add link/linkSync fs call for hardlinks (#2074) 2019-04-08 09:11:32 -04:00
Bartek Iwańczuk
86aee7f137 Flags clean up: DenoFlags::from (#2068) 2019-04-07 14:58:16 -04:00
Bartek Iwańczuk
780e72ab6a Refactor CLI flag parsing (#2025) 2019-04-07 01:13:06 +03:00
andy finch
07f0d077c7 add compile_async (#2053) 2019-04-05 00:04:06 -04:00