1
0
Fork 0
mirror of https://github.com/denoland/deno.git synced 2024-11-01 09:24:20 -04:00
Commit graph

34 commits

Author SHA1 Message Date
Maayan Hanin
edb7a0eead
fix(cli): panic when stdio is null on windows (#6528)
Fixes: #6409
2020-07-09 21:06:51 +02:00
Casper Beyer
1e0808d501
fix: Deno.readSync on stdin (#6126)
Currently sync operations on stdin are failing because tokio::Stdin
cannot be converted to a std::File.

This commit replaces tokio::stdin with a raw file descriptor 
wrapped in a std::fs::File which can be converted to a 
tokio::File and back again making the synchronous version 
of op_read actually work.
2020-06-09 18:29:12 +02:00
Valentin Anger
becbb56b19
feat(core): Ops can take several zero copy buffers (#4788) 2020-06-01 14:20:47 -04:00
Ryan Dahl
d4b05dd89e
refactor: Split isolate and state using safe get_slot() (#5929) 2020-05-29 17:41:39 -04:00
Ryan Dahl
d8711155ca
Rename deno_core::Isolate to deno_core::CoreIsolate (#4851) 2020-04-23 11:51:07 +02:00
Ryan Dahl
cc1720132a
Move resource_table from deno::State to deno_core::Isolate (#4834) 2020-04-21 09:48:44 -04:00
EnokMan
47617e60d5
feat: startTLS (#4773) 2020-04-18 11:21:20 -04:00
Ryan Dahl
fab0204cbf
Make writeSync, readSync, seekSync, openSync, isatty proper synchronous syscalls (#4762) 2020-04-15 20:43:19 -04:00
João Souto
70a5034431
feat: Support Unix Domain Sockets (#4176) 2020-03-23 18:02:51 -04:00
Gurwinder Singh
8077ade741
refactor: remove an unsafe and some boxing (#4398) 2020-03-16 10:46:31 -07:00
João Souto
fb5c31416d
Add waker to StreamResource to fix hang on close bugs (#4293) 2020-03-11 18:19:24 -04:00
Ryan Dahl
54a1688868
Allow BadResource errors to take a custom message (#4251) 2020-03-05 08:30:41 -05:00
Bartek Iwańczuk
7fff2d2d1e
remove Read/Write futures, use poll_fn instead (#4150) 2020-02-26 22:06:20 +01:00
Kevin (Kun) "Kassimo" Qian
5946808f66
tty: Deno.setRaw(rid, mode) to turn on/off raw mode (#3958) 2020-02-26 01:01:24 -05:00
Ryan Dahl
91b606aaae
Clean up how we use opIds (#4118) 2020-02-25 09:14:27 -05:00
Bartek Iwańczuk
4e1abb4f3a
refactor: use OpError instead of ErrBox for errors in ops (#4058)
To better reflect changes in error types in JS from #3662 this PR changes 
default error type used in ops from "ErrBox" to "OpError".

"OpError" is a type that can be sent over to JSON; it has all 
information needed to construct error in JavaScript. That
made "GetErrorKind" trait useless and so it was removed altogether.

To provide compatibility with previous use of "ErrBox" an implementation of
"From<ErrBox> for OpError" was added, however, it is an escape hatch and
ops implementors should strive to use "OpError" directly.
2020-02-23 14:51:29 -05:00
Bartek Iwańczuk
cdba5ab6fc refactor: rename ThreadSafeState, use RefCell for mutable state (#3931)
* rename ThreadSafeState to State
* State stores InnerState wrapped in Rc and RefCell
2020-02-08 20:34:31 +01:00
Bert Belder
25467aa7c7
Add blanket impl for the 'Resource' trait (#3903) 2020-02-07 17:18:28 -08:00
Ryan Dahl
161cf7cdfd
refactor: Use Tokio's single-threaded runtime (#3844)
This change simplifies how we execute V8. Previously V8 Isolates jumped
around threads every time they were woken up. This was overly complex and
potentially hurting performance in a myriad ways. Now isolates run on
their own dedicated thread and never move.

- blocking_json spawns a thread and does not use a thread pool
- op_host_poll_worker and op_host_resume_worker are non-operational
- removes Worker::get_message and Worker::post_message
- ThreadSafeState::workers table contains WorkerChannel entries instead
  of actual Worker instances.
- MainWorker and CompilerWorker are no longer Futures.
- The multi-threaded version of deno_core_http_bench was removed.
- AyncOps no longer need to be Send + Sync

This PR is very large and several tests were disabled to speed
integration:
- installer_test_local_module_run
- installer_test_remote_module_run
- _015_duplicate_parallel_import
- _026_workers
2020-02-03 18:08:44 -05:00
Ryan Dahl
5e32c5ea44
s/PinnedBuf/ZeroCopyBuf (#3782) 2020-01-24 15:10:49 -05:00
Ry Dahl
76e44ddfd0
Rename crates: 'deno' to 'deno_core' and 'deno_cli' to 'deno' (#3600) 2020-01-05 11:56:18 -05:00
Gurwinder Singh
b0761138e5 Remove unnecessary use of Pin, use ready! (#3576) 2020-01-02 13:11:33 -05:00
Bartek Iwańczuk
4258ed262f
refactor: move HttpBody to cli/http_util.rs (#3569) 2019-12-31 15:09:58 +01:00
Bartek Iwańczuk
46d76a7562
upgrade: Tokio 0.2 (#3418) 2019-12-30 14:57:17 +01:00
Bartek Iwańczuk
8f9a942cb9 Use futures 0.3 API (#3358) 2019-11-16 19:17:47 -05:00
Bartek Iwańczuk
8b90b8e883 refactor: per-worker resource table, take 2 (#3342)
- removes global `RESOURCE_TABLE` - resource tables are now created per `Worker`
  in `State`
- renames `CliResource` to `StreamResource` and moves all logic related
  to it to `cli/ops/io.rs`
- removes `cli/resources.rs`
- adds `state` argument to `op_read` and `op_write` and consequently adds
  `stateful_minimal_op` to `State`
- IMPORTANT NOTE: workers don't have access to process stdio - this is
  caused by fact that dropping worker would close stdout for process
  (because it's constructed from raw handle, which closes underlying file
  descriptor on drop)
2019-11-14 12:10:25 -05:00
Ryan Dahl
fdf0ede2ac Revert "refactor: per-worker resource table (#3306)"
This patch does not work with the recent bundler changes (#3325).
Unfortunately I didn't merge master before landing this patch. It has
something to do with console.log not working inside the compiler worker.

This reverts commit fd62379eaf.
2019-11-13 23:42:35 -05:00
Bartek Iwańczuk
fd62379eaf refactor: per-worker resource table (#3306)
- removes global `RESOURCE_TABLE` - resource tables are now created per `Worker`
  in `State`
- renames `CliResource` to `StreamResource` and moves all logic related
  to it to `cli/ops/io.rs`
- removes `cli/resources.rs`
- adds `state` argument to `op_read` and `op_write` and consequently adds
  `stateful_minimal_op` to `State`
- IMPORTANT NOTE: workers don't have access to process stdio - this is
  caused by fact that dropping worker would close stdout for process
  (because it's constructed from raw handle, which closes underlying file
  descriptor on drop)
2019-11-13 22:16:57 -05:00
Bartek Iwańczuk
25c276055b refactor: remove cli::resources::Resource (#3285) 2019-11-07 11:11:15 -05:00
Ryan Dahl
97d8498d46
Add init methods for each op module (#3087) 2019-10-11 11:41:54 -07:00
Bartek Iwańczuk
2a83327a21 fix: replace bad rid panics with errors (#2870) 2019-09-10 00:59:40 -04:00
Ryan Dahl
bdc97b3976
Organize dispatch a bit (#2796)
Just some clean up reorganization around flatbuffer/minimal dispatch
code. This is prep for adding a JSON dispatcher.
2019-08-21 20:42:48 -04:00
Ryan Dahl
81f809f2a6 Revert "Remove dead code: legacy read/write ops"
This is causing a segfault for unknown reasons - see #2787.

This reverts commit 498f6ad431.
2019-08-16 14:41:08 -04:00
Ryan Dahl
498f6ad431
Remove dead code: legacy read/write ops (#2776)
readSync and writeSync use dispatch_minimal now.
2019-08-14 19:54:35 -04:00