OLD | NEW |
1 // Copyright 2014 the V8 project authors. All rights reserved. | 1 // Copyright 2014 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_PPC | 5 #if V8_TARGET_ARCH_PPC |
6 | 6 |
7 #include "src/full-codegen/full-codegen.h" | 7 #include "src/full-codegen/full-codegen.h" |
8 #include "src/ast/compile-time-value.h" | 8 #include "src/ast/compile-time-value.h" |
9 #include "src/ast/scopes.h" | 9 #include "src/ast/scopes.h" |
10 #include "src/code-factory.h" | 10 #include "src/code-factory.h" |
(...skipping 2368 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2379 PrepareForBailoutForId(expr->CallId(), BailoutState::NO_REGISTERS); | 2379 PrepareForBailoutForId(expr->CallId(), BailoutState::NO_REGISTERS); |
2380 SetCallPosition(expr, expr->tail_call_mode()); | 2380 SetCallPosition(expr, expr->tail_call_mode()); |
2381 if (expr->tail_call_mode() == TailCallMode::kAllow) { | 2381 if (expr->tail_call_mode() == TailCallMode::kAllow) { |
2382 if (FLAG_trace) { | 2382 if (FLAG_trace) { |
2383 __ CallRuntime(Runtime::kTraceTailCall); | 2383 __ CallRuntime(Runtime::kTraceTailCall); |
2384 } | 2384 } |
2385 // Update profiling counters before the tail call since we will | 2385 // Update profiling counters before the tail call since we will |
2386 // not return to this function. | 2386 // not return to this function. |
2387 EmitProfilingCounterHandlingForReturnSequence(true); | 2387 EmitProfilingCounterHandlingForReturnSequence(true); |
2388 } | 2388 } |
2389 Handle<Code> ic = | 2389 Handle<Code> code = |
2390 CodeFactory::CallIC(isolate(), arg_count, mode, expr->tail_call_mode()) | 2390 CodeFactory::CallIC(isolate(), arg_count, mode, expr->tail_call_mode()) |
2391 .code(); | 2391 .code(); |
2392 __ LoadSmiLiteral(r6, SmiFromSlot(expr->CallFeedbackICSlot())); | 2392 __ LoadSmiLiteral(r6, SmiFromSlot(expr->CallFeedbackICSlot())); |
2393 __ LoadP(r4, MemOperand(sp, (arg_count + 1) * kPointerSize), r0); | 2393 __ LoadP(r4, MemOperand(sp, (arg_count + 1) * kPointerSize), r0); |
2394 // Don't assign a type feedback id to the IC, since type feedback is provided | 2394 __ Call(code, RelocInfo::CODE_TARGET); |
2395 // by the vector above. | |
2396 CallIC(ic); | |
2397 OperandStackDepthDecrement(arg_count + 1); | 2395 OperandStackDepthDecrement(arg_count + 1); |
2398 | 2396 |
2399 RecordJSReturnSite(expr); | 2397 RecordJSReturnSite(expr); |
2400 RestoreContext(); | 2398 RestoreContext(); |
2401 context()->DropAndPlug(1, r3); | 2399 context()->DropAndPlug(1, r3); |
2402 } | 2400 } |
2403 | 2401 |
2404 | 2402 |
2405 void FullCodeGenerator::EmitResolvePossiblyDirectEval(Call* expr) { | 2403 void FullCodeGenerator::EmitResolvePossiblyDirectEval(Call* expr) { |
2406 int arg_count = expr->arguments()->length(); | 2404 int arg_count = expr->arguments()->length(); |
(...skipping 1250 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3657 | 3655 |
3658 DCHECK(Assembler::IsCrSet(Assembler::instr_at(cmp_address))); | 3656 DCHECK(Assembler::IsCrSet(Assembler::instr_at(cmp_address))); |
3659 | 3657 |
3660 DCHECK(interrupt_address == | 3658 DCHECK(interrupt_address == |
3661 isolate->builtins()->OnStackReplacement()->entry()); | 3659 isolate->builtins()->OnStackReplacement()->entry()); |
3662 return ON_STACK_REPLACEMENT; | 3660 return ON_STACK_REPLACEMENT; |
3663 } | 3661 } |
3664 } // namespace internal | 3662 } // namespace internal |
3665 } // namespace v8 | 3663 } // namespace v8 |
3666 #endif // V8_TARGET_ARCH_PPC | 3664 #endif // V8_TARGET_ARCH_PPC |
OLD | NEW |