Revert of Remove wasm compile time option and enable wasm behind a runtime flag. (patchset #54 id:1050001 of https://codereview.chromium.org/1516753007/ )

Reason for revert:
[Sheriff] Some build failures, e.g.:
https://build.chromium.org/p/client.v8/builders/V8%20Linux%20-%20shared/builds/7502

Original issue's description:
> Remove wasm compile time option and enable wasm behind a runtime flag.
>
> R=titzer@chromium.org
> BUG=
>
> Committed: https://crrev.com/153f2bd47cce9d5dfa74074dda34c02731d96924
> Cr-Commit-Position: refs/heads/master@{#32955}

TBR=titzer@chromium.org,bradnelson@google.com
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true
BUG=

Review URL: https://codereview.chromium.org/1531073003

Cr-Commit-Position: refs/heads/master@{#32957}
This commit is contained in:
machenbach 2015-12-17 09:58:47 -08:00 committed by Commit bot
parent 37b5ebc31d
commit 2a09d7f9b5
9 changed files with 64 additions and 72 deletions

View File

@ -867,9 +867,6 @@ source_set("v8_base") {
"src/compiler/value-numbering-reducer.h",
"src/compiler/verifier.cc",
"src/compiler/verifier.h",
"src/compiler/wasm-compiler.cc",
"src/compiler/wasm-compiler.h",
"src/compiler/wasm-linkage.cc",
"src/compiler/zone-pool.cc",
"src/compiler/zone-pool.h",
"src/compiler.cc",
@ -1285,24 +1282,6 @@ source_set("v8_base") {
"src/version.h",
"src/vm-state-inl.h",
"src/vm-state.h",
"src/wasm/asm-wasm-builder.cc",
"src/wasm/asm-wasm-builder.h",
"src/wasm/ast-decoder.cc",
"src/wasm/ast-decoder.h",
"src/wasm/decoder.h",
"src/wasm/encoder.cc",
"src/wasm/encoder.h",
"src/wasm/module-decoder.cc",
"src/wasm/module-decoder.h",
"src/wasm/wasm-js.cc",
"src/wasm/wasm-js.h",
"src/wasm/wasm-macro-gen.h",
"src/wasm/wasm-module.cc",
"src/wasm/wasm-module.h",
"src/wasm/wasm-opcodes.cc",
"src/wasm/wasm-opcodes.h",
"src/wasm/wasm-result.cc",
"src/wasm/wasm-result.h",
"src/zone.cc",
"src/zone.h",
"src/zone-allocator.h",

View File

@ -220,6 +220,12 @@ ifeq ($(arm_test_noprobe), on)
GYPFLAGS += -Darm_test_noprobe=on
endif
# Optionally enable wasm prototype.
# Assume you've placed a link to v8-native-prototype in third_party/wasm.
ifeq ($(wasm), on)
GYPFLAGS += -Dv8_wasm=1
endif
# ----------------- available targets: --------------------
# - "grokdump": rebuilds heap constants lists used by grokdump
# - any arch listed in ARCHES (see below)

View File

@ -67,6 +67,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,
# Enable/disable JavaScript API accessors.
'v8_js_accessors%': 0,
},
@ -108,6 +111,9 @@
['dcheck_always_on!=0', {
'defines': ['DEBUG',],
}],
['v8_wasm!=0', {
'defines': ['V8_WASM',],
}],
], # conditions
'configurations': {
'DebugBaseCommon': {

View File

@ -16,7 +16,11 @@
#include "src/isolate-inl.h"
#include "src/snapshot/natives.h"
#include "src/snapshot/snapshot.h"
#include "third_party/fdlibm/fdlibm.h"
#if defined(V8_WASM)
#include "src/wasm/wasm-js.h"
#endif
namespace v8 {
namespace internal {
@ -2851,9 +2855,11 @@ bool Genesis::InstallSpecialObjects(Handle<Context> native_context) {
JSObject::AddProperty(global, debug_string, global_proxy, DONT_ENUM);
}
#if defined(V8_WASM)
if (FLAG_expose_wasm) {
WasmJs::Install(isolate, global);
}
#endif
return true;
}

View File

@ -101,6 +101,9 @@
'<(icu_gyp_path):icudata',
],
}],
['v8_wasm!=0', {
'include_dirs': ['../third_party/wasm'],
}],
],
},
{

View File

@ -183,9 +183,6 @@
'test-weakmaps.cc',
'test-weaksets.cc',
'trace-extension.cc',
'wasm/test-run-wasm.cc',
'wasm/test-run-wasm-module.cc',
'wasm/test-signatures.h',
],
'conditions': [
['v8_target_arch=="ia32"', {
@ -302,6 +299,13 @@
}, {
'dependencies': ['../../tools/gyp/v8.gyp:v8'],
}],
['v8_wasm!=0', {
'sources': [
'wasm/test-run-wasm.cc',
'wasm/test-run-wasm-module.cc',
'wasm/test-signatures.h',
],
}],
],
},
{

View File

@ -166,6 +166,9 @@
# issue 4078:
'allocation-site-info': [PASS, NO_VARIANTS],
# Native WASM is not yet enabled by default.
'wasm/*': [SKIP],
##############################################################################
# Too slow in debug mode with --stress-opt mode.
'compiler/regress-stacktrace-methods': [PASS, ['mode == debug', SKIP]],
@ -736,28 +739,6 @@
'regress/regress-1132': [SKIP],
}], # 'arch == ppc and simulator_run == True'
# TODO(bradnelson): Figure out why this fails for arm.
['arch == arm', {
'wasm/asm-wasm': [SKIP],
}],
# TODO(bradnelson): Figure out why this crashes under asan.
['asan == True', {
'wasm/asm-wasm': [SKIP],
}],
# TODO(titzer): Figure out why parameter passing on 32-bit is broken.
['arch != x64', {
'wasm/params': [SKIP],
}],
# TODO(titzer): Figure out why arm64 is broken for wasm.
['arch == arm64', {
'wasm/*': [SKIP],
}],
['ignition == True', {
'asm/*': [SKIP],
'compiler/*': [SKIP],
@ -769,7 +750,6 @@
'harmony/*': [SKIP],
'regress/debug*': [SKIP],
'regress/regress-debug*': [SKIP],
'wasm/*': [SKIP],
'allocation-folding': [SKIP],
'api-call-after-bypassed-exception': [SKIP],

View File

@ -110,10 +110,6 @@
'runtime/runtime-interpreter-unittest.cc',
'test-utils.h',
'test-utils.cc',
'wasm/ast-decoder-unittest.cc',
'wasm/encoder-unittest.cc',
'wasm/module-decoder-unittest.cc',
'wasm/wasm-macro-gen-unittest.cc',
],
'conditions': [
['v8_target_arch=="arm"', {
@ -173,6 +169,14 @@
],
},
}],
['v8_wasm!=0', {
'sources': [
'wasm/ast-decoder-unittest.cc',
'wasm/encoder-unittest.cc',
'wasm/module-decoder-unittest.cc',
'wasm/wasm-macro-gen-unittest.cc',
],
}],
],
},
],

