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/optimizing-compile-dispatcher.h" | 23 #include "src/compiler-dispatcher/optimizing-compile-dispatcher.h" |
24 #include "src/crankshaft/hydrogen.h" | 24 #include "src/crankshaft/hydrogen.h" |
25 #include "src/debug/debug.h" | 25 #include "src/debug/debug.h" |
26 #include "src/deoptimizer.h" | 26 #include "src/deoptimizer.h" |
27 #include "src/external-reference-table.h" | 27 #include "src/external-reference-table.h" |
28 #include "src/frames-inl.h" | 28 #include "src/frames-inl.h" |
29 #include "src/ic/stub-cache.h" | 29 #include "src/ic/stub-cache.h" |
| 30 #include "src/interface-descriptors.h" |
30 #include "src/interpreter/interpreter.h" | 31 #include "src/interpreter/interpreter.h" |
31 #include "src/isolate-inl.h" | 32 #include "src/isolate-inl.h" |
32 #include "src/libsampler/sampler.h" | 33 #include "src/libsampler/sampler.h" |
33 #include "src/log.h" | 34 #include "src/log.h" |
34 #include "src/messages.h" | 35 #include "src/messages.h" |
35 #include "src/profiler/cpu-profiler.h" | 36 #include "src/profiler/cpu-profiler.h" |
36 #include "src/prototype.h" | 37 #include "src/prototype.h" |
37 #include "src/regexp/regexp-stack.h" | 38 #include "src/regexp/regexp-stack.h" |
38 #include "src/runtime-profiler.h" | 39 #include "src/runtime-profiler.h" |
39 #include "src/simulator.h" | 40 #include "src/simulator.h" |
(...skipping 2343 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2383 stack_guard_.InitThread(lock); | 2384 stack_guard_.InitThread(lock); |
2384 } | 2385 } |
2385 | 2386 |
2386 // SetUp the object heap. | 2387 // SetUp the object heap. |
2387 DCHECK(!heap_.HasBeenSetUp()); | 2388 DCHECK(!heap_.HasBeenSetUp()); |
2388 if (!heap_.SetUp()) { | 2389 if (!heap_.SetUp()) { |
2389 V8::FatalProcessOutOfMemory("heap setup"); | 2390 V8::FatalProcessOutOfMemory("heap setup"); |
2390 return false; | 2391 return false; |
2391 } | 2392 } |
2392 | 2393 |
| 2394 // Initialize the interface descriptors ahead of time. |
| 2395 #define INTERFACE_DESCRIPTOR(V) \ |
| 2396 { V##Descriptor(this); } |
| 2397 INTERFACE_DESCRIPTOR_LIST(INTERFACE_DESCRIPTOR) |
| 2398 #undef INTERFACE_DESCRIPTOR |
| 2399 |
2393 deoptimizer_data_ = new DeoptimizerData(heap()->memory_allocator()); | 2400 deoptimizer_data_ = new DeoptimizerData(heap()->memory_allocator()); |
2394 | 2401 |
2395 const bool create_heap_objects = (des == NULL); | 2402 const bool create_heap_objects = (des == NULL); |
2396 if (create_heap_objects && !heap_.CreateHeapObjects()) { | 2403 if (create_heap_objects && !heap_.CreateHeapObjects()) { |
2397 V8::FatalProcessOutOfMemory("heap object creation"); | 2404 V8::FatalProcessOutOfMemory("heap object creation"); |
2398 return false; | 2405 return false; |
2399 } | 2406 } |
2400 | 2407 |
2401 if (create_heap_objects) { | 2408 if (create_heap_objects) { |
2402 // Terminate the partial snapshot cache so we can iterate. | 2409 // Terminate the partial snapshot cache so we can iterate. |
(...skipping 881 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3284 // Then check whether this scope intercepts. | 3291 // Then check whether this scope intercepts. |
3285 if ((flag & intercept_mask_)) { | 3292 if ((flag & intercept_mask_)) { |
3286 intercepted_flags_ |= flag; | 3293 intercepted_flags_ |= flag; |
3287 return true; | 3294 return true; |
3288 } | 3295 } |
3289 return false; | 3296 return false; |
3290 } | 3297 } |
3291 | 3298 |
3292 } // namespace internal | 3299 } // namespace internal |
3293 } // namespace v8 | 3300 } // namespace v8 |
OLD | NEW |