Skip to content

Commit

Permalink
Revert of Remove wasm compile time option and enable wasm behind a ru…
Browse files Browse the repository at this point in the history
…ntime flag. (patchset crosswalk-project#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.
>
> [email protected]
> BUG=
>
> Committed: https://crrev.com/153f2bd47cce9d5dfa74074dda34c02731d96924
> Cr-Commit-Position: refs/heads/master@{#32955}

[email protected],[email protected]
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true
BUG=

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

Cr-Commit-Position: refs/heads/master@{#32957}
  • Loading branch information
mi-ac authored and Commit bot committed Dec 17, 2015
1 parent 37b5ebc commit 2a09d7f
Show file tree
Hide file tree
Showing 9 changed files with 64 additions and 72 deletions.
21 changes: 0 additions & 21 deletions BUILD.gn
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down Expand Up @@ -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",
Expand Down
6 changes: 6 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
6 changes: 6 additions & 0 deletions build/features.gypi
Original file line number Diff line number Diff line change
Expand Up @@ -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,
},
Expand Down Expand Up @@ -108,6 +111,9 @@
['dcheck_always_on!=0', {
'defines': ['DEBUG',],
}],
['v8_wasm!=0', {
'defines': ['V8_WASM',],
}],
], # conditions
'configurations': {
'DebugBaseCommon': {
Expand Down
6 changes: 6 additions & 0 deletions src/bootstrapper.cc
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down Expand Up @@ -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;
}
Expand Down
3 changes: 3 additions & 0 deletions src/d8.gyp
Original file line number Diff line number Diff line change
Expand Up @@ -101,6 +101,9 @@
'<(icu_gyp_path):icudata',
],
}],
['v8_wasm!=0', {
'include_dirs': ['../third_party/wasm'],
}],
],
},
{
Expand Down
10 changes: 7 additions & 3 deletions test/cctest/cctest.gyp
Original file line number Diff line number Diff line change
Expand Up @@ -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"', {
Expand Down Expand Up @@ -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',
],
}],
],
},
{
Expand Down
26 changes: 3 additions & 23 deletions test/mjsunit/mjsunit.status
Original file line number Diff line number Diff line change
Expand Up @@ -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]],
Expand Down Expand Up @@ -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],
Expand All @@ -769,7 +750,6 @@
'harmony/*': [SKIP],
'regress/debug*': [SKIP],
'regress/regress-debug*': [SKIP],
'wasm/*': [SKIP],

'allocation-folding': [SKIP],
'api-call-after-bypassed-exception': [SKIP],
Expand Down
12 changes: 8 additions & 4 deletions test/unittests/unittests.gyp
Original file line number Diff line number Diff line change
Expand Up @@ -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"', {
Expand Down Expand Up @@ -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',
],
}],
],
},
],
Expand Down
46 changes: 25 additions & 21 deletions tools/gyp/v8.gyp
Original file line number Diff line number Diff line change
Expand Up @@ -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',
Expand Down Expand Up @@ -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',
Expand Down Expand Up @@ -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',
],
}],
],
},
{
Expand Down

0 comments on commit 2a09d7f

Please sign in to comment.