| 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 246 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 257 if (cls.IsNull()) { | 257 if (cls.IsNull()) { |
| 258 SetReadException("Invalid object found in message."); | 258 SetReadException("Invalid object found in message."); |
| 259 } | 259 } |
| 260 cls.EnsureIsFinalized(isolate()); | 260 cls.EnsureIsFinalized(isolate()); |
| 261 return cls.raw(); | 261 return cls.raw(); |
| 262 } | 262 } |
| 263 | 263 |
| 264 | 264 |
| 265 RawObject* SnapshotReader::ReadStaticImplicitClosure(intptr_t object_id, | 265 RawObject* SnapshotReader::ReadStaticImplicitClosure(intptr_t object_id, |
| 266 intptr_t class_header) { | 266 intptr_t class_header) { |
| 267 ASSERT(kind_ == Snapshot::kMessage); | 267 ASSERT(kind_ != Snapshot::kFull); |
| 268 | 268 |
| 269 // First create a function object and associate it with the specified | 269 // First create a function object and associate it with the specified |
| 270 // 'object_id'. | 270 // 'object_id'. |
| 271 Function& func = Function::Handle(isolate(), Function::null()); | 271 Function& func = Function::Handle(isolate(), Function::null()); |
| 272 Instance& obj = Instance::ZoneHandle(zone(), Instance::null()); | 272 Instance& obj = Instance::ZoneHandle(zone(), Instance::null()); |
| 273 AddBackRef(object_id, &obj, kIsDeserialized); | 273 AddBackRef(object_id, &obj, kIsDeserialized); |
| 274 | 274 |
| 275 // Read the library/class/function information and lookup the function. | 275 // Read the library/class/function information and lookup the function. |
| 276 str_ ^= ReadObjectImpl(kAsInlinedObject); | 276 str_ ^= ReadObjectImpl(kAsInlinedObject); |
| 277 library_ = Library::LookupLibrary(str_); | 277 library_ = Library::LookupLibrary(str_); |
| (...skipping 2421 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2699 NoSafepointScope no_safepoint; | 2699 NoSafepointScope no_safepoint; |
| 2700 WriteObject(obj.raw()); | 2700 WriteObject(obj.raw()); |
| 2701 UnmarkAll(); | 2701 UnmarkAll(); |
| 2702 } else { | 2702 } else { |
| 2703 ThrowException(exception_type(), exception_msg()); | 2703 ThrowException(exception_type(), exception_msg()); |
| 2704 } | 2704 } |
| 2705 } | 2705 } |
| 2706 | 2706 |
| 2707 | 2707 |
| 2708 } // namespace dart | 2708 } // namespace dart |
| OLD | NEW |