| OLD | NEW |
| 1 // Copyright 2012 the V8 project authors. All rights reserved. | 1 // Copyright 2012 the V8 project authors. All rights reserved. |
| 2 // Redistribution and use in source and binary forms, with or without | 2 // Redistribution and use in source and binary forms, with or without |
| 3 // modification, are permitted provided that the following conditions are | 3 // modification, are permitted provided that the following conditions are |
| 4 // met: | 4 // met: |
| 5 // | 5 // |
| 6 // * Redistributions of source code must retain the above copyright | 6 // * Redistributions of source code must retain the above copyright |
| 7 // notice, this list of conditions and the following disclaimer. | 7 // notice, this list of conditions and the following disclaimer. |
| 8 // * Redistributions in binary form must reproduce the above | 8 // * Redistributions in binary form must reproduce the above |
| 9 // copyright notice, this list of conditions and the following | 9 // copyright notice, this list of conditions and the following |
| 10 // disclaimer in the documentation and/or other materials provided | 10 // disclaimer in the documentation and/or other materials provided |
| (...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 55 | 55 |
| 56 #ifdef ENABLE_VTUNE_JIT_INTERFACE | 56 #ifdef ENABLE_VTUNE_JIT_INTERFACE |
| 57 #include "third_party/vtune/v8-vtune.h" | 57 #include "third_party/vtune/v8-vtune.h" |
| 58 #endif | 58 #endif |
| 59 | 59 |
| 60 #include "d8.h" | 60 #include "d8.h" |
| 61 | 61 |
| 62 #ifndef V8_SHARED | 62 #ifndef V8_SHARED |
| 63 #include "api.h" | 63 #include "api.h" |
| 64 #include "checks.h" | 64 #include "checks.h" |
| 65 #include "cpu.h" |
| 65 #include "d8-debug.h" | 66 #include "d8-debug.h" |
| 66 #include "debug.h" | 67 #include "debug.h" |
| 67 #include "natives.h" | 68 #include "natives.h" |
| 68 #include "platform.h" | 69 #include "platform.h" |
| 69 #include "v8.h" | 70 #include "v8.h" |
| 70 #include "v8-defaults.h" | 71 #include "v8-defaults.h" |
| 71 #endif // V8_SHARED | 72 #endif // V8_SHARED |
| 72 | 73 |
| 73 #if !defined(_WIN32) && !defined(_WIN64) | 74 #if !defined(_WIN32) && !defined(_WIN64) |
| 74 #include <unistd.h> // NOLINT | 75 #include <unistd.h> // NOLINT |
| (...skipping 1627 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1702 MockArrayBufferAllocator mock_arraybuffer_allocator; | 1703 MockArrayBufferAllocator mock_arraybuffer_allocator; |
| 1703 if (options.mock_arraybuffer_allocator) { | 1704 if (options.mock_arraybuffer_allocator) { |
| 1704 v8::V8::SetArrayBufferAllocator(&mock_arraybuffer_allocator); | 1705 v8::V8::SetArrayBufferAllocator(&mock_arraybuffer_allocator); |
| 1705 } else { | 1706 } else { |
| 1706 v8::V8::SetArrayBufferAllocator(&array_buffer_allocator); | 1707 v8::V8::SetArrayBufferAllocator(&array_buffer_allocator); |
| 1707 } | 1708 } |
| 1708 int result = 0; | 1709 int result = 0; |
| 1709 Isolate* isolate = Isolate::GetCurrent(); | 1710 Isolate* isolate = Isolate::GetCurrent(); |
| 1710 #ifndef V8_SHARED | 1711 #ifndef V8_SHARED |
| 1711 v8::ResourceConstraints constraints; | 1712 v8::ResourceConstraints constraints; |
| 1712 constraints.ConfigureDefaults(i::OS::TotalPhysicalMemory()); | 1713 constraints.ConfigureDefaults(i::OS::TotalPhysicalMemory(), |
| 1714 i::CPU::NumberOfProcessorsOnline()); |
| 1713 v8::SetResourceConstraints(isolate, &constraints); | 1715 v8::SetResourceConstraints(isolate, &constraints); |
| 1714 #endif | 1716 #endif |
| 1715 DumbLineEditor dumb_line_editor(isolate); | 1717 DumbLineEditor dumb_line_editor(isolate); |
| 1716 { | 1718 { |
| 1717 Initialize(isolate); | 1719 Initialize(isolate); |
| 1718 #ifdef ENABLE_VTUNE_JIT_INTERFACE | 1720 #ifdef ENABLE_VTUNE_JIT_INTERFACE |
| 1719 vTune::InitializeVtuneForV8(); | 1721 vTune::InitializeVtuneForV8(); |
| 1720 #endif | 1722 #endif |
| 1721 PerIsolateData data(isolate); | 1723 PerIsolateData data(isolate); |
| 1722 InitializeDebugger(isolate); | 1724 InitializeDebugger(isolate); |
| (...skipping 62 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1785 } | 1787 } |
| 1786 | 1788 |
| 1787 } // namespace v8 | 1789 } // namespace v8 |
| 1788 | 1790 |
| 1789 | 1791 |
| 1790 #ifndef GOOGLE3 | 1792 #ifndef GOOGLE3 |
| 1791 int main(int argc, char* argv[]) { | 1793 int main(int argc, char* argv[]) { |
| 1792 return v8::Shell::Main(argc, argv); | 1794 return v8::Shell::Main(argc, argv); |
| 1793 } | 1795 } |
| 1794 #endif | 1796 #endif |
| OLD | NEW |