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 1091 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1102 this.infoReporter = backend.compiler.dumpInfoTask, | 1102 this.infoReporter = backend.compiler.dumpInfoTask, |
1103 this.backend = backend, | 1103 this.backend = backend, |
1104 this.constantSystem = backend.constantSystem, | 1104 this.constantSystem = backend.constantSystem, |
1105 this.rti = backend.rti { | 1105 this.rti = backend.rti { |
1106 assert(target.isImplementation); | 1106 assert(target.isImplementation); |
1107 graph.element = target; | 1107 graph.element = target; |
1108 localsHandler = new LocalsHandler(this, target, null); | 1108 localsHandler = new LocalsHandler(this, target, null); |
1109 sourceElementStack.add(target); | 1109 sourceElementStack.add(target); |
1110 sourceInformationBuilder = sourceInformationFactory.createBuilderForContext( | 1110 sourceInformationBuilder = sourceInformationFactory.createBuilderForContext( |
1111 target); | 1111 target); |
| 1112 graph.sourceInformation = |
| 1113 sourceInformationBuilder.buildVariableDeclaration(); |
1112 } | 1114 } |
1113 | 1115 |
1114 BackendHelpers get helpers => backend.helpers; | 1116 BackendHelpers get helpers => backend.helpers; |
1115 | 1117 |
1116 RuntimeTypesEncoder get rtiEncoder => backend.rtiEncoder; | 1118 RuntimeTypesEncoder get rtiEncoder => backend.rtiEncoder; |
1117 | 1119 |
1118 DiagnosticReporter get reporter => compiler.reporter; | 1120 DiagnosticReporter get reporter => compiler.reporter; |
1119 | 1121 |
1120 CoreClasses get coreClasses => compiler.coreClasses; | 1122 CoreClasses get coreClasses => compiler.coreClasses; |
1121 | 1123 |
(...skipping 8106 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
9228 if (unaliased is TypedefType) throw 'unable to unalias $type'; | 9230 if (unaliased is TypedefType) throw 'unable to unalias $type'; |
9229 unaliased.accept(this, builder); | 9231 unaliased.accept(this, builder); |
9230 } | 9232 } |
9231 | 9233 |
9232 void visitDynamicType(DynamicType type, SsaBuilder builder) { | 9234 void visitDynamicType(DynamicType type, SsaBuilder builder) { |
9233 JavaScriptBackend backend = builder.compiler.backend; | 9235 JavaScriptBackend backend = builder.compiler.backend; |
9234 ClassElement cls = backend.helpers.DynamicRuntimeType; | 9236 ClassElement cls = backend.helpers.DynamicRuntimeType; |
9235 builder.push(new HDynamicType(type, new TypeMask.exact(cls, classWorld))); | 9237 builder.push(new HDynamicType(type, new TypeMask.exact(cls, classWorld))); |
9236 } | 9238 } |
9237 } | 9239 } |
OLD | NEW |