OLD | NEW |
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 1601 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1612 _CrtSetReportFile(_CRT_ASSERT, _CRTDBG_FILE_STDERR); | 1612 _CrtSetReportFile(_CRT_ASSERT, _CRTDBG_FILE_STDERR); |
1613 _CrtSetReportMode(_CRT_ERROR, _CRTDBG_MODE_DEBUG | _CRTDBG_MODE_FILE); | 1613 _CrtSetReportMode(_CRT_ERROR, _CRTDBG_MODE_DEBUG | _CRTDBG_MODE_FILE); |
1614 _CrtSetReportFile(_CRT_ERROR, _CRTDBG_FILE_STDERR); | 1614 _CrtSetReportFile(_CRT_ERROR, _CRTDBG_FILE_STDERR); |
1615 _set_error_mode(_OUT_TO_STDERR); | 1615 _set_error_mode(_OUT_TO_STDERR); |
1616 #endif // defined(_MSC_VER) | 1616 #endif // defined(_MSC_VER) |
1617 #endif // defined(_WIN32) || defined(_WIN64) | 1617 #endif // defined(_WIN32) || defined(_WIN64) |
1618 if (!SetOptions(argc, argv)) return 1; | 1618 if (!SetOptions(argc, argv)) return 1; |
1619 v8::V8::InitializeICU(options.icu_data_file); | 1619 v8::V8::InitializeICU(options.icu_data_file); |
1620 v8::Platform* platform = v8::platform::CreateDefaultPlatform(); | 1620 v8::Platform* platform = v8::platform::CreateDefaultPlatform(); |
1621 v8::V8::InitializePlatform(platform); | 1621 v8::V8::InitializePlatform(platform); |
1622 v8::V8::Initialize(); | |
1623 #ifdef V8_USE_EXTERNAL_STARTUP_DATA | 1622 #ifdef V8_USE_EXTERNAL_STARTUP_DATA |
1624 StartupDataHandler startup_data(options.natives_blob, options.snapshot_blob); | 1623 StartupDataHandler startup_data(options.natives_blob, options.snapshot_blob); |
1625 #endif | 1624 #endif |
1626 SetFlagsFromString("--trace-hydrogen-file=hydrogen.cfg"); | 1625 SetFlagsFromString("--trace-hydrogen-file=hydrogen.cfg"); |
1627 SetFlagsFromString("--redirect-code-traces-to=code.asm"); | 1626 SetFlagsFromString("--redirect-code-traces-to=code.asm"); |
1628 ShellArrayBufferAllocator array_buffer_allocator; | 1627 ShellArrayBufferAllocator array_buffer_allocator; |
1629 MockArrayBufferAllocator mock_arraybuffer_allocator; | 1628 MockArrayBufferAllocator mock_arraybuffer_allocator; |
1630 if (options.mock_arraybuffer_allocator) { | 1629 if (options.mock_arraybuffer_allocator) { |
1631 v8::V8::SetArrayBufferAllocator(&mock_arraybuffer_allocator); | 1630 v8::V8::SetArrayBufferAllocator(&mock_arraybuffer_allocator); |
1632 } else { | 1631 } else { |
(...skipping 78 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1711 } | 1710 } |
1712 | 1711 |
1713 } // namespace v8 | 1712 } // namespace v8 |
1714 | 1713 |
1715 | 1714 |
1716 #ifndef GOOGLE3 | 1715 #ifndef GOOGLE3 |
1717 int main(int argc, char* argv[]) { | 1716 int main(int argc, char* argv[]) { |
1718 return v8::Shell::Main(argc, argv); | 1717 return v8::Shell::Main(argc, argv); |
1719 } | 1718 } |
1720 #endif | 1719 #endif |
OLD | NEW |