OLD | NEW |
1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file |
2 // for details. All rights reserved. Use of this source code is governed by a | 2 // for details. All rights reserved. Use of this source code is governed by a |
3 // BSD-style license that can be found in the LICENSE file. | 3 // BSD-style license that can be found in the LICENSE file. |
4 | 4 |
5 #include "vm/snapshot.h" | 5 #include "vm/snapshot.h" |
6 | 6 |
7 #include "platform/assert.h" | 7 #include "platform/assert.h" |
8 #include "vm/bootstrap.h" | 8 #include "vm/bootstrap.h" |
9 #include "vm/class_finalizer.h" | 9 #include "vm/class_finalizer.h" |
10 #include "vm/dart.h" | 10 #include "vm/dart.h" |
(...skipping 159 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
170 | 170 |
171 intptr_t BaseReader::ReadSmiValue() { | 171 intptr_t BaseReader::ReadSmiValue() { |
172 return Smi::Value(ReadAsSmi()); | 172 return Smi::Value(ReadAsSmi()); |
173 } | 173 } |
174 | 174 |
175 | 175 |
176 SnapshotReader::SnapshotReader( | 176 SnapshotReader::SnapshotReader( |
177 const uint8_t* buffer, | 177 const uint8_t* buffer, |
178 intptr_t size, | 178 intptr_t size, |
179 const uint8_t* instructions_buffer, | 179 const uint8_t* instructions_buffer, |
| 180 const uint8_t* data_buffer, |
180 Snapshot::Kind kind, | 181 Snapshot::Kind kind, |
181 ZoneGrowableArray<BackRefNode>* backward_refs, | 182 ZoneGrowableArray<BackRefNode>* backward_refs, |
182 Thread* thread) | 183 Thread* thread) |
183 : BaseReader(buffer, size), | 184 : BaseReader(buffer, size), |
184 instructions_buffer_(instructions_buffer), | 185 instructions_buffer_(instructions_buffer), |
| 186 data_buffer_(data_buffer), |
185 kind_(kind), | 187 kind_(kind), |
186 snapshot_code_(instructions_buffer != NULL), | 188 snapshot_code_(instructions_buffer != NULL), |
187 thread_(thread), | 189 thread_(thread), |
188 zone_(thread->zone()), | 190 zone_(thread->zone()), |
189 heap_(isolate()->heap()), | 191 heap_(isolate()->heap()), |
190 old_space_(thread_->isolate()->heap()->old_space()), | 192 old_space_(thread_->isolate()->heap()->old_space()), |
191 cls_(Class::Handle(zone_)), | 193 cls_(Class::Handle(zone_)), |
192 obj_(Object::Handle(zone_)), | 194 obj_(Object::Handle(zone_)), |
193 pobj_(PassiveObject::Handle(zone_)), | 195 pobj_(PassiveObject::Handle(zone_)), |
194 array_(Array::Handle(zone_)), | 196 array_(Array::Handle(zone_)), |
195 field_(Field::Handle(zone_)), | 197 field_(Field::Handle(zone_)), |
196 str_(String::Handle(zone_)), | 198 str_(String::Handle(zone_)), |
197 library_(Library::Handle(zone_)), | 199 library_(Library::Handle(zone_)), |
198 type_(AbstractType::Handle(zone_)), | 200 type_(AbstractType::Handle(zone_)), |
199 type_arguments_(TypeArguments::Handle(zone_)), | 201 type_arguments_(TypeArguments::Handle(zone_)), |
200 tokens_(GrowableObjectArray::Handle(zone_)), | 202 tokens_(GrowableObjectArray::Handle(zone_)), |
201 stream_(TokenStream::Handle(zone_)), | 203 stream_(TokenStream::Handle(zone_)), |
202 data_(ExternalTypedData::Handle(zone_)), | 204 data_(ExternalTypedData::Handle(zone_)), |
203 typed_data_(TypedData::Handle(zone_)), | 205 typed_data_(TypedData::Handle(zone_)), |
204 code_(Code::Handle(zone_)), | 206 code_(Code::Handle(zone_)), |
205 function_(Function::Handle(zone_)), | 207 function_(Function::Handle(zone_)), |
206 megamorphic_cache_(MegamorphicCache::Handle(zone_)), | 208 megamorphic_cache_(MegamorphicCache::Handle(zone_)), |
207 error_(UnhandledException::Handle(zone_)), | 209 error_(UnhandledException::Handle(zone_)), |
208 max_vm_isolate_object_id_( | 210 max_vm_isolate_object_id_( |
209 (kind == Snapshot::kFull) ? | 211 (kind == Snapshot::kFull) ? |
210 Object::vm_isolate_snapshot_object_table().Length() : 0), | 212 Object::vm_isolate_snapshot_object_table().Length() : 0), |
211 backward_references_(backward_refs), | 213 backward_references_(backward_refs), |
212 instructions_reader_(NULL) { | 214 instructions_reader_(NULL) { |
213 if (instructions_buffer != NULL) { | 215 if (instructions_buffer != NULL) { |
214 instructions_reader_ = new InstructionsReader(instructions_buffer); | 216 instructions_reader_ = |
| 217 new InstructionsReader(instructions_buffer, data_buffer); |
215 } | 218 } |
216 } | 219 } |
217 | 220 |
218 | 221 |
219 RawObject* SnapshotReader::ReadObject() { | 222 RawObject* SnapshotReader::ReadObject() { |
220 // Setup for long jump in case there is an exception while reading. | 223 // Setup for long jump in case there is an exception while reading. |
221 LongJumpScope jump; | 224 LongJumpScope jump; |
222 if (setjmp(*jump.Set()) == 0) { | 225 if (setjmp(*jump.Set()) == 0) { |
223 PassiveObject& obj = | 226 PassiveObject& obj = |
224 PassiveObject::Handle(zone(), ReadObjectImpl(kAsInlinedObject)); | 227 PassiveObject::Handle(zone(), ReadObjectImpl(kAsInlinedObject)); |
(...skipping 901 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1126 | 1129 |
1127 int32_t InstructionsWriter::GetOffsetFor(RawInstructions* instructions) { | 1130 int32_t InstructionsWriter::GetOffsetFor(RawInstructions* instructions) { |
1128 intptr_t heap_size = instructions->Size(); | 1131 intptr_t heap_size = instructions->Size(); |
1129 intptr_t offset = next_offset_; | 1132 intptr_t offset = next_offset_; |
1130 next_offset_ += heap_size; | 1133 next_offset_ += heap_size; |
1131 instructions_.Add(InstructionsData(instructions)); | 1134 instructions_.Add(InstructionsData(instructions)); |
1132 return offset; | 1135 return offset; |
1133 } | 1136 } |
1134 | 1137 |
1135 | 1138 |
| 1139 int32_t InstructionsWriter::GetObjectOffsetFor(RawObject* raw_object) { |
| 1140 intptr_t heap_size = raw_object->Size(); |
| 1141 intptr_t offset = next_object_offset_; |
| 1142 next_object_offset_ += heap_size; |
| 1143 objects_.Add(ObjectData(raw_object)); |
| 1144 return offset; |
| 1145 } |
| 1146 |
| 1147 |
1136 static void EnsureIdentifier(char* label) { | 1148 static void EnsureIdentifier(char* label) { |
1137 for (char c = *label; c != '\0'; c = *++label) { | 1149 for (char c = *label; c != '\0'; c = *++label) { |
1138 if (((c >= 'a') && (c <= 'z')) || | 1150 if (((c >= 'a') && (c <= 'z')) || |
1139 ((c >= 'A') && (c <= 'Z')) || | 1151 ((c >= 'A') && (c <= 'Z')) || |
1140 ((c >= '0') && (c <= '9'))) { | 1152 ((c >= '0') && (c <= '9'))) { |
1141 continue; | 1153 continue; |
1142 } | 1154 } |
1143 *label = '_'; | 1155 *label = '_'; |
1144 } | 1156 } |
1145 } | 1157 } |
1146 | 1158 |
1147 | 1159 |
1148 void InstructionsWriter::WriteAssembly() { | 1160 void InstructionsWriter::WriteAssembly() { |
1149 Zone* Z = Thread::Current()->zone(); | 1161 Zone* Z = Thread::Current()->zone(); |
1150 | 1162 |
1151 // Handlify collected raw pointers as building the names below | 1163 // Handlify collected raw pointers as building the names below |
1152 // will allocate on the Dart heap. | 1164 // will allocate on the Dart heap. |
1153 for (intptr_t i = 0; i < instructions_.length(); i++) { | 1165 for (intptr_t i = 0; i < instructions_.length(); i++) { |
1154 InstructionsData& data = instructions_[i]; | 1166 InstructionsData& data = instructions_[i]; |
1155 data.insns_ = &Instructions::Handle(Z, data.raw_insns_); | 1167 data.insns_ = &Instructions::Handle(Z, data.raw_insns_); |
1156 ASSERT(data.raw_code_ != NULL); | 1168 ASSERT(data.raw_code_ != NULL); |
1157 data.code_ = &Code::Handle(Z, data.raw_code_); | 1169 data.code_ = &Code::Handle(Z, data.raw_code_); |
1158 } | 1170 } |
| 1171 for (intptr_t i = 0; i < objects_.length(); i++) { |
| 1172 ObjectData& data = objects_[i]; |
| 1173 data.obj_ = &Object::Handle(Z, data.raw_obj_); |
| 1174 } |
1159 | 1175 |
1160 stream_.Print(".text\n"); | 1176 stream_.Print(".text\n"); |
1161 stream_.Print(".globl _kInstructionsSnapshot\n"); | 1177 stream_.Print(".globl _kInstructionsSnapshot\n"); |
1162 stream_.Print(".balign %" Pd ", 0\n", OS::kMaxPreferredCodeAlignment); | 1178 // Start snapshot at page boundary. |
| 1179 ASSERT(VirtualMemory::PageSize() >= OS::kMaxPreferredCodeAlignment); |
| 1180 stream_.Print(".balign %" Pd ", 0\n", VirtualMemory::PageSize()); |
1163 stream_.Print("_kInstructionsSnapshot:\n"); | 1181 stream_.Print("_kInstructionsSnapshot:\n"); |
1164 | 1182 |
1165 // This head also provides the gap to make the instructions snapshot | 1183 // This head also provides the gap to make the instructions snapshot |
1166 // look like a HeapPage. | 1184 // look like a HeapPage. |
1167 intptr_t instructions_length = next_offset_; | 1185 intptr_t instructions_length = next_offset_; |
1168 WriteWordLiteral(instructions_length); | 1186 WriteWordLiteral(instructions_length); |
1169 intptr_t header_words = InstructionsSnapshot::kHeaderSize / sizeof(uword); | 1187 intptr_t header_words = InstructionsSnapshot::kHeaderSize / sizeof(uword); |
1170 for (intptr_t i = 1; i < header_words; i++) { | 1188 for (intptr_t i = 1; i < header_words; i++) { |
1171 WriteWordLiteral(0); | 1189 WriteWordLiteral(0); |
1172 } | 1190 } |
(...skipping 61 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1234 ASSERT(Utils::IsAligned(entry, sizeof(uint64_t))); | 1252 ASSERT(Utils::IsAligned(entry, sizeof(uint64_t))); |
1235 ASSERT(Utils::IsAligned(end, sizeof(uint64_t))); | 1253 ASSERT(Utils::IsAligned(end, sizeof(uint64_t))); |
1236 | 1254 |
1237 for (uword* cursor = reinterpret_cast<uword*>(entry); | 1255 for (uword* cursor = reinterpret_cast<uword*>(entry); |
1238 cursor < reinterpret_cast<uword*>(end); | 1256 cursor < reinterpret_cast<uword*>(end); |
1239 cursor++) { | 1257 cursor++) { |
1240 WriteWordLiteral(*cursor); | 1258 WriteWordLiteral(*cursor); |
1241 } | 1259 } |
1242 } | 1260 } |
1243 } | 1261 } |
| 1262 #if defined(TARGET_OS_LINUX) |
| 1263 stream_.Print(".section .rodata\n"); |
| 1264 #elif defined(TARGET_OS_MACOS) |
| 1265 stream_.Print(".const\n"); |
| 1266 #else |
| 1267 #error Unsupported platform |
| 1268 #endif |
| 1269 stream_.Print(".globl _kDataSnapshot\n"); |
| 1270 // Start snapshot at page boundary. |
| 1271 stream_.Print(".balign %" Pd ", 0\n", VirtualMemory::PageSize()); |
| 1272 stream_.Print("_kDataSnapshot:\n"); |
| 1273 WriteWordLiteral(next_object_offset_); // Data length. |
| 1274 COMPILE_ASSERT(OS::kMaxPreferredCodeAlignment >= kObjectAlignment); |
| 1275 stream_.Print(".balign %" Pd ", 0\n", OS::kMaxPreferredCodeAlignment); |
| 1276 |
| 1277 for (intptr_t i = 0; i < objects_.length(); i++) { |
| 1278 const Object& obj = *objects_[i].obj_; |
| 1279 stream_.Print("Precompiled_Obj_%d:\n", i); |
| 1280 |
| 1281 NoSafepointScope no_safepoint; |
| 1282 uword start = reinterpret_cast<uword>(obj.raw()) - kHeapObjectTag; |
| 1283 uword end = start + obj.raw()->Size(); |
| 1284 |
| 1285 // Write object header with the mark and VM heap bits set. |
| 1286 uword marked_tags = obj.raw()->ptr()->tags_; |
| 1287 marked_tags = RawObject::VMHeapObjectTag::update(true, marked_tags); |
| 1288 marked_tags = RawObject::MarkBit::update(true, marked_tags); |
| 1289 WriteWordLiteral(marked_tags); |
| 1290 start += sizeof(uword); |
| 1291 for (uword* cursor = reinterpret_cast<uword*>(start); |
| 1292 cursor < reinterpret_cast<uword*>(end); |
| 1293 cursor++) { |
| 1294 WriteWordLiteral(*cursor); |
| 1295 } |
| 1296 } |
1244 } | 1297 } |
1245 | 1298 |
1246 | 1299 |
1247 RawInstructions* InstructionsReader::GetInstructionsAt(int32_t offset, | 1300 RawInstructions* InstructionsReader::GetInstructionsAt(int32_t offset, |
1248 uword expected_tags) { | 1301 uword expected_tags) { |
1249 ASSERT(Utils::IsAligned(offset, OS::PreferredCodeAlignment())); | 1302 ASSERT(Utils::IsAligned(offset, OS::PreferredCodeAlignment())); |
1250 | 1303 |
1251 RawInstructions* result = | 1304 RawInstructions* result = |
1252 reinterpret_cast<RawInstructions*>( | 1305 reinterpret_cast<RawInstructions*>( |
1253 reinterpret_cast<uword>(buffer_) + offset + kHeapObjectTag); | 1306 reinterpret_cast<uword>(instructions_buffer_) + |
| 1307 offset + kHeapObjectTag); |
1254 | 1308 |
| 1309 #ifdef DEBUG |
1255 uword actual_tags = result->ptr()->tags_; | 1310 uword actual_tags = result->ptr()->tags_; |
1256 if (actual_tags != expected_tags) { | 1311 if (actual_tags != expected_tags) { |
1257 FATAL2("Instructions tag mismatch: expected %" Pd ", saw %" Pd, | 1312 FATAL2("Instructions tag mismatch: expected %" Pd ", saw %" Pd, |
1258 expected_tags, | 1313 expected_tags, |
1259 actual_tags); | 1314 actual_tags); |
1260 } | 1315 } |
| 1316 #endif |
1261 | 1317 |
1262 ASSERT(result->IsMarked()); | 1318 ASSERT(result->IsMarked()); |
1263 | 1319 |
1264 return result; | 1320 return result; |
| 1321 } |
| 1322 |
| 1323 |
| 1324 RawObject* InstructionsReader::GetObjectAt(int32_t offset) { |
| 1325 ASSERT(Utils::IsAligned(offset, kWordSize)); |
| 1326 |
| 1327 RawObject* result = |
| 1328 reinterpret_cast<RawObject*>( |
| 1329 reinterpret_cast<uword>(data_buffer_) + offset + kHeapObjectTag); |
| 1330 ASSERT(result->IsMarked()); |
| 1331 |
| 1332 return result; |
1265 } | 1333 } |
1266 | 1334 |
1267 | 1335 |
1268 intptr_t SnapshotReader::LookupInternalClass(intptr_t class_header) { | 1336 intptr_t SnapshotReader::LookupInternalClass(intptr_t class_header) { |
1269 // If the header is an object Id, lookup singleton VM classes or classes | 1337 // If the header is an object Id, lookup singleton VM classes or classes |
1270 // stored in the object store. | 1338 // stored in the object store. |
1271 if (IsVMIsolateObject(class_header)) { | 1339 if (IsVMIsolateObject(class_header)) { |
1272 intptr_t class_id = GetVMIsolateObjectId(class_header); | 1340 intptr_t class_id = GetVMIsolateObjectId(class_header); |
1273 ASSERT(IsSingletonClassId(class_id)); | 1341 ASSERT(IsSingletonClassId(class_id)); |
1274 return class_id; | 1342 return class_id; |
(...skipping 207 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1482 (i + offset)); | 1550 (i + offset)); |
1483 result.SetAt(i, *PassiveObjectHandle()); | 1551 result.SetAt(i, *PassiveObjectHandle()); |
1484 } | 1552 } |
1485 } | 1553 } |
1486 | 1554 |
1487 | 1555 |
1488 VmIsolateSnapshotReader::VmIsolateSnapshotReader( | 1556 VmIsolateSnapshotReader::VmIsolateSnapshotReader( |
1489 const uint8_t* buffer, | 1557 const uint8_t* buffer, |
1490 intptr_t size, | 1558 intptr_t size, |
1491 const uint8_t* instructions_buffer, | 1559 const uint8_t* instructions_buffer, |
| 1560 const uint8_t* data_buffer, |
1492 Thread* thread) | 1561 Thread* thread) |
1493 : SnapshotReader(buffer, | 1562 : SnapshotReader(buffer, |
1494 size, | 1563 size, |
1495 instructions_buffer, | 1564 instructions_buffer, |
| 1565 data_buffer, |
1496 Snapshot::kFull, | 1566 Snapshot::kFull, |
1497 new ZoneGrowableArray<BackRefNode>( | 1567 new ZoneGrowableArray<BackRefNode>( |
1498 kNumVmIsolateSnapshotReferences), | 1568 kNumVmIsolateSnapshotReferences), |
1499 thread) { | 1569 thread) { |
1500 } | 1570 } |
1501 | 1571 |
1502 | 1572 |
1503 VmIsolateSnapshotReader::~VmIsolateSnapshotReader() { | 1573 VmIsolateSnapshotReader::~VmIsolateSnapshotReader() { |
1504 intptr_t len = GetBackwardReferenceTable()->length(); | 1574 intptr_t len = GetBackwardReferenceTable()->length(); |
1505 Object::InitVmIsolateSnapshotObjectTable(len); | 1575 Object::InitVmIsolateSnapshotObjectTable(len); |
1506 ZoneGrowableArray<BackRefNode>* backrefs = GetBackwardReferenceTable(); | 1576 ZoneGrowableArray<BackRefNode>* backrefs = GetBackwardReferenceTable(); |
1507 for (intptr_t i = 0; i < len; i++) { | 1577 for (intptr_t i = 0; i < len; i++) { |
1508 Object::vm_isolate_snapshot_object_table().SetAt( | 1578 Object::vm_isolate_snapshot_object_table().SetAt( |
1509 i, *(backrefs->At(i).reference())); | 1579 i, *(backrefs->At(i).reference())); |
1510 } | 1580 } |
1511 ResetBackwardReferenceTable(); | 1581 ResetBackwardReferenceTable(); |
1512 Dart::set_instructions_snapshot_buffer(instructions_buffer_); | 1582 Dart::set_instructions_snapshot_buffer(instructions_buffer_); |
| 1583 Dart::set_data_snapshot_buffer(data_buffer_); |
1513 } | 1584 } |
1514 | 1585 |
1515 | 1586 |
1516 RawApiError* VmIsolateSnapshotReader::ReadVmIsolateSnapshot() { | 1587 RawApiError* VmIsolateSnapshotReader::ReadVmIsolateSnapshot() { |
1517 ASSERT(kind() == Snapshot::kFull); | 1588 ASSERT(kind() == Snapshot::kFull); |
1518 Thread* thread = Thread::Current(); | 1589 Thread* thread = Thread::Current(); |
1519 Isolate* isolate = thread->isolate(); | 1590 Isolate* isolate = thread->isolate(); |
1520 ASSERT(isolate != NULL); | 1591 ASSERT(isolate != NULL); |
1521 ASSERT(isolate == Dart::vm_isolate()); | 1592 ASSERT(isolate == Dart::vm_isolate()); |
1522 ObjectStore* object_store = isolate->object_store(); | 1593 ObjectStore* object_store = isolate->object_store(); |
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1554 #endif | 1625 #endif |
1555 | 1626 |
1556 return ApiError::null(); | 1627 return ApiError::null(); |
1557 } | 1628 } |
1558 } | 1629 } |
1559 | 1630 |
1560 | 1631 |
1561 IsolateSnapshotReader::IsolateSnapshotReader(const uint8_t* buffer, | 1632 IsolateSnapshotReader::IsolateSnapshotReader(const uint8_t* buffer, |
1562 intptr_t size, | 1633 intptr_t size, |
1563 const uint8_t* instructions_buffer, | 1634 const uint8_t* instructions_buffer, |
| 1635 const uint8_t* data_buffer, |
1564 Thread* thread) | 1636 Thread* thread) |
1565 : SnapshotReader(buffer, | 1637 : SnapshotReader(buffer, |
1566 size, | 1638 size, |
1567 instructions_buffer, | 1639 instructions_buffer, |
| 1640 data_buffer, |
1568 Snapshot::kFull, | 1641 Snapshot::kFull, |
1569 new ZoneGrowableArray<BackRefNode>( | 1642 new ZoneGrowableArray<BackRefNode>( |
1570 kNumInitialReferencesInFullSnapshot), | 1643 kNumInitialReferencesInFullSnapshot), |
1571 thread) { | 1644 thread) { |
1572 isolate()->set_compilation_allowed(instructions_buffer_ == NULL); | 1645 isolate()->set_compilation_allowed(instructions_buffer_ == NULL); |
1573 } | 1646 } |
1574 | 1647 |
1575 | 1648 |
1576 IsolateSnapshotReader::~IsolateSnapshotReader() { | 1649 IsolateSnapshotReader::~IsolateSnapshotReader() { |
1577 ResetBackwardReferenceTable(); | 1650 ResetBackwardReferenceTable(); |
1578 } | 1651 } |
1579 | 1652 |
1580 | 1653 |
1581 ScriptSnapshotReader::ScriptSnapshotReader(const uint8_t* buffer, | 1654 ScriptSnapshotReader::ScriptSnapshotReader(const uint8_t* buffer, |
1582 intptr_t size, | 1655 intptr_t size, |
1583 Thread* thread) | 1656 Thread* thread) |
1584 : SnapshotReader(buffer, | 1657 : SnapshotReader(buffer, |
1585 size, | 1658 size, |
1586 NULL, /* instructions_buffer */ | 1659 NULL, /* instructions_buffer */ |
| 1660 NULL, /* data_buffer */ |
1587 Snapshot::kScript, | 1661 Snapshot::kScript, |
1588 new ZoneGrowableArray<BackRefNode>(kNumInitialReferences), | 1662 new ZoneGrowableArray<BackRefNode>(kNumInitialReferences), |
1589 thread) { | 1663 thread) { |
1590 } | 1664 } |
1591 | 1665 |
1592 | 1666 |
1593 ScriptSnapshotReader::~ScriptSnapshotReader() { | 1667 ScriptSnapshotReader::~ScriptSnapshotReader() { |
1594 ResetBackwardReferenceTable(); | 1668 ResetBackwardReferenceTable(); |
1595 } | 1669 } |
1596 | 1670 |
1597 | 1671 |
1598 MessageSnapshotReader::MessageSnapshotReader(const uint8_t* buffer, | 1672 MessageSnapshotReader::MessageSnapshotReader(const uint8_t* buffer, |
1599 intptr_t size, | 1673 intptr_t size, |
1600 Thread* thread) | 1674 Thread* thread) |
1601 : SnapshotReader(buffer, | 1675 : SnapshotReader(buffer, |
1602 size, | 1676 size, |
1603 NULL, /* instructions_buffer */ | 1677 NULL, /* instructions_buffer */ |
| 1678 NULL, /* data_buffer */ |
1604 Snapshot::kMessage, | 1679 Snapshot::kMessage, |
1605 new ZoneGrowableArray<BackRefNode>(kNumInitialReferences), | 1680 new ZoneGrowableArray<BackRefNode>(kNumInitialReferences), |
1606 thread) { | 1681 thread) { |
1607 } | 1682 } |
1608 | 1683 |
1609 | 1684 |
1610 MessageSnapshotReader::~MessageSnapshotReader() { | 1685 MessageSnapshotReader::~MessageSnapshotReader() { |
1611 ResetBackwardReferenceTable(); | 1686 ResetBackwardReferenceTable(); |
1612 } | 1687 } |
1613 | 1688 |
(...skipping 987 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2601 if (setjmp(*jump.Set()) == 0) { | 2676 if (setjmp(*jump.Set()) == 0) { |
2602 NoSafepointScope no_safepoint; | 2677 NoSafepointScope no_safepoint; |
2603 WriteObject(obj.raw()); | 2678 WriteObject(obj.raw()); |
2604 } else { | 2679 } else { |
2605 ThrowException(exception_type(), exception_msg()); | 2680 ThrowException(exception_type(), exception_msg()); |
2606 } | 2681 } |
2607 } | 2682 } |
2608 | 2683 |
2609 | 2684 |
2610 } // namespace dart | 2685 } // namespace dart |
OLD | NEW |