| 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 118 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 129 Operand(FIRST_JS_RECEIVER_TYPE)); | 129 Operand(FIRST_JS_RECEIVER_TYPE)); |
| 130 } | 130 } |
| 131 | 131 |
| 132 // Open a frame scope to indicate that there is a frame on the stack. The | 132 // Open a frame scope to indicate that there is a frame on the stack. The |
| 133 // MANUAL indicates that the scope shouldn't actually generate code to set up | 133 // MANUAL indicates that the scope shouldn't actually generate code to set up |
| 134 // the frame (that is done below). | 134 // the frame (that is done below). |
| 135 FrameScope frame_scope(masm_, StackFrame::MANUAL); | 135 FrameScope frame_scope(masm_, StackFrame::MANUAL); |
| 136 info->set_prologue_offset(masm_->pc_offset()); | 136 info->set_prologue_offset(masm_->pc_offset()); |
| 137 __ Prologue(info->GeneratePreagedPrologue()); | 137 __ Prologue(info->GeneratePreagedPrologue()); |
| 138 | 138 |
| 139 // Increment invocation count for the function. |
| 140 { |
| 141 Comment cmnt(masm_, "[ Increment invocation count"); |
| 142 __ ld(a0, FieldMemOperand(a1, JSFunction::kLiteralsOffset)); |
| 143 __ ld(a0, FieldMemOperand(a0, LiteralsArray::kFeedbackVectorOffset)); |
| 144 __ ld(a4, FieldMemOperand( |
| 145 a0, TypeFeedbackVector::kInvocationCountIndex * kPointerSize + |
| 146 TypeFeedbackVector::kHeaderSize)); |
| 147 __ Daddu(a4, a4, Operand(Smi::FromInt(1))); |
| 148 __ sd(a4, FieldMemOperand( |
| 149 a0, TypeFeedbackVector::kInvocationCountIndex * kPointerSize + |
| 150 TypeFeedbackVector::kHeaderSize)); |
| 151 } |
| 152 |
| 139 { Comment cmnt(masm_, "[ Allocate locals"); | 153 { Comment cmnt(masm_, "[ Allocate locals"); |
| 140 int locals_count = info->scope()->num_stack_slots(); | 154 int locals_count = info->scope()->num_stack_slots(); |
| 141 // Generators allocate locals, if any, in context slots. | 155 // Generators allocate locals, if any, in context slots. |
| 142 DCHECK(!IsGeneratorFunction(info->literal()->kind()) || locals_count == 0); | 156 DCHECK(!IsGeneratorFunction(info->literal()->kind()) || locals_count == 0); |
| 143 OperandStackDepthIncrement(locals_count); | 157 OperandStackDepthIncrement(locals_count); |
| 144 if (locals_count > 0) { | 158 if (locals_count > 0) { |
| 145 if (locals_count >= 128) { | 159 if (locals_count >= 128) { |
| 146 Label ok; | 160 Label ok; |
| 147 __ Dsubu(t1, sp, Operand(locals_count * kPointerSize)); | 161 __ Dsubu(t1, sp, Operand(locals_count * kPointerSize)); |
| 148 __ LoadRoot(a2, Heap::kRealStackLimitRootIndex); | 162 __ LoadRoot(a2, Heap::kRealStackLimitRootIndex); |
| (...skipping 3574 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3723 reinterpret_cast<uint64_t>( | 3737 reinterpret_cast<uint64_t>( |
| 3724 isolate->builtins()->OnStackReplacement()->entry())); | 3738 isolate->builtins()->OnStackReplacement()->entry())); |
| 3725 return ON_STACK_REPLACEMENT; | 3739 return ON_STACK_REPLACEMENT; |
| 3726 } | 3740 } |
| 3727 | 3741 |
| 3728 | 3742 |
| 3729 } // namespace internal | 3743 } // namespace internal |
| 3730 } // namespace v8 | 3744 } // namespace v8 |
| 3731 | 3745 |
| 3732 #endif // V8_TARGET_ARCH_MIPS64 | 3746 #endif // V8_TARGET_ARCH_MIPS64 |
| OLD | NEW |