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

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

Issue 869543004: dart2js: store fields in the model and make the emitters use it. (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
Index: pkg/compiler/lib/src/js_emitter/native_emitter.dart
diff --git a/pkg/compiler/lib/src/js_emitter/native_emitter.dart b/pkg/compiler/lib/src/js_emitter/native_emitter.dart
index 6423959d2c125f3bbee637edfa9c55d071d5fb7e..31df0d455ad3f4a5f943fea9f815edcb78d4be5f 100644
--- a/pkg/compiler/lib/src/js_emitter/native_emitter.dart
+++ b/pkg/compiler/lib/src/js_emitter/native_emitter.dart
@@ -236,6 +236,7 @@ class NativeEmitter {
// Emit the native class interceptors that were actually used.
for (Class cls in classes) {
+ assert(!cls.onlyForRti);
ClassElement classElement = cls.element;
if (!cls.isNative) continue;
if (neededClasses.contains(cls)) {
@@ -246,19 +247,18 @@ class NativeEmitter {
// reason, it is important that we don't call these methods before we
// are certain that a class is needed.
- emitterTask.oldEmitter.classEmitter
- .emitConstructorsForCSP(classElement);
+ emitterTask.oldEmitter.classEmitter.emitConstructorsForCSP(cls);
// [emitClassGettersSettersForCSP] does not affect whether or not a
// class is needed. If getters/setters are emitted, the class has fields
// and is therefore non-trivial.
emitterTask.oldEmitter.classEmitter.emitClassGettersSettersForCSP(
- classElement, builder);
+ cls, builder);
// Define interceptor class for [classElement].
emitterTask.oldEmitter.classEmitter.emitClassBuilderWithReflectionData(
- cls.name,
- classElement, builders[cls],
+ cls,
+ builders[cls],
emitterTask.oldEmitter.getElementDescriptor(classElement));
emitterTask.oldEmitter.needsClassSupport = true;
}
@@ -319,10 +319,9 @@ class NativeEmitter {
builder.superName = superclass.name;
bool hasFields = emitterTask.oldEmitter.classEmitter.emitFields(
- classElement, builder, classIsNative: true);
+ cls, builder, classIsNative: true);
int propertyCount = builder.properties.length;
- emitterTask.oldEmitter.classEmitter.emitCheckedClassSetters(
- classElement, builder);
+ emitterTask.oldEmitter.classEmitter.emitCheckedClassSetters(cls, builder);
emitterTask.oldEmitter.classEmitter.emitInstanceMembers(
classElement, builder);
emitterTask.oldEmitter.classEmitter

Powered by Google App Engine
This is Rietveld 408576698