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/compiler.h" | 7 #include "src/compiler.h" |
8 #include "src/compiler/ast-loop-assignment-analyzer.h" | 8 #include "src/compiler/ast-loop-assignment-analyzer.h" |
9 #include "src/compiler/control-builders.h" | 9 #include "src/compiler/control-builders.h" |
10 #include "src/compiler/js-type-feedback.h" | 10 #include "src/compiler/js-type-feedback.h" |
(...skipping 2526 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2537 // Evaluate all arguments to the runtime call. | 2537 // Evaluate all arguments to the runtime call. |
2538 ZoneList<Expression*>* args = expr->arguments(); | 2538 ZoneList<Expression*>* args = expr->arguments(); |
2539 VisitForValues(args); | 2539 VisitForValues(args); |
2540 | 2540 |
2541 // Create node to perform the runtime call. | 2541 // Create node to perform the runtime call. |
2542 Runtime::FunctionId functionId = function->function_id; | 2542 Runtime::FunctionId functionId = function->function_id; |
2543 // TODO(mstarzinger): This bailout is a gigantic hack, the owner is ashamed. | 2543 // TODO(mstarzinger): This bailout is a gigantic hack, the owner is ashamed. |
2544 if (functionId == Runtime::kInlineGeneratorNext) SetStackOverflow(); | 2544 if (functionId == Runtime::kInlineGeneratorNext) SetStackOverflow(); |
2545 if (functionId == Runtime::kInlineGeneratorThrow) SetStackOverflow(); | 2545 if (functionId == Runtime::kInlineGeneratorThrow) SetStackOverflow(); |
2546 const Operator* call = javascript()->CallRuntime(functionId, args->length()); | 2546 const Operator* call = javascript()->CallRuntime(functionId, args->length()); |
| 2547 FrameStateBeforeAndAfter states(this, expr->CallId()); |
2547 Node* value = ProcessArguments(call, args->length()); | 2548 Node* value = ProcessArguments(call, args->length()); |
2548 PrepareFrameState(value, expr->id(), ast_context()->GetStateCombine()); | 2549 states.AddToNode(value, expr->id(), ast_context()->GetStateCombine()); |
2549 ast_context()->ProduceValue(value); | 2550 ast_context()->ProduceValue(value); |
2550 } | 2551 } |
2551 | 2552 |
2552 | 2553 |
2553 void AstGraphBuilder::VisitUnaryOperation(UnaryOperation* expr) { | 2554 void AstGraphBuilder::VisitUnaryOperation(UnaryOperation* expr) { |
2554 switch (expr->op()) { | 2555 switch (expr->op()) { |
2555 case Token::DELETE: | 2556 case Token::DELETE: |
2556 return VisitDelete(expr); | 2557 return VisitDelete(expr); |
2557 case Token::VOID: | 2558 case Token::VOID: |
2558 return VisitVoid(expr); | 2559 return VisitVoid(expr); |
(...skipping 1603 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
4162 // Phi does not exist yet, introduce one. | 4163 // Phi does not exist yet, introduce one. |
4163 value = NewPhi(inputs, value, control); | 4164 value = NewPhi(inputs, value, control); |
4164 value->ReplaceInput(inputs - 1, other); | 4165 value->ReplaceInput(inputs - 1, other); |
4165 } | 4166 } |
4166 return value; | 4167 return value; |
4167 } | 4168 } |
4168 | 4169 |
4169 } // namespace compiler | 4170 } // namespace compiler |
4170 } // namespace internal | 4171 } // namespace internal |
4171 } // namespace v8 | 4172 } // namespace v8 |
OLD | NEW |