| 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 2097 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2108 heap_.SetStackLimits(); | 2108 heap_.SetStackLimits(); |
| 2109 | 2109 |
| 2110 // Quiet the heap NaN if needed on target platform. | 2110 // Quiet the heap NaN if needed on target platform. |
| 2111 if (!create_heap_objects) Assembler::QuietNaN(heap_.nan_value()); | 2111 if (!create_heap_objects) Assembler::QuietNaN(heap_.nan_value()); |
| 2112 | 2112 |
| 2113 if (FLAG_trace_turbo) { | 2113 if (FLAG_trace_turbo) { |
| 2114 // Create an empty file. | 2114 // Create an empty file. |
| 2115 std::ofstream(GetTurboCfgFileName().c_str(), std::ios_base::trunc); | 2115 std::ofstream(GetTurboCfgFileName().c_str(), std::ios_base::trunc); |
| 2116 } | 2116 } |
| 2117 | 2117 |
| 2118 // If we are deserializing, log non-function code objects and compiled | |
| 2119 // functions found in the snapshot. | |
| 2120 if (!create_heap_objects && | |
| 2121 (FLAG_log_code || | |
| 2122 FLAG_ll_prof || | |
| 2123 FLAG_perf_jit_prof || | |
| 2124 FLAG_perf_basic_prof || | |
| 2125 logger_->is_logging_code_events())) { | |
| 2126 HandleScope scope(this); | |
| 2127 LOG(this, LogCodeObjects()); | |
| 2128 LOG(this, LogCompiledFunctions()); | |
| 2129 } | |
| 2130 | |
| 2131 CHECK_EQ(static_cast<int>(OFFSET_OF(Isolate, embedder_data_)), | 2118 CHECK_EQ(static_cast<int>(OFFSET_OF(Isolate, embedder_data_)), |
| 2132 Internals::kIsolateEmbedderDataOffset); | 2119 Internals::kIsolateEmbedderDataOffset); |
| 2133 CHECK_EQ(static_cast<int>(OFFSET_OF(Isolate, heap_.roots_)), | 2120 CHECK_EQ(static_cast<int>(OFFSET_OF(Isolate, heap_.roots_)), |
| 2134 Internals::kIsolateRootsOffset); | 2121 Internals::kIsolateRootsOffset); |
| 2135 CHECK_EQ(static_cast<int>( | 2122 CHECK_EQ(static_cast<int>( |
| 2136 OFFSET_OF(Isolate, heap_.amount_of_external_allocated_memory_)), | 2123 OFFSET_OF(Isolate, heap_.amount_of_external_allocated_memory_)), |
| 2137 Internals::kAmountOfExternalAllocatedMemoryOffset); | 2124 Internals::kAmountOfExternalAllocatedMemoryOffset); |
| 2138 CHECK_EQ(static_cast<int>(OFFSET_OF( | 2125 CHECK_EQ(static_cast<int>(OFFSET_OF( |
| 2139 Isolate, | 2126 Isolate, |
| 2140 heap_.amount_of_external_allocated_memory_at_last_global_gc_)), | 2127 heap_.amount_of_external_allocated_memory_at_last_global_gc_)), |
| (...skipping 428 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2569 if (prev_ && prev_->Intercept(flag)) return true; | 2556 if (prev_ && prev_->Intercept(flag)) return true; |
| 2570 // Then check whether this scope intercepts. | 2557 // Then check whether this scope intercepts. |
| 2571 if ((flag & intercept_mask_)) { | 2558 if ((flag & intercept_mask_)) { |
| 2572 intercepted_flags_ |= flag; | 2559 intercepted_flags_ |= flag; |
| 2573 return true; | 2560 return true; |
| 2574 } | 2561 } |
| 2575 return false; | 2562 return false; |
| 2576 } | 2563 } |
| 2577 | 2564 |
| 2578 } } // namespace v8::internal | 2565 } } // namespace v8::internal |
| OLD | NEW |