| 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 3165 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3176 | 3176 |
| 3177 // Call the construct call builtin that handles allocation and | 3177 // Call the construct call builtin that handles allocation and |
| 3178 // constructor invocation. | 3178 // constructor invocation. |
| 3179 SetConstructCallPosition(expr); | 3179 SetConstructCallPosition(expr); |
| 3180 | 3180 |
| 3181 // Load function and argument count into a1 and a0. | 3181 // Load function and argument count into a1 and a0. |
| 3182 __ li(a0, Operand(arg_count)); | 3182 __ li(a0, Operand(arg_count)); |
| 3183 __ lw(a1, MemOperand(sp, arg_count * kPointerSize)); | 3183 __ lw(a1, MemOperand(sp, arg_count * kPointerSize)); |
| 3184 | 3184 |
| 3185 // Record call targets in unoptimized code. | 3185 // Record call targets in unoptimized code. |
| 3186 if (FLAG_pretenuring_call_new) { | |
| 3187 EnsureSlotContainsAllocationSite(expr->AllocationSiteFeedbackSlot()); | |
| 3188 DCHECK(expr->AllocationSiteFeedbackSlot().ToInt() == | |
| 3189 expr->CallNewFeedbackSlot().ToInt() + 1); | |
| 3190 } | |
| 3191 | |
| 3192 __ li(a2, FeedbackVector()); | 3186 __ li(a2, FeedbackVector()); |
| 3193 __ li(a3, Operand(SmiFromSlot(expr->CallNewFeedbackSlot()))); | 3187 __ li(a3, Operand(SmiFromSlot(expr->CallNewFeedbackSlot()))); |
| 3194 | 3188 |
| 3195 CallConstructStub stub(isolate(), RECORD_CONSTRUCTOR_TARGET); | 3189 CallConstructStub stub(isolate(), RECORD_CONSTRUCTOR_TARGET); |
| 3196 __ Call(stub.GetCode(), RelocInfo::CONSTRUCT_CALL); | 3190 __ Call(stub.GetCode(), RelocInfo::CONSTRUCT_CALL); |
| 3197 PrepareForBailoutForId(expr->ReturnId(), TOS_REG); | 3191 PrepareForBailoutForId(expr->ReturnId(), TOS_REG); |
| 3198 // Restore context register. | 3192 // Restore context register. |
| 3199 __ lw(cp, MemOperand(fp, StandardFrameConstants::kContextOffset)); | 3193 __ lw(cp, MemOperand(fp, StandardFrameConstants::kContextOffset)); |
| 3200 context()->Plug(v0); | 3194 context()->Plug(v0); |
| 3201 } | 3195 } |
| (...skipping 20 matching lines...) Expand all Loading... |
| 3222 | 3216 |
| 3223 // Load original constructor into t0. | 3217 // Load original constructor into t0. |
| 3224 VisitForAccumulatorValue(super_call_ref->new_target_var()); | 3218 VisitForAccumulatorValue(super_call_ref->new_target_var()); |
| 3225 __ mov(t0, result_register()); | 3219 __ mov(t0, result_register()); |
| 3226 | 3220 |
| 3227 // Load function and argument count into a1 and a0. | 3221 // Load function and argument count into a1 and a0. |
| 3228 __ li(a0, Operand(arg_count)); | 3222 __ li(a0, Operand(arg_count)); |
| 3229 __ lw(a1, MemOperand(sp, arg_count * kPointerSize)); | 3223 __ lw(a1, MemOperand(sp, arg_count * kPointerSize)); |
| 3230 | 3224 |
| 3231 // Record call targets in unoptimized code. | 3225 // Record call targets in unoptimized code. |
| 3232 if (FLAG_pretenuring_call_new) { | |
| 3233 UNREACHABLE(); | |
| 3234 /* TODO(dslomov): support pretenuring. | |
| 3235 EnsureSlotContainsAllocationSite(expr->AllocationSiteFeedbackSlot()); | |
| 3236 DCHECK(expr->AllocationSiteFeedbackSlot().ToInt() == | |
| 3237 expr->CallNewFeedbackSlot().ToInt() + 1); | |
| 3238 */ | |
| 3239 } | |
| 3240 | |
| 3241 __ li(a2, FeedbackVector()); | 3226 __ li(a2, FeedbackVector()); |
| 3242 __ li(a3, Operand(SmiFromSlot(expr->CallFeedbackSlot()))); | 3227 __ li(a3, Operand(SmiFromSlot(expr->CallFeedbackSlot()))); |
| 3243 | 3228 |
| 3244 CallConstructStub stub(isolate(), SUPER_CALL_RECORD_TARGET); | 3229 CallConstructStub stub(isolate(), SUPER_CALL_RECORD_TARGET); |
| 3245 __ Call(stub.GetCode(), RelocInfo::CONSTRUCT_CALL); | 3230 __ Call(stub.GetCode(), RelocInfo::CONSTRUCT_CALL); |
| 3246 | 3231 |
| 3247 RecordJSReturnSite(expr); | 3232 RecordJSReturnSite(expr); |
| 3248 | 3233 |
| 3249 // Restore context register. | 3234 // Restore context register. |
| 3250 __ lw(cp, MemOperand(fp, StandardFrameConstants::kContextOffset)); | 3235 __ lw(cp, MemOperand(fp, StandardFrameConstants::kContextOffset)); |
| (...skipping 1997 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 5248 reinterpret_cast<uint32_t>( | 5233 reinterpret_cast<uint32_t>( |
| 5249 isolate->builtins()->OsrAfterStackCheck()->entry())); | 5234 isolate->builtins()->OsrAfterStackCheck()->entry())); |
| 5250 return OSR_AFTER_STACK_CHECK; | 5235 return OSR_AFTER_STACK_CHECK; |
| 5251 } | 5236 } |
| 5252 | 5237 |
| 5253 | 5238 |
| 5254 } // namespace internal | 5239 } // namespace internal |
| 5255 } // namespace v8 | 5240 } // namespace v8 |
| 5256 | 5241 |
| 5257 #endif // V8_TARGET_ARCH_MIPS | 5242 #endif // V8_TARGET_ARCH_MIPS |
| OLD | NEW |