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/external-reference-table.h" | 8 #include "src/external-reference-table.h" |
9 #include "src/heap/heap.h" | 9 #include "src/heap/heap.h" |
10 #include "src/isolate.h" | 10 #include "src/isolate.h" |
(...skipping 407 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
418 DCHECK(space_index < kNumberOfPreallocatedSpaces); | 418 DCHECK(space_index < kNumberOfPreallocatedSpaces); |
419 Address address = high_water_[space_index]; | 419 Address address = high_water_[space_index]; |
420 DCHECK_NOT_NULL(address); | 420 DCHECK_NOT_NULL(address); |
421 high_water_[space_index] += size; | 421 high_water_[space_index] += size; |
422 #ifdef DEBUG | 422 #ifdef DEBUG |
423 // Assert that the current reserved chunk is still big enough. | 423 // Assert that the current reserved chunk is still big enough. |
424 const Heap::Reservation& reservation = reservations_[space_index]; | 424 const Heap::Reservation& reservation = reservations_[space_index]; |
425 int chunk_index = current_chunk_[space_index]; | 425 int chunk_index = current_chunk_[space_index]; |
426 CHECK_LE(high_water_[space_index], reservation[chunk_index].end); | 426 CHECK_LE(high_water_[space_index], reservation[chunk_index].end); |
427 #endif | 427 #endif |
| 428 if (space_index == CODE_SPACE) SkipList::Update(address, size); |
428 return address; | 429 return address; |
429 } | 430 } |
430 } | 431 } |
431 | 432 |
432 Object** Deserializer::CopyInNativesSource(Vector<const char> source_vector, | 433 Object** Deserializer::CopyInNativesSource(Vector<const char> source_vector, |
433 Object** current) { | 434 Object** current) { |
434 DCHECK(!isolate_->heap()->deserialization_complete()); | 435 DCHECK(!isolate_->heap()->deserialization_complete()); |
435 NativesExternalStringResource* resource = new NativesExternalStringResource( | 436 NativesExternalStringResource* resource = new NativesExternalStringResource( |
436 source_vector.start(), source_vector.length()); | 437 source_vector.start(), source_vector.length()); |
437 Object* resource_obj = reinterpret_cast<Object*>(resource); | 438 Object* resource_obj = reinterpret_cast<Object*>(resource); |
(...skipping 374 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
812 | 813 |
813 default: | 814 default: |
814 CHECK(false); | 815 CHECK(false); |
815 } | 816 } |
816 } | 817 } |
817 CHECK_EQ(limit, current); | 818 CHECK_EQ(limit, current); |
818 return true; | 819 return true; |
819 } | 820 } |
820 } // namespace internal | 821 } // namespace internal |
821 } // namespace v8 | 822 } // namespace v8 |
OLD | NEW |