| 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 5080 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 5091 ConstantExpression constant, | 5091 ConstantExpression constant, |
| 5092 ast.NodeList arguments, | 5092 ast.NodeList arguments, |
| 5093 CallStructure callStructure, | 5093 CallStructure callStructure, |
| 5094 _) { | 5094 _) { |
| 5095 generateConstantTypeLiteral(node); | 5095 generateConstantTypeLiteral(node); |
| 5096 generateTypeLiteralCall(node); | 5096 generateTypeLiteralCall(node); |
| 5097 } | 5097 } |
| 5098 | 5098 |
| 5099 /// Generate the constant value for a constant type literal. | 5099 /// Generate the constant value for a constant type literal. |
| 5100 void generateConstantTypeLiteral(ast.Send node) { | 5100 void generateConstantTypeLiteral(ast.Send node) { |
| 5101 generateIsDeferredLoadedCheckIfNeeded(node); |
| 5101 // TODO(karlklose): add type representation | 5102 // TODO(karlklose): add type representation |
| 5102 if (node.isCall) { | 5103 if (node.isCall) { |
| 5103 // The node itself is not a constant but we register the selector (the | 5104 // The node itself is not a constant but we register the selector (the |
| 5104 // identifier that refers to the class/typedef) as a constant. | 5105 // identifier that refers to the class/typedef) as a constant. |
| 5105 stack.add(addConstant(node.selector)); | 5106 stack.add(addConstant(node.selector)); |
| 5106 } else { | 5107 } else { |
| 5107 stack.add(addConstant(node)); | 5108 stack.add(addConstant(node)); |
| 5108 } | 5109 } |
| 5109 } | 5110 } |
| 5110 | 5111 |
| (...skipping 2476 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 7587 if (unaliased is TypedefType) throw 'unable to unalias $type'; | 7588 if (unaliased is TypedefType) throw 'unable to unalias $type'; |
| 7588 unaliased.accept(this, builder); | 7589 unaliased.accept(this, builder); |
| 7589 } | 7590 } |
| 7590 | 7591 |
| 7591 void visitDynamicType(DynamicType type, SsaBuilder builder) { | 7592 void visitDynamicType(DynamicType type, SsaBuilder builder) { |
| 7592 JavaScriptBackend backend = builder.compiler.backend; | 7593 JavaScriptBackend backend = builder.compiler.backend; |
| 7593 ClassElement cls = backend.findHelper('DynamicRuntimeType'); | 7594 ClassElement cls = backend.findHelper('DynamicRuntimeType'); |
| 7594 builder.push(new HDynamicType(type, new TypeMask.exact(cls, classWorld))); | 7595 builder.push(new HDynamicType(type, new TypeMask.exact(cls, classWorld))); |
| 7595 } | 7596 } |
| 7596 } | 7597 } |
| OLD | NEW |