summaryrefslogtreecommitdiff
path: root/js/main.ts
AgeCommit message (Collapse)Author
2019-02-10Rationalise startup for compiler/main (#1737)Kitson Kelly
2019-02-08Adds deno.noColor (#1716)Ryan Dahl
2019-01-28Split out compiler snapshot (#1566)Kitson Kelly
Speeds up startup time, reduces runtime heap size.
2019-01-13Cleanup compiler and re-enable tests (#1512)Kitson Kelly
2019-01-09Re-enable --recompile (#1492)Ryan Dahl
2019-01-09Native ES modules (#1460)Ryan Dahl
* Native ES modules This is a major refactor of internal compiler. Before: JS and TS both were sent through the typescript compiler where their imports were parsed and handled. Both compiled to AMD JS and finally sent to V8 Now: JS is sent directly into V8. TS is sent through the typescript compiler, but tsc generates ES modules now instead of AMD. This generated JS is then dumped into V8. This should much faster for pure JS code. It may improve TS compilation speed. In the future this allows us to separate TS out of the runtime heap and into its own dedicated snapshot. This will result in a smaller runtime heap, and thus should be faster. Some tests were unfortunately disabled to ease landing this patch: 1. compiler_tests.ts which I intend to bring back in later commits. 2. Some text_encoding_test.ts tests which made the file invalid utf8. See PR for a discussion. Also worth noting that this is necessary to support WASM
2019-01-06Revert "Split Runner from Compiler" (#1462)Ryan Dahl
This reverts commit 3d03f5b0cb3c513e449f3aaa5d35c493b72f47b4.
2019-01-06Add deno.pid (#1464)Ryan Dahl
2018-12-06Process source maps in Rust instead of JS (#1280)Ryan Dahl
- Improves speed and binary size significantly. - Makes deno_last_exception() output a JSON structure. - Isolate::execute and Isolate::event_loop now return structured, mapped JSError objects on errors. - Removes libdeno functions: libdeno.setGlobalErrorHandler() libdeno.setPromiseRejectHandler() libdeno.setPromiseErrorExaminer() In collaboration with Ryan Dahl.
2018-11-20Split Runner from CompilerKitson Kelly
2018-11-16Support shebangRyan Dahl
2018-11-09Ensure global type instances are available.Kitson Kelly
2018-11-06Improve preparing stack tracesKitson Kelly
2018-11-05Decode main.js.map during snapshotting.Ryan Dahl
Pro: time ./out/debug/deno tests/error_001.ts 3.0s -> 0.4s Con: time ./tool/build.py snapshot 33s -> 1m52s out/debug/gen/snapshot_deno.bin 39M -> 121M
2018-11-05Add repl (#998)Andy Hayden
- Running repl from js side. - Add tests for repl behavior. - Handle ctrl-C and ctrl-D.
2018-10-26Remove broken feature: --depsRyan Dahl
2018-10-17Optimization: Reuse ArrayBuffer during serialization.Ryan Dahl
2018-10-15`deno -v` should report typescript versionJinho Bang
Fixes #993
2018-10-12Fix promise reject issue (#936)Kevin (Kun) "Kassimo" Qian
2018-10-11Add support for --typesKitson Kelly
2018-10-08Check thrown type, print String(...) if not instance of error (#939)Kevin (Kun) "Kassimo" Qian
Fixes #935
2018-10-04Rename fbs to msg.Ryan Dahl
2018-10-04Rename flatbuffer base.msg to base.innerRyan Dahl
This better disambiguates with the msg_generated.ts module, which in JS we call "fbs", but would be better called "msg".
2018-09-24Add flag --recompile (#801)Bartek Iwańczuk
2018-09-22Rename deno.argv, libdeno::DenoC and deno_set_flags (#796)ztplz
2018-09-10fbs_util.ts -> dispatch.tsRyan Dahl
And send() -> sendSync()
2018-09-09Remove namespace from src/msg.fbsRyan Dahl
2018-09-09Map promises onto futures.Ryan Dahl
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-06Implementing --deps flagMirko Jotic
- 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-08-31Refactor libdeno.send() code to reduce boilerplate.Ryan Dahl
Also removes assignCmdId as it's currently unused.
2018-08-27Add deno.argv.Ryan Dahl
2018-08-26refactor: add and use libdeno.setGlobalErrorHandler instead of window.onerrorYoshiya Hinosawa
2018-08-25Prevent circular imports in ts code (#576)Francesco Borzì
2018-08-22runtime.ts refactor into compiler.ts (#564)Ryan Dahl
Adds compiler_test.ts
2018-08-20First pass at fetch()Ryan Dahl
With help from Thomas Ghysels <info@thomasg.be>
2018-08-17Command line flag parsing (#524)Ryan Dahl
In particular this allow -D for logging debug output.
2018-08-16Implement deno_handle_msg_from_js in RustRyan Dahl
Fixes #419, #414.
2018-08-15Use typescript strict mode (#505)Kitson Kelly
2018-08-09First pass at setTimeout with Tokio (#434)Ryan Dahl
2018-08-08Organize libdeno functions.Ryan Dahl
2018-08-08Generate declarationsKitson Kelly
2018-08-02Source map support (#429)Ryan Dahl
This change increases size: out/debug/obj/libdeno/from_snapshot.o 19M -> 34M out/release/deno 32M -> 47M
2018-08-02Remove dispatch.ts and move assignCmdId to util.tsRyan Dahl
2018-07-25Remove msg_generated hack (#409)Kitson Kelly
2018-07-24Remove handlers crate target.Ryan Dahl
- 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-24Change copyrights to be 'Deno authors'.Ryan Dahl
2018-07-22Replace packer with rollupKitson Kelly
2018-07-18Execute JS for the first time in Rust rewrite.Ryan Dahl
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-12Move buffers between V8 and nativeBert Belder
* 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-08Add 'command id' field to messagesBert Belder
This allows for correlating response messages to the command message that caused them.