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

17 commits

Author SHA1 Message Date
Bartek Iwańczuk
99a0c6df79
reorg: cli/js/compiler/, move more API to cli/js/web/ (#4310)
- moves compiler implementation to "cli/js/compiler/" directory
- moves more APIs to "cli/js/web":
    * "console.ts"
    * "console_table.ts"
    * "performance.ts"
    * "timers.ts"
    * "workers.ts"
- removes some dead code from "cli/js/"
2020-03-11 10:53:06 +01:00
Nayeem Rahman
6443e4aed1
refactor: Cleanup options object parameters (#4296) 2020-03-10 12:08:58 -04:00
Bartek Iwańczuk
886f330ec8
reorg: move JS ops implementations to cli/js/ops/, part 2 (#4283)
Following JS ops were moved to separate files in cli/js/ops directory:
- io
- process
- worker_host
- web_worker
- plugins
- timers
- signal
- permissions
2020-03-09 15:18:02 +01:00
Bartek Iwańczuk
1b6f831875
reorg: move JS ops implementations to cli/js/ops/, part 1 (#4264)
Following JS ops were moved to separate files in cli/js/ops directory:
- compiler
- dispatch_json
- dispatch_minimal
- errors
- fetch
- fs_events
- os
- random
- repl
- resources
- runtime_compiler
- runtime
- tty
2020-03-08 13:09:22 +01:00
Bartek Iwańczuk
2e59007214 move Web APIs to cli/js/web/ 2020-03-05 18:48:55 +01:00
Ryan Dahl
91b606aaae
Clean up how we use opIds (#4118) 2020-02-25 09:14:27 -05:00
Bartek Iwańczuk
79b3bc05d6
workers: basic event loop (#3828)
* establish basic event loop for workers
* make "self.close()" inside worker
* remove "runWorkerMessageLoop() - instead manually call global function 
  in Rust when message arrives. This is done in preparation for structured clone
* refactor "WorkerChannel" and use distinct structs for internal 
  and external channels;  "WorkerChannelsInternal" and "WorkerHandle"
* move "State.worker_channels_internal" to "Worker.internal_channels"
* add "WorkerEvent" enum for child->host communication; 
  currently "Message(Buf)" and  "Error(ErrBox)" variants are supported
* add tests for nested workers
* add tests for worker throwing error on startup
2020-02-11 10:04:59 +01:00
Ryan Dahl
ed680552a2
fix: basic web worker message passing (#3893)
Removes OP_HOST_GET_WORKER_LOADED, OP_HOST_POLL_WORKER, 
OP_HOST_RESUME_WORKER and ready/messageBuffer in cli/js/workers.ts.
2020-02-05 17:16:07 -05:00
Bartek Iwańczuk
161adfc51b
workers: proper TS libs, more spec-compliant APIs (#3812)
* split lib.deno_main.d.ts into:
  - lib.deno.shared_globals.d.ts
  - lib.deno.window.d.ts
  - lib.deno.worker.d.ts
* remove no longer used libs:
  - lib.deno_main.d.ts
  - lib.deno_worker.d.ts
* change module loading to use proper TS library for compilation
* align to Worker API spec:
  - Worker.terminate()
  - self.close()
  - self.name
2020-01-29 18:54:23 +01:00
Bartek Iwańczuk
7966bf14c0
refactor: split worker and worker host logic (#3722)
* split ops/worker.rs into ops/worker_host.rs and ops/web_worker.rs

* refactor js/workers.ts and factor out js/worker_main.ts - entry point for WebWorker runtime

* BREAKING CHANGE: remove support for blob: URL in Worker

* BREAKING CHANGE: remove Deno namespace support and noDenoNamespace option in Worker constructor

* introduce WebWorker struct which is a stripped down version of cli::Worker
2020-01-21 09:49:47 +01:00
Kitson Kelly
60b53fd6b6 Use globalThis to reference global scope (#3719)
Co-authored-by: Bartek Iwańczuk <biwanczuk@gmail.com>
2020-01-20 09:30:30 -05:00
Bartek Iwańczuk
5fa056e53b workers: minimal error handling and async module loading (#3665) 2020-01-17 18:43:53 -05:00
Ry Dahl
bfab4ed0df
Happy new year! (#3578) 2020-01-02 15:13:47 -05:00
Kitson Kelly
9837d324a7 Update to TypeScript 3.7 (#3275)
and update to prettier 1.19

Also, update `assert()` and remove not null assertions where possibly
in `cli`.

Closes #3273
2019-11-13 13:42:34 -05:00
Bartek Iwańczuk
335e8bd33c refactor: worker is no longer a resource (#3290) 2019-11-09 12:07:14 -08:00
Bartek Iwańczuk
0049d4e50c Refactor Worker and ThreadSafeState (#3242)
* Split ThreadSafeState into State and GlobalState. State is a "local"
  state belonging to "Worker" while "GlobalState" is state shared by
  whole program.
* Update "Worker" and ops to use "GlobalState" where applicable
* Move and refactor "WorkerChannels" resource
2019-11-04 10:38:52 -05:00
Ryan Dahl
b81e5db17a
Merge deno_cli_snapshots into deno_cli (#3064) 2019-10-04 20:28:51 -04:00
Renamed from js/workers.ts (Browse further)