From 2fb506448767163f3c7b251f0489c98b47b04533 Mon Sep 17 00:00:00 2001 From: "mmassi@chromium.org" Date: Tue, 12 Feb 2013 11:44:08 +0000 Subject: [PATCH] Separated smi check from HBoundsCheck. Review URL: https://codereview.chromium.org/12208013 git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@13645 ce2b1a6d-e550-0410-aec6-3dcde31c8c00 --- src/arm/lithium-arm.cc | 6 +++++ src/arm/lithium-codegen-arm.cc | 23 ++----------------- src/arm/lithium-codegen-arm.h | 4 ---- src/code-stubs-hydrogen.cc | 6 ++++- src/hydrogen-instructions.cc | 13 ++++++++--- src/hydrogen-instructions.h | 48 +++++++++++++++++++++++++++++++++++++--- src/hydrogen.cc | 42 +++++++++++++++++++++-------------- src/hydrogen.h | 5 +++++ src/ia32/lithium-codegen-ia32.cc | 22 ++---------------- src/ia32/lithium-codegen-ia32.h | 4 ---- src/ia32/lithium-ia32.cc | 6 +++++ src/mips/lithium-codegen-mips.cc | 24 ++------------------ src/mips/lithium-codegen-mips.h | 4 ---- src/mips/lithium-mips.cc | 6 +++++ src/x64/lithium-codegen-x64.cc | 23 ++----------------- src/x64/lithium-codegen-x64.h | 5 ----- src/x64/lithium-x64.cc | 6 +++++ 17 files changed, 122 insertions(+), 125 deletions(-) diff --git a/src/arm/lithium-arm.cc b/src/arm/lithium-arm.cc index dacdd5a..990eb5f 100644 --- a/src/arm/lithium-arm.cc +++ b/src/arm/lithium-arm.cc @@ -1824,6 +1824,12 @@ LInstruction* LChunkBuilder::DoCheckSmi(HCheckSmi* instr) { } +LInstruction* LChunkBuilder::DoCheckSmiOrInt32(HCheckSmiOrInt32* instr) { + LOperand* value = UseRegisterAtStart(instr->value()); + return AssignEnvironment(new(zone()) LCheckSmi(value)); +} + + LInstruction* LChunkBuilder::DoCheckFunction(HCheckFunction* instr) { LOperand* value = UseRegisterAtStart(instr->value()); return AssignEnvironment(new(zone()) LCheckFunction(value)); diff --git a/src/arm/lithium-codegen-arm.cc b/src/arm/lithium-codegen-arm.cc index 8d87465..4564d26 100644 --- a/src/arm/lithium-codegen-arm.cc +++ b/src/arm/lithium-codegen-arm.cc @@ -4315,28 +4315,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()) { - __ tst(ToRegister(operand), Operand(kSmiTagMask)); - } else { - __ mov(ip, ToOperand(operand)); - __ tst(ip, Operand(kSmiTagMask)); - } - DeoptimizeIf(ne, 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())); diff --git a/src/arm/lithium-codegen-arm.h b/src/arm/lithium-codegen-arm.h index f7d6bad..2c3f01f 100644 --- a/src/arm/lithium-codegen-arm.h +++ b/src/arm/lithium-codegen-arm.h @@ -326,10 +326,6 @@ class LCodeGen BASE_EMBEDDED { LEnvironment* env, NumberUntagDMode mode); - void DeoptIfTaggedButNotSmi(LEnvironment* environment, - HValue* value, - LOperand* operand); - // Emits optimized code for typeof x == "y". Modifies input register. // Returns the condition on which a final split to // true and false label should be made, to optimize fallthrough. diff --git a/src/code-stubs-hydrogen.cc b/src/code-stubs-hydrogen.cc index dd7c3fa..2024d08 100644 --- a/src/code-stubs-hydrogen.cc +++ b/src/code-stubs-hydrogen.cc @@ -178,7 +178,11 @@ void CodeStubGraphBuilder::BuildCodeStub() { HConstant* max_alloc_size = new(zone) HConstant(kMinFreeNewSpaceAfterGC, Representation::Integer32()); AddInstruction(max_alloc_size); - AddInstruction(new(zone) HBoundsCheck(array_length, max_alloc_size)); + // Since we're forcing Integer32 representation for this HBoundsCheck, + // there's no need to Smi-check the index. + AddInstruction( + new(zone) HBoundsCheck(array_length, max_alloc_size, + DONT_ALLOW_SMI_KEY, Representation::Integer32())); current_block()->UpdateEnvironment(new(zone) HEnvironment(zone)); diff --git a/src/hydrogen-instructions.cc b/src/hydrogen-instructions.cc index 11cc901..b353cdb 100644 --- a/src/hydrogen-instructions.cc +++ b/src/hydrogen-instructions.cc @@ -829,9 +829,8 @@ void HBoundsCheck::InferRepresentation(HInferRepresentation* h_infer) { !length()->representation().IsTagged()) { r = Representation::Integer32(); } else if (index()->representation().IsTagged() || - (index()->IsConstant() && - HConstant::cast(index())->HasInteger32Value() && - Smi::IsValid(HConstant::cast(index())->Integer32Value()))) { + (index()->ActualValue()->IsConstant() && + HConstant::cast(index()->ActualValue())->HasSmiValue())) { // If the index is tagged, or a constant that holds a Smi, allow the length // to be tagged, since it is usually already tagged from loading it out of // the length field of a JSArray. This allows for direct comparison without @@ -2392,6 +2391,14 @@ HType HCheckSmi::CalculateInferredType() { } +void HCheckSmiOrInt32::InferRepresentation(HInferRepresentation* h_infer) { + ASSERT(CheckFlag(kFlexibleRepresentation)); + Representation r = value()->representation().IsTagged() + ? Representation::Tagged() : Representation::Integer32(); + UpdateRepresentation(r, h_infer, "checksmiorint32"); +} + + HType HPhi::CalculateInferredType() { HType result = HType::Uninitialized(); for (int i = 0; i < OperandCount(); ++i) { diff --git a/src/hydrogen-instructions.h b/src/hydrogen-instructions.h index 53f1b65..3e53eca 100644 --- a/src/hydrogen-instructions.h +++ b/src/hydrogen-instructions.h @@ -92,6 +92,7 @@ class LChunkBuilder; V(CheckNonSmi) \ V(CheckPrototypeMaps) \ V(CheckSmi) \ + V(CheckSmiOrInt32) \ V(ClampToUint8) \ V(ClassOfTestAndBranch) \ V(CompareIDAndBranch) \ @@ -2612,6 +2613,34 @@ class HCheckSmi: public HUnaryOperation { }; +class HCheckSmiOrInt32: public HUnaryOperation { + public: + explicit HCheckSmiOrInt32(HValue* value) : HUnaryOperation(value) { + SetFlag(kFlexibleRepresentation); + SetFlag(kUseGVN); + } + + virtual int RedefinedOperandIndex() { return 0; } + virtual Representation RequiredInputRepresentation(int index) { + return representation(); + } + virtual void InferRepresentation(HInferRepresentation* h_infer); + + virtual HValue* Canonicalize() { + if (representation().IsTagged() && !type().IsSmi()) { + return this; + } else { + return value(); + } + } + + DECLARE_CONCRETE_INSTRUCTION(CheckSmiOrInt32) + + protected: + virtual bool DataEquals(HValue* other) { return true; } +}; + + class HPhi: public HValue { public: HPhi(int merged_index, Zone* zone) @@ -2807,6 +2836,9 @@ class HConstant: public HTemplateInstruction<0> { ASSERT(HasInteger32Value()); return int32_value_; } + bool HasSmiValue() const { + return HasInteger32Value() && Smi::IsValid(Integer32Value()); + } bool HasDoubleValue() const { return has_double_value_; } double DoubleValue() const { ASSERT(HasDoubleValue()); @@ -3088,15 +3120,21 @@ enum BoundsCheckKeyMode { class HBoundsCheck: public HTemplateInstruction<2> { public: - HBoundsCheck(HValue* index, HValue* length, + // Normally HBoundsCheck should be created using the + // HGraphBuilder::AddBoundsCheck() helper, which also guards the index with + // a HCheckSmiOrInt32 check. + // However when building stubs, where we know that the arguments are Int32, + // it makes sense to invoke this constructor directly. + HBoundsCheck(HValue* index, + HValue* length, BoundsCheckKeyMode key_mode = DONT_ALLOW_SMI_KEY, Representation r = Representation::None()) - : key_mode_(key_mode) { + : key_mode_(key_mode), skip_check_(false) { SetOperandAt(0, index); SetOperandAt(1, length); if (r.IsNone()) { // In the normal compilation pipeline the representation is flexible - // (see comment to RequiredInputRepresentation). + // (see InferRepresentation). SetFlag(kFlexibleRepresentation); } else { // When compiling stubs we want to set the representation explicitly @@ -3106,6 +3144,9 @@ class HBoundsCheck: public HTemplateInstruction<2> { SetFlag(kUseGVN); } + bool skip_check() { return skip_check_; } + void set_skip_check(bool skip_check) { skip_check_ = skip_check; } + virtual Representation RequiredInputRepresentation(int arg_index) { return representation(); } @@ -3126,6 +3167,7 @@ class HBoundsCheck: public HTemplateInstruction<2> { protected: virtual bool DataEquals(HValue* other) { return true; } BoundsCheckKeyMode key_mode_; + bool skip_check_; }; diff --git a/src/hydrogen.cc b/src/hydrogen.cc index 00207c1..7869d71 100644 --- a/src/hydrogen.cc +++ b/src/hydrogen.cc @@ -779,6 +779,20 @@ void HGraphBuilder::AddSimulate(BailoutId id, } +HBoundsCheck* HGraphBuilder::AddBoundsCheck(HValue* index, + HValue* length, + BoundsCheckKeyMode key_mode, + Representation r) { + HCheckSmiOrInt32* checked_index = + new(graph()->zone()) HCheckSmiOrInt32(index); + AddInstruction(checked_index); + HBoundsCheck* result = new(graph()->zone()) HBoundsCheck( + checked_index, length, key_mode, r); + AddInstruction(result); + return result; +} + + HBasicBlock* HGraphBuilder::CreateBasicBlock(HEnvironment* env) { HBasicBlock* b = graph()->CreateBasicBlock(); b->SetInitialEnvironment(env); @@ -918,8 +932,8 @@ HInstruction* HGraphBuilder::BuildUncheckedMonomorphicElementAccess( HInstruction* checked_key = NULL; if (IsExternalArrayElementsKind(elements_kind)) { length = AddInstruction(new(zone) HFixedArrayBaseLength(elements)); - checked_key = AddInstruction(new(zone) HBoundsCheck( - key, length, ALLOW_SMI_KEY, checked_index_representation)); + checked_key = AddBoundsCheck( + key, length, ALLOW_SMI_KEY, checked_index_representation); HLoadExternalArrayPointer* external_elements = new(zone) HLoadExternalArrayPointer(elements); AddInstruction(external_elements); @@ -936,8 +950,8 @@ HInstruction* HGraphBuilder::BuildUncheckedMonomorphicElementAccess( } else { length = AddInstruction(new(zone) HFixedArrayBaseLength(elements)); } - checked_key = AddInstruction(new(zone) HBoundsCheck( - key, length, ALLOW_SMI_KEY, checked_index_representation)); + checked_key = AddBoundsCheck( + key, length, ALLOW_SMI_KEY, checked_index_representation); return BuildFastElementAccess(elements, checked_key, val, mapcheck, elements_kind, is_store); } @@ -6833,7 +6847,7 @@ HValue* HOptimizedGraphBuilder::HandlePolymorphicElementAccess( && todo_external_array) { HInstruction* length = AddInstruction(new(zone()) HFixedArrayBaseLength(elements)); - checked_key = AddInstruction(new(zone()) HBoundsCheck(key, length)); + checked_key = AddBoundsCheck(key, length); external_elements = new(zone()) HLoadExternalArrayPointer(elements); AddInstruction(external_elements); } @@ -6875,8 +6889,7 @@ HValue* HOptimizedGraphBuilder::HandlePolymorphicElementAccess( HInstruction* length; length = AddInstruction(new(zone()) HJSArrayLength(object, typecheck, HType::Smi())); - checked_key = AddInstruction(new(zone()) HBoundsCheck(key, length, - ALLOW_SMI_KEY)); + checked_key = AddBoundsCheck(key, length, ALLOW_SMI_KEY); access = AddInstruction(BuildFastElementAccess( elements, checked_key, val, elements_kind_branch, elements_kind, is_store)); @@ -6892,8 +6905,7 @@ HValue* HOptimizedGraphBuilder::HandlePolymorphicElementAccess( set_current_block(if_fastobject); length = AddInstruction(new(zone()) HFixedArrayBaseLength(elements)); - checked_key = AddInstruction(new(zone()) HBoundsCheck(key, length, - ALLOW_SMI_KEY)); + checked_key = AddBoundsCheck(key, length, ALLOW_SMI_KEY); access = AddInstruction(BuildFastElementAccess( elements, checked_key, val, elements_kind_branch, elements_kind, is_store)); @@ -7042,8 +7054,7 @@ bool HOptimizedGraphBuilder::TryArgumentsAccess(Property* expr) { new(zone()) HArgumentsElements(false)); HInstruction* length = AddInstruction( new(zone()) HArgumentsLength(elements)); - HInstruction* checked_key = - AddInstruction(new(zone()) HBoundsCheck(key, length)); + HInstruction* checked_key = AddBoundsCheck(key, length); result = new(zone()) HAccessArgumentsAt(elements, length, checked_key); } else { EnsureArgumentsArePushedForAccess(); @@ -7055,8 +7066,7 @@ bool HOptimizedGraphBuilder::TryArgumentsAccess(Property* expr) { HInstruction* length = AddInstruction(new(zone()) HConstant( Handle(Smi::FromInt(argument_count)), Representation::Integer32())); - HInstruction* checked_key = - AddInstruction(new(zone()) HBoundsCheck(key, length)); + HInstruction* checked_key = AddBoundsCheck(key, length); result = new(zone()) HAccessArgumentsAt(elements, length, checked_key); } } @@ -8770,8 +8780,7 @@ HStringCharCodeAt* HOptimizedGraphBuilder::BuildStringCharCodeAt( AddInstruction(HCheckInstanceType::NewIsString(string, zone())); HStringLength* length = new(zone()) HStringLength(string); AddInstruction(length); - HInstruction* checked_index = - AddInstruction(new(zone()) HBoundsCheck(index, length)); + HInstruction* checked_index = AddBoundsCheck(index, length); return new(zone()) HStringCharCodeAt(context, string, checked_index); } @@ -9599,8 +9608,7 @@ void HOptimizedGraphBuilder::GenerateArguments(CallRuntime* call) { HInstruction* elements = AddInstruction( new(zone()) HArgumentsElements(false)); HInstruction* length = AddInstruction(new(zone()) HArgumentsLength(elements)); - HInstruction* checked_index = - AddInstruction(new(zone()) HBoundsCheck(index, length)); + HInstruction* checked_index = AddBoundsCheck(index, length); HAccessArgumentsAt* result = new(zone()) HAccessArgumentsAt(elements, length, checked_index); return ast_context()->ReturnInstruction(result, call->id()); diff --git a/src/hydrogen.h b/src/hydrogen.h index e9b8a2f..7c34bba 100644 --- a/src/hydrogen.h +++ b/src/hydrogen.h @@ -875,6 +875,11 @@ class HGraphBuilder { HInstruction* AddInstruction(HInstruction* instr); void AddSimulate(BailoutId id, RemovableSimulate removable = FIXED_SIMULATE); + HBoundsCheck* AddBoundsCheck( + HValue* index, + HValue* length, + BoundsCheckKeyMode key_mode = DONT_ALLOW_SMI_KEY, + Representation r = Representation::None()); protected: virtual bool BuildGraph() = 0; diff --git a/src/ia32/lithium-codegen-ia32.cc b/src/ia32/lithium-codegen-ia32.cc index fc373e0..a1b467d 100644 --- a/src/ia32/lithium-codegen-ia32.cc +++ b/src/ia32/lithium-codegen-ia32.cc @@ -4149,27 +4149,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())); diff --git a/src/ia32/lithium-codegen-ia32.h b/src/ia32/lithium-codegen-ia32.h index 2834305..ea0c777 100644 --- a/src/ia32/lithium-codegen-ia32.h +++ b/src/ia32/lithium-codegen-ia32.h @@ -314,10 +314,6 @@ class LCodeGen BASE_EMBEDDED { LEnvironment* env, NumberUntagDMode mode = NUMBER_CANDIDATE_IS_ANY_TAGGED); - void DeoptIfTaggedButNotSmi(LEnvironment* environment, - HValue* value, - LOperand* operand); - // Emits optimized code for typeof x == "y". Modifies input register. // Returns the condition on which a final split to // true and false label should be made, to optimize fallthrough. diff --git a/src/ia32/lithium-ia32.cc b/src/ia32/lithium-ia32.cc index 37d8390..e69d7f6 100644 --- a/src/ia32/lithium-ia32.cc +++ b/src/ia32/lithium-ia32.cc @@ -1857,6 +1857,12 @@ LInstruction* LChunkBuilder::DoCheckSmi(HCheckSmi* instr) { } +LInstruction* LChunkBuilder::DoCheckSmiOrInt32(HCheckSmiOrInt32* instr) { + LOperand* value = UseAtStart(instr->value()); + return AssignEnvironment(new(zone()) LCheckSmi(value)); +} + + LInstruction* LChunkBuilder::DoCheckFunction(HCheckFunction* instr) { // If the target is in new space, we'll emit a global cell compare and so // want the value in a register. If the target gets promoted before we diff --git a/src/mips/lithium-codegen-mips.cc b/src/mips/lithium-codegen-mips.cc index 734ed0f..a0586ff 100644 --- a/src/mips/lithium-codegen-mips.cc +++ b/src/mips/lithium-codegen-mips.cc @@ -3950,29 +3950,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()) { - __ And(at, ToRegister(operand), Operand(kSmiTagMask)); - DeoptimizeIf(ne, environment, at, Operand(zero_reg)); - } else { - __ li(at, ToOperand(operand)); - __ And(at, at, Operand(kSmiTagMask)); - DeoptimizeIf(ne, environment, at, Operand(zero_reg)); - } - } -} - - 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())); diff --git a/src/mips/lithium-codegen-mips.h b/src/mips/lithium-codegen-mips.h index 83bda9a..4bfff96 100644 --- a/src/mips/lithium-codegen-mips.h +++ b/src/mips/lithium-codegen-mips.h @@ -328,10 +328,6 @@ class LCodeGen BASE_EMBEDDED { bool deoptimize_on_minus_zero, LEnvironment* env); - void DeoptIfTaggedButNotSmi(LEnvironment* environment, - HValue* value, - LOperand* operand); - // Emits optimized code for typeof x == "y". Modifies input register. // Returns the condition on which a final split to // true and false label should be made, to optimize fallthrough. diff --git a/src/mips/lithium-mips.cc b/src/mips/lithium-mips.cc index 736890e..7c7bdde 100644 --- a/src/mips/lithium-mips.cc +++ b/src/mips/lithium-mips.cc @@ -1729,6 +1729,12 @@ LInstruction* LChunkBuilder::DoCheckSmi(HCheckSmi* instr) { } +LInstruction* LChunkBuilder::DoCheckSmiOrInt32(HCheckSmiOrInt32* instr) { + LOperand* value = UseRegisterAtStart(instr->value()); + return AssignEnvironment(new(zone()) LCheckSmi(value)); +} + + LInstruction* LChunkBuilder::DoCheckFunction(HCheckFunction* instr) { LOperand* value = UseRegisterAtStart(instr->value()); return AssignEnvironment(new(zone()) LCheckFunction(value)); diff --git a/src/x64/lithium-codegen-x64.cc b/src/x64/lithium-codegen-x64.cc index f1e6e59..0be9626 100644 --- a/src/x64/lithium-codegen-x64.cc +++ b/src/x64/lithium-codegen-x64.cc @@ -3931,28 +3931,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()) { diff --git a/src/x64/lithium-codegen-x64.h b/src/x64/lithium-codegen-x64.h index 8c6b5d2..b0aa2c2 100644 --- a/src/x64/lithium-codegen-x64.h +++ b/src/x64/lithium-codegen-x64.h @@ -291,11 +291,6 @@ class LCodeGen BASE_EMBEDDED { LEnvironment* env, NumberUntagDMode mode = NUMBER_CANDIDATE_IS_ANY_TAGGED); - - void DeoptIfTaggedButNotSmi(LEnvironment* environment, - HValue* value, - LOperand* operand); - // Emits optimized code for typeof x == "y". Modifies input register. // Returns the condition on which a final split to // true and false label should be made, to optimize fallthrough. diff --git a/src/x64/lithium-x64.cc b/src/x64/lithium-x64.cc index e35a381..20fe5cf 100644 --- a/src/x64/lithium-x64.cc +++ b/src/x64/lithium-x64.cc @@ -1766,6 +1766,12 @@ LInstruction* LChunkBuilder::DoCheckSmi(HCheckSmi* instr) { } +LInstruction* LChunkBuilder::DoCheckSmiOrInt32(HCheckSmiOrInt32* instr) { + LOperand* value = UseRegisterAtStart(instr->value()); + return AssignEnvironment(new(zone()) LCheckSmi(value)); +} + + LInstruction* LChunkBuilder::DoCheckFunction(HCheckFunction* instr) { LOperand* value = UseRegisterAtStart(instr->value()); return AssignEnvironment(new(zone()) LCheckFunction(value)); -- 2.7.4