Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(730)

Side by Side Diff: src/full-codegen/s390/full-codegen-s390.cc

Issue 2504223002: [fullcodegen] Remove deprecated generator implementation. (Closed)
Patch Set: Rebased. Created 4 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « src/full-codegen/ppc/full-codegen-ppc.cc ('k') | src/full-codegen/x64/full-codegen-x64.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2015 the V8 project authors. All rights reserved. 1 // Copyright 2015 the V8 project authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #if V8_TARGET_ARCH_S390 5 #if V8_TARGET_ARCH_S390
6 6
7 #include "src/full-codegen/full-codegen.h" 7 #include "src/full-codegen/full-codegen.h"
8 #include "src/ast/compile-time-value.h" 8 #include "src/ast/compile-time-value.h"
9 #include "src/ast/scopes.h" 9 #include "src/ast/scopes.h"
10 #include "src/code-factory.h" 10 #include "src/code-factory.h"
(...skipping 1673 matching lines...) Expand 10 before | Expand all | Expand 10 after
1684 EmitKeyedSuperPropertyStore(property); 1684 EmitKeyedSuperPropertyStore(property);
1685 context()->Plug(r2); 1685 context()->Plug(r2);
1686 break; 1686 break;
1687 case KEYED_PROPERTY: 1687 case KEYED_PROPERTY:
1688 EmitKeyedPropertyAssignment(expr); 1688 EmitKeyedPropertyAssignment(expr);
1689 break; 1689 break;
1690 } 1690 }
1691 } 1691 }
1692 1692
1693 void FullCodeGenerator::VisitYield(Yield* expr) { 1693 void FullCodeGenerator::VisitYield(Yield* expr) {
1694 Comment cmnt(masm_, "[ Yield"); 1694 // Resumable functions are not supported.
1695 SetExpressionPosition(expr); 1695 UNREACHABLE();
1696
1697 // Evaluate yielded value first; the initial iterator definition depends on
1698 // this. It stays on the stack while we update the iterator.
1699 VisitForStackValue(expr->expression());
1700
1701 Label suspend, continuation, post_runtime, resume, exception;
1702
1703 __ b(&suspend);
1704 __ bind(&continuation);
1705 // When we arrive here, r2 holds the generator object.
1706 __ RecordGeneratorContinuation();
1707 __ LoadP(r3, FieldMemOperand(r2, JSGeneratorObject::kResumeModeOffset));
1708 __ LoadP(r2, FieldMemOperand(r2, JSGeneratorObject::kInputOrDebugPosOffset));
1709 STATIC_ASSERT(JSGeneratorObject::kNext < JSGeneratorObject::kReturn);
1710 STATIC_ASSERT(JSGeneratorObject::kThrow > JSGeneratorObject::kReturn);
1711 __ CmpSmiLiteral(r3, Smi::FromInt(JSGeneratorObject::kReturn), r0);
1712 __ blt(&resume);
1713 __ Push(result_register());
1714 __ bgt(&exception);
1715 EmitCreateIteratorResult(true);
1716 EmitUnwindAndReturn();
1717
1718 __ bind(&exception);
1719 __ CallRuntime(expr->rethrow_on_exception() ? Runtime::kReThrow
1720 : Runtime::kThrow);
1721
1722 __ bind(&suspend);
1723 OperandStackDepthIncrement(1); // Not popped on this path.
1724 VisitForAccumulatorValue(expr->generator_object());
1725 DCHECK(continuation.pos() > 0 && Smi::IsValid(continuation.pos()));
1726 __ LoadSmiLiteral(r3, Smi::FromInt(continuation.pos()));
1727 __ StoreP(r3, FieldMemOperand(r2, JSGeneratorObject::kContinuationOffset),
1728 r0);
1729 __ StoreP(cp, FieldMemOperand(r2, JSGeneratorObject::kContextOffset), r0);
1730 __ LoadRR(r3, cp);
1731 __ RecordWriteField(r2, JSGeneratorObject::kContextOffset, r3, r4,
1732 kLRHasBeenSaved, kDontSaveFPRegs);
1733 __ AddP(r3, fp, Operand(StandardFrameConstants::kExpressionsOffset));
1734 __ CmpP(sp, r3);
1735 __ beq(&post_runtime);
1736 __ push(r2); // generator object
1737 __ CallRuntime(Runtime::kSuspendJSGeneratorObject, 1);
1738 RestoreContext();
1739 __ bind(&post_runtime);
1740 PopOperand(result_register());
1741 EmitReturnSequence();
1742
1743 __ bind(&resume);
1744 context()->Plug(result_register());
1745 } 1696 }
1746 1697
1747 void FullCodeGenerator::PushOperands(Register reg1, Register reg2) { 1698 void FullCodeGenerator::PushOperands(Register reg1, Register reg2) {
1748 OperandStackDepthIncrement(2); 1699 OperandStackDepthIncrement(2);
1749 __ Push(reg1, reg2); 1700 __ Push(reg1, reg2);
1750 } 1701 }
1751 1702
1752 void FullCodeGenerator::PushOperands(Register reg1, Register reg2, 1703 void FullCodeGenerator::PushOperands(Register reg1, Register reg2,
1753 Register reg3) { 1704 Register reg3) {
1754 OperandStackDepthIncrement(3); 1705 OperandStackDepthIncrement(3);
(...skipping 1794 matching lines...) Expand 10 before | Expand all | Expand 10 after
3549 DCHECK(kOSRBranchInstruction == br_instr); 3500 DCHECK(kOSRBranchInstruction == br_instr);
3550 3501
3551 DCHECK(interrupt_address == 3502 DCHECK(interrupt_address ==
3552 isolate->builtins()->OnStackReplacement()->entry()); 3503 isolate->builtins()->OnStackReplacement()->entry());
3553 return ON_STACK_REPLACEMENT; 3504 return ON_STACK_REPLACEMENT;
3554 } 3505 }
3555 3506
3556 } // namespace internal 3507 } // namespace internal
3557 } // namespace v8 3508 } // namespace v8
3558 #endif // V8_TARGET_ARCH_S390 3509 #endif // V8_TARGET_ARCH_S390
OLDNEW
« no previous file with comments | « src/full-codegen/ppc/full-codegen-ppc.cc ('k') | src/full-codegen/x64/full-codegen-x64.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698