summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--.gitignore2
-rw-r--r--.gitmodules6
-rwxr-xr-xscripts/build-d8.sh35
-rwxr-xr-xscripts/upload-d8.sh4
-rwxr-xr-xtest/run-d8.py9
-rw-r--r--test/spec/conversions.txt14
-rw-r--r--test/spec/float_misc.txt10
-rw-r--r--test/spec/nan-propagation.txt6
-rw-r--r--test/spec/select.txt3
-rw-r--r--test/wasm.js2
m---------third_party/v8-native-prototype0
-rw-r--r--third_party/v8/.gclient9
m---------third_party/v8/v80
13 files changed, 30 insertions, 70 deletions
diff --git a/.gitignore b/.gitignore
index e2e7327c..2d011937 100644
--- a/.gitignore
+++ b/.gitignore
@@ -1 +1,3 @@
+.gclient_entries
/out
+/third_party/v8/depot_tools
diff --git a/.gitmodules b/.gitmodules
index fba67fcd..ecf8fc61 100644
--- a/.gitmodules
+++ b/.gitmodules
@@ -1,6 +1,6 @@
-[submodule "third_party/v8-native-prototype"]
- path = third_party/v8-native-prototype
- url = https://github.com/WebAssembly/v8-native-prototype
[submodule "third_party/testsuite"]
path = third_party/testsuite
url = https://github.com/WebAssembly/testsuite
+[submodule "third_party/v8/v8"]
+ path = third_party/v8/v8
+ url = https://chromium.googlesource.com/v8/v8.git
diff --git a/scripts/build-d8.sh b/scripts/build-d8.sh
index e6fa9c09..13b043d9 100755
--- a/scripts/build-d8.sh
+++ b/scripts/build-d8.sh
@@ -2,17 +2,11 @@
set -o nounset
set -o errexit
-V8_REV=e8adbe7821be5be02ef187912a74dde1152eefb1
-
-sync=YES
config=Release
while [[ $# > 0 ]]; do
flag="$1"
case $flag in
- --no-sync)
- sync=NO
- ;;
--debug)
config=Debug
;;
@@ -26,40 +20,19 @@ done
SCRIPT_DIR="$(dirname "$(readlink -f "$0")")"
ROOT_DIR="$(dirname "${SCRIPT_DIR}")"
-cd ${ROOT_DIR}/third_party/v8-native-prototype
+cd ${ROOT_DIR}/third_party/v8
-# copied from v8-native-prototype/install-dependencies.sh, but this fetches a
-# shallow clone.
if [[ ! -d depot_tools ]]; then
echo "Cloning depot_tools"
git clone https://chromium.googlesource.com/chromium/tools/depot_tools.git
fi
export PATH=$PWD/depot_tools:$PATH
-
-if [[ ${sync} = "YES" ]]; then
- if [[ ! -d v8 ]]; then
- echo "Fetching v8"
- mkdir v8
- pushd v8
- fetch --no-history v8
- ln -fs $PWD/.. v8/third_party/wasm
- popd
- else
- pushd v8/v8
- git fetch origin
- git checkout origin/master
- popd
- fi
-
- pushd v8
- gclient update --revision=${V8_REV}
- popd
-fi
+gclient sync
# Don't use the CC from the environment; v8 doesn't seem to build properly with
# it.
unset CC
-cd v8/v8
-GYP_GENERATORS=ninja build/gyp_v8 -Dv8_wasm=1 -Dwerror=
+cd v8
+GYP_GENERATORS=ninja build/gyp_v8 -Dv8_wasm=1
time ninja -C out/${config} d8
diff --git a/scripts/upload-d8.sh b/scripts/upload-d8.sh
index 937d6f5a..6d1b5efb 100755
--- a/scripts/upload-d8.sh
+++ b/scripts/upload-d8.sh
@@ -4,8 +4,8 @@ set -o errexit
SCRIPT_DIR="$(dirname "$(readlink -f "$0")")"
ROOT_DIR="$(dirname "${SCRIPT_DIR}")"
-V8_DIR="${ROOT_DIR}/third_party/v8-native-prototype"
-V8_OUT_DIR="${V8_DIR}/v8/v8/out/Release"
+V8_DIR="${ROOT_DIR}/third_party/v8/v8"
+V8_OUT_DIR="${V8_DIR}/out/Release"
V8_SHA=$(cd ${V8_DIR} && git rev-parse HEAD)
BUCKET_URL=gs://webassembly/v8-native-prototype/${V8_SHA}/
diff --git a/test/run-d8.py b/test/run-d8.py
index e0d9172f..cf3a2827 100755
--- a/test/run-d8.py
+++ b/test/run-d8.py
@@ -10,9 +10,10 @@ import tempfile
SCRIPT_DIR = os.path.dirname(os.path.abspath(__file__))
REPO_ROOT_DIR = os.path.dirname(SCRIPT_DIR)
DEFAULT_EXE = os.path.join(REPO_ROOT_DIR, 'out', 'sexpr-wasm')
-BUILT_D8 = os.path.join(REPO_ROOT_DIR, 'third_party', 'v8-native-prototype',
- 'v8', 'v8', 'out', 'Release', 'd8')
+BUILT_D8 = os.path.join(REPO_ROOT_DIR, 'third_party', 'v8', 'v8', 'out',
+ 'Release', 'd8')
DOWNLOAD_D8 = os.path.join(REPO_ROOT_DIR, 'out', 'd8')
+EXPOSE_WASM = '--expose-wasm'
WASM_JS = os.path.join(SCRIPT_DIR, 'wasm.js')
SPEC_JS = os.path.join(SCRIPT_DIR, 'spec.js')
@@ -91,9 +92,9 @@ def main(args):
# Now run the generated file
if options.spec:
# The generated file is JavaScript, so run it directly.
- cmd = [d8, SPEC_JS, generated.name]
+ cmd = [d8, EXPOSE_WASM, SPEC_JS, generated.name]
else:
- cmd = [d8, WASM_JS, '--', generated.name]
+ cmd = [d8, EXPOSE_WASM, WASM_JS, '--', generated.name]
try:
process = subprocess.Popen(cmd, stdout=subprocess.PIPE,
stderr=subprocess.PIPE)
diff --git a/test/spec/conversions.txt b/test/spec/conversions.txt
index 56082e81..433426bb 100644
--- a/test/spec/conversions.txt
+++ b/test/spec/conversions.txt
@@ -25,17 +25,5 @@ third_party/testsuite/conversions.wast:180: $assert_trap_96 failed, didn't throw
third_party/testsuite/conversions.wast:181: $assert_trap_97 failed, didn't throw
third_party/testsuite/conversions.wast:182: $assert_trap_98 failed, didn't throw
third_party/testsuite/conversions.wast:183: $assert_trap_99 failed, didn't throw
-third_party/testsuite/conversions.wast:200: $assert_return_115 unexpectedly threw: integer result unrepresentable
-third_party/testsuite/conversions.wast:200: $assert_return_115 failed.
-third_party/testsuite/conversions.wast:210: $assert_return_124 unexpectedly threw: integer result unrepresentable
-third_party/testsuite/conversions.wast:210: $assert_return_124 failed.
-third_party/testsuite/conversions.wast:216: $assert_return_130 unexpectedly threw: integer result unrepresentable
-third_party/testsuite/conversions.wast:216: $assert_return_130 failed.
-third_party/testsuite/conversions.wast:238: $assert_return_151 unexpectedly threw: integer result unrepresentable
-third_party/testsuite/conversions.wast:238: $assert_return_151 failed.
-third_party/testsuite/conversions.wast:248: $assert_return_160 unexpectedly threw: integer result unrepresentable
-third_party/testsuite/conversions.wast:248: $assert_return_160 failed.
-third_party/testsuite/conversions.wast:255: $assert_return_167 unexpectedly threw: integer result unrepresentable
-third_party/testsuite/conversions.wast:255: $assert_return_167 failed.
-261/290 tests passed.
+267/290 tests passed.
;;; STDOUT ;;)
diff --git a/test/spec/float_misc.txt b/test/spec/float_misc.txt
index 29691869..f3c1ce29 100644
--- a/test/spec/float_misc.txt
+++ b/test/spec/float_misc.txt
@@ -2,13 +2,5 @@
;;; FLAGS: --spec
;;; STDIN_FILE: third_party/testsuite/float_misc.wast
(;; STDOUT ;;;
-third_party/testsuite/float_misc.wast:271: $assert_return_125 failed.
-third_party/testsuite/float_misc.wast:272: $assert_return_126 failed.
-third_party/testsuite/float_misc.wast:273: $assert_return_127 failed.
-third_party/testsuite/float_misc.wast:274: $assert_return_128 failed.
-third_party/testsuite/float_misc.wast:276: $assert_return_129 failed.
-third_party/testsuite/float_misc.wast:277: $assert_return_130 failed.
-third_party/testsuite/float_misc.wast:278: $assert_return_131 failed.
-third_party/testsuite/float_misc.wast:279: $assert_return_132 failed.
-155/163 tests passed.
+163/163 tests passed.
;;; STDOUT ;;)
diff --git a/test/spec/nan-propagation.txt b/test/spec/nan-propagation.txt
index c9bc01b8..3e9d8108 100644
--- a/test/spec/nan-propagation.txt
+++ b/test/spec/nan-propagation.txt
@@ -17,8 +17,6 @@ third_party/testsuite/nan-propagation.wast:72: $assert_return_33 failed.
third_party/testsuite/nan-propagation.wast:73: $assert_return_34 failed.
third_party/testsuite/nan-propagation.wast:74: $assert_return_35 failed.
third_party/testsuite/nan-propagation.wast:75: $assert_return_36 failed.
-third_party/testsuite/nan-propagation.wast:92: $assert_return_47 failed.
-third_party/testsuite/nan-propagation.wast:93: $assert_return_48 failed.
third_party/testsuite/nan-propagation.wast:132: $assert_return_0 failed.
third_party/testsuite/nan-propagation.wast:139: $assert_return_6 failed.
third_party/testsuite/nan-propagation.wast:146: $assert_return_12 failed.
@@ -34,7 +32,5 @@ third_party/testsuite/nan-propagation.wast:171: $assert_return_33 failed.
third_party/testsuite/nan-propagation.wast:172: $assert_return_34 failed.
third_party/testsuite/nan-propagation.wast:173: $assert_return_35 failed.
third_party/testsuite/nan-propagation.wast:174: $assert_return_36 failed.
-third_party/testsuite/nan-propagation.wast:191: $assert_return_47 failed.
-third_party/testsuite/nan-propagation.wast:192: $assert_return_48 failed.
-76/110 tests passed.
+80/110 tests passed.
;;; STDOUT ;;)
diff --git a/test/spec/select.txt b/test/spec/select.txt
index f021b58a..77f52f40 100644
--- a/test/spec/select.txt
+++ b/test/spec/select.txt
@@ -6,8 +6,7 @@
;;; STDERR ;;)
(;; STDOUT ;;;
-WasmModule::Instantiate(): Compiling WASM function #4:select_trap_l failed:Result = ExprSelect[2] expected type <end>, found ExprI8Const of type i32 @+0
-
+WasmModule::Instantiate():
var module = WASM.instantiateModule(u8a.buffer, ffi);
^
diff --git a/test/wasm.js b/test/wasm.js
index 87d050eb..eaec352b 100644
--- a/test/wasm.js
+++ b/test/wasm.js
@@ -13,7 +13,7 @@ var result;
for (name in module) {
f = module[name];
- if (!(f instanceof Function))
+ if (typeof f !== 'function')
continue;
if (name.lastIndexOf('trap', 0) === 0) {
diff --git a/third_party/v8-native-prototype b/third_party/v8-native-prototype
deleted file mode 160000
-Subproject 1813a67db4e184c3bec7a72d3137eec055adae1
diff --git a/third_party/v8/.gclient b/third_party/v8/.gclient
new file mode 100644
index 00000000..fefeb205
--- /dev/null
+++ b/third_party/v8/.gclient
@@ -0,0 +1,9 @@
+solutions = [
+ { "name" : "v8",
+ "url" : "http://chromium.googlesource.com/v8/v8.git",
+ "deps_file" : "DEPS",
+ "managed" : False,
+ "custom_deps" : {},
+ "safesync_url": "",
+ },
+]
diff --git a/third_party/v8/v8 b/third_party/v8/v8
new file mode 160000
+Subproject 70a7c754bf3445a8b783b75ca2a7aa34cdeb080