| 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 class SsaFunctionCompiler implements FunctionCompiler { | 7 class SsaFunctionCompiler implements FunctionCompiler { |
| 8 final SsaCodeGeneratorTask generator; | 8 final SsaCodeGeneratorTask generator; |
| 9 final SsaBuilderTask builder; | 9 final SsaBuilderTask builder; |
| 10 final SsaOptimizerTask optimizer; | 10 final SsaOptimizerTask optimizer; |
| (...skipping 955 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 966 super.close(); | 966 super.close(); |
| 967 } | 967 } |
| 968 } | 968 } |
| 969 | 969 |
| 970 /** | 970 /** |
| 971 * This class builds SSA nodes for functions represented in AST. | 971 * This class builds SSA nodes for functions represented in AST. |
| 972 */ | 972 */ |
| 973 class SsaBuilder extends ast.Visitor | 973 class SsaBuilder extends ast.Visitor |
| 974 with BaseImplementationOfCompoundsMixin, | 974 with BaseImplementationOfCompoundsMixin, |
| 975 BaseImplementationOfSetIfNullsMixin, | 975 BaseImplementationOfSetIfNullsMixin, |
| 976 SendResolverMixin, | |
| 977 SemanticSendResolvedMixin, | 976 SemanticSendResolvedMixin, |
| 978 NewBulkMixin, | 977 NewBulkMixin, |
| 979 ErrorBulkMixin | 978 ErrorBulkMixin |
| 980 implements SemanticSendVisitor { | 979 implements SemanticSendVisitor { |
| 981 | 980 |
| 982 /// The element for which this SSA builder is being used. | 981 /// The element for which this SSA builder is being used. |
| 983 final Element target; | 982 final Element target; |
| 984 | 983 |
| 985 /// Reference to resolved elements in [target]'s AST. | 984 /// Reference to resolved elements in [target]'s AST. |
| 986 TreeElements elements; | 985 TreeElements elements; |
| (...skipping 8171 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 9158 if (unaliased is TypedefType) throw 'unable to unalias $type'; | 9157 if (unaliased is TypedefType) throw 'unable to unalias $type'; |
| 9159 unaliased.accept(this, builder); | 9158 unaliased.accept(this, builder); |
| 9160 } | 9159 } |
| 9161 | 9160 |
| 9162 void visitDynamicType(DynamicType type, SsaBuilder builder) { | 9161 void visitDynamicType(DynamicType type, SsaBuilder builder) { |
| 9163 JavaScriptBackend backend = builder.compiler.backend; | 9162 JavaScriptBackend backend = builder.compiler.backend; |
| 9164 ClassElement cls = backend.helpers.DynamicRuntimeType; | 9163 ClassElement cls = backend.helpers.DynamicRuntimeType; |
| 9165 builder.push(new HDynamicType(type, new TypeMask.exact(cls, classWorld))); | 9164 builder.push(new HDynamicType(type, new TypeMask.exact(cls, classWorld))); |
| 9166 } | 9165 } |
| 9167 } | 9166 } |
| OLD | NEW |