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

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

Issue 2490233004: - Turn on canonicalization verification after a reload in debug mode. (Closed)
Patch Set: Created 4 years, 1 month 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
« no previous file with comments | « runtime/vm/isolate_reload.cc ('k') | tests/lib/lib.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/object.h" 5 #include "vm/object.h"
6 6
7 #include "include/dart_api.h" 7 #include "include/dart_api.h"
8 #include "platform/assert.h" 8 #include "platform/assert.h"
9 #include "vm/assembler.h" 9 #include "vm/assembler.h"
10 #include "vm/become.h" 10 #include "vm/become.h"
(...skipping 4393 matching lines...) Expand 10 before | Expand all | Expand 10 after
4404 static RawObject* NewKey(const CanonicalInstanceKey& obj) { 4404 static RawObject* NewKey(const CanonicalInstanceKey& obj) {
4405 return obj.key_.raw(); 4405 return obj.key_.raw();
4406 } 4406 }
4407 }; 4407 };
4408 typedef UnorderedHashSet <CanonicalInstanceTraits> CanonicalInstancesSet; 4408 typedef UnorderedHashSet <CanonicalInstanceTraits> CanonicalInstancesSet;
4409 4409
4410 4410
4411 RawInstance* Class::LookupCanonicalInstance(Zone* zone, 4411 RawInstance* Class::LookupCanonicalInstance(Zone* zone,
4412 const Instance& value) const { 4412 const Instance& value) const {
4413 ASSERT(this->raw() == value.clazz()); 4413 ASSERT(this->raw() == value.clazz());
4414 ASSERT(is_finalized());
4414 Instance& canonical_value = Instance::Handle(zone); 4415 Instance& canonical_value = Instance::Handle(zone);
4415 if (this->constants() != Object::empty_array().raw()) { 4416 if (this->constants() != Object::empty_array().raw()) {
4416 CanonicalInstancesSet constants(zone, this->constants()); 4417 CanonicalInstancesSet constants(zone, this->constants());
4417 canonical_value ^= constants.GetOrNull(CanonicalInstanceKey(value)); 4418 canonical_value ^= constants.GetOrNull(CanonicalInstanceKey(value));
4418 this->set_constants(constants.Release()); 4419 this->set_constants(constants.Release());
4419 } 4420 }
4420 return canonical_value.raw(); 4421 return canonical_value.raw();
4421 } 4422 }
4422 4423
4423 4424
(...skipping 18611 matching lines...) Expand 10 before | Expand all | Expand 10 after
23035 return UserTag::null(); 23036 return UserTag::null();
23036 } 23037 }
23037 23038
23038 23039
23039 const char* UserTag::ToCString() const { 23040 const char* UserTag::ToCString() const {
23040 const String& tag_label = String::Handle(label()); 23041 const String& tag_label = String::Handle(label());
23041 return tag_label.ToCString(); 23042 return tag_label.ToCString();
23042 } 23043 }
23043 23044
23044 } // namespace dart 23045 } // namespace dart
OLDNEW
« no previous file with comments | « runtime/vm/isolate_reload.cc ('k') | tests/lib/lib.status » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698