| Index: src/full-codegen/s390/full-codegen-s390.cc
|
| diff --git a/src/full-codegen/s390/full-codegen-s390.cc b/src/full-codegen/s390/full-codegen-s390.cc
|
| index 973363677c23be4cde40795ec33c3d23bf4a8248..9ace29a1bb55ee5c8645824aa7fe9fc63ca68977 100644
|
| --- a/src/full-codegen/s390/full-codegen-s390.cc
|
| +++ b/src/full-codegen/s390/full-codegen-s390.cc
|
| @@ -454,6 +454,10 @@ void FullCodeGenerator::EmitReturnSequence() {
|
| }
|
| }
|
|
|
| +void FullCodeGenerator::RestoreContext() {
|
| + __ LoadP(cp, MemOperand(fp, StandardFrameConstants::kContextOffset));
|
| +}
|
| +
|
| void FullCodeGenerator::StackValueContext::Plug(Variable* var) const {
|
| DCHECK(var->IsStackAllocated() || var->IsContextSlot());
|
| codegen()->GetVar(result_register(), var);
|
| @@ -1339,7 +1343,7 @@ void FullCodeGenerator::VisitObjectLiteral(ObjectLiteral* expr) {
|
| } else {
|
| FastCloneShallowObjectStub stub(isolate(), expr->properties_count());
|
| __ CallStub(&stub);
|
| - __ LoadP(cp, MemOperand(fp, StandardFrameConstants::kContextOffset));
|
| + RestoreContext();
|
| }
|
| PrepareForBailoutForId(expr->CreateLiteralId(), TOS_REG);
|
|
|
| @@ -1781,7 +1785,7 @@ void FullCodeGenerator::VisitYield(Yield* expr) {
|
| __ beq(&post_runtime);
|
| __ push(r2); // generator object
|
| __ CallRuntime(Runtime::kSuspendJSGeneratorObject, 1);
|
| - __ LoadP(cp, MemOperand(fp, StandardFrameConstants::kContextOffset));
|
| + RestoreContext();
|
| __ bind(&post_runtime);
|
| PopOperand(result_register());
|
| EmitReturnSequence();
|
| @@ -2463,8 +2467,7 @@ void FullCodeGenerator::EmitCall(Call* expr, ConvertReceiverMode mode) {
|
| OperandStackDepthDecrement(arg_count + 1);
|
|
|
| RecordJSReturnSite(expr);
|
| - // Restore context register.
|
| - __ LoadP(cp, MemOperand(fp, StandardFrameConstants::kContextOffset));
|
| + RestoreContext();
|
| context()->DropAndPlug(1, r2);
|
| }
|
|
|
| @@ -2569,8 +2572,7 @@ void FullCodeGenerator::EmitPossiblyEvalCall(Call* expr) {
|
| RelocInfo::CODE_TARGET);
|
| OperandStackDepthDecrement(arg_count + 1);
|
| RecordJSReturnSite(expr);
|
| - // Restore context register.
|
| - __ LoadP(cp, MemOperand(fp, StandardFrameConstants::kContextOffset));
|
| + RestoreContext();
|
| context()->DropAndPlug(1, r2);
|
| }
|
|
|
| @@ -2609,8 +2611,7 @@ void FullCodeGenerator::VisitCallNew(CallNew* expr) {
|
| __ Call(stub.GetCode(), RelocInfo::CODE_TARGET);
|
| OperandStackDepthDecrement(arg_count + 1);
|
| PrepareForBailoutForId(expr->ReturnId(), TOS_REG);
|
| - // Restore context register.
|
| - __ LoadP(cp, MemOperand(fp, StandardFrameConstants::kContextOffset));
|
| + RestoreContext();
|
| context()->Plug(r2);
|
| }
|
|
|
| @@ -2652,9 +2653,7 @@ void FullCodeGenerator::EmitSuperConstructorCall(Call* expr) {
|
| OperandStackDepthDecrement(arg_count + 1);
|
|
|
| RecordJSReturnSite(expr);
|
| -
|
| - // Restore context register.
|
| - __ LoadP(cp, MemOperand(fp, StandardFrameConstants::kContextOffset));
|
| + RestoreContext();
|
| context()->Plug(r2);
|
| }
|
|
|
| @@ -3026,8 +3025,7 @@ void FullCodeGenerator::EmitCall(CallRuntime* expr) {
|
| __ mov(r2, Operand(argc));
|
| __ Call(isolate()->builtins()->Call(), RelocInfo::CODE_TARGET);
|
| OperandStackDepthDecrement(argc + 1);
|
| - // Restore context register.
|
| - __ LoadP(cp, MemOperand(fp, StandardFrameConstants::kContextOffset));
|
| + RestoreContext();
|
| // Discard the function left on TOS.
|
| context()->DropAndPlug(1, r2);
|
| }
|
| @@ -3137,9 +3135,7 @@ void FullCodeGenerator::EmitCallJSRuntimeFunction(CallRuntime* expr) {
|
| __ Call(isolate()->builtins()->Call(ConvertReceiverMode::kNullOrUndefined),
|
| RelocInfo::CODE_TARGET);
|
| OperandStackDepthDecrement(arg_count + 1);
|
| -
|
| - // Restore context register.
|
| - __ LoadP(cp, MemOperand(fp, StandardFrameConstants::kContextOffset));
|
| + RestoreContext();
|
| }
|
|
|
| void FullCodeGenerator::VisitUnaryOperation(UnaryOperation* expr) {
|
| @@ -3597,7 +3593,7 @@ void FullCodeGenerator::VisitCompareOperation(CompareOperation* expr) {
|
| case Token::IN:
|
| VisitForStackValue(expr->right());
|
| SetExpressionPosition(expr);
|
| - CallRuntimeWithOperands(Runtime::kHasProperty);
|
| + EmitInExpression();
|
| PrepareForBailoutBeforeSplit(expr, false, NULL, NULL);
|
| __ CompareRoot(r2, Heap::kTrueValueRootIndex);
|
| Split(eq, if_true, if_false, fall_through);
|
|
|