OLD | NEW |
1 // Copyright 2013 the V8 project authors. All rights reserved. | 1 // Copyright 2013 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_ARM64 | 5 #if V8_TARGET_ARCH_ARM64 |
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 2267 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2278 SetCallPosition(expr, expr->tail_call_mode()); | 2278 SetCallPosition(expr, expr->tail_call_mode()); |
2279 if (expr->tail_call_mode() == TailCallMode::kAllow) { | 2279 if (expr->tail_call_mode() == TailCallMode::kAllow) { |
2280 if (FLAG_trace) { | 2280 if (FLAG_trace) { |
2281 __ CallRuntime(Runtime::kTraceTailCall); | 2281 __ CallRuntime(Runtime::kTraceTailCall); |
2282 } | 2282 } |
2283 // Update profiling counters before the tail call since we will | 2283 // Update profiling counters before the tail call since we will |
2284 // not return to this function. | 2284 // not return to this function. |
2285 EmitProfilingCounterHandlingForReturnSequence(true); | 2285 EmitProfilingCounterHandlingForReturnSequence(true); |
2286 } | 2286 } |
2287 Handle<Code> code = | 2287 Handle<Code> code = |
2288 CodeFactory::CallIC(isolate(), arg_count, mode, expr->tail_call_mode()) | 2288 CodeFactory::CallIC(isolate(), mode, expr->tail_call_mode()).code(); |
2289 .code(); | |
2290 __ Mov(x3, SmiFromSlot(expr->CallFeedbackICSlot())); | 2289 __ Mov(x3, SmiFromSlot(expr->CallFeedbackICSlot())); |
2291 __ Peek(x1, (arg_count + 1) * kXRegSize); | 2290 __ Peek(x1, (arg_count + 1) * kXRegSize); |
| 2291 __ Mov(x0, arg_count); |
2292 __ Call(code, RelocInfo::CODE_TARGET); | 2292 __ Call(code, RelocInfo::CODE_TARGET); |
2293 OperandStackDepthDecrement(arg_count + 1); | 2293 OperandStackDepthDecrement(arg_count + 1); |
2294 | 2294 |
2295 RecordJSReturnSite(expr); | 2295 RecordJSReturnSite(expr); |
2296 RestoreContext(); | 2296 RestoreContext(); |
2297 context()->DropAndPlug(1, x0); | 2297 context()->DropAndPlug(1, x0); |
2298 } | 2298 } |
2299 | 2299 |
2300 void FullCodeGenerator::EmitResolvePossiblyDirectEval(Call* expr) { | 2300 void FullCodeGenerator::EmitResolvePossiblyDirectEval(Call* expr) { |
2301 int arg_count = expr->arguments()->length(); | 2301 int arg_count = expr->arguments()->length(); |
(...skipping 1430 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3732 } | 3732 } |
3733 | 3733 |
3734 return INTERRUPT; | 3734 return INTERRUPT; |
3735 } | 3735 } |
3736 | 3736 |
3737 | 3737 |
3738 } // namespace internal | 3738 } // namespace internal |
3739 } // namespace v8 | 3739 } // namespace v8 |
3740 | 3740 |
3741 #endif // V8_TARGET_ARCH_ARM64 | 3741 #endif // V8_TARGET_ARCH_ARM64 |
OLD | NEW |