| 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 56 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 67 options: options, | 67 options: options, |
| 68 environment: environment)); | 68 environment: environment)); |
| 69 backend = compiler.backend; | 69 backend = compiler.backend; |
| 70 | 70 |
| 71 Uri core = Uri.parse("dart:core"); | 71 Uri core = Uri.parse("dart:core"); |
| 72 | 72 |
| 73 return compiler.setupSdk().then((_) { | 73 return compiler.setupSdk().then((_) { |
| 74 return compiler.libraryLoader.loadLibrary(core).then((_) { | 74 return compiler.libraryLoader.loadLibrary(core).then((_) { |
| 75 // Likewise, always be prepared for runtimeType support. | 75 // Likewise, always be prepared for runtimeType support. |
| 76 // TODO(johnniwinther): Add global switch to force RTI. | 76 // TODO(johnniwinther): Add global switch to force RTI. |
| 77 compiler.resolverWorld.hasRuntimeTypeSupport = true; | 77 compiler.resolutionWorldBuilder.hasRuntimeTypeSupport = true; |
| 78 compiler.enqueuer.resolution.applyImpact(backend.registerRuntimeType()); | 78 compiler.enqueuer.resolution.applyImpact(backend.registerRuntimeType()); |
| 79 return compiler; | 79 return compiler; |
| 80 }); | 80 }); |
| 81 }); | 81 }); |
| 82 } else { | 82 } else { |
| 83 compiler.tasks.forEach((t) => t.clearMeasurements()); | 83 compiler.tasks.forEach((t) => t.clearMeasurements()); |
| 84 compiler | 84 compiler |
| 85 ..userOutputProvider = outputProvider | 85 ..userOutputProvider = outputProvider |
| 86 ..provider = inputProvider | 86 ..provider = inputProvider |
| 87 ..handler = diagnosticHandler | 87 ..handler = diagnosticHandler |
| (...skipping 92 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 180 final Map<String, String> output = new Map<String, String>(); | 180 final Map<String, String> output = new Map<String, String>(); |
| 181 | 181 |
| 182 EventSink<String> createEventSink(String name, String extension) { | 182 EventSink<String> createEventSink(String name, String extension) { |
| 183 return new StringEventSink((String data) { | 183 return new StringEventSink((String data) { |
| 184 output['$name.$extension'] = data; | 184 output['$name.$extension'] = data; |
| 185 }); | 185 }); |
| 186 } | 186 } |
| 187 | 187 |
| 188 String operator[] (String key) => output[key]; | 188 String operator[] (String key) => output[key]; |
| 189 } | 189 } |
| OLD | NEW |