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 124 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
135 // the frame (that is done below). | 135 // the frame (that is done below). |
136 FrameScope frame_scope(masm_, StackFrame::MANUAL); | 136 FrameScope frame_scope(masm_, StackFrame::MANUAL); |
137 | 137 |
138 info->set_prologue_offset(masm_->pc_offset()); | 138 info->set_prologue_offset(masm_->pc_offset()); |
139 __ Prologue(info->GeneratePreagedPrologue()); | 139 __ Prologue(info->GeneratePreagedPrologue()); |
140 | 140 |
141 // Increment invocation count for the function. | 141 // Increment invocation count for the function. |
142 { | 142 { |
143 Comment cmnt(masm_, "[ Increment invocation count"); | 143 Comment cmnt(masm_, "[ Increment invocation count"); |
144 __ lw(a0, FieldMemOperand(a1, JSFunction::kFeedbackVectorOffset)); | 144 __ lw(a0, FieldMemOperand(a1, JSFunction::kFeedbackVectorOffset)); |
| 145 __ lw(a0, FieldMemOperand(a0, Cell::kValueOffset)); |
145 __ lw(t0, FieldMemOperand( | 146 __ lw(t0, FieldMemOperand( |
146 a0, TypeFeedbackVector::kInvocationCountIndex * kPointerSize + | 147 a0, TypeFeedbackVector::kInvocationCountIndex * kPointerSize + |
147 TypeFeedbackVector::kHeaderSize)); | 148 TypeFeedbackVector::kHeaderSize)); |
148 __ Addu(t0, t0, Operand(Smi::FromInt(1))); | 149 __ Addu(t0, t0, Operand(Smi::FromInt(1))); |
149 __ sw(t0, FieldMemOperand( | 150 __ sw(t0, FieldMemOperand( |
150 a0, TypeFeedbackVector::kInvocationCountIndex * kPointerSize + | 151 a0, TypeFeedbackVector::kInvocationCountIndex * kPointerSize + |
151 TypeFeedbackVector::kHeaderSize)); | 152 TypeFeedbackVector::kHeaderSize)); |
152 } | 153 } |
153 | 154 |
154 { Comment cmnt(masm_, "[ Allocate locals"); | 155 { Comment cmnt(masm_, "[ Allocate locals"); |
(...skipping 2714 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2869 reinterpret_cast<uint32_t>( | 2870 reinterpret_cast<uint32_t>( |
2870 isolate->builtins()->OnStackReplacement()->entry())); | 2871 isolate->builtins()->OnStackReplacement()->entry())); |
2871 return ON_STACK_REPLACEMENT; | 2872 return ON_STACK_REPLACEMENT; |
2872 } | 2873 } |
2873 | 2874 |
2874 | 2875 |
2875 } // namespace internal | 2876 } // namespace internal |
2876 } // namespace v8 | 2877 } // namespace v8 |
2877 | 2878 |
2878 #endif // V8_TARGET_ARCH_MIPS | 2879 #endif // V8_TARGET_ARCH_MIPS |
OLD | NEW |