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

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

Issue 2012183003: VM: Field::IsConsistentWith should check unboxing state of the field. (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Created 4 years, 7 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
« no previous file with comments | « no previous file | 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/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/cpu.h" 10 #include "vm/cpu.h"
(...skipping 7691 matching lines...) Expand 10 before | Expand all | Expand 10 after
7702 ASSERT(IsOriginal()); 7702 ASSERT(IsOriginal());
7703 FieldDependentArray a(*this); 7703 FieldDependentArray a(*this);
7704 a.DisableCode(); 7704 a.DisableCode();
7705 } 7705 }
7706 7706
7707 7707
7708 bool Field::IsConsistentWith(const Field& other) const { 7708 bool Field::IsConsistentWith(const Field& other) const {
7709 return (raw_ptr()->guarded_cid_ == other.raw_ptr()->guarded_cid_) && 7709 return (raw_ptr()->guarded_cid_ == other.raw_ptr()->guarded_cid_) &&
7710 (raw_ptr()->is_nullable_ == other.raw_ptr()->is_nullable_) && 7710 (raw_ptr()->is_nullable_ == other.raw_ptr()->is_nullable_) &&
7711 (raw_ptr()->guarded_list_length_ == 7711 (raw_ptr()->guarded_list_length_ ==
7712 other.raw_ptr()->guarded_list_length_); 7712 other.raw_ptr()->guarded_list_length_) &&
7713 (is_unboxing_candidate() == other.is_unboxing_candidate());
7713 } 7714 }
7714 7715
7715 7716
7716 bool Field::IsUninitialized() const { 7717 bool Field::IsUninitialized() const {
7717 const Instance& value = Instance::Handle(raw_ptr()->value_.static_value_); 7718 const Instance& value = Instance::Handle(raw_ptr()->value_.static_value_);
7718 ASSERT(value.raw() != Object::transition_sentinel().raw()); 7719 ASSERT(value.raw() != Object::transition_sentinel().raw());
7719 return value.raw() == Object::sentinel().raw(); 7720 return value.raw() == Object::sentinel().raw();
7720 } 7721 }
7721 7722
7722 7723
(...skipping 14887 matching lines...) Expand 10 before | Expand all | Expand 10 after
22610 return UserTag::null(); 22611 return UserTag::null();
22611 } 22612 }
22612 22613
22613 22614
22614 const char* UserTag::ToCString() const { 22615 const char* UserTag::ToCString() const {
22615 const String& tag_label = String::Handle(label()); 22616 const String& tag_label = String::Handle(label());
22616 return tag_label.ToCString(); 22617 return tag_label.ToCString();
22617 } 22618 }
22618 22619
22619 } // namespace dart 22620 } // namespace dart
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698