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 11 matching lines...) Expand all Loading... |
22 #endif // V8_SHARED | 22 #endif // V8_SHARED |
23 | 23 |
24 #ifndef V8_SHARED | 24 #ifndef V8_SHARED |
25 #include <algorithm> | 25 #include <algorithm> |
26 #endif // !V8_SHARED | 26 #endif // !V8_SHARED |
27 | 27 |
28 #ifdef V8_SHARED | 28 #ifdef V8_SHARED |
29 #include "include/v8-testing.h" | 29 #include "include/v8-testing.h" |
30 #endif // V8_SHARED | 30 #endif // V8_SHARED |
31 | 31 |
| 32 #ifdef ENABLE_GDB_JIT_INTERFACE |
| 33 #include "src/gdb-jit.h" |
| 34 #endif |
| 35 |
32 #ifdef ENABLE_VTUNE_JIT_INTERFACE | 36 #ifdef ENABLE_VTUNE_JIT_INTERFACE |
33 #include "src/third_party/vtune/v8-vtune.h" | 37 #include "src/third_party/vtune/v8-vtune.h" |
34 #endif | 38 #endif |
35 | 39 |
36 #include "src/d8.h" | 40 #include "src/d8.h" |
37 | 41 |
38 #include "include/libplatform/libplatform.h" | 42 #include "include/libplatform/libplatform.h" |
39 #ifndef V8_SHARED | 43 #ifndef V8_SHARED |
40 #include "src/api.h" | 44 #include "src/api.h" |
41 #include "src/base/cpu.h" | 45 #include "src/base/cpu.h" |
(...skipping 1528 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1570 v8::ResourceConstraints constraints; | 1574 v8::ResourceConstraints constraints; |
1571 constraints.ConfigureDefaults(base::OS::TotalPhysicalMemory(), | 1575 constraints.ConfigureDefaults(base::OS::TotalPhysicalMemory(), |
1572 base::OS::MaxVirtualMemory(), | 1576 base::OS::MaxVirtualMemory(), |
1573 base::OS::NumberOfProcessorsOnline()); | 1577 base::OS::NumberOfProcessorsOnline()); |
1574 v8::SetResourceConstraints(isolate, &constraints); | 1578 v8::SetResourceConstraints(isolate, &constraints); |
1575 #endif | 1579 #endif |
1576 DumbLineEditor dumb_line_editor(isolate); | 1580 DumbLineEditor dumb_line_editor(isolate); |
1577 { | 1581 { |
1578 Isolate::Scope scope(isolate); | 1582 Isolate::Scope scope(isolate); |
1579 Initialize(isolate); | 1583 Initialize(isolate); |
| 1584 #ifdef ENABLE_GDB_JIT_INTERFACE |
| 1585 v8::V8::SetJitCodeEventHandler(v8::kJitCodeEventDefault, |
| 1586 i::GDBJITInterface::EventHandler); |
| 1587 #endif |
1580 #ifdef ENABLE_VTUNE_JIT_INTERFACE | 1588 #ifdef ENABLE_VTUNE_JIT_INTERFACE |
1581 vTune::InitializeVtuneForV8(); | 1589 vTune::InitializeVtuneForV8(); |
1582 #endif | 1590 #endif |
1583 PerIsolateData data(isolate); | 1591 PerIsolateData data(isolate); |
1584 InitializeDebugger(isolate); | 1592 InitializeDebugger(isolate); |
1585 | 1593 |
1586 #ifndef V8_SHARED | 1594 #ifndef V8_SHARED |
1587 if (options.dump_heap_constants) { | 1595 if (options.dump_heap_constants) { |
1588 DumpHeapConstants(reinterpret_cast<i::Isolate*>(isolate)); | 1596 DumpHeapConstants(reinterpret_cast<i::Isolate*>(isolate)); |
1589 return 0; | 1597 return 0; |
(...skipping 48 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1638 } | 1646 } |
1639 | 1647 |
1640 } // namespace v8 | 1648 } // namespace v8 |
1641 | 1649 |
1642 | 1650 |
1643 #ifndef GOOGLE3 | 1651 #ifndef GOOGLE3 |
1644 int main(int argc, char* argv[]) { | 1652 int main(int argc, char* argv[]) { |
1645 return v8::Shell::Main(argc, argv); | 1653 return v8::Shell::Main(argc, argv); |
1646 } | 1654 } |
1647 #endif | 1655 #endif |
OLD | NEW |