OLD | NEW |
1 // Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2013, 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 dart2js_incremental; | 5 part of dart2js_incremental; |
6 | 6 |
7 /// Do not call this method directly. It will be made private. | 7 /// Do not call this method directly. It will be made private. |
8 // TODO(ahe): Make this method private. | 8 // TODO(ahe): Make this method private. |
9 Future<CompilerImpl> reuseCompiler( | 9 Future<CompilerImpl> reuseCompiler( |
10 {CompilerDiagnostics diagnosticHandler, | 10 {CompilerDiagnostics diagnosticHandler, |
(...skipping 67 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
78 ..needsLazyInitializer = true | 78 ..needsLazyInitializer = true |
79 ..needsStructuredMemberInfo = true; | 79 ..needsStructuredMemberInfo = true; |
80 | 80 |
81 Uri core = Uri.parse("dart:core"); | 81 Uri core = Uri.parse("dart:core"); |
82 | 82 |
83 return compiler.setupSdk().then((_) { | 83 return compiler.setupSdk().then((_) { |
84 return compiler.libraryLoader.loadLibrary(core).then((_) { | 84 return compiler.libraryLoader.loadLibrary(core).then((_) { |
85 // Likewise, always be prepared for runtimeType support. | 85 // Likewise, always be prepared for runtimeType support. |
86 // TODO(johnniwinther): Add global switch to force RTI. | 86 // TODO(johnniwinther): Add global switch to force RTI. |
87 compiler.resolverWorld.hasRuntimeTypeSupport = true; | 87 compiler.resolverWorld.hasRuntimeTypeSupport = true; |
88 backend.registerRuntimeType(compiler.enqueuer.resolution); | 88 compiler.enqueuer.resolution.applyImpact(backend.registerRuntimeType()); |
89 return compiler; | 89 return compiler; |
90 }); | 90 }); |
91 }); | 91 }); |
92 } else { | 92 } else { |
93 compiler.tasks.forEach((t) => t.clearMeasurements()); | 93 compiler.tasks.forEach((t) => t.clearMeasurements()); |
94 compiler | 94 compiler |
95 ..userOutputProvider = outputProvider | 95 ..userOutputProvider = outputProvider |
96 ..provider = inputProvider | 96 ..provider = inputProvider |
97 ..handler = diagnosticHandler | 97 ..handler = diagnosticHandler |
98 ..enqueuer.resolution.queueIsClosed = false | 98 ..enqueuer.resolution.queueIsClosed = false |
(...skipping 91 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
190 final Map<String, String> output = new Map<String, String>(); | 190 final Map<String, String> output = new Map<String, String>(); |
191 | 191 |
192 EventSink<String> createEventSink(String name, String extension) { | 192 EventSink<String> createEventSink(String name, String extension) { |
193 return new StringEventSink((String data) { | 193 return new StringEventSink((String data) { |
194 output['$name.$extension'] = data; | 194 output['$name.$extension'] = data; |
195 }); | 195 }); |
196 } | 196 } |
197 | 197 |
198 String operator[] (String key) => output[key]; | 198 String operator[] (String key) => output[key]; |
199 } | 199 } |
OLD | NEW |