Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(583)

Unified Diff: lib/compiler/implementation/native_handler.dart

Issue 10905305: Patch refactoring. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Rebased. Created 8 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: lib/compiler/implementation/native_handler.dart
diff --git a/lib/compiler/implementation/native_handler.dart b/lib/compiler/implementation/native_handler.dart
index 8365b8ec1a5741b32be08376eb5cfb79695ec956..a97651ad3c4b7f850e12a8f4a1d3b99fa4e7fbd4 100644
--- a/lib/compiler/implementation/native_handler.dart
+++ b/lib/compiler/implementation/native_handler.dart
@@ -40,9 +40,8 @@ void processNativeClassesInLibrary(Enqueuer world,
LibraryElement library) {
bool hasNativeClass = false;
final compiler = emitter.compiler;
- for (Link<Element> link = library.localMembers;
- !link.isEmpty(); link = link.tail) {
- Element element = link.head;
+ // Use implementation to ensure the inclusion of injected members.
+ library.implementation.forEachLocalMember((Element element) {
if (element.kind == ElementKind.CLASS) {
ClassElement classElement = element;
if (classElement.isNative()) {
@@ -60,7 +59,7 @@ void processNativeClassesInLibrary(Enqueuer world,
addSubtypes(classElement, emitter.nativeEmitter);
}
}
- }
+ });
if (hasNativeClass) {
world.registerStaticUse(compiler.findHelper(
const SourceString('dynamicFunction')));

Powered by Google App Engine
This is Rietveld 408576698