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

Unified Diff: runtime/vm/intermediate_language_x64.cc

Issue 10827387: Reenable elimination of strict equals when right side is true. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 8 years, 4 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_ia32.cc ('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_x64.cc
===================================================================
--- runtime/vm/intermediate_language_x64.cc (revision 10862)
+++ runtime/vm/intermediate_language_x64.cc (working copy)
@@ -509,14 +509,6 @@
}
-static intptr_t GetCid(const Value& v) {
- // TODO(srdjan): CompileType does not give us correct type for optimizations.
- // const AbstractType& type = AbstractType::Handle(v.CompileType());
- // return Class::Handle(type.type_class()).id();
- return kIllegalCid;
-}
-
-
static void EmitSmiComparisonOp(FlowGraphCompiler* compiler,
const LocationSummary& locs,
Token::Kind kind,
@@ -527,9 +519,9 @@
Register left = locs.in(0).reg();
Register right = locs.in(1).reg();
const bool left_is_smi = (branch == NULL) ?
- false : (GetCid(*branch->left()) == kSmiCid);
+ false : (branch->left()->ResultCid() == kSmiCid);
const bool right_is_smi = (branch == NULL) ?
- false : (GetCid(*branch->right()) == kSmiCid);
+ false : (branch->right()->ResultCid() == kSmiCid);
if (!left_is_smi || !right_is_smi) {
Register temp = locs.temp(0).reg();
Label* deopt = compiler->AddDeoptStub(deopt_id,
@@ -1465,8 +1457,8 @@
Register result = comp->locs()->out().reg();
Register temp = comp->locs()->temp(0).reg();
ASSERT(left == result);
- const bool left_is_smi = (GetCid(*comp->left()) == kSmiCid);
- const bool right_is_smi = (GetCid(*comp->right()) == kSmiCid);
+ const bool left_is_smi = comp->left()->ResultCid() == kSmiCid;
+ const bool right_is_smi = comp->right()->ResultCid() == kSmiCid;
bool can_deopt;
switch (comp->op_kind()) {
case Token::kBIT_AND:
@@ -1903,6 +1895,7 @@
} else {
UNREACHABLE();
}
+ ASSERT(ResultCid() == kDoubleCid);
}
« no previous file with comments | « runtime/vm/intermediate_language_ia32.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698