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

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: Replaced includeInjectedMembers by implementation Created 8 years, 3 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 66c05892479f64db46e034f004e8a88cb66eae37..def6c76cd44c1b87303d7e13934f5f545d694088 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