| 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_MIPS | 7 #if V8_TARGET_ARCH_MIPS |
| 8 | 8 |
| 9 // Note on Mips implementation: | 9 // Note on Mips implementation: |
| 10 // | 10 // |
| (...skipping 143 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 154 // the frame (that is done below). | 154 // the frame (that is done below). |
| 155 FrameScope frame_scope(masm_, StackFrame::MANUAL); | 155 FrameScope frame_scope(masm_, StackFrame::MANUAL); |
| 156 | 156 |
| 157 info->set_prologue_offset(masm_->pc_offset()); | 157 info->set_prologue_offset(masm_->pc_offset()); |
| 158 __ Prologue(info->IsCodePreAgingActive()); | 158 __ Prologue(info->IsCodePreAgingActive()); |
| 159 info->AddNoFrameRange(0, masm_->pc_offset()); | 159 info->AddNoFrameRange(0, masm_->pc_offset()); |
| 160 | 160 |
| 161 { Comment cmnt(masm_, "[ Allocate locals"); | 161 { Comment cmnt(masm_, "[ Allocate locals"); |
| 162 int locals_count = info->scope()->num_stack_slots(); | 162 int locals_count = info->scope()->num_stack_slots(); |
| 163 // Generators allocate locals, if any, in context slots. | 163 // Generators allocate locals, if any, in context slots. |
| 164 DCHECK(!info->function()->is_generator() || locals_count == 0); | 164 DCHECK(!IsGeneratorFunction(info->function()->kind()) || locals_count == 0); |
| 165 if (locals_count > 0) { | 165 if (locals_count > 0) { |
| 166 if (locals_count >= 128) { | 166 if (locals_count >= 128) { |
| 167 Label ok; | 167 Label ok; |
| 168 __ Subu(t5, sp, Operand(locals_count * kPointerSize)); | 168 __ Subu(t5, sp, Operand(locals_count * kPointerSize)); |
| 169 __ LoadRoot(a2, Heap::kRealStackLimitRootIndex); | 169 __ LoadRoot(a2, Heap::kRealStackLimitRootIndex); |
| 170 __ Branch(&ok, hs, t5, Operand(a2)); | 170 __ Branch(&ok, hs, t5, Operand(a2)); |
| 171 __ InvokeBuiltin(Builtins::STACK_OVERFLOW, CALL_FUNCTION); | 171 __ InvokeBuiltin(Builtins::STACK_OVERFLOW, CALL_FUNCTION); |
| 172 __ bind(&ok); | 172 __ bind(&ok); |
| 173 } | 173 } |
| 174 __ LoadRoot(t5, Heap::kUndefinedValueRootIndex); | 174 __ LoadRoot(t5, Heap::kUndefinedValueRootIndex); |
| (...skipping 5197 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 5372 Assembler::target_address_at(pc_immediate_load_address)) == | 5372 Assembler::target_address_at(pc_immediate_load_address)) == |
| 5373 reinterpret_cast<uint32_t>( | 5373 reinterpret_cast<uint32_t>( |
| 5374 isolate->builtins()->OsrAfterStackCheck()->entry())); | 5374 isolate->builtins()->OsrAfterStackCheck()->entry())); |
| 5375 return OSR_AFTER_STACK_CHECK; | 5375 return OSR_AFTER_STACK_CHECK; |
| 5376 } | 5376 } |
| 5377 | 5377 |
| 5378 | 5378 |
| 5379 } } // namespace v8::internal | 5379 } } // namespace v8::internal |
| 5380 | 5380 |
| 5381 #endif // V8_TARGET_ARCH_MIPS | 5381 #endif // V8_TARGET_ARCH_MIPS |
| OLD | NEW |