1
0
Fork 0
mirror of https://github.com/denoland/deno.git synced 2024-11-14 16:33:45 -05:00
Commit graph

39 commits

Author SHA1 Message Date
Kevin (Kun) "Kassimo" Qian
45d3b8955d Fix promise reject issue (#936) 2018-10-12 14:22:52 -04:00
Kitson Kelly
298d755152 Add support for --types 2018-10-11 20:29:43 -04:00
Kevin (Kun) "Kassimo" Qian
2b8cee9a49 Check thrown type, print String(...) if not instance of error (#939)
Fixes #935
2018-10-08 11:36:09 -04:00
Ryan Dahl
818ad37678 Rename fbs to msg. 2018-10-04 00:25:55 -04:00
Ryan Dahl
f774953011 Rename flatbuffer base.msg to base.inner
This better disambiguates with the msg_generated.ts module, which in JS
we call "fbs", but would be better called "msg".
2018-10-04 00:25:55 -04:00
Bartek Iwańczuk
3fe4be07ca Add flag --recompile (#801) 2018-09-24 15:33:50 -04:00
ztplz
f3684c28e5 Rename deno.argv, libdeno::DenoC and deno_set_flags (#796) 2018-09-22 08:47:44 -04:00
Ryan Dahl
3afc0b8482 fbs_util.ts -> dispatch.ts
And send() -> sendSync()
2018-09-10 00:14:28 -04:00
Ryan Dahl
a4f1b367b9 Remove namespace from src/msg.fbs 2018-09-09 23:12:22 -04:00
Ryan Dahl
0d03fafbfe Map promises onto futures.
Refactors handlers.rs

The idea is that all Deno "ops" (aka bindings) should map onto
a Rust Future. By setting the "sync" flag in the Base message
users can determine if the future is executed immediately or put
on the event loop.

In the case of async futures, a promise is automatically created.
Errors are automatically forwarded and raised.

TODO:

- The file system ops in src/handler.rs are not using the thread pool
  yet. This will be done in the future using tokio_threadpool::blocking.
  That is, if you try to call them asynchronously, you will get a promise
  and it will act asynchronous, but currently it will be blocking.
- Handlers in src/handler.rs returned boxed futures. This was to make
  it easy while developing. We should try to remove this allocation.
2018-09-09 18:47:22 -04:00
Mirko Jotic
fcdfacc2de Implementing --deps flag
- Adding a ModuleId type alias to specify original url or local file of
dependency
- Modifying ModuleMetaData class to contain ModuleId
- Adding a --deps flag
2018-09-06 10:42:07 -04:00
Ryan Dahl
45dafe15ee Refactor libdeno.send() code to reduce boilerplate.
Also removes assignCmdId as it's currently unused.
2018-08-31 10:43:11 -04:00
Ryan Dahl
722c7e4a1b Add deno.argv. 2018-08-27 17:51:24 -04:00
Yoshiya Hinosawa
17d6d6b336 refactor: add and use libdeno.setGlobalErrorHandler instead of window.onerror 2018-08-26 11:03:41 -04:00
Francesco Borzì
84c38f34ee Prevent circular imports in ts code (#576) 2018-08-25 15:42:49 -04:00
Ryan Dahl
e7cab71574
runtime.ts refactor into compiler.ts (#564)
Adds compiler_test.ts
2018-08-22 17:17:26 -04:00
Ryan Dahl
868e8d8866 First pass at fetch()
With help from Thomas Ghysels <info@thomasg.be>
2018-08-20 16:53:39 -04:00
Ryan Dahl
17b9c5c390
Command line flag parsing (#524)
In particular this allow -D for logging debug output.
2018-08-17 16:34:30 -04:00
Ryan Dahl
36d82374cf Implement deno_handle_msg_from_js in Rust
Fixes #419, #414.
2018-08-16 08:40:11 -04:00
Kitson Kelly
168d92f5d2 Use typescript strict mode (#505) 2018-08-15 12:40:30 -04:00
Ryan Dahl
fb87cb38ec
First pass at setTimeout with Tokio (#434) 2018-08-09 12:17:08 -07:00
Ryan Dahl
51380bf399 Organize libdeno functions. 2018-08-08 18:35:26 -07:00
Kitson Kelly
817380a2d9 Generate declarations 2018-08-08 04:17:46 -07:00
Ryan Dahl
c7c6203e61
Source map support (#429)
This change increases size:
out/debug/obj/libdeno/from_snapshot.o  19M -> 34M
out/release/deno                       32M -> 47M
2018-08-02 13:13:32 -04:00
Ryan Dahl
421358e7a9 Remove dispatch.ts and move assignCmdId to util.ts 2018-08-02 12:49:40 -04:00
Kitson Kelly
5562c36824 Remove msg_generated hack (#409) 2018-07-25 23:07:50 -04:00
Ryan Dahl
0213053856 Remove handlers crate target.
- Add build scripts for Rust flatbuffers.
- Rewrites some reply.cc methods in Rust.
- Changes some struct elements to table in msg.fbs (rust flatbuffers
  lacks support currently)
- Renames handlers_test to test_rs.
- This reorg is needed to make progress on the code cache handler.
2018-07-24 12:29:54 -04:00
Ryan Dahl
1de16af1f3 Change copyrights to be 'Deno authors'. 2018-07-24 10:38:11 -04:00
Kitson Kelly
845f7215db
Replace packer with rollup 2018-07-22 03:16:17 +02:00
Ryan Dahl
3e51605bc9 Execute JS for the first time in Rust rewrite.
Implements code_fetch handler in Rust.

Add ability to embed string assets (for typescript declaration files)

Remove deno_cc and deno_cc_nosnapshot targets.
2018-07-18 15:43:50 -04:00
Bert Belder
24b0e91d80
Move buffers between V8 and native
* send()/recv() now operate on TypedArrays rather than ArrayBuffers.

* Remove a copy (through ArrayBuffer.slice()) from the send path.

* Remove a copy (through v8::ArrayBuffer::New()) from the return path.

* After moving a buffer from JS to native, the ArrayBuffer object and
  it's views are made inaccessible ('neutered').

* `struct deno_buf` now holds two [ptr, length] tuples, one for the actual
  memory allocation, and one for the logical data contained therein.
  This is necessary because flatbuffers fills it's buffer bottom-up, so
  the serialized blob doesn't start at beginning of the buffer, but
  somewhere in the middle.
2018-07-12 21:26:38 +02:00
Bert Belder
8a17db8266
Add 'command id' field to messages
This allows for correlating response messages to the command message that
caused them.
2018-07-08 21:01:24 +02:00
Ryan Dahl
a2dde56c59 Remove channel parameter from deno_send/recv. 2018-07-06 18:25:09 -04:00
Ryan Dahl
9778eceaf5 Use C++ to do flatbuffer parsing.
- Port protobuf messages to flatbuffers.
- Demo linking to rust from C++ executable.
- Start using the prototype TS libraries.
2018-07-06 17:33:06 -04:00
Ryan Dahl
fe404dfce9 Import ts file from prototype without change
From commit 559453cf6c
Excluding v8worker.d.ts, main.ts, and deno.d.ts.

Updates tslint.json to be original settings.
2018-07-06 12:22:11 -04:00
Ryan Dahl
06a28998ea Replace protobufs with flatbuffers 2018-07-04 16:43:08 -04:00
Ryan Dahl
a33f575cda Switch back to recv/send instead of pub/sub for low-level API. 2018-07-03 21:22:39 +02:00
Parsa Ghadimi
235e549035 Add tslint 2018-07-01 21:41:53 +02:00
Yoshiya Hinosawa
ea35281d63 chore: move //src/js to //js
refs: #285
2018-07-01 17:22:36 +02:00
Renamed from src/js/main.ts (Browse further)