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 2374 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2385 // Record source position of the IC call. | 2385 // Record source position of the IC call. |
2386 SetCallPosition(expr, expr->tail_call_mode()); | 2386 SetCallPosition(expr, expr->tail_call_mode()); |
2387 if (expr->tail_call_mode() == TailCallMode::kAllow) { | 2387 if (expr->tail_call_mode() == TailCallMode::kAllow) { |
2388 if (FLAG_trace) { | 2388 if (FLAG_trace) { |
2389 __ CallRuntime(Runtime::kTraceTailCall); | 2389 __ CallRuntime(Runtime::kTraceTailCall); |
2390 } | 2390 } |
2391 // Update profiling counters before the tail call since we will | 2391 // Update profiling counters before the tail call since we will |
2392 // not return to this function. | 2392 // not return to this function. |
2393 EmitProfilingCounterHandlingForReturnSequence(true); | 2393 EmitProfilingCounterHandlingForReturnSequence(true); |
2394 } | 2394 } |
2395 Handle<Code> ic = | 2395 Handle<Code> code = |
2396 CodeFactory::CallIC(isolate(), arg_count, mode, expr->tail_call_mode()) | 2396 CodeFactory::CallIC(isolate(), arg_count, mode, expr->tail_call_mode()) |
2397 .code(); | 2397 .code(); |
2398 __ li(a3, Operand(SmiFromSlot(expr->CallFeedbackICSlot()))); | 2398 __ li(a3, Operand(SmiFromSlot(expr->CallFeedbackICSlot()))); |
2399 __ lw(a1, MemOperand(sp, (arg_count + 1) * kPointerSize)); | 2399 __ lw(a1, MemOperand(sp, (arg_count + 1) * kPointerSize)); |
2400 // Don't assign a type feedback id to the IC, since type feedback is provided | 2400 __ Call(code, RelocInfo::CODE_TARGET); |
2401 // by the vector above. | |
2402 CallIC(ic); | |
2403 OperandStackDepthDecrement(arg_count + 1); | 2401 OperandStackDepthDecrement(arg_count + 1); |
2404 | 2402 |
2405 RecordJSReturnSite(expr); | 2403 RecordJSReturnSite(expr); |
2406 RestoreContext(); | 2404 RestoreContext(); |
2407 context()->DropAndPlug(1, v0); | 2405 context()->DropAndPlug(1, v0); |
2408 } | 2406 } |
2409 | 2407 |
2410 void FullCodeGenerator::EmitResolvePossiblyDirectEval(Call* expr) { | 2408 void FullCodeGenerator::EmitResolvePossiblyDirectEval(Call* expr) { |
2411 int arg_count = expr->arguments()->length(); | 2409 int arg_count = expr->arguments()->length(); |
2412 // t4: copy of the first argument or undefined if it doesn't exist. | 2410 // t4: copy of the first argument or undefined if it doesn't exist. |
(...skipping 1259 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3672 reinterpret_cast<uint32_t>( | 3670 reinterpret_cast<uint32_t>( |
3673 isolate->builtins()->OnStackReplacement()->entry())); | 3671 isolate->builtins()->OnStackReplacement()->entry())); |
3674 return ON_STACK_REPLACEMENT; | 3672 return ON_STACK_REPLACEMENT; |
3675 } | 3673 } |
3676 | 3674 |
3677 | 3675 |
3678 } // namespace internal | 3676 } // namespace internal |
3679 } // namespace v8 | 3677 } // namespace v8 |
3680 | 3678 |
3681 #endif // V8_TARGET_ARCH_MIPS | 3679 #endif // V8_TARGET_ARCH_MIPS |
OLD | NEW |