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 #include "src/v8.h" | 5 #include "src/v8.h" |
6 | 6 |
7 #if V8_TARGET_ARCH_MIPS64 | 7 #if V8_TARGET_ARCH_MIPS64 |
8 | 8 |
9 // Note on Mips implementation: | 9 // Note on Mips implementation: |
10 // | 10 // |
(...skipping 140 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
151 // MANUAL indicates that the scope shouldn't actually generate code to set up | 151 // MANUAL indicates that the scope shouldn't actually generate code to set up |
152 // the frame (that is done below). | 152 // the frame (that is done below). |
153 FrameScope frame_scope(masm_, StackFrame::MANUAL); | 153 FrameScope frame_scope(masm_, StackFrame::MANUAL); |
154 info->set_prologue_offset(masm_->pc_offset()); | 154 info->set_prologue_offset(masm_->pc_offset()); |
155 __ Prologue(info->IsCodePreAgingActive()); | 155 __ Prologue(info->IsCodePreAgingActive()); |
156 info->AddNoFrameRange(0, masm_->pc_offset()); | 156 info->AddNoFrameRange(0, masm_->pc_offset()); |
157 | 157 |
158 { Comment cmnt(masm_, "[ Allocate locals"); | 158 { Comment cmnt(masm_, "[ Allocate locals"); |
159 int locals_count = info->scope()->num_stack_slots(); | 159 int locals_count = info->scope()->num_stack_slots(); |
160 // Generators allocate locals, if any, in context slots. | 160 // Generators allocate locals, if any, in context slots. |
161 DCHECK(!info->function()->is_generator() || locals_count == 0); | 161 DCHECK(!IsGeneratorFunction(info->function()->kind()) || locals_count == 0); |
162 if (locals_count > 0) { | 162 if (locals_count > 0) { |
163 if (locals_count >= 128) { | 163 if (locals_count >= 128) { |
164 Label ok; | 164 Label ok; |
165 __ Dsubu(t1, sp, Operand(locals_count * kPointerSize)); | 165 __ Dsubu(t1, sp, Operand(locals_count * kPointerSize)); |
166 __ LoadRoot(a2, Heap::kRealStackLimitRootIndex); | 166 __ LoadRoot(a2, Heap::kRealStackLimitRootIndex); |
167 __ Branch(&ok, hs, t1, Operand(a2)); | 167 __ Branch(&ok, hs, t1, Operand(a2)); |
168 __ InvokeBuiltin(Builtins::STACK_OVERFLOW, CALL_FUNCTION); | 168 __ InvokeBuiltin(Builtins::STACK_OVERFLOW, CALL_FUNCTION); |
169 __ bind(&ok); | 169 __ bind(&ok); |
170 } | 170 } |
171 __ LoadRoot(t1, Heap::kUndefinedValueRootIndex); | 171 __ LoadRoot(t1, Heap::kUndefinedValueRootIndex); |
(...skipping 5204 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
5376 Assembler::target_address_at(pc_immediate_load_address)) == | 5376 Assembler::target_address_at(pc_immediate_load_address)) == |
5377 reinterpret_cast<uint64_t>( | 5377 reinterpret_cast<uint64_t>( |
5378 isolate->builtins()->OsrAfterStackCheck()->entry())); | 5378 isolate->builtins()->OsrAfterStackCheck()->entry())); |
5379 return OSR_AFTER_STACK_CHECK; | 5379 return OSR_AFTER_STACK_CHECK; |
5380 } | 5380 } |
5381 | 5381 |
5382 | 5382 |
5383 } } // namespace v8::internal | 5383 } } // namespace v8::internal |
5384 | 5384 |
5385 #endif // V8_TARGET_ARCH_MIPS64 | 5385 #endif // V8_TARGET_ARCH_MIPS64 |
OLD | NEW |