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_X87 | 5 #if V8_TARGET_ARCH_X87 |
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 2256 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2267 SetCallPosition(expr, expr->tail_call_mode()); | 2267 SetCallPosition(expr, expr->tail_call_mode()); |
2268 if (expr->tail_call_mode() == TailCallMode::kAllow) { | 2268 if (expr->tail_call_mode() == TailCallMode::kAllow) { |
2269 if (FLAG_trace) { | 2269 if (FLAG_trace) { |
2270 __ CallRuntime(Runtime::kTraceTailCall); | 2270 __ CallRuntime(Runtime::kTraceTailCall); |
2271 } | 2271 } |
2272 // Update profiling counters before the tail call since we will | 2272 // Update profiling counters before the tail call since we will |
2273 // not return to this function. | 2273 // not return to this function. |
2274 EmitProfilingCounterHandlingForReturnSequence(true); | 2274 EmitProfilingCounterHandlingForReturnSequence(true); |
2275 } | 2275 } |
2276 Handle<Code> code = | 2276 Handle<Code> code = |
2277 CodeFactory::CallIC(isolate(), arg_count, mode, expr->tail_call_mode()) | 2277 CodeFactory::CallIC(isolate(), mode, expr->tail_call_mode()).code(); |
2278 .code(); | |
2279 __ Move(edx, Immediate(SmiFromSlot(expr->CallFeedbackICSlot()))); | 2278 __ Move(edx, Immediate(SmiFromSlot(expr->CallFeedbackICSlot()))); |
2280 __ mov(edi, Operand(esp, (arg_count + 1) * kPointerSize)); | 2279 __ mov(edi, Operand(esp, (arg_count + 1) * kPointerSize)); |
| 2280 __ Move(eax, Immediate(arg_count)); |
2281 __ call(code, RelocInfo::CODE_TARGET); | 2281 __ call(code, RelocInfo::CODE_TARGET); |
2282 OperandStackDepthDecrement(arg_count + 1); | 2282 OperandStackDepthDecrement(arg_count + 1); |
2283 | 2283 |
2284 RecordJSReturnSite(expr); | 2284 RecordJSReturnSite(expr); |
2285 RestoreContext(); | 2285 RestoreContext(); |
2286 context()->DropAndPlug(1, eax); | 2286 context()->DropAndPlug(1, eax); |
2287 } | 2287 } |
2288 | 2288 |
2289 void FullCodeGenerator::EmitResolvePossiblyDirectEval(Call* expr) { | 2289 void FullCodeGenerator::EmitResolvePossiblyDirectEval(Call* expr) { |
2290 int arg_count = expr->arguments()->length(); | 2290 int arg_count = expr->arguments()->length(); |
(...skipping 1261 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3552 isolate->builtins()->OnStackReplacement()->entry(), | 3552 isolate->builtins()->OnStackReplacement()->entry(), |
3553 Assembler::target_address_at(call_target_address, unoptimized_code)); | 3553 Assembler::target_address_at(call_target_address, unoptimized_code)); |
3554 return ON_STACK_REPLACEMENT; | 3554 return ON_STACK_REPLACEMENT; |
3555 } | 3555 } |
3556 | 3556 |
3557 | 3557 |
3558 } // namespace internal | 3558 } // namespace internal |
3559 } // namespace v8 | 3559 } // namespace v8 |
3560 | 3560 |
3561 #endif // V8_TARGET_ARCH_X87 | 3561 #endif // V8_TARGET_ARCH_X87 |
OLD | NEW |