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 "src/isolate.h" | 5 #include "src/isolate.h" |
6 | 6 |
7 #include <stdlib.h> | 7 #include <stdlib.h> |
8 | 8 |
9 #include <fstream> // NOLINT(readability/streams) | 9 #include <fstream> // NOLINT(readability/streams) |
10 #include <sstream> | 10 #include <sstream> |
11 | 11 |
12 #include "src/ast/context-slot-cache.h" | 12 #include "src/ast/context-slot-cache.h" |
13 #include "src/base/hashmap.h" | 13 #include "src/base/hashmap.h" |
14 #include "src/base/platform/platform.h" | 14 #include "src/base/platform/platform.h" |
15 #include "src/base/sys-info.h" | 15 #include "src/base/sys-info.h" |
16 #include "src/base/utils/random-number-generator.h" | 16 #include "src/base/utils/random-number-generator.h" |
17 #include "src/basic-block-profiler.h" | 17 #include "src/basic-block-profiler.h" |
18 #include "src/bootstrapper.h" | 18 #include "src/bootstrapper.h" |
19 #include "src/cancelable-task.h" | 19 #include "src/cancelable-task.h" |
20 #include "src/codegen.h" | 20 #include "src/codegen.h" |
21 #include "src/compilation-cache.h" | 21 #include "src/compilation-cache.h" |
22 #include "src/compilation-statistics.h" | 22 #include "src/compilation-statistics.h" |
23 #include "src/compiler-dispatcher/compiler-dispatcher-tracer.h" | 23 #include "src/compiler-dispatcher/compiler-dispatcher.h" |
24 #include "src/compiler-dispatcher/optimizing-compile-dispatcher.h" | 24 #include "src/compiler-dispatcher/optimizing-compile-dispatcher.h" |
25 #include "src/crankshaft/hydrogen.h" | 25 #include "src/crankshaft/hydrogen.h" |
26 #include "src/debug/debug.h" | 26 #include "src/debug/debug.h" |
27 #include "src/deoptimizer.h" | 27 #include "src/deoptimizer.h" |
28 #include "src/elements.h" | 28 #include "src/elements.h" |
29 #include "src/external-reference-table.h" | 29 #include "src/external-reference-table.h" |
30 #include "src/frames-inl.h" | 30 #include "src/frames-inl.h" |
31 #include "src/ic/access-compiler-data.h" | 31 #include "src/ic/access-compiler-data.h" |
32 #include "src/ic/stub-cache.h" | 32 #include "src/ic/stub-cache.h" |
33 #include "src/interface-descriptors.h" | 33 #include "src/interface-descriptors.h" |
(...skipping 2237 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2271 delete runtime_profiler_; | 2271 delete runtime_profiler_; |
2272 runtime_profiler_ = NULL; | 2272 runtime_profiler_ = NULL; |
2273 } | 2273 } |
2274 | 2274 |
2275 delete basic_block_profiler_; | 2275 delete basic_block_profiler_; |
2276 basic_block_profiler_ = NULL; | 2276 basic_block_profiler_ = NULL; |
2277 | 2277 |
2278 delete heap_profiler_; | 2278 delete heap_profiler_; |
2279 heap_profiler_ = NULL; | 2279 heap_profiler_ = NULL; |
2280 | 2280 |
| 2281 compiler_dispatcher_->AbortAll(CompilerDispatcher::BlockingBehavior::kBlock); |
| 2282 delete compiler_dispatcher_; |
| 2283 compiler_dispatcher_ = nullptr; |
| 2284 |
2281 cancelable_task_manager()->CancelAndWait(); | 2285 cancelable_task_manager()->CancelAndWait(); |
2282 | 2286 |
2283 heap_.TearDown(); | 2287 heap_.TearDown(); |
2284 logger_->TearDown(); | 2288 logger_->TearDown(); |
2285 | 2289 |
2286 delete interpreter_; | 2290 delete interpreter_; |
2287 interpreter_ = NULL; | 2291 interpreter_ = NULL; |
2288 | 2292 |
2289 delete compiler_dispatcher_tracer_; | |
2290 compiler_dispatcher_tracer_ = nullptr; | |
2291 | |
2292 delete cpu_profiler_; | 2293 delete cpu_profiler_; |
2293 cpu_profiler_ = NULL; | 2294 cpu_profiler_ = NULL; |
2294 | 2295 |
2295 code_event_dispatcher_.reset(); | 2296 code_event_dispatcher_.reset(); |
2296 | 2297 |
2297 delete root_index_map_; | 2298 delete root_index_map_; |
2298 root_index_map_ = NULL; | 2299 root_index_map_ = NULL; |
2299 | 2300 |
2300 ClearSerializerData(); | 2301 ClearSerializerData(); |
2301 } | 2302 } |
(...skipping 188 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2490 materialized_object_store_ = new MaterializedObjectStore(this); | 2491 materialized_object_store_ = new MaterializedObjectStore(this); |
2491 regexp_stack_ = new RegExpStack(); | 2492 regexp_stack_ = new RegExpStack(); |
2492 regexp_stack_->isolate_ = this; | 2493 regexp_stack_->isolate_ = this; |
2493 date_cache_ = new DateCache(); | 2494 date_cache_ = new DateCache(); |
2494 call_descriptor_data_ = | 2495 call_descriptor_data_ = |
2495 new CallInterfaceDescriptorData[CallDescriptors::NUMBER_OF_DESCRIPTORS]; | 2496 new CallInterfaceDescriptorData[CallDescriptors::NUMBER_OF_DESCRIPTORS]; |
2496 access_compiler_data_ = new AccessCompilerData(); | 2497 access_compiler_data_ = new AccessCompilerData(); |
2497 cpu_profiler_ = new CpuProfiler(this); | 2498 cpu_profiler_ = new CpuProfiler(this); |
2498 heap_profiler_ = new HeapProfiler(heap()); | 2499 heap_profiler_ = new HeapProfiler(heap()); |
2499 interpreter_ = new interpreter::Interpreter(this); | 2500 interpreter_ = new interpreter::Interpreter(this); |
2500 compiler_dispatcher_tracer_ = new CompilerDispatcherTracer(this); | 2501 compiler_dispatcher_ = new CompilerDispatcher(this, FLAG_stack_size); |
2501 | 2502 |
2502 // Enable logging before setting up the heap | 2503 // Enable logging before setting up the heap |
2503 logger_->SetUp(this); | 2504 logger_->SetUp(this); |
2504 | 2505 |
2505 // Initialize other runtime facilities | 2506 // Initialize other runtime facilities |
2506 #if defined(USE_SIMULATOR) | 2507 #if defined(USE_SIMULATOR) |
2507 #if V8_TARGET_ARCH_ARM || V8_TARGET_ARCH_ARM64 || V8_TARGET_ARCH_MIPS || \ | 2508 #if V8_TARGET_ARCH_ARM || V8_TARGET_ARCH_ARM64 || V8_TARGET_ARCH_MIPS || \ |
2508 V8_TARGET_ARCH_MIPS64 || V8_TARGET_ARCH_PPC || V8_TARGET_ARCH_S390 | 2509 V8_TARGET_ARCH_MIPS64 || V8_TARGET_ARCH_PPC || V8_TARGET_ARCH_S390 |
2509 Simulator::Initialize(this); | 2510 Simulator::Initialize(this); |
2510 #endif | 2511 #endif |
(...skipping 1028 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3539 // Then check whether this scope intercepts. | 3540 // Then check whether this scope intercepts. |
3540 if ((flag & intercept_mask_)) { | 3541 if ((flag & intercept_mask_)) { |
3541 intercepted_flags_ |= flag; | 3542 intercepted_flags_ |= flag; |
3542 return true; | 3543 return true; |
3543 } | 3544 } |
3544 return false; | 3545 return false; |
3545 } | 3546 } |
3546 | 3547 |
3547 } // namespace internal | 3548 } // namespace internal |
3548 } // namespace v8 | 3549 } // namespace v8 |
OLD | NEW |