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

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

Issue 1586043005: Check comparison tag before checking attributes in IfThenElseInstr::AttributesEqual. (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Created 4 years, 11 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) 2013, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2013, 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 #ifndef VM_INTERMEDIATE_LANGUAGE_H_ 5 #ifndef VM_INTERMEDIATE_LANGUAGE_H_
6 #define VM_INTERMEDIATE_LANGUAGE_H_ 6 #define VM_INTERMEDIATE_LANGUAGE_H_
7 7
8 #include "vm/allocation.h" 8 #include "vm/allocation.h"
9 #include "vm/ast.h" 9 #include "vm/ast.h"
10 #include "vm/growable_array.h" 10 #include "vm/growable_array.h"
(...skipping 3176 matching lines...) Expand 10 before | Expand all | Expand 10 after
3187 intptr_t if_true() const { return if_true_; } 3187 intptr_t if_true() const { return if_true_; }
3188 intptr_t if_false() const { return if_false_; } 3188 intptr_t if_false() const { return if_false_; }
3189 3189
3190 virtual bool AllowsCSE() const { return comparison()->AllowsCSE(); } 3190 virtual bool AllowsCSE() const { return comparison()->AllowsCSE(); }
3191 virtual EffectSet Effects() const { return comparison()->Effects(); } 3191 virtual EffectSet Effects() const { return comparison()->Effects(); }
3192 virtual EffectSet Dependencies() const { 3192 virtual EffectSet Dependencies() const {
3193 return comparison()->Dependencies(); 3193 return comparison()->Dependencies();
3194 } 3194 }
3195 virtual bool AttributesEqual(Instruction* other) const { 3195 virtual bool AttributesEqual(Instruction* other) const {
3196 IfThenElseInstr* other_if_then_else = other->AsIfThenElse(); 3196 IfThenElseInstr* other_if_then_else = other->AsIfThenElse();
3197 return comparison()->AttributesEqual(other_if_then_else->comparison()) && 3197 return (comparison()->tag() == other_if_then_else->comparison()->tag()) &&
3198 comparison()->AttributesEqual(other_if_then_else->comparison()) &&
3198 (if_true_ == other_if_then_else->if_true_) && 3199 (if_true_ == other_if_then_else->if_true_) &&
3199 (if_false_ == other_if_then_else->if_false_); 3200 (if_false_ == other_if_then_else->if_false_);
3200 } 3201 }
3201 3202
3202 virtual bool MayThrow() const { return comparison()->MayThrow(); } 3203 virtual bool MayThrow() const { return comparison()->MayThrow(); }
3203 3204
3204 private: 3205 private:
3205 virtual void RawSetInputAt(intptr_t i, Value* value) { 3206 virtual void RawSetInputAt(intptr_t i, Value* value) {
3206 comparison()->RawSetInputAt(i, value); 3207 comparison()->RawSetInputAt(i, value);
3207 } 3208 }
(...skipping 5007 matching lines...) Expand 10 before | Expand all | Expand 10 after
8215 LocationSummary* Name::MakeLocationSummary(Zone* zone, bool opt) const { \ 8216 LocationSummary* Name::MakeLocationSummary(Zone* zone, bool opt) const { \
8216 UNIMPLEMENTED(); \ 8217 UNIMPLEMENTED(); \
8217 return NULL; \ 8218 return NULL; \
8218 } \ 8219 } \
8219 void Name::EmitNativeCode(FlowGraphCompiler* compiler) { UNIMPLEMENTED(); } 8220 void Name::EmitNativeCode(FlowGraphCompiler* compiler) { UNIMPLEMENTED(); }
8220 8221
8221 8222
8222 } // namespace dart 8223 } // namespace dart
8223 8224
8224 #endif // VM_INTERMEDIATE_LANGUAGE_H_ 8225 #endif // VM_INTERMEDIATE_LANGUAGE_H_
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