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 2079 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
2090 heap_.SetStackLimits(); | 2090 heap_.SetStackLimits(); |
2091 | 2091 |
2092 // Quiet the heap NaN if needed on target platform. | 2092 // Quiet the heap NaN if needed on target platform. |
2093 if (!create_heap_objects) Assembler::QuietNaN(heap_.nan_value()); | 2093 if (!create_heap_objects) Assembler::QuietNaN(heap_.nan_value()); |
2094 | 2094 |
2095 if (FLAG_trace_turbo) { | 2095 if (FLAG_trace_turbo) { |
2096 // Create an empty file. | 2096 // Create an empty file. |
2097 std::ofstream(GetTurboCfgFileName().c_str(), std::ios_base::trunc); | 2097 std::ofstream(GetTurboCfgFileName().c_str(), std::ios_base::trunc); |
2098 } | 2098 } |
2099 | 2099 |
2100 // If we are deserializing, log non-function code objects and compiled | |
Jakob Kummerow
2014/12/15 12:09:15
Drive-by cleanup: Deserializer::Deserialize() (cal
Yang
2015/01/08 13:32:40
Nice catch.
| |
2101 // functions found in the snapshot. | |
2102 if (!create_heap_objects && | |
2103 (FLAG_log_code || | |
2104 FLAG_ll_prof || | |
2105 FLAG_perf_jit_prof || | |
2106 FLAG_perf_basic_prof || | |
2107 logger_->is_logging_code_events())) { | |
2108 HandleScope scope(this); | |
2109 LOG(this, LogCodeObjects()); | |
2110 LOG(this, LogCompiledFunctions()); | |
2111 } | |
2112 | |
2113 CHECK_EQ(static_cast<int>(OFFSET_OF(Isolate, embedder_data_)), | 2100 CHECK_EQ(static_cast<int>(OFFSET_OF(Isolate, embedder_data_)), |
2114 Internals::kIsolateEmbedderDataOffset); | 2101 Internals::kIsolateEmbedderDataOffset); |
2115 CHECK_EQ(static_cast<int>(OFFSET_OF(Isolate, heap_.roots_)), | 2102 CHECK_EQ(static_cast<int>(OFFSET_OF(Isolate, heap_.roots_)), |
2116 Internals::kIsolateRootsOffset); | 2103 Internals::kIsolateRootsOffset); |
2117 CHECK_EQ(static_cast<int>( | 2104 CHECK_EQ(static_cast<int>( |
2118 OFFSET_OF(Isolate, heap_.amount_of_external_allocated_memory_)), | 2105 OFFSET_OF(Isolate, heap_.amount_of_external_allocated_memory_)), |
2119 Internals::kAmountOfExternalAllocatedMemoryOffset); | 2106 Internals::kAmountOfExternalAllocatedMemoryOffset); |
2120 CHECK_EQ(static_cast<int>(OFFSET_OF( | 2107 CHECK_EQ(static_cast<int>(OFFSET_OF( |
2121 Isolate, | 2108 Isolate, |
2122 heap_.amount_of_external_allocated_memory_at_last_global_gc_)), | 2109 heap_.amount_of_external_allocated_memory_at_last_global_gc_)), |
(...skipping 426 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
2549 if (prev_ && prev_->Intercept(flag)) return true; | 2536 if (prev_ && prev_->Intercept(flag)) return true; |
2550 // Then check whether this scope intercepts. | 2537 // Then check whether this scope intercepts. |
2551 if ((flag & intercept_mask_)) { | 2538 if ((flag & intercept_mask_)) { |
2552 intercepted_flags_ |= flag; | 2539 intercepted_flags_ |= flag; |
2553 return true; | 2540 return true; |
2554 } | 2541 } |
2555 return false; | 2542 return false; |
2556 } | 2543 } |
2557 | 2544 |
2558 } } // namespace v8::internal | 2545 } } // namespace v8::internal |
OLD | NEW |