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 #include <stdlib.h> | 5 #include <stdlib.h> |
6 | 6 |
7 #include <fstream> // NOLINT(readability/streams) | 7 #include <fstream> // NOLINT(readability/streams) |
8 #include <sstream> | 8 #include <sstream> |
9 | 9 |
10 #include "src/v8.h" | 10 #include "src/v8.h" |
11 | 11 |
12 #include "src/ast.h" | 12 #include "src/ast.h" |
13 #include "src/base/platform/platform.h" | 13 #include "src/base/platform/platform.h" |
14 #include "src/base/sys-info.h" | 14 #include "src/base/sys-info.h" |
15 #include "src/base/utils/random-number-generator.h" | 15 #include "src/base/utils/random-number-generator.h" |
16 #include "src/basic-block-profiler.h" | 16 #include "src/basic-block-profiler.h" |
17 #include "src/bootstrapper.h" | 17 #include "src/bootstrapper.h" |
18 #include "src/codegen.h" | 18 #include "src/codegen.h" |
19 #include "src/compilation-cache.h" | 19 #include "src/compilation-cache.h" |
20 #include "src/compilation-statistics.h" | 20 #include "src/compilation-statistics.h" |
21 #include "src/cpu-profiler.h" | 21 #include "src/cpu-profiler.h" |
22 #include "src/debug.h" | 22 #include "src/debug.h" |
23 #include "src/deoptimizer.h" | 23 #include "src/deoptimizer.h" |
24 #include "src/heap/spaces.h" | 24 #include "src/heap/spaces.h" |
25 #include "src/heap-profiler.h" | 25 #include "src/heap-profiler.h" |
26 #include "src/hydrogen.h" | 26 #include "src/hydrogen.h" |
27 #include "src/ic/stub-cache.h" | 27 #include "src/ic/stub-cache.h" |
| 28 #include "src/interpreter/interpreter.h" |
28 #include "src/lithium-allocator.h" | 29 #include "src/lithium-allocator.h" |
29 #include "src/log.h" | 30 #include "src/log.h" |
30 #include "src/messages.h" | 31 #include "src/messages.h" |
31 #include "src/prototype.h" | 32 #include "src/prototype.h" |
32 #include "src/regexp-stack.h" | 33 #include "src/regexp-stack.h" |
33 #include "src/runtime-profiler.h" | 34 #include "src/runtime-profiler.h" |
34 #include "src/sampler.h" | 35 #include "src/sampler.h" |
35 #include "src/scopeinfo.h" | 36 #include "src/scopeinfo.h" |
36 #include "src/simulator.h" | 37 #include "src/simulator.h" |
37 #include "src/snapshot/serialize.h" | 38 #include "src/snapshot/serialize.h" |
(...skipping 2071 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2109 handle_scope_implementer_ = new HandleScopeImplementer(this); | 2110 handle_scope_implementer_ = new HandleScopeImplementer(this); |
2110 stub_cache_ = new StubCache(this); | 2111 stub_cache_ = new StubCache(this); |
2111 materialized_object_store_ = new MaterializedObjectStore(this); | 2112 materialized_object_store_ = new MaterializedObjectStore(this); |
2112 regexp_stack_ = new RegExpStack(); | 2113 regexp_stack_ = new RegExpStack(); |
2113 regexp_stack_->isolate_ = this; | 2114 regexp_stack_->isolate_ = this; |
2114 date_cache_ = new DateCache(); | 2115 date_cache_ = new DateCache(); |
2115 call_descriptor_data_ = | 2116 call_descriptor_data_ = |
2116 new CallInterfaceDescriptorData[CallDescriptors::NUMBER_OF_DESCRIPTORS]; | 2117 new CallInterfaceDescriptorData[CallDescriptors::NUMBER_OF_DESCRIPTORS]; |
2117 cpu_profiler_ = new CpuProfiler(this); | 2118 cpu_profiler_ = new CpuProfiler(this); |
2118 heap_profiler_ = new HeapProfiler(heap()); | 2119 heap_profiler_ = new HeapProfiler(heap()); |
| 2120 interpreter_ = new interpreter::Interpreter(); |
2119 | 2121 |
2120 // Enable logging before setting up the heap | 2122 // Enable logging before setting up the heap |
2121 logger_->SetUp(this); | 2123 logger_->SetUp(this); |
2122 | 2124 |
2123 // Initialize other runtime facilities | 2125 // Initialize other runtime facilities |
2124 #if defined(USE_SIMULATOR) | 2126 #if defined(USE_SIMULATOR) |
2125 #if V8_TARGET_ARCH_ARM || V8_TARGET_ARCH_ARM64 || V8_TARGET_ARCH_MIPS || \ | 2127 #if V8_TARGET_ARCH_ARM || V8_TARGET_ARCH_ARM64 || V8_TARGET_ARCH_MIPS || \ |
2126 V8_TARGET_ARCH_MIPS64 || V8_TARGET_ARCH_PPC | 2128 V8_TARGET_ARCH_MIPS64 || V8_TARGET_ARCH_PPC |
2127 Simulator::Initialize(this); | 2129 Simulator::Initialize(this); |
2128 #endif | 2130 #endif |
(...skipping 27 matching lines...) Expand all Loading... |
2156 if (create_heap_objects) { | 2158 if (create_heap_objects) { |
2157 // Terminate the cache array with the sentinel so we can iterate. | 2159 // Terminate the cache array with the sentinel so we can iterate. |
2158 partial_snapshot_cache_.Add(heap_.undefined_value()); | 2160 partial_snapshot_cache_.Add(heap_.undefined_value()); |
2159 } | 2161 } |
2160 | 2162 |
2161 InitializeThreadLocal(); | 2163 InitializeThreadLocal(); |
2162 | 2164 |
2163 bootstrapper_->Initialize(create_heap_objects); | 2165 bootstrapper_->Initialize(create_heap_objects); |
2164 builtins_.SetUp(this, create_heap_objects); | 2166 builtins_.SetUp(this, create_heap_objects); |
2165 | 2167 |
| 2168 if (FLAG_ignition) { |
| 2169 interpreter_->Initialize(this, create_heap_objects); |
| 2170 } |
| 2171 |
2166 if (FLAG_log_internal_timer_events) { | 2172 if (FLAG_log_internal_timer_events) { |
2167 set_event_logger(Logger::DefaultEventLoggerSentinel); | 2173 set_event_logger(Logger::DefaultEventLoggerSentinel); |
2168 } | 2174 } |
2169 | 2175 |
2170 if (FLAG_trace_hydrogen || FLAG_trace_hydrogen_stubs) { | 2176 if (FLAG_trace_hydrogen || FLAG_trace_hydrogen_stubs) { |
2171 PrintF("Concurrent recompilation has been disabled for tracing.\n"); | 2177 PrintF("Concurrent recompilation has been disabled for tracing.\n"); |
2172 } else if (OptimizingCompileDispatcher::Enabled()) { | 2178 } else if (OptimizingCompileDispatcher::Enabled()) { |
2173 optimizing_compile_dispatcher_ = new OptimizingCompileDispatcher(this); | 2179 optimizing_compile_dispatcher_ = new OptimizingCompileDispatcher(this); |
2174 } | 2180 } |
2175 | 2181 |
(...skipping 631 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2807 // Then check whether this scope intercepts. | 2813 // Then check whether this scope intercepts. |
2808 if ((flag & intercept_mask_)) { | 2814 if ((flag & intercept_mask_)) { |
2809 intercepted_flags_ |= flag; | 2815 intercepted_flags_ |= flag; |
2810 return true; | 2816 return true; |
2811 } | 2817 } |
2812 return false; | 2818 return false; |
2813 } | 2819 } |
2814 | 2820 |
2815 } // namespace internal | 2821 } // namespace internal |
2816 } // namespace v8 | 2822 } // namespace v8 |
OLD | NEW |