Index: runtime/vm/intermediate_language_ia32.cc |
=================================================================== |
--- runtime/vm/intermediate_language_ia32.cc (revision 35455) |
+++ runtime/vm/intermediate_language_ia32.cc (working copy) |
@@ -602,7 +602,7 @@ |
Register cid_reg = locs()->temp(0).reg(); |
Label* deopt = CanDeoptimize() ? |
- compiler->AddDeoptStub(deopt_id(), kDeoptTestCids) : NULL; |
+ compiler->AddDeoptStub(deopt_id(), ICData::kDeoptTestCids) : NULL; |
const intptr_t true_result = (kind() == Token::kIS) ? 1 : 0; |
const ZoneGrowableArray<intptr_t>& data = cid_results(); |
@@ -1080,7 +1080,8 @@ |
__ SmiTag(result); |
break; |
case kTypedDataInt32ArrayCid: { |
- Label* deopt = compiler->AddDeoptStub(deopt_id(), kDeoptInt32Load); |
+ Label* deopt = compiler->AddDeoptStub(deopt_id(), |
+ ICData::kDeoptInt32Load); |
__ movl(result, element_address); |
// Verify that the signed value in 'result' can fit inside a Smi. |
__ cmpl(result, Immediate(0xC0000000)); |
@@ -1089,7 +1090,8 @@ |
} |
break; |
case kTypedDataUint32ArrayCid: { |
- Label* deopt = compiler->AddDeoptStub(deopt_id(), kDeoptUint32Load); |
+ Label* deopt = compiler->AddDeoptStub(deopt_id(), |
+ ICData::kDeoptUint32Load); |
__ movl(result, element_address); |
// Verify that the unsigned value in 'result' can fit inside a Smi. |
__ testl(result, Immediate(0xC0000000)); |
@@ -1374,7 +1376,7 @@ |
Label ok, fail_label; |
Label* deopt = compiler->is_optimizing() ? |
- compiler->AddDeoptStub(deopt_id(), kDeoptGuardField) : NULL; |
+ compiler->AddDeoptStub(deopt_id(), ICData::kDeoptGuardField) : NULL; |
Label* fail = (deopt != NULL) ? deopt : &fail_label; |
@@ -2686,7 +2688,8 @@ |
Register result = locs.out(0).reg(); |
ASSERT(left == result); |
Label* deopt = shift_left->CanDeoptimize() ? |
- compiler->AddDeoptStub(shift_left->deopt_id(), kDeoptBinarySmiOp) : NULL; |
+ compiler->AddDeoptStub(shift_left->deopt_id(), ICData::kDeoptBinarySmiOp) |
+ : NULL; |
if (locs.in(1).IsConstant()) { |
const Object& constant = locs.in(1).constant(); |
ASSERT(constant.IsSmi()); |
@@ -2880,7 +2883,7 @@ |
ASSERT(left == result); |
Label* deopt = NULL; |
if (CanDeoptimize()) { |
- deopt = compiler->AddDeoptStub(deopt_id(), kDeoptBinarySmiOp); |
+ deopt = compiler->AddDeoptStub(deopt_id(), ICData::kDeoptBinarySmiOp); |
} |
if (locs()->in(1).IsConstant()) { |
@@ -3186,7 +3189,8 @@ |
void CheckEitherNonSmiInstr::EmitNativeCode(FlowGraphCompiler* compiler) { |
- Label* deopt = compiler->AddDeoptStub(deopt_id(), kDeoptBinaryDoubleOp); |
+ Label* deopt = compiler->AddDeoptStub(deopt_id(), |
+ ICData::kDeoptBinaryDoubleOp); |
intptr_t left_cid = left()->Type()->ToCid(); |
intptr_t right_cid = right()->Type()->ToCid(); |
Register left = locs()->in(0).reg(); |
@@ -3266,7 +3270,8 @@ |
__ SmiUntag(value); // Untag input before conversion. |
__ cvtsi2sd(result, value); |
} else { |
- Label* deopt = compiler->AddDeoptStub(deopt_id_, kDeoptBinaryDoubleOp); |
+ Label* deopt = compiler->AddDeoptStub(deopt_id_, |
+ ICData::kDeoptBinaryDoubleOp); |
Register temp = locs()->temp(0).reg(); |
Label is_smi, done; |
__ testl(value, Immediate(kSmiTagMask)); |
@@ -3337,7 +3342,7 @@ |
if (value_cid != kFloat32x4Cid) { |
const Register temp = locs()->temp(0).reg(); |
- Label* deopt = compiler->AddDeoptStub(deopt_id_, kDeoptCheckClass); |
+ Label* deopt = compiler->AddDeoptStub(deopt_id_, ICData::kDeoptCheckClass); |
__ testl(value, Immediate(kSmiTagMask)); |
__ j(ZERO, deopt); |
__ CompareClassId(value, kFloat32x4Cid, temp); |
@@ -3400,7 +3405,7 @@ |
if (value_cid != kFloat64x2Cid) { |
const Register temp = locs()->temp(0).reg(); |
- Label* deopt = compiler->AddDeoptStub(deopt_id_, kDeoptCheckClass); |
+ Label* deopt = compiler->AddDeoptStub(deopt_id_, ICData::kDeoptCheckClass); |
__ testl(value, Immediate(kSmiTagMask)); |
__ j(ZERO, deopt); |
__ CompareClassId(value, kFloat64x2Cid, temp); |
@@ -3495,7 +3500,7 @@ |
if (value_cid != kInt32x4Cid) { |
const Register temp = locs()->temp(0).reg(); |
- Label* deopt = compiler->AddDeoptStub(deopt_id_, kDeoptCheckClass); |
+ Label* deopt = compiler->AddDeoptStub(deopt_id_, ICData::kDeoptCheckClass); |
__ testl(value, Immediate(kSmiTagMask)); |
__ j(ZERO, deopt); |
__ CompareClassId(value, kInt32x4Cid, temp); |
@@ -4638,8 +4643,7 @@ |
ASSERT(value == locs()->out(0).reg()); |
switch (op_kind()) { |
case Token::kNEGATE: { |
- Label* deopt = compiler->AddDeoptStub(deopt_id(), |
- kDeoptUnaryOp); |
+ Label* deopt = compiler->AddDeoptStub(deopt_id(), ICData::kDeoptUnaryOp); |
__ negl(value); |
__ j(OVERFLOW, deopt); |
break; |
@@ -4747,7 +4751,7 @@ |
void DoubleToSmiInstr::EmitNativeCode(FlowGraphCompiler* compiler) { |
- Label* deopt = compiler->AddDeoptStub(deopt_id(), kDeoptDoubleToSmi); |
+ Label* deopt = compiler->AddDeoptStub(deopt_id(), ICData::kDeoptDoubleToSmi); |
Register result = locs()->out(0).reg(); |
XmmRegister value = locs()->in(0).fpu_reg(); |
__ cvttsd2si(result, value); |
@@ -5022,7 +5026,7 @@ |
void MergedMathInstr::EmitNativeCode(FlowGraphCompiler* compiler) { |
Label* deopt = NULL; |
if (CanDeoptimize()) { |
- deopt = compiler->AddDeoptStub(deopt_id(), kDeoptBinarySmiOp); |
+ deopt = compiler->AddDeoptStub(deopt_id(), ICData::kDeoptBinarySmiOp); |
} |
if (kind() == MergedMathInstr::kTruncDivMod) { |
@@ -5121,13 +5125,13 @@ |
void PolymorphicInstanceCallInstr::EmitNativeCode(FlowGraphCompiler* compiler) { |
- Label* deopt = compiler->AddDeoptStub(deopt_id(), |
- kDeoptPolymorphicInstanceCallTestFail); |
+ Label* deopt = compiler->AddDeoptStub( |
+ deopt_id(), ICData::kDeoptPolymorphicInstanceCallTestFail); |
if (ic_data().NumberOfChecks() == 0) { |
__ jmp(deopt); |
return; |
} |
- ASSERT(ic_data().num_args_tested() == 1); |
+ ASSERT(ic_data().NumArgsTested() == 1); |
if (!with_checks()) { |
ASSERT(ic_data().HasOneTarget()); |
const Function& target = Function::ZoneHandle(ic_data().GetTargetAt(0)); |
@@ -5185,8 +5189,8 @@ |
void CheckClassInstr::EmitNativeCode(FlowGraphCompiler* compiler) { |
- const DeoptReasonId deopt_reason = |
- licm_hoisted_ ? kDeoptHoistedCheckClass : kDeoptCheckClass; |
+ const ICData::DeoptReasonId deopt_reason = licm_hoisted_ ? |
+ ICData::kDeoptHoistedCheckClass : ICData::kDeoptCheckClass; |
if (IsNullCheck()) { |
Label* deopt = compiler->AddDeoptStub(deopt_id(), deopt_reason); |
const Immediate& raw_null = |
@@ -5243,8 +5247,7 @@ |
void CheckSmiInstr::EmitNativeCode(FlowGraphCompiler* compiler) { |
Register value = locs()->in(0).reg(); |
- Label* deopt = compiler->AddDeoptStub(deopt_id(), |
- kDeoptCheckSmi); |
+ Label* deopt = compiler->AddDeoptStub(deopt_id(), ICData::kDeoptCheckSmi); |
__ testl(value, Immediate(kSmiTagMask)); |
__ j(NOT_ZERO, deopt); |
} |
@@ -5269,7 +5272,8 @@ |
void CheckArrayBoundInstr::EmitNativeCode(FlowGraphCompiler* compiler) { |
- Label* deopt = compiler->AddDeoptStub(deopt_id(), kDeoptCheckArrayBound); |
+ Label* deopt = compiler->AddDeoptStub(deopt_id(), |
+ ICData::kDeoptCheckArrayBound); |
Location length_loc = locs()->in(kLengthPos); |
Location index_loc = locs()->in(kIndexPos); |
@@ -5352,7 +5356,8 @@ |
__ pmovsxdq(result, result); |
} else { |
Register temp = locs()->temp(0).reg(); |
- Label* deopt = compiler->AddDeoptStub(deopt_id_, kDeoptUnboxInteger); |
+ Label* deopt = compiler->AddDeoptStub(deopt_id_, |
+ ICData::kDeoptUnboxInteger); |
Label is_smi, done; |
__ testl(value, Immediate(kSmiTagMask)); |
__ j(ZERO, &is_smi); |
@@ -5504,7 +5509,7 @@ |
Label* deopt = NULL; |
if (FLAG_throw_on_javascript_int_overflow) { |
- deopt = compiler->AddDeoptStub(deopt_id(), kDeoptBinaryMintOp); |
+ deopt = compiler->AddDeoptStub(deopt_id(), ICData::kDeoptBinaryMintOp); |
} |
switch (op_kind()) { |
case Token::kBIT_AND: __ andpd(left, right); break; |
@@ -5515,7 +5520,7 @@ |
Register lo = locs()->temp(0).reg(); |
Register hi = locs()->temp(1).reg(); |
if (!FLAG_throw_on_javascript_int_overflow) { |
- deopt = compiler->AddDeoptStub(deopt_id(), kDeoptBinaryMintOp); |
+ deopt = compiler->AddDeoptStub(deopt_id(), ICData::kDeoptBinaryMintOp); |
} |
Label done, overflow; |
@@ -5570,8 +5575,7 @@ |
ASSERT(locs()->in(1).reg() == ECX); |
ASSERT(locs()->out(0).fpu_reg() == left); |
- Label* deopt = compiler->AddDeoptStub(deopt_id(), |
- kDeoptShiftMintOp); |
+ Label* deopt = compiler->AddDeoptStub(deopt_id(), ICData::kDeoptShiftMintOp); |
Label done; |
__ testl(ECX, ECX); |
__ j(ZERO, &done); // Shift by 0 is a nop. |
@@ -5644,8 +5648,7 @@ |
ASSERT(value == locs()->out(0).fpu_reg()); |
Label* deopt = NULL; |
if (FLAG_throw_on_javascript_int_overflow) { |
- deopt = compiler->AddDeoptStub(deopt_id(), |
- kDeoptUnaryMintOp); |
+ deopt = compiler->AddDeoptStub(deopt_id(), ICData::kDeoptUnaryMintOp); |
} |
__ pcmpeqq(XMM0, XMM0); // Generate all 1's. |
__ pxor(value, XMM0); |