| Index: runtime/vm/intermediate_language_ia32.cc
|
| ===================================================================
|
| --- runtime/vm/intermediate_language_ia32.cc (revision 11464)
|
| +++ runtime/vm/intermediate_language_ia32.cc (working copy)
|
| @@ -354,7 +354,7 @@
|
| const ICData& ic_data = ICData::Handle(orig_ic_data.AsUnaryClassChecks());
|
| ASSERT(ic_data.NumberOfChecks() > 0);
|
| ASSERT(ic_data.num_args_tested() == 1);
|
| - Label* deopt = compiler->AddDeoptStub(deopt_id, try_index, kDeoptEquality);
|
| + Label* deopt = compiler->AddDeoptStub(deopt_id, kDeoptEquality);
|
| Register left = locs->in(0).reg();
|
| Register right = locs->in(1).reg();
|
| __ testl(left, Immediate(kSmiTagMask));
|
| @@ -438,15 +438,12 @@
|
| const LocationSummary& locs,
|
| Token::Kind kind,
|
| BranchInstr* branch,
|
| - intptr_t deopt_id,
|
| - intptr_t try_index) {
|
| + intptr_t deopt_id) {
|
| ASSERT((kind == Token::kEQ) || (kind == Token::kNE));
|
| Register left = locs.in(0).reg();
|
| Register right = locs.in(1).reg();
|
| Register temp = locs.temp(0).reg();
|
| - Label* deopt = compiler->AddDeoptStub(deopt_id,
|
| - try_index,
|
| - kDeoptEquality);
|
| + Label* deopt = compiler->AddDeoptStub(deopt_id, kDeoptEquality);
|
| __ testl(left, Immediate(kSmiTagMask));
|
| __ j(ZERO, deopt);
|
| // 'left' is not Smi.
|
| @@ -539,8 +536,7 @@
|
| const LocationSummary& locs,
|
| Token::Kind kind,
|
| BranchInstr* branch,
|
| - intptr_t deopt_id,
|
| - intptr_t try_index) {
|
| + intptr_t deopt_id) {
|
| Register left = locs.in(0).reg();
|
| Register right = locs.in(1).reg();
|
| const bool left_is_smi = (branch == NULL) ?
|
| @@ -549,9 +545,7 @@
|
| false : (branch->right()->ResultCid() == kSmiCid);
|
| if (!left_is_smi || !right_is_smi) {
|
| Register temp = locs.temp(0).reg();
|
| - Label* deopt = compiler->AddDeoptStub(deopt_id,
|
| - try_index,
|
| - kDeoptSmiCompareSmi);
|
| + Label* deopt = compiler->AddDeoptStub(deopt_id, kDeoptSmiCompareSmi);
|
| __ movl(temp, left);
|
| __ orl(temp, right);
|
| __ testl(temp, Immediate(kSmiTagMask));
|
| @@ -595,15 +589,12 @@
|
| const LocationSummary& locs,
|
| Token::Kind kind,
|
| BranchInstr* branch,
|
| - intptr_t deopt_id,
|
| - intptr_t try_index) {
|
| + intptr_t deopt_id) {
|
| Register left = locs.in(0).reg();
|
| Register right = locs.in(1).reg();
|
| // TODO(srdjan): temp is only needed if a conversion Smi->Double occurs.
|
| Register temp = locs.temp(0).reg();
|
| - Label* deopt = compiler->AddDeoptStub(deopt_id,
|
| - try_index,
|
| - kDeoptDoubleComparison);
|
| + Label* deopt = compiler->AddDeoptStub(deopt_id, kDeoptDoubleComparison);
|
| compiler->LoadDoubleOrSmiToXmm(XMM0, left, temp, deopt);
|
| compiler->LoadDoubleOrSmiToXmm(XMM1, right, temp, deopt);
|
|
|
| @@ -619,27 +610,26 @@
|
|
|
|
|
| void EqualityCompareComp::EmitNativeCode(FlowGraphCompiler* compiler) {
|
| + BranchInstr* kNoBranch = NULL;
|
| if (receiver_class_id() == kSmiCid) {
|
| // Deoptimizes if both arguments not Smi.
|
| - EmitSmiComparisonOp(compiler, *locs(), kind(), NULL, // No branch.
|
| - deopt_id(), try_index());
|
| + EmitSmiComparisonOp(compiler, *locs(), kind(), kNoBranch, deopt_id());
|
| return;
|
| }
|
| if (receiver_class_id() == kDoubleCid) {
|
| // Deoptimizes if both arguments are Smi, or if none is Double or Smi.
|
| - EmitDoubleComparisonOp(compiler, *locs(), kind(), NULL, // No branch.
|
| - deopt_id(), try_index());
|
| + EmitDoubleComparisonOp(compiler, *locs(), kind(), kNoBranch, deopt_id());
|
| return;
|
| }
|
| const bool is_checked_strict_equal =
|
| HasICData() && ic_data()->AllTargetsHaveSameOwner(kInstanceCid);
|
| if (is_checked_strict_equal) {
|
| - EmitCheckedStrictEqual(compiler, *ic_data(), *locs(), kind(), NULL,
|
| - deopt_id(), try_index());
|
| + EmitCheckedStrictEqual(compiler, *ic_data(), *locs(), kind(), kNoBranch,
|
| + deopt_id());
|
| return;
|
| }
|
| if (HasICData() && (ic_data()->NumberOfChecks() > 0)) {
|
| - EmitGenericEqualityCompare(compiler, locs(), kind(), NULL, *ic_data(),
|
| + EmitGenericEqualityCompare(compiler, locs(), kind(), kNoBranch, *ic_data(),
|
| deopt_id(), token_pos(), try_index());
|
| } else {
|
| Register left = locs()->in(0).reg();
|
| @@ -682,13 +672,11 @@
|
|
|
| void RelationalOpComp::EmitNativeCode(FlowGraphCompiler* compiler) {
|
| if (operands_class_id() == kSmiCid) {
|
| - EmitSmiComparisonOp(compiler, *locs(), kind(), NULL,
|
| - deopt_id(), try_index());
|
| + EmitSmiComparisonOp(compiler, *locs(), kind(), NULL, deopt_id());
|
| return;
|
| }
|
| if (operands_class_id() == kDoubleCid) {
|
| - EmitDoubleComparisonOp(compiler, *locs(), kind(), NULL,
|
| - deopt_id(), try_index());
|
| + EmitDoubleComparisonOp(compiler, *locs(), kind(), NULL, deopt_id());
|
| return;
|
| }
|
|
|
| @@ -700,9 +688,7 @@
|
| __ pushl(left);
|
| __ pushl(right);
|
| if (HasICData() && (ic_data()->NumberOfChecks() > 0)) {
|
| - Label* deopt = compiler->AddDeoptStub(deopt_id(),
|
| - try_index(),
|
| - kDeoptRelationalOp);
|
| + Label* deopt = compiler->AddDeoptStub(deopt_id(), kDeoptRelationalOp);
|
| // Load class into EDI. Since this is a call, any register except
|
| // the fixed input registers would be ok.
|
| ASSERT((left != EDI) && (right != EDI));
|
| @@ -1086,7 +1072,6 @@
|
| if (HasICData()) {
|
| ASSERT(original() != NULL);
|
| Label* deopt = compiler->AddDeoptStub(original()->deopt_id(),
|
| - original()->try_index(),
|
| kDeoptInstanceGetterSameTarget);
|
| // Smis do not have instance fields (Smi class is always first).
|
| // Use 'result' as temporary register.
|
| @@ -1471,7 +1456,6 @@
|
| break;
|
| default:
|
| deopt = compiler->AddDeoptStub(instance_call()->deopt_id(),
|
| - instance_call()->try_index(),
|
| kDeoptBinarySmiOp);
|
| }
|
|
|
| @@ -1640,7 +1624,6 @@
|
| ASSERT(left == result);
|
| ASSERT(op_kind() == Token::kBIT_AND);
|
| Label* deopt = compiler->AddDeoptStub(instance_call()->deopt_id(),
|
| - instance_call()->try_index(),
|
| kDeoptBinaryMintOp);
|
| Label mint_static_call, smi_static_call, non_smi, smi_smi, done;
|
| __ testl(left, Immediate(kSmiTagMask)); // Is receiver Smi?
|
| @@ -1747,7 +1730,6 @@
|
| __ movl(left, Address(ESP, kWordSize));
|
|
|
| Label* deopt = compiler->AddDeoptStub(instance_call()->deopt_id(),
|
| - instance_call()->try_index(),
|
| kDeoptBinaryDoubleOp);
|
|
|
| // Binary operation of two Smi's produces a Smi not a double.
|
| @@ -1789,7 +1771,6 @@
|
|
|
| void CheckEitherNonSmiComp::EmitNativeCode(FlowGraphCompiler* compiler) {
|
| Label* deopt = compiler->AddDeoptStub(instance_call_->deopt_id(),
|
| - instance_call_->try_index(),
|
| kDeoptBinaryDoubleOp);
|
|
|
| Register temp = locs()->temp(0).reg();
|
| @@ -1885,7 +1866,6 @@
|
| const XmmRegister result = locs()->out().xmm_reg();
|
| if (v_cid != kDoubleCid) {
|
| Label* deopt = compiler->AddDeoptStub(instance_call()->deopt_id(),
|
| - instance_call()->try_index(),
|
| kDeoptBinaryDoubleOp);
|
| compiler->LoadDoubleOrSmiToXmm(result,
|
| value,
|
| @@ -1942,7 +1922,6 @@
|
| switch (op_kind()) {
|
| case Token::kNEGATE: {
|
| Label* deopt = compiler->AddDeoptStub(instance_call()->deopt_id(),
|
| - instance_call()->try_index(),
|
| kDeoptUnaryOp);
|
| __ negl(value);
|
| __ j(OVERFLOW, deopt);
|
| @@ -1985,7 +1964,6 @@
|
| Register result = locs()->out().reg();
|
| ASSERT(value == result);
|
| Label* deopt = compiler->AddDeoptStub(instance_call()->deopt_id(),
|
| - instance_call()->try_index(),
|
| kDeoptUnaryOp);
|
| if (test_class_id == kDoubleCid) {
|
| Register temp = locs()->temp(0).reg();
|
| @@ -2035,7 +2013,6 @@
|
| Register result = locs()->out().reg();
|
|
|
| Label* deopt = compiler->AddDeoptStub(instance_call()->deopt_id(),
|
| - instance_call()->try_index(),
|
| kDeoptDoubleToDouble);
|
| Register temp = locs()->temp(0).reg();
|
| __ testl(value, Immediate(kSmiTagMask));
|
| @@ -2055,7 +2032,6 @@
|
| Register result = locs()->out().reg();
|
|
|
| Label* deopt = compiler->AddDeoptStub(instance_call()->deopt_id(),
|
| - instance_call()->try_index(),
|
| kDeoptIntegerToDouble);
|
|
|
| const Class& double_class = compiler->double_class();
|
| @@ -2090,7 +2066,6 @@
|
|
|
| void PolymorphicInstanceCallComp::EmitNativeCode(FlowGraphCompiler* compiler) {
|
| Label* deopt = compiler->AddDeoptStub(instance_call()->deopt_id(),
|
| - instance_call()->try_index(),
|
| kDeoptPolymorphicInstanceCallTestFail);
|
| if (!HasICData() || (ic_data()->NumberOfChecks() == 0)) {
|
| __ jmp(deopt);
|
| @@ -2193,18 +2168,16 @@
|
| // Relational or equality.
|
| if (HasICData() && (ic_data()->NumberOfChecks() > 0)) {
|
| if (ICDataWithBothClassIds(*ic_data(), kSmiCid)) {
|
| - EmitSmiComparisonOp(compiler, *locs(), kind(), this,
|
| - deopt_id(), try_index());
|
| + EmitSmiComparisonOp(compiler, *locs(), kind(), this, deopt_id());
|
| return;
|
| }
|
| if (ICDataWithBothClassIds(*ic_data(), kDoubleCid)) {
|
| - EmitDoubleComparisonOp(compiler, *locs(), kind(), this,
|
| - deopt_id(), try_index());
|
| + EmitDoubleComparisonOp(compiler, *locs(), kind(), this, deopt_id());
|
| return;
|
| }
|
| if (IsCheckedStrictEquals(*ic_data(), kind())) {
|
| EmitCheckedStrictEqual(compiler, *ic_data(), *locs(), kind(), this,
|
| - deopt_id(), try_index());
|
| + deopt_id());
|
| return;
|
| }
|
|
|
| @@ -2286,7 +2259,6 @@
|
| Register value = locs()->in(0).reg();
|
| Register temp = locs()->temp(0).reg();
|
| Label* deopt = compiler->AddDeoptStub(deopt_id(),
|
| - try_index(),
|
| kDeoptCheckClass);
|
| ASSERT(ic_data()->GetReceiverClassIdAt(0) != kSmiCid);
|
| __ testl(value, Immediate(kSmiTagMask));
|
| @@ -2324,7 +2296,6 @@
|
| void CheckSmiComp::EmitNativeCode(FlowGraphCompiler* compiler) {
|
| Register value = locs()->in(0).reg();
|
| Label* deopt = compiler->AddDeoptStub(deopt_id(),
|
| - try_index(),
|
| kDeoptCheckSmi);
|
| __ testl(value, Immediate(kSmiTagMask));
|
| __ j(NOT_ZERO, deopt);
|
| @@ -2346,7 +2317,6 @@
|
| (array_type() == kGrowableObjectArrayCid) ?
|
| kDeoptLoadIndexedGrowableArray : kDeoptLoadIndexedFixedArray;
|
| Label* deopt = compiler->AddDeoptStub(deopt_id(),
|
| - try_index(),
|
| deopt_reason);
|
| switch (array_type()) {
|
| case kArrayCid:
|
|
|