OLD | NEW |
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_MIPS | 5 #if V8_TARGET_ARCH_MIPS |
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 2069 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2080 Expression *value, | 2080 Expression *value, |
2081 JSGeneratorObject::ResumeMode resume_mode) { | 2081 JSGeneratorObject::ResumeMode resume_mode) { |
2082 // The value stays in a0, and is ultimately read by the resumed generator, as | 2082 // The value stays in a0, and is ultimately read by the resumed generator, as |
2083 // if CallRuntime(Runtime::kSuspendJSGeneratorObject) returned it. Or it | 2083 // if CallRuntime(Runtime::kSuspendJSGeneratorObject) returned it. Or it |
2084 // is read to throw the value when the resumed generator is already closed. | 2084 // is read to throw the value when the resumed generator is already closed. |
2085 // a1 will hold the generator object until the activation has been resumed. | 2085 // a1 will hold the generator object until the activation has been resumed. |
2086 VisitForStackValue(generator); | 2086 VisitForStackValue(generator); |
2087 VisitForAccumulatorValue(value); | 2087 VisitForAccumulatorValue(value); |
2088 __ pop(a1); | 2088 __ pop(a1); |
2089 | 2089 |
| 2090 // Store input value into generator object. |
| 2091 __ sw(result_register(), |
| 2092 FieldMemOperand(a1, JSGeneratorObject::kInputOffset)); |
| 2093 __ mov(a2, result_register()); |
| 2094 __ RecordWriteField(a1, JSGeneratorObject::kInputOffset, a2, a3, |
| 2095 kRAHasBeenSaved, kDontSaveFPRegs); |
| 2096 |
2090 // Load suspended function and context. | 2097 // Load suspended function and context. |
2091 __ lw(cp, FieldMemOperand(a1, JSGeneratorObject::kContextOffset)); | 2098 __ lw(cp, FieldMemOperand(a1, JSGeneratorObject::kContextOffset)); |
2092 __ lw(t0, FieldMemOperand(a1, JSGeneratorObject::kFunctionOffset)); | 2099 __ lw(t0, FieldMemOperand(a1, JSGeneratorObject::kFunctionOffset)); |
2093 | 2100 |
2094 // Load receiver and store as the first argument. | 2101 // Load receiver and store as the first argument. |
2095 __ lw(a2, FieldMemOperand(a1, JSGeneratorObject::kReceiverOffset)); | 2102 __ lw(a2, FieldMemOperand(a1, JSGeneratorObject::kReceiverOffset)); |
2096 __ push(a2); | 2103 __ push(a2); |
2097 | 2104 |
2098 // Push holes for the rest of the arguments to the generator function. | 2105 // Push holes for the rest of the arguments to the generator function. |
2099 __ lw(a3, FieldMemOperand(t0, JSFunction::kSharedFunctionInfoOffset)); | 2106 __ lw(a3, FieldMemOperand(t0, JSFunction::kSharedFunctionInfoOffset)); |
(...skipping 2701 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
4801 reinterpret_cast<uint32_t>( | 4808 reinterpret_cast<uint32_t>( |
4802 isolate->builtins()->OsrAfterStackCheck()->entry())); | 4809 isolate->builtins()->OsrAfterStackCheck()->entry())); |
4803 return OSR_AFTER_STACK_CHECK; | 4810 return OSR_AFTER_STACK_CHECK; |
4804 } | 4811 } |
4805 | 4812 |
4806 | 4813 |
4807 } // namespace internal | 4814 } // namespace internal |
4808 } // namespace v8 | 4815 } // namespace v8 |
4809 | 4816 |
4810 #endif // V8_TARGET_ARCH_MIPS | 4817 #endif // V8_TARGET_ARCH_MIPS |
OLD | NEW |