| 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/assembler-inl.h" | 12 #include "src/assembler-inl.h" |
| 13 #include "src/ast/ast-value-factory.h" | 13 #include "src/ast/ast-value-factory.h" |
| 14 #include "src/ast/context-slot-cache.h" | 14 #include "src/ast/context-slot-cache.h" |
| 15 #include "src/base/hashmap.h" | 15 #include "src/base/hashmap.h" |
| 16 #include "src/base/platform/platform.h" | 16 #include "src/base/platform/platform.h" |
| 17 #include "src/base/sys-info.h" | 17 #include "src/base/sys-info.h" |
| 18 #include "src/base/utils/random-number-generator.h" | 18 #include "src/base/utils/random-number-generator.h" |
| 19 #include "src/basic-block-profiler.h" | 19 #include "src/basic-block-profiler.h" |
| 20 #include "src/bootstrapper.h" | 20 #include "src/bootstrapper.h" |
| 21 #include "src/builtins/setup-builtins.h" |
| 21 #include "src/cancelable-task.h" | 22 #include "src/cancelable-task.h" |
| 22 #include "src/codegen.h" | 23 #include "src/codegen.h" |
| 23 #include "src/compilation-cache.h" | 24 #include "src/compilation-cache.h" |
| 24 #include "src/compilation-statistics.h" | 25 #include "src/compilation-statistics.h" |
| 25 #include "src/compiler-dispatcher/compiler-dispatcher.h" | 26 #include "src/compiler-dispatcher/compiler-dispatcher.h" |
| 26 #include "src/compiler-dispatcher/optimizing-compile-dispatcher.h" | 27 #include "src/compiler-dispatcher/optimizing-compile-dispatcher.h" |
| 27 #include "src/crankshaft/hydrogen.h" | 28 #include "src/crankshaft/hydrogen.h" |
| 28 #include "src/debug/debug.h" | 29 #include "src/debug/debug.h" |
| 29 #include "src/deoptimizer.h" | 30 #include "src/deoptimizer.h" |
| 30 #include "src/elements.h" | 31 #include "src/elements.h" |
| (...skipping 2260 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2291 descriptor_lookup_cache_(NULL), | 2292 descriptor_lookup_cache_(NULL), |
| 2292 handle_scope_implementer_(NULL), | 2293 handle_scope_implementer_(NULL), |
| 2293 unicode_cache_(NULL), | 2294 unicode_cache_(NULL), |
| 2294 allocator_(FLAG_trace_gc_object_stats ? new VerboseAccountingAllocator( | 2295 allocator_(FLAG_trace_gc_object_stats ? new VerboseAccountingAllocator( |
| 2295 &heap_, 256 * KB, 128 * KB) | 2296 &heap_, 256 * KB, 128 * KB) |
| 2296 : new AccountingAllocator()), | 2297 : new AccountingAllocator()), |
| 2297 inner_pointer_to_code_cache_(NULL), | 2298 inner_pointer_to_code_cache_(NULL), |
| 2298 global_handles_(NULL), | 2299 global_handles_(NULL), |
| 2299 eternal_handles_(NULL), | 2300 eternal_handles_(NULL), |
| 2300 thread_manager_(NULL), | 2301 thread_manager_(NULL), |
| 2302 setup_builtins_delegate_(NULL), |
| 2301 regexp_stack_(NULL), | 2303 regexp_stack_(NULL), |
| 2302 date_cache_(NULL), | 2304 date_cache_(NULL), |
| 2303 call_descriptor_data_(NULL), | 2305 call_descriptor_data_(NULL), |
| 2304 // TODO(bmeurer) Initialized lazily because it depends on flags; can | 2306 // TODO(bmeurer) Initialized lazily because it depends on flags; can |
| 2305 // be fixed once the default isolate cleanup is done. | 2307 // be fixed once the default isolate cleanup is done. |
| 2306 random_number_generator_(NULL), | 2308 random_number_generator_(NULL), |
| 2307 rail_mode_(PERFORMANCE_ANIMATION), | 2309 rail_mode_(PERFORMANCE_ANIMATION), |
| 2308 promise_hook_or_debug_is_active_(false), | 2310 promise_hook_or_debug_is_active_(false), |
| 2309 promise_hook_(NULL), | 2311 promise_hook_(NULL), |
| 2310 load_start_time_ms_(0), | 2312 load_start_time_ms_(0), |
| (...skipping 417 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2728 } | 2730 } |
| 2729 | 2731 |
| 2730 if (create_heap_objects) { | 2732 if (create_heap_objects) { |
| 2731 // Terminate the partial snapshot cache so we can iterate. | 2733 // Terminate the partial snapshot cache so we can iterate. |
| 2732 partial_snapshot_cache_.Add(heap_.undefined_value()); | 2734 partial_snapshot_cache_.Add(heap_.undefined_value()); |
| 2733 } | 2735 } |
| 2734 | 2736 |
| 2735 InitializeThreadLocal(); | 2737 InitializeThreadLocal(); |
| 2736 | 2738 |
| 2737 bootstrapper_->Initialize(create_heap_objects); | 2739 bootstrapper_->Initialize(create_heap_objects); |
| 2738 builtins_.SetUp(this, create_heap_objects); | 2740 if (setup_builtins_delegate_ == nullptr) { |
| 2741 setup_builtins_delegate_ = new SetupBuiltinsDelegate(); |
| 2742 } |
| 2743 setup_builtins_delegate_->SetupBuiltins(this, create_heap_objects); |
| 2744 delete setup_builtins_delegate_; |
| 2745 setup_builtins_delegate_ = nullptr; |
| 2739 if (create_heap_objects) heap_.CreateFixedStubs(); | 2746 if (create_heap_objects) heap_.CreateFixedStubs(); |
| 2740 | 2747 |
| 2741 if (FLAG_log_internal_timer_events) { | 2748 if (FLAG_log_internal_timer_events) { |
| 2742 set_event_logger(Logger::DefaultEventLoggerSentinel); | 2749 set_event_logger(Logger::DefaultEventLoggerSentinel); |
| 2743 } | 2750 } |
| 2744 | 2751 |
| 2745 if (FLAG_trace_hydrogen || FLAG_trace_hydrogen_stubs || FLAG_trace_turbo || | 2752 if (FLAG_trace_hydrogen || FLAG_trace_hydrogen_stubs || FLAG_trace_turbo || |
| 2746 FLAG_trace_turbo_graph) { | 2753 FLAG_trace_turbo_graph) { |
| 2747 PrintF("Concurrent recompilation has been disabled for tracing.\n"); | 2754 PrintF("Concurrent recompilation has been disabled for tracing.\n"); |
| 2748 } else if (OptimizingCompileDispatcher::Enabled()) { | 2755 } else if (OptimizingCompileDispatcher::Enabled()) { |
| (...skipping 983 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3732 // Then check whether this scope intercepts. | 3739 // Then check whether this scope intercepts. |
| 3733 if ((flag & intercept_mask_)) { | 3740 if ((flag & intercept_mask_)) { |
| 3734 intercepted_flags_ |= flag; | 3741 intercepted_flags_ |= flag; |
| 3735 return true; | 3742 return true; |
| 3736 } | 3743 } |
| 3737 return false; | 3744 return false; |
| 3738 } | 3745 } |
| 3739 | 3746 |
| 3740 } // namespace internal | 3747 } // namespace internal |
| 3741 } // namespace v8 | 3748 } // namespace v8 |
| OLD | NEW |