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 49 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
60 inputProvider, | 60 inputProvider, |
61 outputProvider, | 61 outputProvider, |
62 diagnosticHandler, | 62 diagnosticHandler, |
63 libraryRoot, | 63 libraryRoot, |
64 packageRoot, | 64 packageRoot, |
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, at least. | 70 // mixins, classes, and lazy statics, at least. |
71 backend.emitter.oldEmitter.needsMixinSupport = true; | 71 backend.emitter.oldEmitter |
| 72 ..needsDefineClass = true |
| 73 ..needsMixinSupport = true |
| 74 ..needsLazyInitializer = true; |
72 | 75 |
73 Uri core = Uri.parse("dart:core"); | 76 Uri core = Uri.parse("dart:core"); |
74 return compiler.libraryLoader.loadLibrary(core).then((_) { | 77 return compiler.libraryLoader.loadLibrary(core).then((_) { |
75 // Likewise, always be prepared for runtimeType support. | 78 // Likewise, always be prepared for runtimeType support. |
76 compiler.enabledRuntimeType = true; | 79 compiler.enabledRuntimeType = true; |
77 backend.registerRuntimeType( | 80 backend.registerRuntimeType( |
78 compiler.enqueuer.resolution, compiler.globalDependencies); | 81 compiler.enqueuer.resolution, compiler.globalDependencies); |
79 return compiler; | 82 return compiler; |
80 }); | 83 }); |
81 } else { | 84 } else { |
(...skipping 81 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
163 library.isPlatformLibrary || | 166 library.isPlatformLibrary || |
164 (packagesAreImmutable && library.isPackageLibrary)); | 167 (packagesAreImmutable && library.isPackageLibrary)); |
165 }; | 168 }; |
166 } | 169 } |
167 return compiler.libraryLoader.resetAsync(reuseLibrary).then((_) { | 170 return compiler.libraryLoader.resetAsync(reuseLibrary).then((_) { |
168 oldTag.makeCurrent(); | 171 oldTag.makeCurrent(); |
169 return compiler; | 172 return compiler; |
170 }); | 173 }); |
171 } | 174 } |
172 } | 175 } |
OLD | NEW |