| Index: src/ia32/lithium-codegen-ia32.cc
|
| diff --git a/src/ia32/lithium-codegen-ia32.cc b/src/ia32/lithium-codegen-ia32.cc
|
| index fb674297967769dc60ee89d3d3c772a06e63964e..d37c3c9aae5f34baedf48d59b4ec5bbeb828a869 100644
|
| --- a/src/ia32/lithium-codegen-ia32.cc
|
| +++ b/src/ia32/lithium-codegen-ia32.cc
|
| @@ -3047,7 +3047,7 @@ void LCodeGen::DoCallFunction(LCallFunction* instr) {
|
| ASSERT(ToRegister(instr->result()).is(eax));
|
|
|
| int arity = instr->arity();
|
| - CallFunctionStub stub(arity, RECEIVER_MIGHT_BE_IMPLICIT);
|
| + CallFunctionStub stub(arity, NO_CALL_FUNCTION_FLAGS);
|
| CallCode(stub.GetCode(), RelocInfo::CODE_TARGET, instr);
|
| __ Drop(1);
|
| }
|
| @@ -3925,9 +3925,16 @@ void LCodeGen::DoCheckInstanceType(LCheckInstanceType* instr) {
|
|
|
|
|
| void LCodeGen::DoCheckFunction(LCheckFunction* instr) {
|
| - ASSERT(instr->InputAt(0)->IsRegister());
|
| - Operand operand = ToOperand(instr->InputAt(0));
|
| - __ cmp(operand, instr->hydrogen()->target());
|
| + Handle<JSFunction> target = instr->hydrogen()->target();
|
| + if (isolate()->heap()->InNewSpace(*target)) {
|
| + Register reg = ToRegister(instr->value());
|
| + Handle<JSGlobalPropertyCell> cell =
|
| + isolate()->factory()->NewJSGlobalPropertyCell(target);
|
| + __ cmp(reg, Operand::Cell(cell));
|
| + } else {
|
| + Operand operand = ToOperand(instr->value());
|
| + __ cmp(operand, instr->hydrogen()->target());
|
| + }
|
| DeoptimizeIf(not_equal, instr->environment());
|
| }
|
|
|
|
|