| 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 145 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
|  156       isolate->heap()->RegisterReservationsForBlackAllocation(reservations_); |  156       isolate->heap()->RegisterReservationsForBlackAllocation(reservations_); | 
|  157     } |  157     } | 
|  158     CommitPostProcessedObjects(isolate); |  158     CommitPostProcessedObjects(isolate); | 
|  159     return scope.CloseAndEscape(result); |  159     return scope.CloseAndEscape(result); | 
|  160   } |  160   } | 
|  161 } |  161 } | 
|  162  |  162  | 
|  163 Deserializer::~Deserializer() { |  163 Deserializer::~Deserializer() { | 
|  164   // TODO(svenpanne) Re-enable this assertion when v8 initialization is fixed. |  164   // TODO(svenpanne) Re-enable this assertion when v8 initialization is fixed. | 
|  165   // DCHECK(source_.AtEOF()); |  165   // DCHECK(source_.AtEOF()); | 
 |  166 #ifdef DEBUG | 
|  166   for (int space = 0; space < kNumberOfPreallocatedSpaces; space++) { |  167   for (int space = 0; space < kNumberOfPreallocatedSpaces; space++) { | 
|  167     int chunk_index = current_chunk_[space]; |  168     int chunk_index = current_chunk_[space]; | 
|  168     CHECK_EQ(reservations_[space].length(), chunk_index + 1); |  169     CHECK_EQ(reservations_[space].length(), chunk_index + 1); | 
|  169     CHECK_EQ(reservations_[space][chunk_index].end, high_water_[space]); |  170     CHECK_EQ(reservations_[space][chunk_index].end, high_water_[space]); | 
|  170   } |  171   } | 
|  171   CHECK_EQ(allocated_maps_.length(), next_map_index_); |  172   CHECK_EQ(allocated_maps_.length(), next_map_index_); | 
 |  173 #endif  // DEBUG | 
|  172 } |  174 } | 
|  173  |  175  | 
|  174 // This is called on the roots.  It is the driver of the deserialization |  176 // This is called on the roots.  It is the driver of the deserialization | 
|  175 // process.  It is also called on the body of each function. |  177 // process.  It is also called on the body of each function. | 
|  176 void Deserializer::VisitPointers(Object** start, Object** end) { |  178 void Deserializer::VisitPointers(Object** start, Object** end) { | 
|  177   // The space must be new space.  Any other space would cause ReadChunk to try |  179   // The space must be new space.  Any other space would cause ReadChunk to try | 
|  178   // to update the remembered using NULL as the address. |  180   // to update the remembered using NULL as the address. | 
|  179   ReadData(start, end, NEW_SPACE, NULL); |  181   ReadData(start, end, NEW_SPACE, NULL); | 
|  180 } |  182 } | 
|  181  |  183  | 
| (...skipping 640 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
|  822  |  824  | 
|  823       default: |  825       default: | 
|  824         CHECK(false); |  826         CHECK(false); | 
|  825     } |  827     } | 
|  826   } |  828   } | 
|  827   CHECK_EQ(limit, current); |  829   CHECK_EQ(limit, current); | 
|  828   return true; |  830   return true; | 
|  829 } |  831 } | 
|  830 }  // namespace internal |  832 }  // namespace internal | 
|  831 }  // namespace v8 |  833 }  // namespace v8 | 
| OLD | NEW |