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

Unified Diff: runtime/vm/intermediate_language.cc

Issue 642693005: Revert "IR refactoring: reduce duplication related to MayThrow/AllowsCSE." (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 6 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « runtime/vm/intermediate_language.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/vm/intermediate_language.cc
diff --git a/runtime/vm/intermediate_language.cc b/runtime/vm/intermediate_language.cc
index 7a800233acfb0e9099b434284e344994f9850cc6..b4b37ab8b14651ce817dc757e65751aad74570f1 100644
--- a/runtime/vm/intermediate_language.cc
+++ b/runtime/vm/intermediate_language.cc
@@ -109,7 +109,7 @@ CheckClassInstr::CheckClassInstr(Value* value,
intptr_t deopt_id,
const ICData& unary_checks,
intptr_t token_pos)
- : TemplateInstruction(deopt_id),
+ : TemplateInstruction<1>(deopt_id),
unary_checks_(unary_checks),
cids_(unary_checks.NumberOfChecks()),
licm_hoisted_(false),
@@ -292,8 +292,7 @@ bool AssertAssignableInstr::AttributesEqual(Instruction* other) const {
bool StrictCompareInstr::AttributesEqual(Instruction* other) const {
StrictCompareInstr* other_op = other->AsStrictCompare();
ASSERT(other_op != NULL);
- return ComparisonInstr::AttributesEqual(other) &&
- (needs_number_check() == other_op->needs_number_check());
+ return kind() == other_op->kind();
}
@@ -361,6 +360,18 @@ const Field& LoadStaticFieldInstr::StaticField() const {
}
+EffectSet LoadIndexedInstr::Dependencies() const {
+ return EffectSet::All();
+}
+
+
+bool LoadIndexedInstr::AttributesEqual(Instruction* other) const {
+ LoadIndexedInstr* other_load = other->AsLoadIndexed();
+ ASSERT(other_load != NULL);
+ return class_id() == other_load->class_id();
+}
+
+
ConstantInstr::ConstantInstr(const Object& value) : value_(value) {
// Check that the value is not an incorrect Integer representation.
ASSERT(!value.IsBigint() || !Bigint::Cast(value).FitsIntoSmi());
@@ -3037,7 +3048,8 @@ ComparisonInstr* TestCidsInstr::CopyWithNewOperands(Value* new_left,
bool TestCidsInstr::AttributesEqual(Instruction* other) const {
TestCidsInstr* other_instr = other->AsTestCids();
- if (!ComparisonInstr::AttributesEqual(other)) {
+ ASSERT(other != NULL);
+ if (kind() != other_instr->kind()) {
return false;
}
if (cid_results().length() != other_instr->cid_results().length()) {
@@ -3211,7 +3223,7 @@ InvokeMathCFunctionInstr::InvokeMathCFunctionInstr(
intptr_t deopt_id,
MethodRecognizer::Kind recognized_kind,
intptr_t token_pos)
- : PureDefinition(deopt_id),
+ : Definition(deopt_id),
inputs_(inputs),
recognized_kind_(recognized_kind),
token_pos_(token_pos) {
@@ -3332,7 +3344,7 @@ const char* MathUnaryInstr::KindToCString(MathUnaryKind kind) {
MergedMathInstr::MergedMathInstr(ZoneGrowableArray<Value*>* inputs,
intptr_t deopt_id,
MergedMathInstr::Kind kind)
- : PureDefinition(deopt_id),
+ : Definition(deopt_id),
inputs_(inputs),
kind_(kind) {
ASSERT(inputs_->length() == InputCountFor(kind_));
« no previous file with comments | « runtime/vm/intermediate_language.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698