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 2025 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2036 // The value stays in r3, and is ultimately read by the resumed generator, as | 2036 // The value stays in r3, and is ultimately read by the resumed generator, as |
2037 // if CallRuntime(Runtime::kSuspendJSGeneratorObject) returned it. Or it | 2037 // if CallRuntime(Runtime::kSuspendJSGeneratorObject) returned it. Or it |
2038 // is read to throw the value when the resumed generator is already closed. | 2038 // is read to throw the value when the resumed generator is already closed. |
2039 // r4 will hold the generator object until the activation has been resumed. | 2039 // r4 will hold the generator object until the activation has been resumed. |
2040 VisitForStackValue(generator); | 2040 VisitForStackValue(generator); |
2041 VisitForAccumulatorValue(value); | 2041 VisitForAccumulatorValue(value); |
2042 __ pop(r4); | 2042 __ pop(r4); |
2043 | 2043 |
2044 // Store input value into generator object. | 2044 // Store input value into generator object. |
2045 __ StoreP(result_register(), | 2045 __ StoreP(result_register(), |
2046 FieldMemOperand(r4, JSGeneratorObject::kInputOffset)); | 2046 FieldMemOperand(r4, JSGeneratorObject::kInputOffset), r0); |
2047 __ mr(r5, result_register()); | 2047 __ mr(r5, result_register()); |
2048 __ RecordWriteField(r4, JSGeneratorObject::kInputOffset, r5, r6, | 2048 __ RecordWriteField(r4, JSGeneratorObject::kInputOffset, r5, r6, |
2049 kLRHasBeenSaved, kDontSaveFPRegs); | 2049 kLRHasBeenSaved, kDontSaveFPRegs); |
2050 | 2050 |
2051 // Load suspended function and context. | 2051 // Load suspended function and context. |
2052 __ LoadP(cp, FieldMemOperand(r4, JSGeneratorObject::kContextOffset)); | 2052 __ LoadP(cp, FieldMemOperand(r4, JSGeneratorObject::kContextOffset)); |
2053 __ LoadP(r7, FieldMemOperand(r4, JSGeneratorObject::kFunctionOffset)); | 2053 __ LoadP(r7, FieldMemOperand(r4, JSGeneratorObject::kFunctionOffset)); |
2054 | 2054 |
2055 // Load receiver and store as the first argument. | 2055 // Load receiver and store as the first argument. |
2056 __ LoadP(r5, FieldMemOperand(r4, JSGeneratorObject::kReceiverOffset)); | 2056 __ LoadP(r5, FieldMemOperand(r4, JSGeneratorObject::kReceiverOffset)); |
(...skipping 2736 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
4793 return ON_STACK_REPLACEMENT; | 4793 return ON_STACK_REPLACEMENT; |
4794 } | 4794 } |
4795 | 4795 |
4796 DCHECK(interrupt_address == | 4796 DCHECK(interrupt_address == |
4797 isolate->builtins()->OsrAfterStackCheck()->entry()); | 4797 isolate->builtins()->OsrAfterStackCheck()->entry()); |
4798 return OSR_AFTER_STACK_CHECK; | 4798 return OSR_AFTER_STACK_CHECK; |
4799 } | 4799 } |
4800 } // namespace internal | 4800 } // namespace internal |
4801 } // namespace v8 | 4801 } // namespace v8 |
4802 #endif // V8_TARGET_ARCH_PPC | 4802 #endif // V8_TARGET_ARCH_PPC |
OLD | NEW |