| 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 library dart2js.js_emitter.full_emitter; | 5 library dart2js.js_emitter.full_emitter; |
| 6 | 6 |
| 7 import 'dart:collection' show HashMap; | 7 import 'dart:collection' show HashMap; |
| 8 import 'dart:convert'; | 8 import 'dart:convert'; |
| 9 | 9 |
| 10 import 'package:js_runtime/shared/embedded_names.dart' as embeddedNames; | 10 import 'package:js_runtime/shared/embedded_names.dart' as embeddedNames; |
| (...skipping 601 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 612 classEmitter.emitClass(cls, enclosingBuilder, fragment); | 612 classEmitter.emitClass(cls, enclosingBuilder, fragment); |
| 613 } | 613 } |
| 614 }); | 614 }); |
| 615 } | 615 } |
| 616 | 616 |
| 617 void assembleStaticFunctions( | 617 void assembleStaticFunctions( |
| 618 Iterable<Method> staticFunctions, Fragment fragment) { | 618 Iterable<Method> staticFunctions, Fragment fragment) { |
| 619 if (staticFunctions == null) return; | 619 if (staticFunctions == null) return; |
| 620 | 620 |
| 621 for (Method method in staticFunctions) { | 621 for (Method method in staticFunctions) { |
| 622 Element element = method.element; | 622 MethodElement element = method.element; |
| 623 // We need to filter out null-elements for the interceptors. | 623 // We need to filter out null-elements for the interceptors. |
| 624 // TODO(floitsch): use the precomputed interceptors here. | 624 // TODO(floitsch): use the precomputed interceptors here. |
| 625 if (element == null) continue; | 625 if (element == null) continue; |
| 626 ClassBuilder builder = new ClassBuilder.forStatics(element, namer); | 626 ClassBuilder builder = new ClassBuilder.forStatics(element, namer); |
| 627 containerBuilder.addMemberMethod(method, builder); | 627 containerBuilder.addMemberMethod(method, builder); |
| 628 getElementDescriptor(element, fragment) | 628 getElementDescriptor(element, fragment) |
| 629 .properties | 629 .properties |
| 630 .addAll(builder.properties); | 630 .addAll(builder.properties); |
| 631 } | 631 } |
| 632 } | 632 } |
| (...skipping 1551 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2184 if (cachedElements.isEmpty) return; | 2184 if (cachedElements.isEmpty) return; |
| 2185 for (Element element in backend.codegenEnqueuer.newlyEnqueuedElements) { | 2185 for (Element element in backend.codegenEnqueuer.newlyEnqueuedElements) { |
| 2186 if (element.isInstanceMember) { | 2186 if (element.isInstanceMember) { |
| 2187 cachedClassBuilders.remove(element.enclosingClass); | 2187 cachedClassBuilders.remove(element.enclosingClass); |
| 2188 | 2188 |
| 2189 nativeEmitter.cachedBuilders.remove(element.enclosingClass); | 2189 nativeEmitter.cachedBuilders.remove(element.enclosingClass); |
| 2190 } | 2190 } |
| 2191 } | 2191 } |
| 2192 } | 2192 } |
| 2193 } | 2193 } |
| OLD | NEW |