| 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> |
| (...skipping 1840 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1851 : embedder_data_(), | 1851 : embedder_data_(), |
| 1852 entry_stack_(NULL), | 1852 entry_stack_(NULL), |
| 1853 stack_trace_nesting_level_(0), | 1853 stack_trace_nesting_level_(0), |
| 1854 incomplete_message_(NULL), | 1854 incomplete_message_(NULL), |
| 1855 bootstrapper_(NULL), | 1855 bootstrapper_(NULL), |
| 1856 runtime_profiler_(NULL), | 1856 runtime_profiler_(NULL), |
| 1857 compilation_cache_(NULL), | 1857 compilation_cache_(NULL), |
| 1858 counters_(NULL), | 1858 counters_(NULL), |
| 1859 logger_(NULL), | 1859 logger_(NULL), |
| 1860 stats_table_(NULL), | 1860 stats_table_(NULL), |
| 1861 stub_cache_(NULL), | 1861 load_stub_cache_(NULL), |
| 1862 store_stub_cache_(NULL), |
| 1862 code_aging_helper_(NULL), | 1863 code_aging_helper_(NULL), |
| 1863 deoptimizer_data_(NULL), | 1864 deoptimizer_data_(NULL), |
| 1864 deoptimizer_lazy_throw_(false), | 1865 deoptimizer_lazy_throw_(false), |
| 1865 materialized_object_store_(NULL), | 1866 materialized_object_store_(NULL), |
| 1866 capture_stack_trace_for_uncaught_exceptions_(false), | 1867 capture_stack_trace_for_uncaught_exceptions_(false), |
| 1867 stack_trace_for_uncaught_exceptions_frame_limit_(0), | 1868 stack_trace_for_uncaught_exceptions_frame_limit_(0), |
| 1868 stack_trace_for_uncaught_exceptions_options_(StackTrace::kOverview), | 1869 stack_trace_for_uncaught_exceptions_options_(StackTrace::kOverview), |
| 1869 keyed_lookup_cache_(NULL), | 1870 keyed_lookup_cache_(NULL), |
| 1870 context_slot_cache_(NULL), | 1871 context_slot_cache_(NULL), |
| 1871 descriptor_lookup_cache_(NULL), | 1872 descriptor_lookup_cache_(NULL), |
| (...skipping 217 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2089 delete regexp_stack_; | 2090 delete regexp_stack_; |
| 2090 regexp_stack_ = NULL; | 2091 regexp_stack_ = NULL; |
| 2091 | 2092 |
| 2092 delete descriptor_lookup_cache_; | 2093 delete descriptor_lookup_cache_; |
| 2093 descriptor_lookup_cache_ = NULL; | 2094 descriptor_lookup_cache_ = NULL; |
| 2094 delete context_slot_cache_; | 2095 delete context_slot_cache_; |
| 2095 context_slot_cache_ = NULL; | 2096 context_slot_cache_ = NULL; |
| 2096 delete keyed_lookup_cache_; | 2097 delete keyed_lookup_cache_; |
| 2097 keyed_lookup_cache_ = NULL; | 2098 keyed_lookup_cache_ = NULL; |
| 2098 | 2099 |
| 2099 delete stub_cache_; | 2100 delete load_stub_cache_; |
| 2100 stub_cache_ = NULL; | 2101 load_stub_cache_ = NULL; |
| 2102 delete store_stub_cache_; |
| 2103 store_stub_cache_ = NULL; |
| 2101 delete code_aging_helper_; | 2104 delete code_aging_helper_; |
| 2102 code_aging_helper_ = NULL; | 2105 code_aging_helper_ = NULL; |
| 2103 delete stats_table_; | 2106 delete stats_table_; |
| 2104 stats_table_ = NULL; | 2107 stats_table_ = NULL; |
| 2105 | 2108 |
| 2106 delete materialized_object_store_; | 2109 delete materialized_object_store_; |
| 2107 materialized_object_store_ = NULL; | 2110 materialized_object_store_ = NULL; |
| 2108 | 2111 |
| 2109 delete logger_; | 2112 delete logger_; |
| 2110 logger_ = NULL; | 2113 logger_ = NULL; |
| (...skipping 122 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2233 compilation_cache_ = new CompilationCache(this); | 2236 compilation_cache_ = new CompilationCache(this); |
| 2234 keyed_lookup_cache_ = new KeyedLookupCache(); | 2237 keyed_lookup_cache_ = new KeyedLookupCache(); |
| 2235 context_slot_cache_ = new ContextSlotCache(); | 2238 context_slot_cache_ = new ContextSlotCache(); |
| 2236 descriptor_lookup_cache_ = new DescriptorLookupCache(); | 2239 descriptor_lookup_cache_ = new DescriptorLookupCache(); |
| 2237 unicode_cache_ = new UnicodeCache(); | 2240 unicode_cache_ = new UnicodeCache(); |
| 2238 inner_pointer_to_code_cache_ = new InnerPointerToCodeCache(this); | 2241 inner_pointer_to_code_cache_ = new InnerPointerToCodeCache(this); |
| 2239 global_handles_ = new GlobalHandles(this); | 2242 global_handles_ = new GlobalHandles(this); |
| 2240 eternal_handles_ = new EternalHandles(); | 2243 eternal_handles_ = new EternalHandles(); |
| 2241 bootstrapper_ = new Bootstrapper(this); | 2244 bootstrapper_ = new Bootstrapper(this); |
| 2242 handle_scope_implementer_ = new HandleScopeImplementer(this); | 2245 handle_scope_implementer_ = new HandleScopeImplementer(this); |
| 2243 stub_cache_ = new StubCache(this); | 2246 load_stub_cache_ = new StubCache(this, Code::LOAD_IC); |
| 2247 store_stub_cache_ = new StubCache(this, Code::STORE_IC); |
| 2244 materialized_object_store_ = new MaterializedObjectStore(this); | 2248 materialized_object_store_ = new MaterializedObjectStore(this); |
| 2245 regexp_stack_ = new RegExpStack(); | 2249 regexp_stack_ = new RegExpStack(); |
| 2246 regexp_stack_->isolate_ = this; | 2250 regexp_stack_->isolate_ = this; |
| 2247 date_cache_ = new DateCache(); | 2251 date_cache_ = new DateCache(); |
| 2248 call_descriptor_data_ = | 2252 call_descriptor_data_ = |
| 2249 new CallInterfaceDescriptorData[CallDescriptors::NUMBER_OF_DESCRIPTORS]; | 2253 new CallInterfaceDescriptorData[CallDescriptors::NUMBER_OF_DESCRIPTORS]; |
| 2250 cpu_profiler_ = new CpuProfiler(this); | 2254 cpu_profiler_ = new CpuProfiler(this); |
| 2251 heap_profiler_ = new HeapProfiler(heap()); | 2255 heap_profiler_ = new HeapProfiler(heap()); |
| 2252 interpreter_ = new interpreter::Interpreter(this); | 2256 interpreter_ = new interpreter::Interpreter(this); |
| 2253 | 2257 |
| (...skipping 55 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2309 } | 2313 } |
| 2310 | 2314 |
| 2311 // Initialize runtime profiler before deserialization, because collections may | 2315 // Initialize runtime profiler before deserialization, because collections may |
| 2312 // occur, clearing/updating ICs. | 2316 // occur, clearing/updating ICs. |
| 2313 runtime_profiler_ = new RuntimeProfiler(this); | 2317 runtime_profiler_ = new RuntimeProfiler(this); |
| 2314 | 2318 |
| 2315 // If we are deserializing, read the state into the now-empty heap. | 2319 // If we are deserializing, read the state into the now-empty heap. |
| 2316 if (!create_heap_objects) { | 2320 if (!create_heap_objects) { |
| 2317 des->Deserialize(this); | 2321 des->Deserialize(this); |
| 2318 } | 2322 } |
| 2319 stub_cache_->Initialize(); | 2323 load_stub_cache_->Initialize(); |
| 2324 store_stub_cache_->Initialize(); |
| 2320 if (FLAG_ignition || serializer_enabled()) { | 2325 if (FLAG_ignition || serializer_enabled()) { |
| 2321 interpreter_->Initialize(); | 2326 interpreter_->Initialize(); |
| 2322 } | 2327 } |
| 2323 | 2328 |
| 2324 // Finish initialization of ThreadLocal after deserialization is done. | 2329 // Finish initialization of ThreadLocal after deserialization is done. |
| 2325 clear_pending_exception(); | 2330 clear_pending_exception(); |
| 2326 clear_pending_message(); | 2331 clear_pending_message(); |
| 2327 clear_scheduled_exception(); | 2332 clear_scheduled_exception(); |
| 2328 | 2333 |
| 2329 // Deserializing may put strange things in the root array's copy of the | 2334 // Deserializing may put strange things in the root array's copy of the |
| (...skipping 757 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3087 // Then check whether this scope intercepts. | 3092 // Then check whether this scope intercepts. |
| 3088 if ((flag & intercept_mask_)) { | 3093 if ((flag & intercept_mask_)) { |
| 3089 intercepted_flags_ |= flag; | 3094 intercepted_flags_ |= flag; |
| 3090 return true; | 3095 return true; |
| 3091 } | 3096 } |
| 3092 return false; | 3097 return false; |
| 3093 } | 3098 } |
| 3094 | 3099 |
| 3095 } // namespace internal | 3100 } // namespace internal |
| 3096 } // namespace v8 | 3101 } // namespace v8 |
| OLD | NEW |