| Index: src/ia32/lithium-codegen-ia32.cc
|
| diff --git a/src/ia32/lithium-codegen-ia32.cc b/src/ia32/lithium-codegen-ia32.cc
|
| index dfced7c221335f060f7c333e02c0ec38bb7516d8..31c7cc7f0a80de884ebe1278ad7fb3253c48b8fc 100644
|
| --- a/src/ia32/lithium-codegen-ia32.cc
|
| +++ b/src/ia32/lithium-codegen-ia32.cc
|
| @@ -4166,27 +4166,9 @@ void LCodeGen::DoStoreNamedGeneric(LStoreNamedGeneric* instr) {
|
| }
|
|
|
|
|
| -void LCodeGen::DeoptIfTaggedButNotSmi(LEnvironment* environment,
|
| - HValue* value,
|
| - LOperand* operand) {
|
| - if (value->representation().IsTagged() && !value->type().IsSmi()) {
|
| - if (operand->IsRegister()) {
|
| - __ test(ToRegister(operand), Immediate(kSmiTagMask));
|
| - } else {
|
| - __ test(ToOperand(operand), Immediate(kSmiTagMask));
|
| - }
|
| - DeoptimizeIf(not_zero, environment);
|
| - }
|
| -}
|
| -
|
| -
|
| void LCodeGen::DoBoundsCheck(LBoundsCheck* instr) {
|
| - DeoptIfTaggedButNotSmi(instr->environment(),
|
| - instr->hydrogen()->length(),
|
| - instr->length());
|
| - DeoptIfTaggedButNotSmi(instr->environment(),
|
| - instr->hydrogen()->index(),
|
| - instr->index());
|
| + if (instr->hydrogen()->skip_check()) return;
|
| +
|
| if (instr->index()->IsConstantOperand()) {
|
| int constant_index =
|
| ToInteger32(LConstantOperand::cast(instr->index()));
|
| @@ -5176,6 +5158,21 @@ void LCodeGen::DoCheckSmi(LCheckSmi* instr) {
|
| }
|
|
|
|
|
| +void LCodeGen::DoDeoptimizeIfTaggedIsNotSmi(
|
| + LDeoptimizeIfTaggedIsNotSmi* instr) {
|
| + if (instr->hydrogen_value()->representation().IsTagged() &&
|
| + !instr->hydrogen_value()->type().IsSmi()) {
|
| + LOperand* operand = instr->value();
|
| + if (operand->IsRegister()) {
|
| + __ test(ToRegister(operand), Immediate(kSmiTagMask));
|
| + } else {
|
| + __ test(ToOperand(operand), Immediate(kSmiTagMask));
|
| + }
|
| + DeoptimizeIf(not_zero, instr->environment());
|
| + }
|
| +}
|
| +
|
| +
|
| void LCodeGen::DoCheckNonSmi(LCheckNonSmi* instr) {
|
| LOperand* input = instr->value();
|
| __ test(ToOperand(input), Immediate(kSmiTagMask));
|
|
|