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 SsaCodeGeneratorTask generator; | 8 SsaCodeGeneratorTask generator; |
9 SsaBuilderTask builder; | 9 SsaBuilderTask builder; |
10 SsaOptimizerTask optimizer; | 10 SsaOptimizerTask optimizer; |
(...skipping 5163 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
5174 } | 5174 } |
5175 | 5175 |
5176 @override | 5176 @override |
5177 void visitUnresolvedInvoke( | 5177 void visitUnresolvedInvoke( |
5178 ast.Send node, | 5178 ast.Send node, |
5179 Element element, | 5179 Element element, |
5180 ast.NodeList arguments, | 5180 ast.NodeList arguments, |
5181 Selector selector, | 5181 Selector selector, |
5182 _) { | 5182 _) { |
5183 if (element is ErroneousElement) { | 5183 if (element is ErroneousElement) { |
5184 // An erroneous element indicates that the funciton could not be | 5184 // An erroneous element indicates that the function could not be |
5185 // resolved (a warning has been issued). | 5185 // resolved (a warning has been issued). |
5186 handleInvalidStaticInvoke(node, element); | 5186 handleInvalidStaticInvoke(node, element); |
5187 } else { | 5187 } else { |
5188 // TODO(ahe): Do something like [generateWrongArgumentCountError]. | 5188 // TODO(ahe): Do something like [generateWrongArgumentCountError]. |
5189 stack.add(graph.addConstantNull(compiler)); | 5189 stack.add(graph.addConstantNull(compiler)); |
5190 } | 5190 } |
5191 return; | 5191 return; |
5192 } | 5192 } |
5193 | 5193 |
5194 HConstant addConstantString(String string) { | 5194 HConstant addConstantString(String string) { |
(...skipping 2914 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
8109 if (unaliased is TypedefType) throw 'unable to unalias $type'; | 8109 if (unaliased is TypedefType) throw 'unable to unalias $type'; |
8110 unaliased.accept(this, builder); | 8110 unaliased.accept(this, builder); |
8111 } | 8111 } |
8112 | 8112 |
8113 void visitDynamicType(DynamicType type, SsaBuilder builder) { | 8113 void visitDynamicType(DynamicType type, SsaBuilder builder) { |
8114 JavaScriptBackend backend = builder.compiler.backend; | 8114 JavaScriptBackend backend = builder.compiler.backend; |
8115 ClassElement cls = backend.findHelper('DynamicRuntimeType'); | 8115 ClassElement cls = backend.findHelper('DynamicRuntimeType'); |
8116 builder.push(new HDynamicType(type, new TypeMask.exact(cls, classWorld))); | 8116 builder.push(new HDynamicType(type, new TypeMask.exact(cls, classWorld))); |
8117 } | 8117 } |
8118 } | 8118 } |
OLD | NEW |