| OLD | NEW |
| 1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file |
| 2 // for details. All rights reserved. Use of this source code is governed by a | 2 // for details. All rights reserved. Use of this source code is governed by a |
| 3 // BSD-style license that can be found in the LICENSE file. | 3 // BSD-style license that can be found in the LICENSE file. |
| 4 | 4 |
| 5 part of ssa; | 5 part of ssa; |
| 6 | 6 |
| 7 /// A synthetic local variable only used with the SSA graph. | 7 /// A synthetic local variable only used with the SSA graph. |
| 8 /// | 8 /// |
| 9 /// For instance used for holding return value of function or the exception of a | 9 /// For instance used for holding return value of function or the exception of a |
| 10 /// try-catch statement. | 10 /// try-catch statement. |
| (...skipping 5040 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 5051 | 5051 |
| 5052 visitThrow(ast.Throw node) { | 5052 visitThrow(ast.Throw node) { |
| 5053 visitThrowExpression(node.expression); | 5053 visitThrowExpression(node.expression); |
| 5054 if (isReachable) { | 5054 if (isReachable) { |
| 5055 handleInTryStatement(); | 5055 handleInTryStatement(); |
| 5056 push(new HThrowExpression(pop())); | 5056 push(new HThrowExpression(pop())); |
| 5057 isReachable = false; | 5057 isReachable = false; |
| 5058 } | 5058 } |
| 5059 } | 5059 } |
| 5060 | 5060 |
| 5061 visitYield(ast.Yield node) { |
| 5062 // Dummy implementation. |
| 5063 visit(node.expression); |
| 5064 pop(); |
| 5065 } |
| 5066 |
| 5067 visitAwait(ast.Await node) { |
| 5068 // Dummy implementation. |
| 5069 visit(node.expression); |
| 5070 } |
| 5071 |
| 5061 visitTypeAnnotation(ast.TypeAnnotation node) { | 5072 visitTypeAnnotation(ast.TypeAnnotation node) { |
| 5062 compiler.internalError(node, | 5073 compiler.internalError(node, |
| 5063 'Visiting type annotation in SSA builder.'); | 5074 'Visiting type annotation in SSA builder.'); |
| 5064 } | 5075 } |
| 5065 | 5076 |
| 5066 visitVariableDefinitions(ast.VariableDefinitions node) { | 5077 visitVariableDefinitions(ast.VariableDefinitions node) { |
| 5067 assert(isReachable); | 5078 assert(isReachable); |
| 5068 for (Link<ast.Node> link = node.definitions.nodes; | 5079 for (Link<ast.Node> link = node.definitions.nodes; |
| 5069 !link.isEmpty; | 5080 !link.isEmpty; |
| 5070 link = link.tail) { | 5081 link = link.tail) { |
| (...skipping 1487 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 6558 if (unaliased is TypedefType) throw 'unable to unalias $type'; | 6569 if (unaliased is TypedefType) throw 'unable to unalias $type'; |
| 6559 unaliased.accept(this, builder); | 6570 unaliased.accept(this, builder); |
| 6560 } | 6571 } |
| 6561 | 6572 |
| 6562 void visitDynamicType(DynamicType type, SsaBuilder builder) { | 6573 void visitDynamicType(DynamicType type, SsaBuilder builder) { |
| 6563 JavaScriptBackend backend = builder.compiler.backend; | 6574 JavaScriptBackend backend = builder.compiler.backend; |
| 6564 ClassElement cls = backend.findHelper('DynamicRuntimeType'); | 6575 ClassElement cls = backend.findHelper('DynamicRuntimeType'); |
| 6565 builder.push(new HDynamicType(type, new TypeMask.exact(cls, classWorld))); | 6576 builder.push(new HDynamicType(type, new TypeMask.exact(cls, classWorld))); |
| 6566 } | 6577 } |
| 6567 } | 6578 } |
| OLD | NEW |