Index: src/full-codegen/mips64/full-codegen-mips64.cc |
diff --git a/src/full-codegen/mips64/full-codegen-mips64.cc b/src/full-codegen/mips64/full-codegen-mips64.cc |
index 922eac655c0ffa65e19b69f21a8fc081485254a6..b9a00245b5b9536e6bbe590ae7f1936a7a6f653c 100644 |
--- a/src/full-codegen/mips64/full-codegen-mips64.cc |
+++ b/src/full-codegen/mips64/full-codegen-mips64.cc |
@@ -458,6 +458,9 @@ void FullCodeGenerator::EmitReturnSequence() { |
} |
} |
+void FullCodeGenerator::RestoreContext() { |
+ __ ld(cp, MemOperand(fp, StandardFrameConstants::kContextOffset)); |
+} |
void FullCodeGenerator::StackValueContext::Plug(Variable* var) const { |
DCHECK(var->IsStackAllocated() || var->IsContextSlot()); |
@@ -1414,7 +1417,7 @@ void FullCodeGenerator::VisitObjectLiteral(ObjectLiteral* expr) { |
} else { |
FastCloneShallowObjectStub stub(isolate(), expr->properties_count()); |
__ CallStub(&stub); |
- __ ld(cp, MemOperand(fp, StandardFrameConstants::kContextOffset)); |
+ RestoreContext(); |
} |
PrepareForBailoutForId(expr->CreateLiteralId(), TOS_REG); |
@@ -1860,7 +1863,7 @@ void FullCodeGenerator::VisitYield(Yield* expr) { |
__ Branch(&post_runtime, eq, sp, Operand(a1)); |
__ push(v0); // generator object |
__ CallRuntime(Runtime::kSuspendJSGeneratorObject, 1); |
- __ ld(cp, MemOperand(fp, StandardFrameConstants::kContextOffset)); |
+ RestoreContext(); |
__ bind(&post_runtime); |
PopOperand(result_register()); |
EmitReturnSequence(); |
@@ -2531,8 +2534,7 @@ void FullCodeGenerator::EmitCall(Call* expr, ConvertReceiverMode mode) { |
OperandStackDepthDecrement(arg_count + 1); |
RecordJSReturnSite(expr); |
- // Restore context register. |
- __ ld(cp, MemOperand(fp, StandardFrameConstants::kContextOffset)); |
+ RestoreContext(); |
context()->DropAndPlug(1, v0); |
} |
@@ -2638,8 +2640,7 @@ void FullCodeGenerator::EmitPossiblyEvalCall(Call* expr) { |
RelocInfo::CODE_TARGET); |
OperandStackDepthDecrement(arg_count + 1); |
RecordJSReturnSite(expr); |
- // Restore context register. |
- __ ld(cp, MemOperand(fp, StandardFrameConstants::kContextOffset)); |
+ RestoreContext(); |
context()->DropAndPlug(1, v0); |
} |
@@ -2679,8 +2680,7 @@ void FullCodeGenerator::VisitCallNew(CallNew* expr) { |
__ Call(stub.GetCode(), RelocInfo::CODE_TARGET); |
OperandStackDepthDecrement(arg_count + 1); |
PrepareForBailoutForId(expr->ReturnId(), TOS_REG); |
- // Restore context register. |
- __ ld(cp, MemOperand(fp, StandardFrameConstants::kContextOffset)); |
+ RestoreContext(); |
context()->Plug(v0); |
} |
@@ -2723,9 +2723,7 @@ void FullCodeGenerator::EmitSuperConstructorCall(Call* expr) { |
OperandStackDepthDecrement(arg_count + 1); |
RecordJSReturnSite(expr); |
- |
- // Restore context register. |
- __ ld(cp, MemOperand(fp, StandardFrameConstants::kContextOffset)); |
+ RestoreContext(); |
context()->Plug(v0); |
} |
@@ -3137,8 +3135,7 @@ void FullCodeGenerator::EmitCall(CallRuntime* expr) { |
__ li(a0, Operand(argc)); |
__ Call(isolate()->builtins()->Call(), RelocInfo::CODE_TARGET); |
OperandStackDepthDecrement(argc + 1); |
- // Restore context register. |
- __ ld(cp, MemOperand(fp, StandardFrameConstants::kContextOffset)); |
+ RestoreContext(); |
// Discard the function left on TOS. |
context()->DropAndPlug(1, v0); |
} |
@@ -3255,9 +3252,7 @@ void FullCodeGenerator::EmitCallJSRuntimeFunction(CallRuntime* expr) { |
__ Call(isolate()->builtins()->Call(ConvertReceiverMode::kNullOrUndefined), |
RelocInfo::CODE_TARGET); |
OperandStackDepthDecrement(arg_count + 1); |
- |
- // Restore context register. |
- __ ld(cp, MemOperand(fp, StandardFrameConstants::kContextOffset)); |
+ RestoreContext(); |
} |
@@ -3725,7 +3720,7 @@ void FullCodeGenerator::VisitCompareOperation(CompareOperation* expr) { |
case Token::IN: |
VisitForStackValue(expr->right()); |
SetExpressionPosition(expr); |
- CallRuntimeWithOperands(Runtime::kHasProperty); |
+ EmitHasProperty(); |
PrepareForBailoutBeforeSplit(expr, false, NULL, NULL); |
__ LoadRoot(a4, Heap::kTrueValueRootIndex); |
Split(eq, v0, Operand(a4), if_true, if_false, fall_through); |