| OLD | NEW |
| 1 // Copyright 2012 the V8 project authors. All rights reserved. | 1 // Copyright 2012 the V8 project authors. All rights reserved. |
| 2 // Redistribution and use in source and binary forms, with or without | 2 // Redistribution and use in source and binary forms, with or without |
| 3 // modification, are permitted provided that the following conditions are | 3 // modification, are permitted provided that the following conditions are |
| 4 // met: | 4 // met: |
| 5 // | 5 // |
| 6 // * Redistributions of source code must retain the above copyright | 6 // * Redistributions of source code must retain the above copyright |
| 7 // notice, this list of conditions and the following disclaimer. | 7 // notice, this list of conditions and the following disclaimer. |
| 8 // * Redistributions in binary form must reproduce the above | 8 // * Redistributions in binary form must reproduce the above |
| 9 // copyright notice, this list of conditions and the following | 9 // copyright notice, this list of conditions and the following |
| 10 // disclaimer in the documentation and/or other materials provided | 10 // disclaimer in the documentation and/or other materials provided |
| (...skipping 1279 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1290 HowToCode how_to_code, | 1290 HowToCode how_to_code, |
| 1291 WhereToPoint where_to_point, | 1291 WhereToPoint where_to_point, |
| 1292 int skip) { | 1292 int skip) { |
| 1293 CHECK(o->IsHeapObject()); | 1293 CHECK(o->IsHeapObject()); |
| 1294 HeapObject* heap_object = HeapObject::cast(o); | 1294 HeapObject* heap_object = HeapObject::cast(o); |
| 1295 | 1295 |
| 1296 if (heap_object->IsMap()) { | 1296 if (heap_object->IsMap()) { |
| 1297 // The code-caches link to context-specific code objects, which | 1297 // The code-caches link to context-specific code objects, which |
| 1298 // the startup and context serializes cannot currently handle. | 1298 // the startup and context serializes cannot currently handle. |
| 1299 ASSERT(Map::cast(heap_object)->code_cache() == | 1299 ASSERT(Map::cast(heap_object)->code_cache() == |
| 1300 heap_object->GetHeap()->raw_unchecked_empty_fixed_array()); | 1300 heap_object->GetHeap()->empty_fixed_array()); |
| 1301 } | 1301 } |
| 1302 | 1302 |
| 1303 int root_index; | 1303 int root_index; |
| 1304 if ((root_index = RootIndex(heap_object, how_to_code)) != kInvalidRootIndex) { | 1304 if ((root_index = RootIndex(heap_object, how_to_code)) != kInvalidRootIndex) { |
| 1305 PutRoot(root_index, heap_object, how_to_code, where_to_point, skip); | 1305 PutRoot(root_index, heap_object, how_to_code, where_to_point, skip); |
| 1306 return; | 1306 return; |
| 1307 } | 1307 } |
| 1308 | 1308 |
| 1309 if (ShouldBeInThePartialSnapshotCache(heap_object)) { | 1309 if (ShouldBeInThePartialSnapshotCache(heap_object)) { |
| 1310 if (skip != 0) { | 1310 if (skip != 0) { |
| (...skipping 308 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1619 | 1619 |
| 1620 bool SnapshotByteSource::AtEOF() { | 1620 bool SnapshotByteSource::AtEOF() { |
| 1621 if (0u + length_ - position_ > 2 * sizeof(uint32_t)) return false; | 1621 if (0u + length_ - position_ > 2 * sizeof(uint32_t)) return false; |
| 1622 for (int x = position_; x < length_; x++) { | 1622 for (int x = position_; x < length_; x++) { |
| 1623 if (data_[x] != SerializerDeserializer::nop()) return false; | 1623 if (data_[x] != SerializerDeserializer::nop()) return false; |
| 1624 } | 1624 } |
| 1625 return true; | 1625 return true; |
| 1626 } | 1626 } |
| 1627 | 1627 |
| 1628 } } // namespace v8::internal | 1628 } } // namespace v8::internal |
| OLD | NEW |