summaryrefslogtreecommitdiff
path: root/src/isolate.rs
AgeCommit message (Collapse)Author
2019-03-19Rename //src/ to //cli/ (#1962)Ryan Dahl
To better distinguish the deno_core crate from the executable deno, which will now be called "the cli" internally.
2019-03-18Re-implement init scripts in core (#1958)andy finch
Re-enables arm64 CI test
2019-03-18Integrate //core into existing code baseRyan Dahl
This disables a few tests which are broken still: - tests/error_004_missing_module.test - tests/error_005_missing_dynamic_import.test - tests/error_006_import_ext_failure.test - repl_test test_set_timeout - repl_test test_async_op - repl_test test_set_timeout_interlaced - all of permission_prompt_test
2019-03-12Make timers act like normal opsRyan Dahl
This is in preperation for core integration.
2019-03-07Remove 'deno' builtin module (#1895)Kitson Kelly
2019-03-04`use-snapshots` build option for cross compile support. (#1852)andy finch
2019-03-01Permissions refactor (#1864)andy finch
Refactored permissions to be assignable on a per-isolate basis, and added a fix for #1858 to op_fetch_module_meta_data.
2019-02-28Use deno_core::JSError in deno (#1855)Ryan Dahl
src/js_errors.rs takes care of source maps and color while core/js_errors.rs is just the basic struct.
2019-02-26deno_core (#1827)Ryan Dahl
A new low-level crate with focus on speed. This doesn't yet hook into the existing code base.
2019-02-26Add import.meta.main (#1835)Bartek IwaƄczuk
2019-02-26Updated some type assertions to work with other libc implementations. (#1837)andy finch
2019-02-18Add window.locationRyan Dahl
2019-02-18Rationalise compiler ops (#1740)Kitson Kelly
2019-02-08Add deps to --info output. (#1720)Ryan Dahl
Move module stuff into its own file.
2019-02-08Add --allow-read (#1689)Dmitry Sharshakov
Co-authored-by: Greg Altman <g.s.altman@gmail.com>
2019-02-06fix: do not load cache files when recompile flag is set (#1695)jingweicai
2019-02-02Better error message for bad filename CLI argument.Ryan Dahl
2019-02-02Clean up return value of deno_executeRyan Dahl
and deno_respond
2019-02-01src: simplify rust codeBert Belder
2019-01-30Refactor libdeno ES module interface. (#1624)Ryan Dahl
Allows for future asynchronous module loading. Add support for import.meta.url Fixes #1496
2019-01-24Minor code cleanups (#1570)JaePil Jung
2019-01-18Avoid crashes on ES module resolution when module not found (#1546)Kevin (Kun) "Kassimo" Qian
2019-01-15 Add --prefetch flag for deps prefetch without running (#1475)Kevin (Kun) "Kassimo" Qian
2019-01-15Clippy fixes (also fixes build with nightly) (#1527)Bert Belder
2019-01-14Update to rust 2018 editionAndy Hayden
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-08Minimal Worker support (#1476)Ryan Dahl
This adds the ability to spawn additional Isolates from Rust and send and receive messages from them. This is preliminary work to support running the typescript compiler in a separate isolate and thus support native ES modules. Ref #975.
2019-01-08Isolate::execute_mod wrap filename in CString (#1479)Ryan Dahl
When we called js_filename.as_ptr() without using CString it wasn't necessarally null terminated, which was creating spurious failures.
2019-01-03Add rust binding and test for deno_execute_mod()Ryan Dahl
2019-01-02Happy new year!Ryan Dahl
2018-12-13Check that IsolateState is thread safe. (#1321)Ryan Dahl
2018-12-13Merge deno_new_snapshotter behavior into deno_new (#1318)Ryan Dahl
2018-12-11Use default filename for Isolate::execute.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-12-05Isolate::from_raw_ptr and other cleanups.F001
`Isolate::from_void_ptr` is renamed to `from_raw_ptr`, to keep consistency with std libs. It is changed to `unsafe` function, because it can't guarantee that the input is valid. This guarantee should be provided by the caller. Its return type is changed to `&Isolate`, because `&mut Isolate` type requires that no other aliases co-exist in this period of time, this does not seem true. So I changed most of the methods to accept shared reference `&Isolate`. It is easier to reason about the correctness of `unsafe` blocks. As long as these shared references are in the same thread, these `unsafe` codes are probably correct.
2018-12-04Add deno_config struct for isolate creation. (#1277)Ryan Dahl
In preperation for adding other callbacks to libdeno.
2018-12-04Remove static lifetime bound in OpCreator (#1276)F001
The main purpose of this PR is to remove the `'static` lifetime bound in type OpCreator = fn(state: &Arc<IsolateState>, base: &msg::Base, data: &'static mut [u8]) -> Box<Op>; The reason is simple: it is plain wrong, the `data` is actually not `'static`. It is created when the message is sent from C side, and will be recycled when the message is responded. It violates the definition of `'static` lifetime. If someone save this pointer somewhere else, and reuse it later again, uninitialized memory could be accessed. This kind of memory unsafety does not happen yet because the logic is carefully organized in this project. Lifetime constraints are maintained by code convention. It could be more robust if we can express this constraint by Rust's type system. Basic idea: tie buffer's lifetime to an object's lifetime, a.k.a, RAII. The type `deno_buf` is pretty suitable for this job.
2018-12-03Avoid memory leak (#1265)F001
2018-11-30clippy fixes (#1250)Andy Hayden
2018-11-29Replace mutex by atomics (#1238)F001
2018-11-27Don't use snapshot for src/isolate.rs tests.Ryan Dahl
2018-11-23Revert "Use include_bytes! instead of incbin. (#1182)"Ryan Dahl
Reverting because this is causing Appveyor to be red. However I hope we can reintroduce include_bytes! soon in a way that works on windows. Fixes #1208. This reverts commits 96c3641fffe8509af9351cec4580861e76d89cc9 and 92e404706b0b1a26cdaf6f8cf81aac148292557f.
2018-11-16First pass at running subprocesses (#1156)Bert Belder
2018-11-16Lift snapshot to be an argument of Isolate::new().Ryan Dahl
2018-11-12Use include_bytes! instead of incbin. (#1182)Ryan Dahl
2018-11-06Fix many of the clippy::pedantic warningsAndy Hayden
2018-11-04Fix clippy warnings (#1149)Andy Hayden
Run with: cargo clippy https://github.com/rust-lang-nursery/rust-clippy
2018-10-27Ergonomics: Prompt TTY for permission escalation (#1081)Ryan Dahl
2018-10-24Add libdeno.shared global shared ArrayBuffer.Ryan Dahl