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 2233 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2244 ast_context()->GetStateCombine()); | 2244 ast_context()->GetStateCombine()); |
2245 break; | 2245 break; |
2246 } | 2246 } |
2247 } | 2247 } |
2248 | 2248 |
2249 ast_context()->ProduceValue(value); | 2249 ast_context()->ProduceValue(value); |
2250 } | 2250 } |
2251 | 2251 |
2252 | 2252 |
2253 void AstGraphBuilder::VisitYield(Yield* expr) { | 2253 void AstGraphBuilder::VisitYield(Yield* expr) { |
2254 // TODO(turbofan): Implement yield here. | 2254 // Generator functions are supported only by going through Ignition first. |
2255 SetStackOverflow(); | 2255 SetStackOverflow(); |
2256 ast_context()->ProduceValue(jsgraph()->UndefinedConstant()); | 2256 ast_context()->ProduceValue(jsgraph()->UndefinedConstant()); |
2257 } | 2257 } |
2258 | 2258 |
2259 | 2259 |
2260 void AstGraphBuilder::VisitThrow(Throw* expr) { | 2260 void AstGraphBuilder::VisitThrow(Throw* expr) { |
2261 VisitForValue(expr->exception()); | 2261 VisitForValue(expr->exception()); |
2262 Node* exception = environment()->Pop(); | 2262 Node* exception = environment()->Pop(); |
2263 Node* value = BuildThrowError(exception, expr->id()); | 2263 Node* value = BuildThrowError(exception, expr->id()); |
2264 ast_context()->ProduceValue(value); | 2264 ast_context()->ProduceValue(value); |
(...skipping 2093 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
4358 // Phi does not exist yet, introduce one. | 4358 // Phi does not exist yet, introduce one. |
4359 value = NewPhi(inputs, value, control); | 4359 value = NewPhi(inputs, value, control); |
4360 value->ReplaceInput(inputs - 1, other); | 4360 value->ReplaceInput(inputs - 1, other); |
4361 } | 4361 } |
4362 return value; | 4362 return value; |
4363 } | 4363 } |
4364 | 4364 |
4365 } // namespace compiler | 4365 } // namespace compiler |
4366 } // namespace internal | 4366 } // namespace internal |
4367 } // namespace v8 | 4367 } // namespace v8 |
OLD | NEW |