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

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

Issue 12982010: Review changes (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Merged Created 7 years, 9 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/raw_object.h ('k') | runtime/vm/symbols.h » ('j') | 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/class_finalizer.h" 10 #include "vm/class_finalizer.h"
(...skipping 449 matching lines...) Expand 10 before | Expand all | Expand 10 after
460 obj->ptr()->num_variables_ = num_variables; 460 obj->ptr()->num_variables_ = num_variables;
461 return obj; 461 return obj;
462 } 462 }
463 463
464 464
465 RawClass* SnapshotReader::NewClass(intptr_t class_id) { 465 RawClass* SnapshotReader::NewClass(intptr_t class_id) {
466 ASSERT(kind_ == Snapshot::kFull); 466 ASSERT(kind_ == Snapshot::kFull);
467 ASSERT(isolate()->no_gc_scope_depth() != 0); 467 ASSERT(isolate()->no_gc_scope_depth() != 0);
468 if (class_id < kNumPredefinedCids) { 468 if (class_id < kNumPredefinedCids) {
469 ASSERT((class_id >= kInstanceCid) && 469 ASSERT((class_id >= kInstanceCid) &&
470 (class_id <= kExternalTypedDataFloat64ArrayCid)); 470 (class_id <= kExternalTypedDataFloat32x4ArrayCid));
471 return isolate()->class_table()->At(class_id); 471 return isolate()->class_table()->At(class_id);
472 } 472 }
473 cls_ = Object::class_class(); 473 cls_ = Object::class_class();
474 RawClass* obj = reinterpret_cast<RawClass*>( 474 RawClass* obj = reinterpret_cast<RawClass*>(
475 AllocateUninitialized(cls_, Class::InstanceSize())); 475 AllocateUninitialized(cls_, Class::InstanceSize()));
476 Instance fake; 476 Instance fake;
477 obj->ptr()->handle_vtable_ = fake.vtable(); 477 obj->ptr()->handle_vtable_ = fake.vtable();
478 cls_ = obj; 478 cls_ = obj;
479 cls_.set_id(kIllegalCid); 479 cls_.set_id(kIllegalCid);
480 isolate()->class_table()->Register(cls_); 480 isolate()->class_table()->Register(cls_);
(...skipping 985 matching lines...) Expand 10 before | Expand all | Expand 10 after
1466 UnmarkAll(); 1466 UnmarkAll();
1467 isolate->set_long_jump_base(base); 1467 isolate->set_long_jump_base(base);
1468 } else { 1468 } else {
1469 isolate->set_long_jump_base(base); 1469 isolate->set_long_jump_base(base);
1470 ThrowException(exception_type(), exception_msg()); 1470 ThrowException(exception_type(), exception_msg());
1471 } 1471 }
1472 } 1472 }
1473 1473
1474 1474
1475 } // namespace dart 1475 } // namespace dart
OLDNEW
« no previous file with comments | « runtime/vm/raw_object.h ('k') | runtime/vm/symbols.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698