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