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_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 134 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
145 a0, TypeFeedbackVector::kInvocationCountIndex * kPointerSize + | 145 a0, TypeFeedbackVector::kInvocationCountIndex * kPointerSize + |
146 TypeFeedbackVector::kHeaderSize)); | 146 TypeFeedbackVector::kHeaderSize)); |
147 __ Daddu(a4, a4, Operand(Smi::FromInt(1))); | 147 __ Daddu(a4, a4, Operand(Smi::FromInt(1))); |
148 __ sd(a4, FieldMemOperand( | 148 __ sd(a4, FieldMemOperand( |
149 a0, TypeFeedbackVector::kInvocationCountIndex * kPointerSize + | 149 a0, TypeFeedbackVector::kInvocationCountIndex * kPointerSize + |
150 TypeFeedbackVector::kHeaderSize)); | 150 TypeFeedbackVector::kHeaderSize)); |
151 } | 151 } |
152 | 152 |
153 { Comment cmnt(masm_, "[ Allocate locals"); | 153 { Comment cmnt(masm_, "[ Allocate locals"); |
154 int locals_count = info->scope()->num_stack_slots(); | 154 int locals_count = info->scope()->num_stack_slots(); |
155 // Generators allocate locals, if any, in context slots. | |
156 DCHECK(!IsGeneratorFunction(info->literal()->kind()) || locals_count == 0); | |
157 OperandStackDepthIncrement(locals_count); | 155 OperandStackDepthIncrement(locals_count); |
158 if (locals_count > 0) { | 156 if (locals_count > 0) { |
159 if (locals_count >= 128) { | 157 if (locals_count >= 128) { |
160 Label ok; | 158 Label ok; |
161 __ Dsubu(t1, sp, Operand(locals_count * kPointerSize)); | 159 __ Dsubu(t1, sp, Operand(locals_count * kPointerSize)); |
162 __ LoadRoot(a2, Heap::kRealStackLimitRootIndex); | 160 __ LoadRoot(a2, Heap::kRealStackLimitRootIndex); |
163 __ Branch(&ok, hs, t1, Operand(a2)); | 161 __ Branch(&ok, hs, t1, Operand(a2)); |
164 __ CallRuntime(Runtime::kThrowStackOverflow); | 162 __ CallRuntime(Runtime::kThrowStackOverflow); |
165 __ bind(&ok); | 163 __ bind(&ok); |
166 } | 164 } |
(...skipping 3436 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3603 reinterpret_cast<uint64_t>( | 3601 reinterpret_cast<uint64_t>( |
3604 isolate->builtins()->OnStackReplacement()->entry())); | 3602 isolate->builtins()->OnStackReplacement()->entry())); |
3605 return ON_STACK_REPLACEMENT; | 3603 return ON_STACK_REPLACEMENT; |
3606 } | 3604 } |
3607 | 3605 |
3608 | 3606 |
3609 } // namespace internal | 3607 } // namespace internal |
3610 } // namespace v8 | 3608 } // namespace v8 |
3611 | 3609 |
3612 #endif // V8_TARGET_ARCH_MIPS64 | 3610 #endif // V8_TARGET_ARCH_MIPS64 |
OLD | NEW |