| 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 673 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 684 #leafTagsAccess[tags[i]] = true; | 684 #leafTagsAccess[tags[i]] = true; |
| 685 } | 685 } |
| 686 } | 686 } |
| 687 if (nativeSpec[1]) { | 687 if (nativeSpec[1]) { |
| 688 tags = nativeSpec[1].split("|"); | 688 tags = nativeSpec[1].split("|"); |
| 689 if (#allowNativesSubclassing) { | 689 if (#allowNativesSubclassing) { |
| 690 if (nativeSpec[2]) { | 690 if (nativeSpec[2]) { |
| 691 var subclasses = nativeSpec[2].split("|"); | 691 var subclasses = nativeSpec[2].split("|"); |
| 692 for (var i = 0; i < subclasses.length; i++) { | 692 for (var i = 0; i < subclasses.length; i++) { |
| 693 var subclass = allClasses[subclasses[i]]; | 693 var subclass = allClasses[subclasses[i]]; |
| 694 subclass.\$nativeSuperclassTag = tags[0]; | 694 subclass.#nativeSuperclassTagName = tags[0]; |
| 695 } | 695 } |
| 696 } | 696 } |
| 697 for (i = 0; i < tags.length; i++) { | 697 for (i = 0; i < tags.length; i++) { |
| 698 #interceptorsByTagAccess[tags[i]] = constructor; | 698 #interceptorsByTagAccess[tags[i]] = constructor; |
| 699 #leafTagsAccess[tags[i]] = false; | 699 #leafTagsAccess[tags[i]] = false; |
| 700 } | 700 } |
| 701 } | 701 } |
| 702 } | 702 } |
| 703 } | 703 } |
| 704 } | 704 } |
| 705 } | 705 } |
| 706 }''', {'finishedClassesAccess': finishedClassesAccess, | 706 }''', {'finishedClassesAccess': finishedClassesAccess, |
| 707 'needsMixinSupport': needsMixinSupport, | 707 'needsMixinSupport': needsMixinSupport, |
| 708 'hasNativeClasses': nativeClasses.isNotEmpty, | 708 'hasNativeClasses': nativeClasses.isNotEmpty, |
| 709 'nativeSuperclassTagName': embeddedNames.NATIVE_SUPERCLASS_TAG_NAME, |
| 709 'interceptorsByTagAccess': interceptorsByTagAccess, | 710 'interceptorsByTagAccess': interceptorsByTagAccess, |
| 710 'leafTagsAccess': leafTagsAccess, | 711 'leafTagsAccess': leafTagsAccess, |
| 711 'allowNativesSubclassing': true}); | 712 'allowNativesSubclassing': true}); |
| 712 } | 713 } |
| 713 | 714 |
| 714 jsAst.Fun get finishIsolateConstructorFunction { | 715 jsAst.Fun get finishIsolateConstructorFunction { |
| 715 // We replace the old Isolate function with a new one that initializes | 716 // We replace the old Isolate function with a new one that initializes |
| 716 // all its fields with the initial (and often final) value of all globals. | 717 // all its fields with the initial (and often final) value of all globals. |
| 717 // | 718 // |
| 718 // We also copy over old values like the prototype, and the | 719 // We also copy over old values like the prototype, and the |
| (...skipping 1557 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2276 for (Element element in compiler.enqueuer.codegen.newlyEnqueuedElements) { | 2277 for (Element element in compiler.enqueuer.codegen.newlyEnqueuedElements) { |
| 2277 if (element.isInstanceMember) { | 2278 if (element.isInstanceMember) { |
| 2278 cachedClassBuilders.remove(element.enclosingClass); | 2279 cachedClassBuilders.remove(element.enclosingClass); |
| 2279 | 2280 |
| 2280 nativeEmitter.cachedBuilders.remove(element.enclosingClass); | 2281 nativeEmitter.cachedBuilders.remove(element.enclosingClass); |
| 2281 | 2282 |
| 2282 } | 2283 } |
| 2283 } | 2284 } |
| 2284 } | 2285 } |
| 2285 } | 2286 } |
| OLD | NEW |