OLD | NEW |
1 // Copyright 2016 the V8 project authors. All rights reserved. | 1 // Copyright 2016 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/snapshot/deserializer.h" | 5 #include "src/snapshot/deserializer.h" |
6 | 6 |
7 #include "src/bootstrapper.h" | 7 #include "src/bootstrapper.h" |
8 #include "src/heap/heap.h" | 8 #include "src/heap/heap.h" |
9 #include "src/isolate.h" | 9 #include "src/isolate.h" |
10 #include "src/macro-assembler.h" | 10 #include "src/macro-assembler.h" |
(...skipping 23 matching lines...) Expand all Loading... |
34 while (it.has_next()) { | 34 while (it.has_next()) { |
35 Page* p = it.next(); | 35 Page* p = it.next(); |
36 Assembler::FlushICache(isolate_, p->area_start(), | 36 Assembler::FlushICache(isolate_, p->area_start(), |
37 p->area_end() - p->area_start()); | 37 p->area_end() - p->area_start()); |
38 } | 38 } |
39 } | 39 } |
40 | 40 |
41 void Deserializer::FlushICacheForNewCodeObjects() { | 41 void Deserializer::FlushICacheForNewCodeObjects() { |
42 DCHECK(deserializing_user_code_); | 42 DCHECK(deserializing_user_code_); |
43 for (Code* code : new_code_objects_) { | 43 for (Code* code : new_code_objects_) { |
| 44 if (FLAG_serialize_age_code) code->PreAge(isolate_); |
44 Assembler::FlushICache(isolate_, code->instruction_start(), | 45 Assembler::FlushICache(isolate_, code->instruction_start(), |
45 code->instruction_size()); | 46 code->instruction_size()); |
46 } | 47 } |
47 } | 48 } |
48 | 49 |
49 bool Deserializer::ReserveSpace() { | 50 bool Deserializer::ReserveSpace() { |
50 #ifdef DEBUG | 51 #ifdef DEBUG |
51 for (int i = NEW_SPACE; i < kNumberOfSpaces; ++i) { | 52 for (int i = NEW_SPACE; i < kNumberOfSpaces; ++i) { |
52 CHECK(reservations_[i].length() > 0); | 53 CHECK(reservations_[i].length() > 0); |
53 } | 54 } |
(...skipping 750 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
804 | 805 |
805 default: | 806 default: |
806 CHECK(false); | 807 CHECK(false); |
807 } | 808 } |
808 } | 809 } |
809 CHECK_EQ(limit, current); | 810 CHECK_EQ(limit, current); |
810 return true; | 811 return true; |
811 } | 812 } |
812 } // namespace internal | 813 } // namespace internal |
813 } // namespace v8 | 814 } // namespace v8 |
OLD | NEW |