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/compile-time-value.h" | 7 #include "src/ast/compile-time-value.h" |
8 #include "src/ast/scopes.h" | 8 #include "src/ast/scopes.h" |
9 #include "src/compilation-info.h" | 9 #include "src/compilation-info.h" |
10 #include "src/compiler.h" | 10 #include "src/compiler.h" |
(...skipping 2189 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2200 break; | 2200 break; |
2201 } | 2201 } |
2202 } | 2202 } |
2203 | 2203 |
2204 ast_context()->ProduceValue(expr, value); | 2204 ast_context()->ProduceValue(expr, value); |
2205 } | 2205 } |
2206 | 2206 |
2207 | 2207 |
2208 void AstGraphBuilder::VisitYield(Yield* expr) { | 2208 void AstGraphBuilder::VisitYield(Yield* expr) { |
2209 // Generator functions are supported only by going through Ignition first. | 2209 // Generator functions are supported only by going through Ignition first. |
2210 SetStackOverflow(); | 2210 UNREACHABLE(); |
2211 ast_context()->ProduceValue(expr, jsgraph()->UndefinedConstant()); | |
2212 } | 2211 } |
2213 | 2212 |
2214 | 2213 |
2215 void AstGraphBuilder::VisitThrow(Throw* expr) { | 2214 void AstGraphBuilder::VisitThrow(Throw* expr) { |
2216 VisitForValue(expr->exception()); | 2215 VisitForValue(expr->exception()); |
2217 Node* exception = environment()->Pop(); | 2216 Node* exception = environment()->Pop(); |
2218 Node* value = BuildThrowError(exception, expr->id()); | 2217 Node* value = BuildThrowError(exception, expr->id()); |
2219 ast_context()->ProduceValue(expr, value); | 2218 ast_context()->ProduceValue(expr, value); |
2220 } | 2219 } |
2221 | 2220 |
(...skipping 2147 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
4369 TypeHintAnalysis* type_hint_analysis, SourcePositionTable* source_positions, | 4368 TypeHintAnalysis* type_hint_analysis, SourcePositionTable* source_positions, |
4370 int inlining_id) | 4369 int inlining_id) |
4371 : AstGraphBuilder(local_zone, info, jsgraph, invocation_frequency, | 4370 : AstGraphBuilder(local_zone, info, jsgraph, invocation_frequency, |
4372 loop_assignment, type_hint_analysis), | 4371 loop_assignment, type_hint_analysis), |
4373 source_positions_(source_positions), | 4372 source_positions_(source_positions), |
4374 start_position_(info->shared_info()->start_position(), inlining_id) {} | 4373 start_position_(info->shared_info()->start_position(), inlining_id) {} |
4375 | 4374 |
4376 } // namespace compiler | 4375 } // namespace compiler |
4377 } // namespace internal | 4376 } // namespace internal |
4378 } // namespace v8 | 4377 } // namespace v8 |
OLD | NEW |