Reviewers: Michael Starzinger, Yang,
Description:
[wasm] Move the (conditional) installation of the WASM api into
bootstrapper.cc.
[email protected],[email protected]
BUG=
Please review this at https://codereview.chromium.org/1319003002/
Base URL: https://chromium.googlesource.com/v8/v8.git@master
Affected files (+9, -9 lines):
M src/bootstrapper.cc
M src/d8.cc
Index: src/bootstrapper.cc
diff --git a/src/bootstrapper.cc b/src/bootstrapper.cc
index
ecd3c43c9c5e7855254875c3ef793eb11e992eb1..9d2121e54379ecb51d812aff8acfbfb7bb43babc
100644
--- a/src/bootstrapper.cc
+++ b/src/bootstrapper.cc
@@ -18,6 +18,10 @@
#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 {
@@ -2666,6 +2670,11 @@ bool Genesis::InstallSpecialObjects(Handle<Context>
native_context) {
Handle<Object> global_proxy(debug_context->global_proxy(), isolate);
JSObject::AddProperty(global, debug_string, global_proxy, DONT_ENUM);
}
+
+#if defined(V8_WASM)
+ WasmJs::Install(isolate, global);
+#endif
+
return true;
}
Index: src/d8.cc
diff --git a/src/d8.cc b/src/d8.cc
index
58b59c890fac87d6a8de637e677432b975e1ea03..2a141af71d46acde6b33bdaf033adc27c85a0275
100644
--- a/src/d8.cc
+++ b/src/d8.cc
@@ -49,10 +49,6 @@
#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
@@ -1182,11 +1178,6 @@ 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;
}
--
--
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.