Index: src/x64/lithium-codegen-x64.cc |
diff --git a/src/x64/lithium-codegen-x64.cc b/src/x64/lithium-codegen-x64.cc |
index f71bf38e42a0ecae4453f12dd29b9a018c5c550d..94f8a026efb008230a261bdbb195242d433ee7b7 100644 |
--- a/src/x64/lithium-codegen-x64.cc |
+++ b/src/x64/lithium-codegen-x64.cc |
@@ -3924,28 +3924,9 @@ void LCodeGen::DoStoreNamedGeneric(LStoreNamedGeneric* instr) { |
} |
-void LCodeGen::DeoptIfTaggedButNotSmi(LEnvironment* environment, |
- HValue* value, |
- LOperand* operand) { |
- if (value->representation().IsTagged() && !value->type().IsSmi()) { |
- Condition cc; |
- if (operand->IsRegister()) { |
- cc = masm()->CheckSmi(ToRegister(operand)); |
- } else { |
- cc = masm()->CheckSmi(ToOperand(operand)); |
- } |
- DeoptimizeIf(NegateCondition(cc), 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->length()->IsRegister()) { |
Register reg = ToRegister(instr->length()); |
if (!instr->hydrogen()->length()->representation().IsTagged()) { |
@@ -4751,6 +4732,22 @@ 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(); |
+ Condition cc; |
+ if (operand->IsRegister()) { |
+ cc = masm()->CheckSmi(ToRegister(operand)); |
+ } else { |
+ cc = masm()->CheckSmi(ToOperand(operand)); |
+ } |
+ DeoptimizeIf(NegateCondition(cc), instr->environment()); |
+ } |
+} |
+ |
+ |
void LCodeGen::DoCheckNonSmi(LCheckNonSmi* instr) { |
LOperand* input = instr->value(); |
Condition cc = masm()->CheckSmi(ToRegister(input)); |