Reviewers: titzer,
Description:
Pulling in wasm v8-native-prototype behind a gyp define.
Allowing optional build of a WASM prototype behind a gyp define.
BUG=None
TEST=None
[email protected]
LOG=N
Please review this at https://codereview.chromium.org/1294543006/
Base URL: https://chromium.googlesource.com/v8/v8.git@master
Affected files (+30, -0 lines):
M DEPS
M build/features.gypi
M src/d8.cc
M src/d8.gyp
M src/flag-definitions.h
M test/cctest/cctest.gyp
M test/unittests/unittests.gyp
M tools/gyp/v8.gyp
Index: DEPS
diff --git a/DEPS b/DEPS
index
c8d9ec969a0b8c6fbdb48826cdb9050b2c48f70a..3e7aa8f753b7a4696b37948286ffa523c91a3732
100644
--- a/DEPS
+++ b/DEPS
@@ -11,6 +11,9 @@ deps = {
Var("git_url") + "/external/gyp.git" + "@"
+ "6ee91ad8659871916f9aa840d42e1513befdf638",
"v8/third_party/icu":
Var("git_url") + "/chromium/deps/icu.git" + "@"
+ "bbb24c53b4f46025e87a5973c39fa722c8757595",
+ # Will change to chromium mirror of WebAssembly before landing.
+ "v8/third_party/wasm":
+ "https://github.com/flagxor/v8-native-prototype.git"+ "@"
+ "62edf1234847605ff519d3e96f7a0cc74060941c",
"v8/buildtools":
Var("git_url") + "/chromium/buildtools.git" + "@"
+ "565d04e8741429fb1b4f26d102f2c6c3b849edeb",
"v8/testing/gtest":
Index: build/features.gypi
diff --git a/build/features.gypi b/build/features.gypi
index
76bfa22a77cb47f4c48606a91ffb5d8fd8dedf7e..86b351105eed92e1f42b18e12184c1d9eeb5e27f
100644
--- a/build/features.gypi
+++ b/build/features.gypi
@@ -64,6 +64,9 @@
# Set to 1 to enable DCHECKs in release builds.
'dcheck_always_on%': 0,
+
+ # Set to 1 to enable building with wasm prototype.
+ 'v8_wasm%': 0,
},
'target_defaults': {
'conditions': [
@@ -103,6 +106,9 @@
['dcheck_always_on!=0', {
'defines': ['DEBUG',],
}],
+ ['v8_wasm!=0', {
+ 'defines': ['V8_WASM',],
+ }],
], # conditions
'configurations': {
'DebugBaseCommon': {
Index: src/d8.cc
diff --git a/src/d8.cc b/src/d8.cc
index
d1eb9592777b3cfe2270df001c36db49885447c5..9531e24a44e62fc472011f0f15e1f461fd0fbcfa
100644
--- a/src/d8.cc
+++ b/src/d8.cc
@@ -49,6 +49,10 @@
#include "src/v8.h"
#endif // !V8_SHARED
+#if defined(V8_WASM)
+#include "src/wasm/wasm-js.h"
+#endif
+
#if !defined(_WIN32) && !defined(_WIN64)
#include <unistd.h> // NOLINT
#else
@@ -1170,6 +1174,11 @@ Local<ObjectTemplate>
Shell::CreateGlobalTemplate(Isolate* isolate) {
.ToLocalChecked(),
os_templ);
+#if defined(V8_WASM)
+ // Install WASM API.
+ WasmJs::Install(isolate, global_template);
+#endif
+
return global_template;
}
Index: src/d8.gyp
diff --git a/src/d8.gyp b/src/d8.gyp
index
04136bf5e5bc1ef648e5f5fe02f5753c325a2387..a01e655e5d3707bdcc60706d193ccd1f92cf7e1e
100644
--- a/src/d8.gyp
+++ b/src/d8.gyp
@@ -46,6 +46,7 @@
'include_dirs+': [
'..',
],
+ 'includes': ['../third_party/wasm/src/wasm/d8.gypi'],
'sources': [
'd8.h',
'd8.cc',
Index: src/flag-definitions.h
diff --git a/src/flag-definitions.h b/src/flag-definitions.h
index
7a6bc879ab75d11b1774557d5d6c98afb472b960..374f94e3c33d49e6ffb837057d5de58616ff2822
100644
--- a/src/flag-definitions.h
+++ b/src/flag-definitions.h
@@ -444,6 +444,14 @@ DEFINE_BOOL(turbo_frame_elision, true, "elide frames
in TurboFan")
DEFINE_BOOL(turbo_cache_shared_code, true, "cache context-independent
code")
DEFINE_BOOL(turbo_preserve_shared_code, false, "keep context-independent
code")
+#if defined(V8_WASM)
+// Flags for native WebAssembly.
+DEFINE_BOOL(trace_wasm_decoder, false, "trace decoding of wasm code")
+DEFINE_BOOL(trace_wasm_compiler, false, "trace compiling of wasm code")
+DEFINE_BOOL(wasm_break_on_decoder_error, false,
+ "debug break when wasm decoder encounters an error")
+#endif
+
DEFINE_INT(typed_array_max_size_in_heap, 64,
"threshold for in-heap typed array")
Index: test/cctest/cctest.gyp
diff --git a/test/cctest/cctest.gyp b/test/cctest/cctest.gyp
index
b58aee953c92143ff1e6c09cc8f10a476e4a66c5..25117dc62bdc26cddcdd54389937b03d2f177f35
100644
--- a/test/cctest/cctest.gyp
+++ b/test/cctest/cctest.gyp
@@ -42,6 +42,7 @@
'include_dirs': [
'../..',
],
+ 'includes': ['../../third_party/wasm/test/cctest/wasm/wasm.gypi'],
'sources': [ ### gcmole(all) ###
'<(generated_file)',
'compiler/c-signature.h',
Index: test/unittests/unittests.gyp
diff --git a/test/unittests/unittests.gyp b/test/unittests/unittests.gyp
index
1b7112e840804bf73e854ff28d9dde93445eb099..e4e45bfc854b5f462091964ab5e31acca04eccea
100644
--- a/test/unittests/unittests.gyp
+++ b/test/unittests/unittests.gyp
@@ -26,6 +26,7 @@
# TODO(jochen): Remove again after this is globally turned on.
'V8_IMMINENT_DEPRECATION_WARNINGS',
],
+ 'includes': ['../../third_party/wasm/test/unittests/wasm/wasm.gypi'],
'sources': [ ### gcmole(all) ###
'base/bits-unittest.cc',
'base/cpu-unittest.cc',
Index: tools/gyp/v8.gyp
diff --git a/tools/gyp/v8.gyp b/tools/gyp/v8.gyp
index
0ac43deaf5fe5a463e3f5f65b5e9b2a6c6bd305f..b1957722afc9f401ddf8966aeac941a996cbae0f
100644
--- a/tools/gyp/v8.gyp
+++ b/tools/gyp/v8.gyp
@@ -370,6 +370,7 @@
# TODO(jochen): Remove again after this is globally turned on.
'V8_IMMINENT_DEPRECATION_WARNINGS',
],
+ 'includes': ['../../third_party/wasm/src/wasm/wasm.gypi'],
'sources': [ ### gcmole(all) ###
'../../include/v8-debug.h',
'../../include/v8-platform.h',
--
--
v8-dev mailing list
[email protected]
http://groups.google.com/group/v8-dev
---
You received this message because you are subscribed to the Google Groups "v8-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
For more options, visit https://groups.google.com/d/optout.