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 2255 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2266 PrepareForBailoutForId(expr->CallId(), BailoutState::NO_REGISTERS); | 2266 PrepareForBailoutForId(expr->CallId(), BailoutState::NO_REGISTERS); |
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> ic = | 2276 Handle<Code> code = |
2277 CodeFactory::CallIC(isolate(), arg_count, mode, expr->tail_call_mode()) | 2277 CodeFactory::CallIC(isolate(), arg_count, mode, expr->tail_call_mode()) |
2278 .code(); | 2278 .code(); |
2279 __ Move(edx, Immediate(SmiFromSlot(expr->CallFeedbackICSlot()))); | 2279 __ Move(edx, Immediate(SmiFromSlot(expr->CallFeedbackICSlot()))); |
2280 __ mov(edi, Operand(esp, (arg_count + 1) * kPointerSize)); | 2280 __ mov(edi, Operand(esp, (arg_count + 1) * kPointerSize)); |
2281 // Don't assign a type feedback id to the IC, since type feedback is provided | 2281 __ call(code, RelocInfo::CODE_TARGET); |
2282 // by the vector above. | |
2283 CallIC(ic); | |
2284 OperandStackDepthDecrement(arg_count + 1); | 2282 OperandStackDepthDecrement(arg_count + 1); |
2285 | 2283 |
2286 RecordJSReturnSite(expr); | 2284 RecordJSReturnSite(expr); |
2287 RestoreContext(); | 2285 RestoreContext(); |
2288 context()->DropAndPlug(1, eax); | 2286 context()->DropAndPlug(1, eax); |
2289 } | 2287 } |
2290 | 2288 |
2291 void FullCodeGenerator::EmitResolvePossiblyDirectEval(Call* expr) { | 2289 void FullCodeGenerator::EmitResolvePossiblyDirectEval(Call* expr) { |
2292 int arg_count = expr->arguments()->length(); | 2290 int arg_count = expr->arguments()->length(); |
2293 // Push copy of the first argument or undefined if it doesn't exist. | 2291 // Push copy of the first argument or undefined if it doesn't exist. |
(...skipping 1260 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3554 isolate->builtins()->OnStackReplacement()->entry(), | 3552 isolate->builtins()->OnStackReplacement()->entry(), |
3555 Assembler::target_address_at(call_target_address, unoptimized_code)); | 3553 Assembler::target_address_at(call_target_address, unoptimized_code)); |
3556 return ON_STACK_REPLACEMENT; | 3554 return ON_STACK_REPLACEMENT; |
3557 } | 3555 } |
3558 | 3556 |
3559 | 3557 |
3560 } // namespace internal | 3558 } // namespace internal |
3561 } // namespace v8 | 3559 } // namespace v8 |
3562 | 3560 |
3563 #endif // V8_TARGET_ARCH_X87 | 3561 #endif // V8_TARGET_ARCH_X87 |
OLD | NEW |