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

Unified Diff: pkg/compiler/lib/src/js_emitter/code_emitter_task.dart

Issue 878553002: dart2js: native classes go through the normal code path. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Rebase Created 5 years, 11 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
« no previous file with comments | « no previous file | pkg/compiler/lib/src/js_emitter/model.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: pkg/compiler/lib/src/js_emitter/code_emitter_task.dart
diff --git a/pkg/compiler/lib/src/js_emitter/code_emitter_task.dart b/pkg/compiler/lib/src/js_emitter/code_emitter_task.dart
index e7d9421871a63207d3e3c74a549a485e998e51eb..1ed955de6b8697b24c611d8392df2f5cdc6dd14d 100644
--- a/pkg/compiler/lib/src/js_emitter/code_emitter_task.dart
+++ b/pkg/compiler/lib/src/js_emitter/code_emitter_task.dart
@@ -37,7 +37,7 @@ class CodeEmitterTask extends CompilerTask {
/// This flag is updated in [computeNeededConstants].
bool outputContainsConstantList = false;
- final List<ClassElement> nativeClasses = <ClassElement>[];
+ final List<ClassElement> nativeClassesAndSubclasses = <ClassElement>[];
/// Records if a type variable is read dynamically for type tests.
final Set<TypeVariableElement> readTypeVariables =
@@ -338,13 +338,11 @@ class CodeEmitterTask extends CompilerTask {
if (Elements.isNativeOrExtendsNative(element) &&
!typeTestRegistry.rtiNeededClasses.contains(element)) {
// For now, native classes and related classes cannot be deferred.
- nativeClasses.add(element);
- if (!element.isNative) {
- assert(invariant(element,
- !compiler.deferredLoadTask.isDeferred(element)));
- outputClassLists.putIfAbsent(compiler.deferredLoadTask.mainOutputUnit,
- () => new List<ClassElement>()).add(element);
- }
+ nativeClassesAndSubclasses.add(element);
+ assert(invariant(element,
+ !compiler.deferredLoadTask.isDeferred(element)));
+ outputClassLists.putIfAbsent(compiler.deferredLoadTask.mainOutputUnit,
+ () => new List<ClassElement>()).add(element);
} else {
outputClassLists.putIfAbsent(
compiler.deferredLoadTask.outputUnitForElement(element),
« no previous file with comments | « no previous file | pkg/compiler/lib/src/js_emitter/model.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698