| 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 1631 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1642 SetStandaloneFlagsViaCommandLine(); | 1642 SetStandaloneFlagsViaCommandLine(); |
| 1643 #endif | 1643 #endif |
| 1644 ShellArrayBufferAllocator array_buffer_allocator; | 1644 ShellArrayBufferAllocator array_buffer_allocator; |
| 1645 MockArrayBufferAllocator mock_arraybuffer_allocator; | 1645 MockArrayBufferAllocator mock_arraybuffer_allocator; |
| 1646 if (options.mock_arraybuffer_allocator) { | 1646 if (options.mock_arraybuffer_allocator) { |
| 1647 v8::V8::SetArrayBufferAllocator(&mock_arraybuffer_allocator); | 1647 v8::V8::SetArrayBufferAllocator(&mock_arraybuffer_allocator); |
| 1648 } else { | 1648 } else { |
| 1649 v8::V8::SetArrayBufferAllocator(&array_buffer_allocator); | 1649 v8::V8::SetArrayBufferAllocator(&array_buffer_allocator); |
| 1650 } | 1650 } |
| 1651 int result = 0; | 1651 int result = 0; |
| 1652 Isolate* isolate = Isolate::GetCurrent(); | 1652 Isolate* isolate = Isolate::New(); |
| 1653 #ifndef V8_SHARED | 1653 #ifndef V8_SHARED |
| 1654 v8::ResourceConstraints constraints; | 1654 v8::ResourceConstraints constraints; |
| 1655 constraints.ConfigureDefaults(i::OS::TotalPhysicalMemory(), | 1655 constraints.ConfigureDefaults(i::OS::TotalPhysicalMemory(), |
| 1656 i::OS::MaxVirtualMemory(), | 1656 i::OS::MaxVirtualMemory(), |
| 1657 i::CPU::NumberOfProcessorsOnline()); | 1657 i::CPU::NumberOfProcessorsOnline()); |
| 1658 v8::SetResourceConstraints(isolate, &constraints); | 1658 v8::SetResourceConstraints(isolate, &constraints); |
| 1659 #endif | 1659 #endif |
| 1660 DumbLineEditor dumb_line_editor(isolate); | 1660 DumbLineEditor dumb_line_editor(isolate); |
| 1661 { | 1661 { |
| 1662 Isolate::Scope scope(isolate); |
| 1662 Initialize(isolate); | 1663 Initialize(isolate); |
| 1663 #ifdef ENABLE_VTUNE_JIT_INTERFACE | 1664 #ifdef ENABLE_VTUNE_JIT_INTERFACE |
| 1664 vTune::InitializeVtuneForV8(); | 1665 vTune::InitializeVtuneForV8(); |
| 1665 #endif | 1666 #endif |
| 1666 PerIsolateData data(isolate); | 1667 PerIsolateData data(isolate); |
| 1667 InitializeDebugger(isolate); | 1668 InitializeDebugger(isolate); |
| 1668 | 1669 |
| 1669 #ifndef V8_SHARED | 1670 #ifndef V8_SHARED |
| 1670 if (options.dump_heap_constants) { | 1671 if (options.dump_heap_constants) { |
| 1671 DumpHeapConstants(reinterpret_cast<i::Isolate*>(isolate)); | 1672 DumpHeapConstants(reinterpret_cast<i::Isolate*>(isolate)); |
| (...skipping 58 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1730 } | 1731 } |
| 1731 | 1732 |
| 1732 } // namespace v8 | 1733 } // namespace v8 |
| 1733 | 1734 |
| 1734 | 1735 |
| 1735 #ifndef GOOGLE3 | 1736 #ifndef GOOGLE3 |
| 1736 int main(int argc, char* argv[]) { | 1737 int main(int argc, char* argv[]) { |
| 1737 return v8::Shell::Main(argc, argv); | 1738 return v8::Shell::Main(argc, argv); |
| 1738 } | 1739 } |
| 1739 #endif | 1740 #endif |
| OLD | NEW |