| 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" | 
| (...skipping 2149 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
| 2160   if (create_heap_objects) { | 2160   if (create_heap_objects) { | 
| 2161     // Terminate the cache array with the sentinel so we can iterate. | 2161     // Terminate the cache array with the sentinel so we can iterate. | 
| 2162     partial_snapshot_cache_.Add(heap_.undefined_value()); | 2162     partial_snapshot_cache_.Add(heap_.undefined_value()); | 
| 2163   } | 2163   } | 
| 2164 | 2164 | 
| 2165   InitializeThreadLocal(); | 2165   InitializeThreadLocal(); | 
| 2166 | 2166 | 
| 2167   bootstrapper_->Initialize(create_heap_objects); | 2167   bootstrapper_->Initialize(create_heap_objects); | 
| 2168   builtins_.SetUp(this, create_heap_objects); | 2168   builtins_.SetUp(this, create_heap_objects); | 
| 2169 | 2169 | 
| 2170   if (FLAG_ignition) { |  | 
| 2171     interpreter_->Initialize(); |  | 
| 2172   } |  | 
| 2173 |  | 
| 2174   if (FLAG_log_internal_timer_events) { | 2170   if (FLAG_log_internal_timer_events) { | 
| 2175     set_event_logger(Logger::DefaultEventLoggerSentinel); | 2171     set_event_logger(Logger::DefaultEventLoggerSentinel); | 
| 2176   } | 2172   } | 
| 2177 | 2173 | 
| 2178   if (FLAG_trace_hydrogen || FLAG_trace_hydrogen_stubs) { | 2174   if (FLAG_trace_hydrogen || FLAG_trace_hydrogen_stubs) { | 
| 2179     PrintF("Concurrent recompilation has been disabled for tracing.\n"); | 2175     PrintF("Concurrent recompilation has been disabled for tracing.\n"); | 
| 2180   } else if (OptimizingCompileDispatcher::Enabled()) { | 2176   } else if (OptimizingCompileDispatcher::Enabled()) { | 
| 2181     optimizing_compile_dispatcher_ = new OptimizingCompileDispatcher(this); | 2177     optimizing_compile_dispatcher_ = new OptimizingCompileDispatcher(this); | 
| 2182   } | 2178   } | 
| 2183 | 2179 | 
| 2184   // Initialize runtime profiler before deserialization, because collections may | 2180   // Initialize runtime profiler before deserialization, because collections may | 
| 2185   // occur, clearing/updating ICs. | 2181   // occur, clearing/updating ICs. | 
| 2186   runtime_profiler_ = new RuntimeProfiler(this); | 2182   runtime_profiler_ = new RuntimeProfiler(this); | 
| 2187 | 2183 | 
| 2188   if (create_heap_objects) { | 2184   if (create_heap_objects) { | 
| 2189     if (!bootstrapper_->CreateCodeStubContext(this)) { | 2185     if (!bootstrapper_->CreateCodeStubContext(this)) { | 
| 2190       return false; | 2186       return false; | 
| 2191     } | 2187     } | 
| 2192   } | 2188   } | 
| 2193 | 2189 | 
| 2194   // If we are deserializing, read the state into the now-empty heap. | 2190   // If we are deserializing, read the state into the now-empty heap. | 
| 2195   if (!create_heap_objects) { | 2191   if (!create_heap_objects) { | 
| 2196     des->Deserialize(this); | 2192     des->Deserialize(this); | 
| 2197   } | 2193   } | 
| 2198   stub_cache_->Initialize(); | 2194   stub_cache_->Initialize(); | 
| 2199 | 2195 | 
|  | 2196   if (FLAG_ignition) { | 
|  | 2197     interpreter_->Initialize(); | 
|  | 2198   } | 
|  | 2199 | 
| 2200   // Finish initialization of ThreadLocal after deserialization is done. | 2200   // Finish initialization of ThreadLocal after deserialization is done. | 
| 2201   clear_pending_exception(); | 2201   clear_pending_exception(); | 
| 2202   clear_pending_message(); | 2202   clear_pending_message(); | 
| 2203   clear_scheduled_exception(); | 2203   clear_scheduled_exception(); | 
| 2204 | 2204 | 
| 2205   // Deserializing may put strange things in the root array's copy of the | 2205   // Deserializing may put strange things in the root array's copy of the | 
| 2206   // stack guard. | 2206   // stack guard. | 
| 2207   heap_.SetStackLimits(); | 2207   heap_.SetStackLimits(); | 
| 2208 | 2208 | 
| 2209   // Quiet the heap NaN if needed on target platform. | 2209   // Quiet the heap NaN if needed on target platform. | 
| (...skipping 615 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
| 2825   // Then check whether this scope intercepts. | 2825   // Then check whether this scope intercepts. | 
| 2826   if ((flag & intercept_mask_)) { | 2826   if ((flag & intercept_mask_)) { | 
| 2827     intercepted_flags_ |= flag; | 2827     intercepted_flags_ |= flag; | 
| 2828     return true; | 2828     return true; | 
| 2829   } | 2829   } | 
| 2830   return false; | 2830   return false; | 
| 2831 } | 2831 } | 
| 2832 | 2832 | 
| 2833 }  // namespace internal | 2833 }  // namespace internal | 
| 2834 }  // namespace v8 | 2834 }  // namespace v8 | 
| OLD | NEW | 
|---|