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

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

Issue 2504223002: [fullcodegen] Remove deprecated generator implementation. (Closed)
Patch Set: Rebased. Created 4 years, 1 month 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/mips/full-codegen-mips.cc ('k') | src/full-codegen/ppc/full-codegen-ppc.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 2012 the V8 project authors. All rights reserved. 1 // Copyright 2012 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_MIPS64 5 #if V8_TARGET_ARCH_MIPS64
6 6
7 // Note on Mips implementation: 7 // Note on Mips implementation:
8 // 8 //
9 // The result_register() for mips is the 'v0' register, which is defined 9 // The result_register() for mips is the 'v0' register, which is defined
10 // by the ABI to contain function return values. However, the first 10 // by the ABI to contain function return values. However, the first
(...skipping 1749 matching lines...) Expand 10 before | Expand all | Expand 10 after
1760 context()->Plug(v0); 1760 context()->Plug(v0);
1761 break; 1761 break;
1762 case KEYED_PROPERTY: 1762 case KEYED_PROPERTY:
1763 EmitKeyedPropertyAssignment(expr); 1763 EmitKeyedPropertyAssignment(expr);
1764 break; 1764 break;
1765 } 1765 }
1766 } 1766 }
1767 1767
1768 1768
1769 void FullCodeGenerator::VisitYield(Yield* expr) { 1769 void FullCodeGenerator::VisitYield(Yield* expr) {
1770 Comment cmnt(masm_, "[ Yield"); 1770 // Resumable functions are not supported.
1771 SetExpressionPosition(expr); 1771 UNREACHABLE();
1772
1773 // Evaluate yielded value first; the initial iterator definition depends on
1774 // this. It stays on the stack while we update the iterator.
1775 VisitForStackValue(expr->expression());
1776
1777 Label suspend, continuation, post_runtime, resume, exception;
1778
1779 __ jmp(&suspend);
1780 __ bind(&continuation);
1781 // When we arrive here, v0 holds the generator object.
1782 __ RecordGeneratorContinuation();
1783 __ ld(a1, FieldMemOperand(v0, JSGeneratorObject::kResumeModeOffset));
1784 __ ld(v0, FieldMemOperand(v0, JSGeneratorObject::kInputOrDebugPosOffset));
1785 __ Branch(&resume, eq, a1, Operand(Smi::FromInt(JSGeneratorObject::kNext)));
1786 __ Push(result_register());
1787 __ Branch(&exception, eq, a1,
1788 Operand(Smi::FromInt(JSGeneratorObject::kThrow)));
1789 EmitCreateIteratorResult(true);
1790 EmitUnwindAndReturn();
1791
1792 __ bind(&exception);
1793 __ CallRuntime(expr->rethrow_on_exception() ? Runtime::kReThrow
1794 : Runtime::kThrow);
1795
1796 __ bind(&suspend);
1797 OperandStackDepthIncrement(1); // Not popped on this path.
1798 VisitForAccumulatorValue(expr->generator_object());
1799 DCHECK(continuation.pos() > 0 && Smi::IsValid(continuation.pos()));
1800 __ li(a1, Operand(Smi::FromInt(continuation.pos())));
1801 __ sd(a1, FieldMemOperand(v0, JSGeneratorObject::kContinuationOffset));
1802 __ sd(cp, FieldMemOperand(v0, JSGeneratorObject::kContextOffset));
1803 __ mov(a1, cp);
1804 __ RecordWriteField(v0, JSGeneratorObject::kContextOffset, a1, a2,
1805 kRAHasBeenSaved, kDontSaveFPRegs);
1806 __ Daddu(a1, fp, Operand(StandardFrameConstants::kExpressionsOffset));
1807 __ Branch(&post_runtime, eq, sp, Operand(a1));
1808 __ push(v0); // generator object
1809 __ CallRuntime(Runtime::kSuspendJSGeneratorObject, 1);
1810 RestoreContext();
1811 __ bind(&post_runtime);
1812 PopOperand(result_register());
1813 EmitReturnSequence();
1814
1815 __ bind(&resume);
1816 context()->Plug(result_register());
1817 } 1772 }
1818 1773
1819 void FullCodeGenerator::PushOperands(Register reg1, Register reg2) { 1774 void FullCodeGenerator::PushOperands(Register reg1, Register reg2) {
1820 OperandStackDepthIncrement(2); 1775 OperandStackDepthIncrement(2);
1821 __ Push(reg1, reg2); 1776 __ Push(reg1, reg2);
1822 } 1777 }
1823 1778
1824 void FullCodeGenerator::PushOperands(Register reg1, Register reg2, 1779 void FullCodeGenerator::PushOperands(Register reg1, Register reg2,
1825 Register reg3) { 1780 Register reg3) {
1826 OperandStackDepthIncrement(3); 1781 OperandStackDepthIncrement(3);
(...skipping 1821 matching lines...) Expand 10 before | Expand all | Expand 10 after
3648 reinterpret_cast<uint64_t>( 3603 reinterpret_cast<uint64_t>(
3649 isolate->builtins()->OnStackReplacement()->entry())); 3604 isolate->builtins()->OnStackReplacement()->entry()));
3650 return ON_STACK_REPLACEMENT; 3605 return ON_STACK_REPLACEMENT;
3651 } 3606 }
3652 3607
3653 3608
3654 } // namespace internal 3609 } // namespace internal
3655 } // namespace v8 3610 } // namespace v8
3656 3611
3657 #endif // V8_TARGET_ARCH_MIPS64 3612 #endif // V8_TARGET_ARCH_MIPS64
OLDNEW
« no previous file with comments | « src/full-codegen/mips/full-codegen-mips.cc ('k') | src/full-codegen/ppc/full-codegen-ppc.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698