OLD | NEW |
1 // Copyright 2014 the V8 project authors. All rights reserved. | 1 // Copyright 2014 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_PPC | 5 #if V8_TARGET_ARCH_PPC |
6 | 6 |
7 #include "src/ast/scopes.h" | 7 #include "src/ast/scopes.h" |
8 #include "src/code-factory.h" | 8 #include "src/code-factory.h" |
9 #include "src/code-stubs.h" | 9 #include "src/code-stubs.h" |
10 #include "src/codegen.h" | 10 #include "src/codegen.h" |
(...skipping 1768 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1779 // this. It stays on the stack while we update the iterator. | 1779 // this. It stays on the stack while we update the iterator. |
1780 VisitForStackValue(expr->expression()); | 1780 VisitForStackValue(expr->expression()); |
1781 | 1781 |
1782 Label suspend, continuation, post_runtime, resume, exception; | 1782 Label suspend, continuation, post_runtime, resume, exception; |
1783 | 1783 |
1784 __ b(&suspend); | 1784 __ b(&suspend); |
1785 __ bind(&continuation); | 1785 __ bind(&continuation); |
1786 // When we arrive here, r3 holds the generator object. | 1786 // When we arrive here, r3 holds the generator object. |
1787 __ RecordGeneratorContinuation(); | 1787 __ RecordGeneratorContinuation(); |
1788 __ LoadP(r4, FieldMemOperand(r3, JSGeneratorObject::kResumeModeOffset)); | 1788 __ LoadP(r4, FieldMemOperand(r3, JSGeneratorObject::kResumeModeOffset)); |
1789 __ LoadP(r3, FieldMemOperand(r3, JSGeneratorObject::kInputOffset)); | 1789 __ LoadP(r3, FieldMemOperand(r3, JSGeneratorObject::kInputOrDebugPosOffset)); |
1790 STATIC_ASSERT(JSGeneratorObject::kNext < JSGeneratorObject::kReturn); | 1790 STATIC_ASSERT(JSGeneratorObject::kNext < JSGeneratorObject::kReturn); |
1791 STATIC_ASSERT(JSGeneratorObject::kThrow > JSGeneratorObject::kReturn); | 1791 STATIC_ASSERT(JSGeneratorObject::kThrow > JSGeneratorObject::kReturn); |
1792 __ CmpSmiLiteral(r4, Smi::FromInt(JSGeneratorObject::kReturn), r0); | 1792 __ CmpSmiLiteral(r4, Smi::FromInt(JSGeneratorObject::kReturn), r0); |
1793 __ blt(&resume); | 1793 __ blt(&resume); |
1794 __ Push(result_register()); | 1794 __ Push(result_register()); |
1795 __ bgt(&exception); | 1795 __ bgt(&exception); |
1796 EmitCreateIteratorResult(true); | 1796 EmitCreateIteratorResult(true); |
1797 EmitUnwindAndReturn(); | 1797 EmitUnwindAndReturn(); |
1798 | 1798 |
1799 __ bind(&exception); | 1799 __ bind(&exception); |
(...skipping 1982 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3782 | 3782 |
3783 DCHECK(Assembler::IsCrSet(Assembler::instr_at(cmp_address))); | 3783 DCHECK(Assembler::IsCrSet(Assembler::instr_at(cmp_address))); |
3784 | 3784 |
3785 DCHECK(interrupt_address == | 3785 DCHECK(interrupt_address == |
3786 isolate->builtins()->OnStackReplacement()->entry()); | 3786 isolate->builtins()->OnStackReplacement()->entry()); |
3787 return ON_STACK_REPLACEMENT; | 3787 return ON_STACK_REPLACEMENT; |
3788 } | 3788 } |
3789 } // namespace internal | 3789 } // namespace internal |
3790 } // namespace v8 | 3790 } // namespace v8 |
3791 #endif // V8_TARGET_ARCH_PPC | 3791 #endif // V8_TARGET_ARCH_PPC |
OLD | NEW |