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

Unified Diff: sdk/lib/_internal/compiler/implementation/enqueue.dart

Issue 23600020: Native abstract classes may be 'instantiated' (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 7 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
« no previous file with comments | « no previous file | tests/compiler/dart2js_native/abstract_class_test.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: sdk/lib/_internal/compiler/implementation/enqueue.dart
diff --git a/sdk/lib/_internal/compiler/implementation/enqueue.dart b/sdk/lib/_internal/compiler/implementation/enqueue.dart
index e3e9e64d4f6e016fcccffbf8efc37415944dcc20..d68333a3a997d389ad62138f2fbd18ce055338e3 100644
--- a/sdk/lib/_internal/compiler/implementation/enqueue.dart
+++ b/sdk/lib/_internal/compiler/implementation/enqueue.dart
@@ -117,7 +117,12 @@ abstract class Enqueuer {
elements.registerDependency(cls);
cls.ensureResolved(compiler);
universe.instantiatedTypes.add(type);
- if (!cls.isAbstract(compiler)) {
+ if (!cls.isAbstract(compiler)
+ // We can't use the closed-world assumption with native abstract
+ // classes; a native abstract class may have non-abstract subclasses
+ // not declared to the program. Instances of these classes are
+ // indistinguishable from the abstract class.
+ || cls.isNative()) {
ngeoffray 2013/09/10 11:55:37 Could we avoid marking the native classes abstract
universe.instantiatedClasses.add(cls);
}
onRegisterInstantiatedClass(cls);
« no previous file with comments | « no previous file | tests/compiler/dart2js_native/abstract_class_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698