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 2546 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2557 // Handle calls to runtime functions implemented in JavaScript separately as | 2557 // Handle calls to runtime functions implemented in JavaScript separately as |
2558 // the call follows JavaScript ABI and the callee is statically unknown. | 2558 // the call follows JavaScript ABI and the callee is statically unknown. |
2559 if (expr->is_jsruntime()) { | 2559 if (expr->is_jsruntime()) { |
2560 return VisitCallJSRuntime(expr); | 2560 return VisitCallJSRuntime(expr); |
2561 } | 2561 } |
2562 | 2562 |
2563 const Runtime::Function* function = expr->function(); | 2563 const Runtime::Function* function = expr->function(); |
2564 | 2564 |
2565 // TODO(mstarzinger): This bailout is a gigantic hack, the owner is ashamed. | 2565 // TODO(mstarzinger): This bailout is a gigantic hack, the owner is ashamed. |
2566 if (function->function_id == Runtime::kInlineGeneratorNext || | 2566 if (function->function_id == Runtime::kInlineGeneratorNext || |
| 2567 function->function_id == Runtime::kInlineGeneratorReturn || |
2567 function->function_id == Runtime::kInlineGeneratorThrow) { | 2568 function->function_id == Runtime::kInlineGeneratorThrow) { |
2568 ast_context()->ProduceValue(jsgraph()->TheHoleConstant()); | 2569 ast_context()->ProduceValue(jsgraph()->TheHoleConstant()); |
2569 return SetStackOverflow(); | 2570 return SetStackOverflow(); |
2570 } | 2571 } |
2571 | 2572 |
2572 // Evaluate all arguments to the runtime call. | 2573 // Evaluate all arguments to the runtime call. |
2573 ZoneList<Expression*>* args = expr->arguments(); | 2574 ZoneList<Expression*>* args = expr->arguments(); |
2574 VisitForValues(args); | 2575 VisitForValues(args); |
2575 | 2576 |
2576 // Create node to perform the runtime call. | 2577 // Create node to perform the runtime call. |
(...skipping 1760 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
4337 // Phi does not exist yet, introduce one. | 4338 // Phi does not exist yet, introduce one. |
4338 value = NewPhi(inputs, value, control); | 4339 value = NewPhi(inputs, value, control); |
4339 value->ReplaceInput(inputs - 1, other); | 4340 value->ReplaceInput(inputs - 1, other); |
4340 } | 4341 } |
4341 return value; | 4342 return value; |
4342 } | 4343 } |
4343 | 4344 |
4344 } // namespace compiler | 4345 } // namespace compiler |
4345 } // namespace internal | 4346 } // namespace internal |
4346 } // namespace v8 | 4347 } // namespace v8 |
OLD | NEW |