| 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<Compiler> reuseCompiler( | 9 Future<Compiler> reuseCompiler( |
| 10 {DiagnosticHandler diagnosticHandler, | 10 {DiagnosticHandler diagnosticHandler, |
| (...skipping 54 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 65 options, | 65 options, |
| 66 environment); | 66 environment); |
| 67 JavaScriptBackend backend = compiler.backend; | 67 JavaScriptBackend backend = compiler.backend; |
| 68 | 68 |
| 69 // Much like a scout, an incremental compiler is always prepared. For | 69 // Much like a scout, an incremental compiler is always prepared. For |
| 70 // mixins, classes, and lazy statics, at least. | 70 // mixins, classes, and lazy statics, at least. |
| 71 backend.emitter.oldEmitter | 71 backend.emitter.oldEmitter |
| 72 ..needsClassSupport = true | 72 ..needsClassSupport = true |
| 73 ..needsMixinSupport = true | 73 ..needsMixinSupport = true |
| 74 ..needsLazyInitializer = true | 74 ..needsLazyInitializer = true |
| 75 ..needsArrayInitializerSupport = true; | 75 ..needsStructuredMemberInfo = true; |
| 76 | 76 |
| 77 Uri core = Uri.parse("dart:core"); | 77 Uri core = Uri.parse("dart:core"); |
| 78 return compiler.libraryLoader.loadLibrary(core).then((_) { | 78 return compiler.libraryLoader.loadLibrary(core).then((_) { |
| 79 // Likewise, always be prepared for runtimeType support. | 79 // Likewise, always be prepared for runtimeType support. |
| 80 // TODO(johnniwinther): Add global switch to force RTI. | 80 // TODO(johnniwinther): Add global switch to force RTI. |
| 81 compiler.enabledRuntimeType = true; | 81 compiler.enabledRuntimeType = true; |
| 82 backend.registerRuntimeType( | 82 backend.registerRuntimeType( |
| 83 compiler.enqueuer.resolution, compiler.globalDependencies); | 83 compiler.enqueuer.resolution, compiler.globalDependencies); |
| 84 return compiler; | 84 return compiler; |
| 85 }); | 85 }); |
| (...skipping 115 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 201 final Map<String, String> output = new Map<String, String>(); | 201 final Map<String, String> output = new Map<String, String>(); |
| 202 | 202 |
| 203 EventSink<String> call(String name, String extension) { | 203 EventSink<String> call(String name, String extension) { |
| 204 return new StringEventSink((String data) { | 204 return new StringEventSink((String data) { |
| 205 output['$name.$extension'] = data; | 205 output['$name.$extension'] = data; |
| 206 }); | 206 }); |
| 207 } | 207 } |
| 208 | 208 |
| 209 String operator[] (String key) => output[key]; | 209 String operator[] (String key) => output[key]; |
| 210 } | 210 } |
| OLD | NEW |