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 #include "src/compiler/ast-graph-builder.h" | 5 #include "src/compiler/ast-graph-builder.h" |
6 | 6 |
7 #include "src/ast/scopes.h" | 7 #include "src/ast/scopes.h" |
8 #include "src/compiler.h" | 8 #include "src/compiler.h" |
9 #include "src/compiler/ast-loop-assignment-analyzer.h" | 9 #include "src/compiler/ast-loop-assignment-analyzer.h" |
10 #include "src/compiler/control-builders.h" | 10 #include "src/compiler/control-builders.h" |
(...skipping 2459 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2470 NewNode(op, callee, source, function, language, position); | 2470 NewNode(op, callee, source, function, language, position); |
2471 PrepareFrameState(new_callee, expr->EvalId(), | 2471 PrepareFrameState(new_callee, expr->EvalId(), |
2472 OutputFrameStateCombine::PokeAt(arg_count + 1)); | 2472 OutputFrameStateCombine::PokeAt(arg_count + 1)); |
2473 | 2473 |
2474 // Patch callee on the environment. | 2474 // Patch callee on the environment. |
2475 environment()->Poke(arg_count + 1, new_callee); | 2475 environment()->Poke(arg_count + 1, new_callee); |
2476 } | 2476 } |
2477 | 2477 |
2478 // Create node to perform the function call. | 2478 // Create node to perform the function call. |
2479 VectorSlotPair feedback = CreateVectorSlotPair(expr->CallFeedbackICSlot()); | 2479 VectorSlotPair feedback = CreateVectorSlotPair(expr->CallFeedbackICSlot()); |
2480 const Operator* call = javascript()->CallFunction( | 2480 const Operator* call = |
2481 args->length() + 2, language_mode(), feedback, receiver_hint); | 2481 javascript()->CallFunction(args->length() + 2, language_mode(), feedback, |
| 2482 receiver_hint, expr->tail_call_mode()); |
2482 FrameStateBeforeAndAfter states(this, expr->CallId()); | 2483 FrameStateBeforeAndAfter states(this, expr->CallId()); |
2483 Node* value = ProcessArguments(call, args->length() + 2); | 2484 Node* value = ProcessArguments(call, args->length() + 2); |
2484 environment()->Push(value->InputAt(0)); // The callee passed to the call. | 2485 environment()->Push(value->InputAt(0)); // The callee passed to the call. |
2485 states.AddToNode(value, expr->ReturnId(), OutputFrameStateCombine::Push()); | 2486 states.AddToNode(value, expr->ReturnId(), OutputFrameStateCombine::Push()); |
2486 environment()->Drop(1); | 2487 environment()->Drop(1); |
2487 ast_context()->ProduceValue(value); | 2488 ast_context()->ProduceValue(value); |
2488 } | 2489 } |
2489 | 2490 |
2490 | 2491 |
2491 void AstGraphBuilder::VisitCallSuper(Call* expr) { | 2492 void AstGraphBuilder::VisitCallSuper(Call* expr) { |
(...skipping 1847 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
4339 // Phi does not exist yet, introduce one. | 4340 // Phi does not exist yet, introduce one. |
4340 value = NewPhi(inputs, value, control); | 4341 value = NewPhi(inputs, value, control); |
4341 value->ReplaceInput(inputs - 1, other); | 4342 value->ReplaceInput(inputs - 1, other); |
4342 } | 4343 } |
4343 return value; | 4344 return value; |
4344 } | 4345 } |
4345 | 4346 |
4346 } // namespace compiler | 4347 } // namespace compiler |
4347 } // namespace internal | 4348 } // namespace internal |
4348 } // namespace v8 | 4349 } // namespace v8 |
OLD | NEW |