View File

@ -646,9 +646,6 @@
'../../src/compiler/value-numbering-reducer.h',
'../../src/compiler/verifier.cc',
'../../src/compiler/verifier.h',
'../../src/compiler/wasm-compiler.cc',
'../../src/compiler/wasm-compiler.h',
'../../src/compiler/wasm-linkage.cc',
'../../src/compiler/zone-pool.cc',
'../../src/compiler/zone-pool.h',
'../../src/compiler.cc',
@ -1069,24 +1066,6 @@
'../../src/version.h',
'../../src/vm-state-inl.h',
'../../src/vm-state.h',
'../../src/wasm/asm-wasm-builder.cc',
'../../src/wasm/asm-wasm-builder.h',
'../../src/wasm/ast-decoder.cc',
'../../src/wasm/ast-decoder.h',
'../../src/wasm/decoder.h',
'../../src/wasm/encoder.cc',
'../../src/wasm/encoder.h',
'../../src/wasm/module-decoder.cc',
'../../src/wasm/module-decoder.h',
'../../src/wasm/wasm-js.cc',
'../../src/wasm/wasm-js.h',
'../../src/wasm/wasm-macro-gen.h',
'../../src/wasm/wasm-module.cc',
'../../src/wasm/wasm-module.h',
'../../src/wasm/wasm-opcodes.cc',
'../../src/wasm/wasm-opcodes.h',
'../../src/wasm/wasm-result.cc',
'../../src/wasm/wasm-result.h',
'../../src/zone.cc',
'../../src/zone.h',
'../../src/zone-allocator.h',
@ -1500,6 +1479,31 @@
}],
],
}],
['v8_wasm!=0', {
'sources': [
'../../src/compiler/wasm-compiler.cc',
'../../src/compiler/wasm-compiler.h',
'../../src/compiler/wasm-linkage.cc',
'../../src/wasm/asm-wasm-builder.cc',
'../../src/wasm/asm-wasm-builder.h',
'../../src/wasm/ast-decoder.cc',
'../../src/wasm/ast-decoder.h',
'../../src/wasm/decoder.h',
'../../src/wasm/encoder.cc',
'../../src/wasm/encoder.h',
'../../src/wasm/module-decoder.cc',
'../../src/wasm/module-decoder.h',
'../../src/wasm/wasm-js.cc',
'../../src/wasm/wasm-js.h',
'../../src/wasm/wasm-macro-gen.h',
'../../src/wasm/wasm-module.cc',
'../../src/wasm/wasm-module.h',
'../../src/wasm/wasm-opcodes.cc',
'../../src/wasm/wasm-opcodes.h',
'../../src/wasm/wasm-result.cc',
'../../src/wasm/wasm-result.h',
],
}],
],
},
{