@@ -21,7 +21,7 @@ class Program {
2121
2222 // If this field is not `null` then its value must be emitted in the embedded
2323 // global `TYPE_TO_INTERCEPTOR_MAP`. The map references constants and classes.
24- final js.Expression typeToInterceptorMap;
24+ final js.Expression ? typeToInterceptorMap;
2525
2626 // TODO(floitsch): we should store the metadata directly instead of storing
2727 // the collector. However, the old emitter still updates the data.
@@ -173,7 +173,8 @@ class StaticField {
173173 final FieldEntity element;
174174
175175 final js.Name name;
176- final js.Name getterName;
176+ // Null for static non-final fields.
177+ final js.Name ? getterName;
177178 // TODO(floitsch): the holder for static fields is the isolate object. We
178179 // could remove this field and use the isolate object directly.
179180 final js.Expression code;
@@ -252,7 +253,7 @@ class Class {
252253
253254 // If the class implements a function type, and the type is encoded in the
254255 // metatada table, then this field contains the index into that field.
255- final js.Expression functionTypeIndex;
256+ final js.Expression ? functionTypeIndex;
256257
257258 /// Whether the class must be evaluated eagerly.
258259 bool isEager = false ;
@@ -305,11 +306,11 @@ class MixinApplication extends Class {
305306 List <StubMethod > checkedSetters,
306307 List <StubMethod > gettersSetters,
307308 List <StubMethod > isChecks,
308- js.Expression functionTypeIndex,
309- {required bool hasRtiField,
310- required bool onlyForRti,
311- required bool onlyForConstructor,
312- required bool isDirectlyInstantiated})
309+ js.Expression ? functionTypeIndex,
310+ {required super . hasRtiField,
311+ required super . onlyForRti,
312+ required super . onlyForConstructor,
313+ required super . isDirectlyInstantiated})
313314 : super (
314315 element,
315316 typeData,
@@ -322,10 +323,6 @@ class MixinApplication extends Class {
322323 gettersSetters,
323324 isChecks,
324325 functionTypeIndex,
325- hasRtiField: hasRtiField,
326- onlyForRti: onlyForRti,
327- onlyForConstructor: onlyForConstructor,
328- isDirectlyInstantiated: isDirectlyInstantiated,
329326 isNative: false ,
330327 isClosureBaseClass: false ,
331328 isMixinApplicationWithMembers: false );
@@ -363,9 +360,9 @@ class Field {
363360
364361 final bool needsCheckedSetter;
365362
366- final ConstantValue initializerInAllocator;
363+ final ConstantValue ? initializerInAllocator;
367364
368- final ConstantValue constantValue;
365+ final ConstantValue ? constantValue;
369366
370367 final bool isElided;
371368
@@ -488,7 +485,7 @@ class InstanceMethod extends DartMethod {
488485 super .name,
489486 super .code,
490487 super .parameterStubs,
491- js. Name super .callName, {
488+ super .callName, {
492489 required super .needsTearOff,
493490 super .tearOffName,
494491 this .aliasName,
@@ -559,7 +556,7 @@ abstract class StaticMethod implements Method {}
559556
560557class StaticDartMethod extends DartMethod implements StaticMethod {
561558 StaticDartMethod (super .element, super .name, super .code, super .parameterStubs,
562- js. Name super .callName,
559+ super .callName,
563560 {required super .needsTearOff,
564561 super .tearOffName,
565562 required super .canBeApplied,
0 commit comments