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

Unified Diff: runtime/vm/intermediate_language_x64.cc

Issue 12260008: Reapply r18377 it was reverted due to the unrelated bug it surfaced. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 7 years, 10 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
Index: runtime/vm/intermediate_language_x64.cc
diff --git a/runtime/vm/intermediate_language_x64.cc b/runtime/vm/intermediate_language_x64.cc
index c0e93f910b124bdca01eab2b8c476d4b550b0538..87aa256c99682a7a6fcf5863b2999f2636f3fa22 100644
--- a/runtime/vm/intermediate_language_x64.cc
+++ b/runtime/vm/intermediate_language_x64.cc
@@ -219,9 +219,7 @@ void AssertBooleanInstr::EmitNativeCode(FlowGraphCompiler* compiler) {
Register obj = locs()->in(0).reg();
Register result = locs()->out().reg();
- if (!is_eliminated()) {
- EmitAssertBoolean(obj, token_pos(), deopt_id(), locs(), compiler);
- }
+ EmitAssertBoolean(obj, token_pos(), deopt_id(), locs(), compiler);
ASSERT(obj == result);
}
@@ -961,14 +959,16 @@ void StringFromCharCodeInstr::EmitNativeCode(FlowGraphCompiler* compiler) {
}
-intptr_t LoadIndexedInstr::ResultCid() const {
+CompileType* LoadIndexedInstr::ComputeInitialType() const {
switch (class_id_) {
case kArrayCid:
case kImmutableArrayCid:
- return kDynamicCid;
+ return CompileType::Dynamic();
+
case kFloat32ArrayCid :
case kFloat64ArrayCid :
- return kDoubleCid;
+ return CompileType::FromCid(kDoubleCid);
+
case kInt8ArrayCid:
case kUint8ArrayCid:
case kUint8ClampedArrayCid:
@@ -980,10 +980,11 @@ intptr_t LoadIndexedInstr::ResultCid() const {
case kTwoByteStringCid:
case kInt32ArrayCid:
case kUint32ArrayCid:
- return kSmiCid;
+ return CompileType::FromCid(kSmiCid);
+
default:
UNIMPLEMENTED();
- return kSmiCid;
+ return NULL;
}
}
@@ -2127,8 +2128,8 @@ void BinarySmiOpInstr::EmitNativeCode(FlowGraphCompiler* compiler) {
LocationSummary* CheckEitherNonSmiInstr::MakeLocationSummary() const {
- ASSERT((left()->ResultCid() != kDoubleCid) &&
- (right()->ResultCid() != kDoubleCid));
+ ASSERT((left()->Type()->ToCid() != kDoubleCid) &&
+ (right()->Type()->ToCid() != kDoubleCid));
const intptr_t kNumInputs = 2;
const intptr_t kNumTemps = 1;
LocationSummary* summary =
@@ -2225,7 +2226,7 @@ LocationSummary* UnboxDoubleInstr::MakeLocationSummary() const {
void UnboxDoubleInstr::EmitNativeCode(FlowGraphCompiler* compiler) {
- const intptr_t value_cid = value()->ResultCid();
+ const intptr_t value_cid = value()->Type()->ToCid();
const Register value = locs()->in(0).reg();
const XmmRegister result = locs()->out().fpu_reg();
@@ -2627,8 +2628,6 @@ LocationSummary* CheckSmiInstr::MakeLocationSummary() const {
void CheckSmiInstr::EmitNativeCode(FlowGraphCompiler* compiler) {
- // TODO(srdjan): Check if we can remove this by reordering CSE and LICM.
- if (value()->ResultCid() == kSmiCid) return;
Register value = locs()->in(0).reg();
Label* deopt = compiler->AddDeoptStub(deopt_id(),
kDeoptCheckSmi);

Powered by Google App Engine
This is Rietveld 408576698