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

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

Issue 16780009: When canonicalize instances check if all fields are canonical. If a field is a non-canonical number… (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 7 years, 6 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_snapshot.cc ('k') | tests/co19/co19-runtime.status » ('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 777 matching lines...) Expand 10 before | Expand all | Expand 10 after
788 } 788 }
789 intptr_t offset = Object::InstanceSize(); 789 intptr_t offset = Object::InstanceSize();
790 while (offset < instance_size) { 790 while (offset < instance_size) {
791 obj_ = ReadObjectRef(); 791 obj_ = ReadObjectRef();
792 result->SetFieldAtOffset(offset, obj_); 792 result->SetFieldAtOffset(offset, obj_);
793 offset += kWordSize; 793 offset += kWordSize;
794 } 794 }
795 if (kind_ == Snapshot::kFull) { 795 if (kind_ == Snapshot::kFull) {
796 result->SetCreatedFromSnapshot(); 796 result->SetCreatedFromSnapshot();
797 } else if (result->IsCanonical()) { 797 } else if (result->IsCanonical()) {
798 *result = result->Canonicalize(); 798 *result = result->CheckAndCanonicalize(NULL);
799 ASSERT(!result->IsNull());
799 } 800 }
800 return result->raw(); 801 return result->raw();
801 } 802 }
802 ASSERT((class_header & kSmiTagMask) != kSmiTag); 803 ASSERT((class_header & kSmiTagMask) != kSmiTag);
803 cls_ = LookupInternalClass(class_header); 804 cls_ = LookupInternalClass(class_header);
804 ASSERT(!cls_.IsNull()); 805 ASSERT(!cls_.IsNull());
805 switch (cls_.id()) { 806 switch (cls_.id()) {
806 #define SNAPSHOT_READ(clazz) \ 807 #define SNAPSHOT_READ(clazz) \
807 case clazz::kClassId: { \ 808 case clazz::kClassId: { \
808 obj_ = clazz::ReadFrom(this, object_id, tags, kind_); \ 809 obj_ = clazz::ReadFrom(this, object_id, tags, kind_); \
(...skipping 656 matching lines...) Expand 10 before | Expand all | Expand 10 after
1465 UnmarkAll(); 1466 UnmarkAll();
1466 isolate->set_long_jump_base(base); 1467 isolate->set_long_jump_base(base);
1467 } else { 1468 } else {
1468 isolate->set_long_jump_base(base); 1469 isolate->set_long_jump_base(base);
1469 ThrowException(exception_type(), exception_msg()); 1470 ThrowException(exception_type(), exception_msg());
1470 } 1471 }
1471 } 1472 }
1472 1473
1473 1474
1474 } // namespace dart 1475 } // namespace dart
OLDNEW
« no previous file with comments | « runtime/vm/raw_object_snapshot.cc ('k') | tests/co19/co19-runtime.status » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698