| 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 47 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 58 outputProvider, | 58 outputProvider, |
| 59 diagnosticHandler, | 59 diagnosticHandler, |
| 60 libraryRoot, | 60 libraryRoot, |
| 61 packageRoot, | 61 packageRoot, |
| 62 options, | 62 options, |
| 63 environment, | 63 environment, |
| 64 null, | 64 null, |
| 65 null); | 65 null); |
| 66 JavaScriptBackend backend = compiler.backend; | 66 JavaScriptBackend backend = compiler.backend; |
| 67 | 67 |
| 68 OldEmitter emitter = backend.emitter.emitter; | 68 full.Emitter emitter = backend.emitter.emitter; |
| 69 | 69 |
| 70 // Much like a scout, an incremental compiler is always prepared. For | 70 // Much like a scout, an incremental compiler is always prepared. For |
| 71 // mixins, classes, and lazy statics, at least. | 71 // mixins, classes, and lazy statics, at least. |
| 72 emitter | 72 emitter |
| 73 ..needsClassSupport = true | 73 ..needsClassSupport = true |
| 74 ..needsMixinSupport = true | 74 ..needsMixinSupport = true |
| 75 ..needsLazyInitializer = true | 75 ..needsLazyInitializer = true |
| 76 ..needsStructuredMemberInfo = true; | 76 ..needsStructuredMemberInfo = true; |
| 77 | 77 |
| 78 Uri core = Uri.parse("dart:core"); | 78 Uri core = Uri.parse("dart:core"); |
| (...skipping 16 matching lines...) Expand all Loading... |
| 95 ..provider = inputProvider | 95 ..provider = inputProvider |
| 96 ..handler = diagnosticHandler | 96 ..handler = diagnosticHandler |
| 97 ..enqueuer.resolution.queueIsClosed = false | 97 ..enqueuer.resolution.queueIsClosed = false |
| 98 ..enqueuer.resolution.hasEnqueuedReflectiveElements = false | 98 ..enqueuer.resolution.hasEnqueuedReflectiveElements = false |
| 99 ..enqueuer.resolution.hasEnqueuedReflectiveStaticFields = false | 99 ..enqueuer.resolution.hasEnqueuedReflectiveStaticFields = false |
| 100 ..enqueuer.codegen.queueIsClosed = false | 100 ..enqueuer.codegen.queueIsClosed = false |
| 101 ..enqueuer.codegen.hasEnqueuedReflectiveElements = false | 101 ..enqueuer.codegen.hasEnqueuedReflectiveElements = false |
| 102 ..enqueuer.codegen.hasEnqueuedReflectiveStaticFields = false | 102 ..enqueuer.codegen.hasEnqueuedReflectiveStaticFields = false |
| 103 ..compilationFailed = false; | 103 ..compilationFailed = false; |
| 104 JavaScriptBackend backend = compiler.backend; | 104 JavaScriptBackend backend = compiler.backend; |
| 105 OldEmitter emitter = backend.emitter.emitter; | 105 full.Emitter emitter = backend.emitter.emitter; |
| 106 | 106 |
| 107 // TODO(ahe): Seems this cache only serves to tell | 107 // TODO(ahe): Seems this cache only serves to tell |
| 108 // [emitter.invalidateCaches] if it was invoked on a full compile (in | 108 // [emitter.invalidateCaches] if it was invoked on a full compile (in |
| 109 // which case nothing should be invalidated), or if it is an incremental | 109 // which case nothing should be invalidated), or if it is an incremental |
| 110 // compilation (in which case, holders/owners of newly compiled methods | 110 // compilation (in which case, holders/owners of newly compiled methods |
| 111 // must be invalidated). | 111 // must be invalidated). |
| 112 emitter.cachedElements.add(null); | 112 emitter.cachedElements.add(null); |
| 113 | 113 |
| 114 compiler.enqueuer.codegen | 114 compiler.enqueuer.codegen |
| 115 ..newlyEnqueuedElements.clear() | 115 ..newlyEnqueuedElements.clear() |
| (...skipping 73 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 189 final Map<String, String> output = new Map<String, String>(); | 189 final Map<String, String> output = new Map<String, String>(); |
| 190 | 190 |
| 191 EventSink<String> call(String name, String extension) { | 191 EventSink<String> call(String name, String extension) { |
| 192 return new StringEventSink((String data) { | 192 return new StringEventSink((String data) { |
| 193 output['$name.$extension'] = data; | 193 output['$name.$extension'] = data; |
| 194 }); | 194 }); |
| 195 } | 195 } |
| 196 | 196 |
| 197 String operator[] (String key) => output[key]; | 197 String operator[] (String key) => output[key]; |
| 198 } | 198 } |
| OLD | NEW |