| OLD | NEW |
| 1 // Copyright (c) 2014, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2014, 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.js_emitter; | 5 part of dart2js.js_emitter; |
| 6 | 6 |
| 7 | 7 |
| 8 class OldEmitter implements Emitter { | 8 class OldEmitter implements Emitter { |
| 9 final Compiler compiler; | 9 final Compiler compiler; |
| 10 final CodeEmitterTask task; | 10 final CodeEmitterTask task; |
| (...skipping 1349 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1360 if (compiler.hasIncrementalSupport) { | 1360 if (compiler.hasIncrementalSupport) { |
| 1361 mainOutput.addBuffer(jsAst.prettyPrint(js.statement( | 1361 mainOutput.addBuffer(jsAst.prettyPrint(js.statement( |
| 1362 """ | 1362 """ |
| 1363 { | 1363 { |
| 1364 #helper = #helper || Object.create(null); | 1364 #helper = #helper || Object.create(null); |
| 1365 #helper.patch = function(a) { eval(a)}; | 1365 #helper.patch = function(a) { eval(a)}; |
| 1366 #helper.schemaChange = #schemaChange; | 1366 #helper.schemaChange = #schemaChange; |
| 1367 #helper.addMethod = #addMethod; | 1367 #helper.addMethod = #addMethod; |
| 1368 #helper.extractStubs = function(array, name, isStatic, originalDescriptor) { | 1368 #helper.extractStubs = function(array, name, isStatic, originalDescriptor) { |
| 1369 var descriptor = Object.create(null); | 1369 var descriptor = Object.create(null); |
| 1370 this.addStubs(descriptor, array, name, isStatic, originalDescriptor, []); | 1370 this.addStubs(descriptor, array, name, isStatic, []); |
| 1371 return descriptor; | 1371 return descriptor; |
| 1372 }; | 1372 }; |
| 1373 }""", | 1373 }""", |
| 1374 { 'helper': js('this.#', [namer.incrementalHelperName]), | 1374 { 'helper': js('this.#', [namer.incrementalHelperName]), |
| 1375 'schemaChange': buildSchemaChangeFunction(), | 1375 'schemaChange': buildSchemaChangeFunction(), |
| 1376 'addMethod': buildIncrementalAddMethod() }), compiler)); | 1376 'addMethod': buildIncrementalAddMethod() }), compiler)); |
| 1377 } | 1377 } |
| 1378 if (isProgramSplit) { | 1378 if (isProgramSplit) { |
| 1379 /// We collect all the global state, so it can be passed to the | 1379 /// We collect all the global state, so it can be passed to the |
| 1380 /// initializer of deferred files. | 1380 /// initializer of deferred files. |
| (...skipping 640 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2021 for (Element element in compiler.enqueuer.codegen.newlyEnqueuedElements) { | 2021 for (Element element in compiler.enqueuer.codegen.newlyEnqueuedElements) { |
| 2022 if (element.isInstanceMember) { | 2022 if (element.isInstanceMember) { |
| 2023 cachedClassBuilders.remove(element.enclosingClass); | 2023 cachedClassBuilders.remove(element.enclosingClass); |
| 2024 | 2024 |
| 2025 nativeEmitter.cachedBuilders.remove(element.enclosingClass); | 2025 nativeEmitter.cachedBuilders.remove(element.enclosingClass); |
| 2026 | 2026 |
| 2027 } | 2027 } |
| 2028 } | 2028 } |
| 2029 } | 2029 } |
| 2030 } | 2030 } |
| OLD | NEW |