| Index: src/ia32/full-codegen-ia32.cc
|
| ===================================================================
|
| --- src/ia32/full-codegen-ia32.cc (revision 5449)
|
| +++ src/ia32/full-codegen-ia32.cc (working copy)
|
| @@ -684,7 +684,8 @@
|
|
|
| // Perform the comparison as if via '==='.
|
| __ mov(edx, Operand(esp, 0)); // Switch value.
|
| - if (ShouldInlineSmiCase(Token::EQ_STRICT)) {
|
| + bool inline_smi_code = ShouldInlineSmiCase(Token::EQ_STRICT);
|
| + if (inline_smi_code) {
|
| Label slow_case;
|
| __ mov(ecx, edx);
|
| __ or_(ecx, Operand(eax));
|
| @@ -697,7 +698,10 @@
|
| __ bind(&slow_case);
|
| }
|
|
|
| - CompareStub stub(equal, true);
|
| + CompareFlags flags = inline_smi_code
|
| + ? NO_SMI_COMPARE_IN_STUB
|
| + : NO_COMPARE_FLAGS;
|
| + CompareStub stub(equal, true, flags);
|
| __ CallStub(&stub);
|
| __ test(eax, Operand(eax));
|
| __ j(not_equal, &next_test);
|
| @@ -3257,7 +3261,7 @@
|
| bool can_overwrite = expr->expression()->ResultOverwriteAllowed();
|
| UnaryOverwriteMode overwrite =
|
| can_overwrite ? UNARY_OVERWRITE : UNARY_NO_OVERWRITE;
|
| - GenericUnaryOpStub stub(Token::SUB, overwrite);
|
| + GenericUnaryOpStub stub(Token::SUB, overwrite, NO_UNARY_FLAGS);
|
| // GenericUnaryOpStub expects the argument to be in the
|
| // accumulator register eax.
|
| VisitForValue(expr->expression(), kAccumulator);
|
| @@ -3272,7 +3276,8 @@
|
| // in the accumulator register eax.
|
| VisitForValue(expr->expression(), kAccumulator);
|
| Label done;
|
| - if (ShouldInlineSmiCase(expr->op())) {
|
| + bool inline_smi_case = ShouldInlineSmiCase(expr->op());
|
| + if (inline_smi_case) {
|
| Label call_stub;
|
| __ test(eax, Immediate(kSmiTagMask));
|
| __ j(not_zero, &call_stub);
|
| @@ -3284,7 +3289,10 @@
|
| bool overwrite = expr->expression()->ResultOverwriteAllowed();
|
| UnaryOverwriteMode mode =
|
| overwrite ? UNARY_OVERWRITE : UNARY_NO_OVERWRITE;
|
| - GenericUnaryOpStub stub(Token::BIT_NOT, mode);
|
| + UnaryOpFlags flags = inline_smi_case
|
| + ? NO_UNARY_SMI_CODE_IN_STUB
|
| + : NO_UNARY_FLAGS;
|
| + GenericUnaryOpStub stub(Token::BIT_NOT, mode, flags);
|
| __ CallStub(&stub);
|
| __ bind(&done);
|
| Apply(context_, eax);
|
| @@ -3672,7 +3680,8 @@
|
| UNREACHABLE();
|
| }
|
|
|
| - if (ShouldInlineSmiCase(op)) {
|
| + bool inline_smi_code = ShouldInlineSmiCase(op);
|
| + if (inline_smi_code) {
|
| Label slow_case;
|
| __ mov(ecx, Operand(edx));
|
| __ or_(ecx, Operand(eax));
|
| @@ -3683,7 +3692,10 @@
|
| __ bind(&slow_case);
|
| }
|
|
|
| - CompareStub stub(cc, strict);
|
| + CompareFlags flags = inline_smi_code
|
| + ? NO_SMI_COMPARE_IN_STUB
|
| + : NO_COMPARE_FLAGS;
|
| + CompareStub stub(cc, strict, flags);
|
| __ CallStub(&stub);
|
| __ test(eax, Operand(eax));
|
| Split(cc, if_true, if_false, fall_through);
|
|
|