Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(57)

Side by Side Diff: src/d8.cc

Issue 1319003002: [wasm] Move the (conditional) installation of the WASM api into bootstrapper.cc. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 5 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « src/bootstrapper.cc ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2012 the V8 project authors. All rights reserved. 1 // Copyright 2012 the V8 project authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 5
6 // Defined when linking against shared lib on Windows. 6 // Defined when linking against shared lib on Windows.
7 #if defined(USING_V8_SHARED) && !defined(V8_SHARED) 7 #if defined(USING_V8_SHARED) && !defined(V8_SHARED)
8 #define V8_SHARED 8 #define V8_SHARED
9 #endif 9 #endif
10 10
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after
42 #include "src/base/cpu.h" 42 #include "src/base/cpu.h"
43 #include "src/base/logging.h" 43 #include "src/base/logging.h"
44 #include "src/base/platform/platform.h" 44 #include "src/base/platform/platform.h"
45 #include "src/base/sys-info.h" 45 #include "src/base/sys-info.h"
46 #include "src/basic-block-profiler.h" 46 #include "src/basic-block-profiler.h"
47 #include "src/snapshot/natives.h" 47 #include "src/snapshot/natives.h"
48 #include "src/utils.h" 48 #include "src/utils.h"
49 #include "src/v8.h" 49 #include "src/v8.h"
50 #endif // !V8_SHARED 50 #endif // !V8_SHARED
51 51
52 #if defined(V8_WASM)
53 #include "src/wasm/wasm-js.h"
54 #endif
55
56 #if !defined(_WIN32) && !defined(_WIN64) 52 #if !defined(_WIN32) && !defined(_WIN64)
57 #include <unistd.h> // NOLINT 53 #include <unistd.h> // NOLINT
58 #else 54 #else
59 #include <windows.h> // NOLINT 55 #include <windows.h> // NOLINT
60 #if defined(_MSC_VER) 56 #if defined(_MSC_VER)
61 #include <crtdbg.h> // NOLINT 57 #include <crtdbg.h> // NOLINT
62 #endif // defined(_MSC_VER) 58 #endif // defined(_MSC_VER)
63 #endif // !defined(_WIN32) && !defined(_WIN64) 59 #endif // !defined(_WIN32) && !defined(_WIN64)
64 60
65 #ifndef DCHECK 61 #ifndef DCHECK
(...skipping 1109 matching lines...) Expand 10 before | Expand all | Expand 10 after
1175 worker_fun_template); 1171 worker_fun_template);
1176 #endif // !V8_SHARED 1172 #endif // !V8_SHARED
1177 1173
1178 Local<ObjectTemplate> os_templ = ObjectTemplate::New(isolate); 1174 Local<ObjectTemplate> os_templ = ObjectTemplate::New(isolate);
1179 AddOSMethods(isolate, os_templ); 1175 AddOSMethods(isolate, os_templ);
1180 global_template->Set( 1176 global_template->Set(
1181 String::NewFromUtf8(isolate, "os", NewStringType::kNormal) 1177 String::NewFromUtf8(isolate, "os", NewStringType::kNormal)
1182 .ToLocalChecked(), 1178 .ToLocalChecked(),
1183 os_templ); 1179 os_templ);
1184 1180
1185 #if defined(V8_WASM)
1186 // Install WASM API.
1187 WasmJs::Install(isolate, global_template);
1188 #endif
1189
1190 return global_template; 1181 return global_template;
1191 } 1182 }
1192 1183
1193 1184
1194 void Shell::Initialize(Isolate* isolate) { 1185 void Shell::Initialize(Isolate* isolate) {
1195 #ifndef V8_SHARED 1186 #ifndef V8_SHARED
1196 // Set up counters 1187 // Set up counters
1197 if (i::StrLength(i::FLAG_map_counters) != 0) 1188 if (i::StrLength(i::FLAG_map_counters) != 0)
1198 MapCounters(isolate, i::FLAG_map_counters); 1189 MapCounters(isolate, i::FLAG_map_counters);
1199 #endif // !V8_SHARED 1190 #endif // !V8_SHARED
(...skipping 1285 matching lines...) Expand 10 before | Expand all | Expand 10 after
2485 } 2476 }
2486 2477
2487 } // namespace v8 2478 } // namespace v8
2488 2479
2489 2480
2490 #ifndef GOOGLE3 2481 #ifndef GOOGLE3
2491 int main(int argc, char* argv[]) { 2482 int main(int argc, char* argv[]) {
2492 return v8::Shell::Main(argc, argv); 2483 return v8::Shell::Main(argc, argv);
2493 } 2484 }
2494 #endif 2485 #endif
OLDNEW
« no previous file with comments | « src/bootstrapper.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698