Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

The long road to rusty_v8 #3556

Merged
merged 85 commits into from
Jan 5, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
85 commits
Select commit Hold shift + click to select a range
80fbac7
WIP remove core/libdeno
ry Dec 27, 2019
88c8385
fmt
ry Dec 27, 2019
6b11883
fix
ry Dec 27, 2019
0cc5243
Implement deno_init
ry Dec 27, 2019
03c75aa
rusty_v8 0.0.17
ry Dec 27, 2019
42bfa5e
wip
ry Dec 27, 2019
2588321
wip
ry Dec 27, 2019
2a3a40f
wip
ry Dec 29, 2019
6981764
wip
ry Dec 29, 2019
fb77bd5
progress
ry Dec 30, 2019
3cece9d
WIP
ry Dec 30, 2019
14ddf54
WIP
ry Dec 30, 2019
fbabace
ModuleInfo
ry Dec 30, 2019
2ca2b11
deno_mod_imports_len works
ry Dec 30, 2019
9804eb0
test_js passes
ry Dec 30, 2019
243d3d7
first pass at handle_exception
ry Dec 30, 2019
11f6e65
handle_exception WIP
ry Dec 31, 2019
fe24302
Merge remote-tracking branch 'origin/master' into rusty_v8
ry Dec 31, 2019
15cb344
progress
ry Dec 31, 2019
d08cea3
cargo.lock
ry Dec 31, 2019
48e2e7c
deno_lock and deno_unlock
ry Jan 2, 2020
3f72e05
deno_throw_exception
ry Jan 2, 2020
079fedb
Merge branch 'master' into rusty_v8
ry Jan 2, 2020
cd2d965
deno_clear_last_exception
ry Jan 2, 2020
10a0c9b
initialize_context
ry Jan 2, 2020
09fd9de
serialize exceptions
bartlomieju Jan 2, 2020
6581b2a
handle exception during terminate execution
bartlomieju Jan 2, 2020
8a0385b
Fix Deno.core assignmetn
ry Jan 2, 2020
48b3c31
add shared_
ry Jan 2, 2020
add661a
wip modules
bartlomieju Jan 2, 2020
2bd039f
modules
bartlomieju Jan 2, 2020
94abd97
port recv,error_to_json
bartlomieju Jan 2, 2020
037db70
Merge branch 'master' into rusty_v8
ry Jan 2, 2020
963ad2c
wip shared getter
bartlomieju Jan 2, 2020
3c092cf
shared_ab_ working
bartlomieju Jan 2, 2020
b7f2079
cleanup
bartlomieju Jan 2, 2020
0782617
WIP Deno.core.send
bartlomieju Jan 3, 2020
733eb12
unsafe v8::SharedArrayBuffer::new_DEPRECATED
ry Jan 3, 2020
20b4ee2
make it build
ry Jan 3, 2020
c2d8986
add UserDataScope
bartlomieju Jan 3, 2020
3b163b6
use UserDataScope in module callbacks
bartlomieju Jan 3, 2020
ef45adf
Update PinnedBuf and implement a bit more of send()
piscisaureus Jan 3, 2020
77e8d2c
Fix crash in pre_dispatch()
piscisaureus Jan 3, 2020
3c4f181
deno_respond and deno_import_buf
bartlomieju Jan 3, 2020
d0e1867
dispose isolate and global handles
bartlomieju Jan 3, 2020
ca259f8
first test green 🔥
bartlomieju Jan 3, 2020
6c49a63
some progress on deno_new_snapshotter
ry Jan 3, 2020
d020f78
pass tests for terminated execution and mods
bartlomieju Jan 3, 2020
f35988a
test_pre_dispatch working
bartlomieju Jan 3, 2020
2d42ba7
import meta object callback
bartlomieju Jan 3, 2020
75d299a
implement Deno.core.print
bartlomieju Jan 3, 2020
161c777
make progress on snapshotting
ry Jan 3, 2020
fada169
isolate::tests::will_snapshot ... ok
ry Jan 3, 2020
6d44ca6
deno_set_v8_flags
ry Jan 3, 2020
d213da7
Fix startup_script, deno_core_http_bench works
ry Jan 3, 2020
185ee94
all crates build now
ry Jan 3, 2020
d486bb6
dyn imports
bartlomieju Jan 3, 2020
6c568a0
add DenoIsolate.pending_promise_map_
bartlomieju Jan 2, 2020
9ed5277
port eval_context
bartlomieju Jan 3, 2020
bcec307
queue microtasks
bartlomieju Jan 3, 2020
9107a58
try to get further in build
ry Jan 4, 2020
fc92a38
Remove v8 and cpplint from third_party
ry Jan 4, 2020
bd7e6c3
lint
bartlomieju Jan 4, 2020
85dfeb8
Fix loading snapshots
piscisaureus Jan 4, 2020
9bdc209
message_callback
bartlomieju Jan 4, 2020
d399114
Remove unsafe casts
piscisaureus Jan 4, 2020
28fe047
Use rusty_v8 0.0.20
ry Jan 4, 2020
69d40fa
Merge branch 'master' into rusty_v8
ry Jan 4, 2020
8743f46
dyn imports working
bartlomieju Jan 4, 2020
ea59eff
fix error_014_catch_dynamic_import_error.js
bartlomieju Jan 4, 2020
08bb14e
target tests
bartlomieju Jan 4, 2020
0bece6a
fix promise_reject_callback
bartlomieju Jan 4, 2020
78c0bf3
Remove C++ code comments
ry Jan 4, 2020
c3f19e9
fix js_unit_tests on linux
ry Jan 4, 2020
fe75143
Remove third_party/depot_tools
ry Jan 4, 2020
1f12cdb
Remove depot_tools, gclient related tools
ry Jan 4, 2020
a8d6e6b
remove unused file ./tools/testdata/travis_benchmark.json
ry Jan 4, 2020
1d3be72
try rusty_v8 0.0.22
ry Jan 5, 2020
b3825f3
use v8::Boolean::new
ry Jan 5, 2020
a82e18e
Upgrade to rusty_v8 v0.0.23 and cargo_gn v0.0.15
piscisaureus Jan 5, 2020
e4f5b57
remove hacky for v8::Global
bartlomieju Jan 5, 2020
5c397c2
remove unneed if/else
bartlomieju Jan 5, 2020
194c5a1
disable test testPrettierReadFromStdin
bartlomieju Jan 5, 2020
b37d585
smaller diff
bartlomieju Jan 5, 2020
adfb26d
fix conflict
bartlomieju Jan 5, 2020
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 0 additions & 3 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -103,9 +103,6 @@ jobs:
rustc --version
cargo --version

