Age | Commit message (Collapse) | Author |
|
To better distinguish the deno_core crate from the executable deno,
which will now be called "the cli" internally.
|
|
Re-enables arm64 CI test
|
|
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
|
|
This is in preperation for core integration.
|
|
|
|
|
|
Refactored permissions to be assignable on a per-isolate
basis, and added a fix for #1858 to op_fetch_module_meta_data.
|
|
src/js_errors.rs takes care of source maps and color while
core/js_errors.rs is just the basic struct.
|
|
A new low-level crate with focus on speed.
This doesn't yet hook into the existing code base.
|
|
|
|
|
|
|
|
|
|
Move module stuff into its own file.
|
|
Co-authored-by: Greg Altman <g.s.altman@gmail.com>
|
|
|
|
|
|
and deno_respond
|
|
|
|
Allows for future asynchronous module loading.
Add support for import.meta.url
Fixes #1496
|
|
|
|
|
|
|
|
|
|
|
|
|
|
* 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
|
|
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.
|
|
When we called js_filename.as_ptr() without using CString it wasn't
necessarally null terminated, which was creating spurious failures.
|
|
|
|
|
|
|
|
|
|
|
|
- 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.
|
|
`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.
|
|
In preperation for adding other callbacks to libdeno.
|
|
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.
|
|
|
|
|
|
|
|
|
|
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.
|
|
|
|
|
|
|
|
|
|
Run with: cargo clippy
https://github.com/rust-lang-nursery/rust-clippy
|
|
|
|
|