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

Side by Side Diff: src/d8.cc

Issue 1314863002: Version 4.5.103.27 (cherry-pick) (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@4.5
Patch Set: 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 | « src/api.cc ('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 32 matching lines...) Expand 10 before | Expand all | Expand 10 after
43 #include "src/base/platform/platform.h" 43 #include "src/base/platform/platform.h"
44 #include "src/base/sys-info.h" 44 #include "src/base/sys-info.h"
45 #include "src/basic-block-profiler.h" 45 #include "src/basic-block-profiler.h"
46 #include "src/d8-debug.h" 46 #include "src/d8-debug.h"
47 #include "src/debug.h" 47 #include "src/debug.h"
48 #include "src/snapshot/natives.h" 48 #include "src/snapshot/natives.h"
49 #include "src/utils.h" 49 #include "src/utils.h"
50 #include "src/v8.h" 50 #include "src/v8.h"
51 #endif // !V8_SHARED 51 #endif // !V8_SHARED
52 52
53 #ifdef V8_USE_EXTERNAL_STARTUP_DATA
54 #include "src/startup-data-util.h"
55 #endif // V8_USE_EXTERNAL_STARTUP_DATA
56
57 #if !defined(_WIN32) && !defined(_WIN64) 53 #if !defined(_WIN32) && !defined(_WIN64)
58 #include <unistd.h> // NOLINT 54 #include <unistd.h> // NOLINT
59 #else 55 #else
60 #include <windows.h> // NOLINT 56 #include <windows.h> // NOLINT
61 #if defined(_MSC_VER) 57 #if defined(_MSC_VER)
62 #include <crtdbg.h> // NOLINT 58 #include <crtdbg.h> // NOLINT
63 #endif // defined(_MSC_VER) 59 #endif // defined(_MSC_VER)
64 #endif // !defined(_WIN32) && !defined(_WIN64) 60 #endif // !defined(_WIN32) && !defined(_WIN64)
65 61
66 #ifndef DCHECK 62 #ifndef DCHECK
(...skipping 2242 matching lines...) Expand 10 before | Expand all | Expand 10 after
2309 _CrtSetReportMode(_CRT_ERROR, _CRTDBG_MODE_DEBUG | _CRTDBG_MODE_FILE); 2305 _CrtSetReportMode(_CRT_ERROR, _CRTDBG_MODE_DEBUG | _CRTDBG_MODE_FILE);
2310 _CrtSetReportFile(_CRT_ERROR, _CRTDBG_FILE_STDERR); 2306 _CrtSetReportFile(_CRT_ERROR, _CRTDBG_FILE_STDERR);
2311 _set_error_mode(_OUT_TO_STDERR); 2307 _set_error_mode(_OUT_TO_STDERR);
2312 #endif // defined(_MSC_VER) 2308 #endif // defined(_MSC_VER)
2313 #endif // defined(_WIN32) || defined(_WIN64) 2309 #endif // defined(_WIN32) || defined(_WIN64)
2314 if (!SetOptions(argc, argv)) return 1; 2310 if (!SetOptions(argc, argv)) return 1;
2315 v8::V8::InitializeICU(options.icu_data_file); 2311 v8::V8::InitializeICU(options.icu_data_file);
2316 g_platform = v8::platform::CreateDefaultPlatform(); 2312 g_platform = v8::platform::CreateDefaultPlatform();
2317 v8::V8::InitializePlatform(g_platform); 2313 v8::V8::InitializePlatform(g_platform);
2318 v8::V8::Initialize(); 2314 v8::V8::Initialize();
2319 #ifdef V8_USE_EXTERNAL_STARTUP_DATA 2315 if (options.natives_blob || options.snapshot_blob) {
2320 v8::StartupDataHandler startup_data(argv[0], options.natives_blob, 2316 v8::V8::InitializeExternalStartupData(options.natives_blob,
2321 options.snapshot_blob); 2317 options.snapshot_blob);
2322 #endif 2318 } else {
2319 v8::V8::InitializeExternalStartupData(argv[0]);
2320 }
2323 SetFlagsFromString("--trace-hydrogen-file=hydrogen.cfg"); 2321 SetFlagsFromString("--trace-hydrogen-file=hydrogen.cfg");
2324 SetFlagsFromString("--trace-turbo-cfg-file=turbo.cfg"); 2322 SetFlagsFromString("--trace-turbo-cfg-file=turbo.cfg");
2325 SetFlagsFromString("--redirect-code-traces-to=code.asm"); 2323 SetFlagsFromString("--redirect-code-traces-to=code.asm");
2326 int result = 0; 2324 int result = 0;
2327 Isolate::CreateParams create_params; 2325 Isolate::CreateParams create_params;
2328 ShellArrayBufferAllocator shell_array_buffer_allocator; 2326 ShellArrayBufferAllocator shell_array_buffer_allocator;
2329 MockArrayBufferAllocator mock_arraybuffer_allocator; 2327 MockArrayBufferAllocator mock_arraybuffer_allocator;
2330 if (options.mock_arraybuffer_allocator) { 2328 if (options.mock_arraybuffer_allocator) {
2331 Shell::array_buffer_allocator = &mock_arraybuffer_allocator; 2329 Shell::array_buffer_allocator = &mock_arraybuffer_allocator;
2332 } else { 2330 } else {
(...skipping 97 matching lines...) Expand 10 before | Expand all | Expand 10 after
2430 } 2428 }
2431 2429
2432 } // namespace v8 2430 } // namespace v8
2433 2431
2434 2432
2435 #ifndef GOOGLE3 2433 #ifndef GOOGLE3
2436 int main(int argc, char* argv[]) { 2434 int main(int argc, char* argv[]) {
2437 return v8::Shell::Main(argc, argv); 2435 return v8::Shell::Main(argc, argv);
2438 } 2436 }
2439 #endif 2437 #endif
OLDNEW
« no previous file with comments | « src/api.cc ('k') | src/d8.gyp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698