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

Unified Diff: runtime/vm/intermediate_language_ia32.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_ia32.cc
diff --git a/runtime/vm/intermediate_language_ia32.cc b/runtime/vm/intermediate_language_ia32.cc
index 0787527bdb24ed3189f5a3d353d7cbc36e60b40b..d0e5efdf38d184bd635fbc6ea5c25c6119dc484b 100644
--- a/runtime/vm/intermediate_language_ia32.cc
+++ b/runtime/vm/intermediate_language_ia32.cc
@@ -212,9 +212,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);
}
@@ -1097,14 +1095,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:
@@ -1114,16 +1114,19 @@ intptr_t LoadIndexedInstr::ResultCid() const {
case kUint16ArrayCid:
case kOneByteStringCid:
case kTwoByteStringCid:
- return kSmiCid;
+ return CompileType::FromCid(kSmiCid);
+
case kInt32ArrayCid:
case kUint32ArrayCid:
// Result can be Smi or Mint when boxed.
// Instruction can deoptimize if we optimistically assumed that the result
// fits into Smi.
- return CanDeoptimize() ? kSmiCid : kDynamicCid;
+ return CanDeoptimize() ? CompileType::FromCid(kSmiCid)
+ : CompileType::Int();
+
default:
UNIMPLEMENTED();
- return kDynamicCid;
+ return CompileType::Dynamic();
}
}
@@ -2267,8 +2270,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 =
@@ -2365,7 +2368,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();
@@ -2753,8 +2756,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);
@@ -2820,7 +2821,7 @@ LocationSummary* UnboxIntegerInstr::MakeLocationSummary() const {
void UnboxIntegerInstr::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();

Powered by Google App Engine
This is Rietveld 408576698