Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(143)

Side by Side Diff: runtime/vm/snapshot.cc

Issue 10871005: Make ClassFinalizer indifferent on whether we are generating a snapshot or not. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 8 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « runtime/vm/snapshot.h ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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/bigint_operations.h" 8 #include "vm/bigint_operations.h"
9 #include "vm/bootstrap.h" 9 #include "vm/bootstrap.h"
10 #include "vm/exceptions.h" 10 #include "vm/exceptions.h"
(...skipping 516 matching lines...) Expand 10 before | Expand all | Expand 10 after
527 ALLOC_NEW_OBJECT(LiteralToken, Object::literal_token_class()); 527 ALLOC_NEW_OBJECT(LiteralToken, Object::literal_token_class());
528 } 528 }
529 529
530 530
531 RawGrowableObjectArray* SnapshotReader::NewGrowableObjectArray() { 531 RawGrowableObjectArray* SnapshotReader::NewGrowableObjectArray() {
532 ALLOC_NEW_OBJECT(GrowableObjectArray, 532 ALLOC_NEW_OBJECT(GrowableObjectArray,
533 object_store()->growable_object_array_class()); 533 object_store()->growable_object_array_class());
534 } 534 }
535 535
536 536
537 RawApiError* SnapshotReader::NewApiError() {
538 ALLOC_NEW_OBJECT(ApiError, Object::api_error_class());
539 }
540
541
542 RawLanguageError* SnapshotReader::NewLanguageError() {
543 ALLOC_NEW_OBJECT(LanguageError, Object::language_error_class());
544 }
545
546
537 RawClass* SnapshotReader::LookupInternalClass(intptr_t class_header) { 547 RawClass* SnapshotReader::LookupInternalClass(intptr_t class_header) {
538 // If the header is an object Id, lookup singleton VM classes or classes 548 // If the header is an object Id, lookup singleton VM classes or classes
539 // stored in the object store. 549 // stored in the object store.
540 if (IsVMIsolateObject(class_header)) { 550 if (IsVMIsolateObject(class_header)) {
541 intptr_t class_id = GetVMIsolateObjectId(class_header); 551 intptr_t class_id = GetVMIsolateObjectId(class_header);
542 if (IsSingletonClassId(class_id)) { 552 if (IsSingletonClassId(class_id)) {
543 return isolate()->class_table()->At(class_id); // get singleton class. 553 return isolate()->class_table()->At(class_id); // get singleton class.
544 } 554 }
545 } else if (SerializedHeaderTag::decode(class_header) == kObjectId) { 555 } else if (SerializedHeaderTag::decode(class_header) == kObjectId) {
546 intptr_t class_id = SerializedHeaderData::decode(class_header); 556 intptr_t class_id = SerializedHeaderData::decode(class_header);
(...skipping 574 matching lines...) Expand 10 before | Expand all | Expand 10 after
1121 RawObject* raw_obj = *current; 1131 RawObject* raw_obj = *current;
1122 if (as_references_) { 1132 if (as_references_) {
1123 writer_->WriteObjectRef(raw_obj); 1133 writer_->WriteObjectRef(raw_obj);
1124 } else { 1134 } else {
1125 writer_->WriteObjectImpl(raw_obj); 1135 writer_->WriteObjectImpl(raw_obj);
1126 } 1136 }
1127 } 1137 }
1128 } 1138 }
1129 1139
1130 } // namespace dart 1140 } // namespace dart
OLDNEW
« no previous file with comments | « runtime/vm/snapshot.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698