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

Unified Diff: pkg/compiler/lib/src/js_emitter/old_emitter/emitter.dart

Issue 858433005: dart2js: Don't reference mixins when they are only used for RTI. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: 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
Index: pkg/compiler/lib/src/js_emitter/old_emitter/emitter.dart
diff --git a/pkg/compiler/lib/src/js_emitter/old_emitter/emitter.dart b/pkg/compiler/lib/src/js_emitter/old_emitter/emitter.dart
index f216b859952561ed363b8c1c3820952484ed1897..47f4378fab16c7465e509eea88f5f2c2bf3657bd 100644
--- a/pkg/compiler/lib/src/js_emitter/old_emitter/emitter.dart
+++ b/pkg/compiler/lib/src/js_emitter/old_emitter/emitter.dart
@@ -430,11 +430,6 @@ class OldEmitter implements Emitter {
var hasOwnProperty = Object.prototype.hasOwnProperty;
return function (constructor, superConstructor) {
if (superConstructor == null) {
- // TODO(21896): this test shouldn't be necessary. Without it
- // we have a crash in language/mixin_only_for_rti and
- // pkg/analysis_server/tool/spec/check_all_test.
- if (constructor == null) return;
-
// Fix up the the Dart Object class' prototype.
var prototype = constructor.prototype;
prototype.constructor = constructor;
@@ -489,17 +484,12 @@ class OldEmitter implements Emitter {
var mixinClass = s[1];
finishClass(mixinClass);
var mixin = allClasses[mixinClass];
- // TODO(21896): this test shouldn't be necessary. Without it
- // we have a crash in language/mixin_only_for_rti and
- // pkg/analysis_server/tool/spec/check_all_test.
- if (mixin) {
- var mixinPrototype = mixin.prototype;
- var clsPrototype = allClasses[cls].prototype;
- for (var d in mixinPrototype) {
- if (hasOwnProperty.call(mixinPrototype, d) &&
- !hasOwnProperty.call(clsPrototype, d))
- clsPrototype[d] = mixinPrototype[d];
- }
+ var mixinPrototype = mixin.prototype;
+ var clsPrototype = allClasses[cls].prototype;
+ for (var d in mixinPrototype) {
+ if (hasOwnProperty.call(mixinPrototype, d) &&
+ !hasOwnProperty.call(clsPrototype, d))
+ clsPrototype[d] = mixinPrototype[d];
}
}
}
« no previous file with comments | « pkg/compiler/lib/src/js_emitter/old_emitter/class_emitter.dart ('k') | pkg/compiler/lib/src/js_emitter/program_builder.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698