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

Side by Side Diff: src/d8.cc

Issue 1294543006: Allowing optional build of a WASM prototype behind a gyp define. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: drop deps Created 5 years, 4 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 | « build/features.gypi ('k') | src/d8.gyp » ('j') | 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
52 #if !defined(_WIN32) && !defined(_WIN64) 56 #if !defined(_WIN32) && !defined(_WIN64)
53 #include <unistd.h> // NOLINT 57 #include <unistd.h> // NOLINT
54 #else 58 #else
55 #include <windows.h> // NOLINT 59 #include <windows.h> // NOLINT
56 #if defined(_MSC_VER) 60 #if defined(_MSC_VER)
57 #include <crtdbg.h> // NOLINT 61 #include <crtdbg.h> // NOLINT
58 #endif // defined(_MSC_VER) 62 #endif // defined(_MSC_VER)
59 #endif // !defined(_WIN32) && !defined(_WIN64) 63 #endif // !defined(_WIN32) && !defined(_WIN64)
60 64
61 #ifndef DCHECK 65 #ifndef DCHECK
(...skipping 1101 matching lines...) Expand 10 before | Expand all | Expand 10 after
1163 worker_fun_template); 1167 worker_fun_template);
1164 #endif // !V8_SHARED 1168 #endif // !V8_SHARED
1165 1169
1166 Local<ObjectTemplate> os_templ = ObjectTemplate::New(isolate); 1170 Local<ObjectTemplate> os_templ = ObjectTemplate::New(isolate);
1167 AddOSMethods(isolate, os_templ); 1171 AddOSMethods(isolate, os_templ);
1168 global_template->Set( 1172 global_template->Set(
1169 String::NewFromUtf8(isolate, "os", NewStringType::kNormal) 1173 String::NewFromUtf8(isolate, "os", NewStringType::kNormal)
1170 .ToLocalChecked(), 1174 .ToLocalChecked(),
1171 os_templ); 1175 os_templ);
1172 1176
1177 #if defined(V8_WASM)
1178 // Install WASM API.
1179 WasmJs::Install(isolate, global_template);
1180 #endif
1181
1173 return global_template; 1182 return global_template;
1174 } 1183 }
1175 1184
1176 1185
1177 void Shell::Initialize(Isolate* isolate) { 1186 void Shell::Initialize(Isolate* isolate) {
1178 #ifndef V8_SHARED 1187 #ifndef V8_SHARED
1179 // Set up counters 1188 // Set up counters
1180 if (i::StrLength(i::FLAG_map_counters) != 0) 1189 if (i::StrLength(i::FLAG_map_counters) != 0)
1181 MapCounters(isolate, i::FLAG_map_counters); 1190 MapCounters(isolate, i::FLAG_map_counters);
1182 #endif // !V8_SHARED 1191 #endif // !V8_SHARED
(...skipping 1285 matching lines...) Expand 10 before | Expand all | Expand 10 after
2468 } 2477 }
2469 2478
2470 } // namespace v8 2479 } // namespace v8
2471 2480
2472 2481
2473 #ifndef GOOGLE3 2482 #ifndef GOOGLE3
2474 int main(int argc, char* argv[]) { 2483 int main(int argc, char* argv[]) {
2475 return v8::Shell::Main(argc, argv); 2484 return v8::Shell::Main(argc, argv);
2476 } 2485 }
2477 #endif 2486 #endif
OLDNEW
« no previous file with comments | « build/features.gypi ('k') | src/d8.gyp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698