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

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

Issue 10986044: Relax assertions on equality of load fields. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 8 years, 2 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 | « 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/intermediate_language.h" 5 #include "vm/intermediate_language.h"
6 6
7 #include "vm/bit_vector.h" 7 #include "vm/bit_vector.h"
8 #include "vm/dart_entry.h" 8 #include "vm/dart_entry.h"
9 #include "vm/flow_graph_allocator.h" 9 #include "vm/flow_graph_allocator.h"
10 #include "vm/flow_graph_builder.h" 10 #include "vm/flow_graph_builder.h"
(...skipping 88 matching lines...) Expand 10 before | Expand all | Expand 10 after
99 return (op_kind() == other_op->op_kind()) && 99 return (op_kind() == other_op->op_kind()) &&
100 (overflow_ == other_op->overflow_); 100 (overflow_ == other_op->overflow_);
101 } 101 }
102 102
103 103
104 bool LoadFieldInstr::AttributesEqual(Instruction* other) const { 104 bool LoadFieldInstr::AttributesEqual(Instruction* other) const {
105 LoadFieldInstr* other_load = other->AsLoadField(); 105 LoadFieldInstr* other_load = other->AsLoadField();
106 ASSERT(other_load != NULL); 106 ASSERT(other_load != NULL);
107 ASSERT((offset_in_bytes() != other_load->offset_in_bytes()) || 107 ASSERT((offset_in_bytes() != other_load->offset_in_bytes()) ||
108 ((immutable_ == other_load->immutable_) && 108 ((immutable_ == other_load->immutable_) &&
109 (ResultCid() == other_load->ResultCid()))); 109 ((ResultCid() == other_load->ResultCid()) ||
110 (ResultCid() == kDynamicCid) ||
111 (other_load->ResultCid() == kDynamicCid))));
110 return offset_in_bytes() == other_load->offset_in_bytes(); 112 return offset_in_bytes() == other_load->offset_in_bytes();
111 } 113 }
112 114
113 115
114 bool LoadStaticFieldInstr::AttributesEqual(Instruction* other) const { 116 bool LoadStaticFieldInstr::AttributesEqual(Instruction* other) const {
115 LoadStaticFieldInstr* other_load = other->AsLoadStaticField(); 117 LoadStaticFieldInstr* other_load = other->AsLoadStaticField();
116 ASSERT(other_load != NULL); 118 ASSERT(other_load != NULL);
117 // Assert that the field is initialized. 119 // Assert that the field is initialized.
118 ASSERT(field().value() != Object::sentinel()); 120 ASSERT(field().value() != Object::sentinel());
119 ASSERT(field().value() != Object::transition_sentinel()); 121 ASSERT(field().value() != Object::transition_sentinel());
(...skipping 1914 matching lines...) Expand 10 before | Expand all | Expand 10 after
2034 new_max = new_max.Clamp(); 2036 new_max = new_max.Clamp();
2035 } 2037 }
2036 2038
2037 return Range::Update(&range_, new_min, new_max); 2039 return Range::Update(&range_, new_min, new_max);
2038 } 2040 }
2039 2041
2040 2042
2041 #undef __ 2043 #undef __
2042 2044
2043 } // namespace dart 2045 } // 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