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 1773 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1784 STATIC_ASSERT(JSGeneratorObject::kNext < JSGeneratorObject::kReturn); | 1784 STATIC_ASSERT(JSGeneratorObject::kNext < JSGeneratorObject::kReturn); |
1785 STATIC_ASSERT(JSGeneratorObject::kThrow > JSGeneratorObject::kReturn); | 1785 STATIC_ASSERT(JSGeneratorObject::kThrow > JSGeneratorObject::kReturn); |
1786 __ CmpSmiLiteral(r4, Smi::FromInt(JSGeneratorObject::kReturn), r0); | 1786 __ CmpSmiLiteral(r4, Smi::FromInt(JSGeneratorObject::kReturn), r0); |
1787 __ blt(&resume); | 1787 __ blt(&resume); |
1788 __ Push(result_register()); | 1788 __ Push(result_register()); |
1789 __ bgt(&exception); | 1789 __ bgt(&exception); |
1790 EmitCreateIteratorResult(true); | 1790 EmitCreateIteratorResult(true); |
1791 EmitUnwindAndReturn(); | 1791 EmitUnwindAndReturn(); |
1792 | 1792 |
1793 __ bind(&exception); | 1793 __ bind(&exception); |
1794 __ CallRuntime(Runtime::kThrow); | 1794 __ CallRuntime(expr->rethrow_on_exception() ? Runtime::kReThrow |
| 1795 : Runtime::kThrow); |
1795 | 1796 |
1796 __ bind(&suspend); | 1797 __ bind(&suspend); |
1797 OperandStackDepthIncrement(1); // Not popped on this path. | 1798 OperandStackDepthIncrement(1); // Not popped on this path. |
1798 VisitForAccumulatorValue(expr->generator_object()); | 1799 VisitForAccumulatorValue(expr->generator_object()); |
1799 DCHECK(continuation.pos() > 0 && Smi::IsValid(continuation.pos())); | 1800 DCHECK(continuation.pos() > 0 && Smi::IsValid(continuation.pos())); |
1800 __ LoadSmiLiteral(r4, Smi::FromInt(continuation.pos())); | 1801 __ LoadSmiLiteral(r4, Smi::FromInt(continuation.pos())); |
1801 __ StoreP(r4, FieldMemOperand(r3, JSGeneratorObject::kContinuationOffset), | 1802 __ StoreP(r4, FieldMemOperand(r3, JSGeneratorObject::kContinuationOffset), |
1802 r0); | 1803 r0); |
1803 __ StoreP(cp, FieldMemOperand(r3, JSGeneratorObject::kContextOffset), r0); | 1804 __ StoreP(cp, FieldMemOperand(r3, JSGeneratorObject::kContextOffset), r0); |
1804 __ mr(r4, cp); | 1805 __ mr(r4, cp); |
(...skipping 1955 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3760 | 3761 |
3761 DCHECK(Assembler::IsCrSet(Assembler::instr_at(cmp_address))); | 3762 DCHECK(Assembler::IsCrSet(Assembler::instr_at(cmp_address))); |
3762 | 3763 |
3763 DCHECK(interrupt_address == | 3764 DCHECK(interrupt_address == |
3764 isolate->builtins()->OnStackReplacement()->entry()); | 3765 isolate->builtins()->OnStackReplacement()->entry()); |
3765 return ON_STACK_REPLACEMENT; | 3766 return ON_STACK_REPLACEMENT; |
3766 } | 3767 } |
3767 } // namespace internal | 3768 } // namespace internal |
3768 } // namespace v8 | 3769 } // namespace v8 |
3769 #endif // V8_TARGET_ARCH_PPC | 3770 #endif // V8_TARGET_ARCH_PPC |
OLD | NEW |