- name: Run setup.py
run: python ./tools/setup.py

- name: Start sccache
env:
AWS_ACCESS_KEY_ID: AKIAIVRN52PLDBP55LBQ
Expand Down
3 changes: 0 additions & 3 deletions .gitmodules
Original file line number Diff line number Diff line change
@@ -1,6 +1,3 @@
[submodule "chromium_build"]
path = core/libdeno/build
url = https://github.com/denoland/chromium_build.git
[submodule "deno_third_party"]
path = third_party
url = https://github.com/denoland/deno_third_party.git
Expand Down
38 changes: 34 additions & 4 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

5 changes: 2 additions & 3 deletions cli/js/os_test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -248,9 +248,8 @@ testPerm({ env: true }, function getDir(): void {
for (const r of s.runtime) {
if (Deno.build.os !== r.os) continue;
if (r.shouldHaveValue) {
assertNotEquals(Deno.dir(s.kind), "");
} else {
assertEquals(Deno.dir(s.kind), null);
const d = Deno.dir(s.kind);
assert(d.length > 0);
}
}
}
Expand Down
5 changes: 0 additions & 5 deletions cli/tests/integration_tests.rs
Original file line number Diff line number Diff line change
Expand Up @@ -102,11 +102,6 @@ fn repl_test() {
util::run_python_script("tools/repl_test.py")
}

#[test]
fn setup_test() {
util::run_python_script("tools/setup_test.py")
}

#[test]
fn target_test() {
util::run_python_script("tools/target_test.py")
Expand Down
3 changes: 3 additions & 0 deletions core/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,9 @@ log = "0.4.8"
serde_json = "1.0.41"
url = "2.1"

rusty_v8 = "0.0.23"
# rusty_v8 = { path = "../../rusty_v8" }

[[example]]
name = "deno_core_http_bench"
path = "examples/http_bench.rs"
Expand Down
148 changes: 0 additions & 148 deletions core/build.rs

This file was deleted.

41 changes: 2 additions & 39 deletions core/flags.rs
Original file line number Diff line number Diff line change
@@ -1,44 +1,7 @@
// Copyright 2018-2020 the Deno authors. All rights reserved. MIT license.
//! This module wraps libdeno::deno_set_v8_flags
use crate::libdeno::deno_set_v8_flags;
use libc::c_char;
use libc::c_int;
use std::ffi::CStr;
use std::ffi::CString;
use std::vec::Vec;

use rusty_v8 as v8;
/// Pass the command line arguments to v8.
/// Returns a vector of command line arguments that V8 did not understand.
pub fn v8_set_flags(args: Vec<String>) -> Vec<String> {
// deno_set_v8_flags(int* argc, char** argv) mutates argc and argv to remove
// flags that v8 understands.

// Make a new array, that can be modified by V8::SetFlagsFromCommandLine(),
// containing mutable raw pointers to the individual command line args.
let mut raw_argv = args
.iter()
.map(|arg| CString::new(arg.as_str()).unwrap().into_bytes_with_nul())
.collect::<Vec<_>>();
let mut c_argv = raw_argv
.iter_mut()
.map(|arg| arg.as_mut_ptr() as *mut c_char)
.collect::<Vec<_>>();

// Store the length of the c_argv array in a local variable. We'll pass
// a pointer to this local variable to deno_set_v8_flags(), which then
// updates its value.
let mut c_argv_len = c_argv.len() as c_int;
// Let v8 parse the arguments it recognizes and remove them from c_argv.
unsafe { deno_set_v8_flags(&mut c_argv_len, c_argv.as_mut_ptr()) };
// If c_argv_len was updated we have to change the length of c_argv to match.
c_argv.truncate(c_argv_len as usize);
// Copy the modified arguments list into a proper rust vec and return it.
c_argv
.iter()
.map(|ptr| unsafe {
let cstr = CStr::from_ptr(*ptr as *const c_char);
let slice = cstr.to_str().unwrap();
slice.to_string()
})
.collect()
v8::V8::set_flags_from_command_line(args)
}
Loading