@@ -170,12 +170,6 @@ namespace {
170
170
// - or has a field with resilient layout.
171
171
bool ClassMetadataRequiresDynamicInitialization = false ;
172
172
173
- // Does the superclass have a fixed number of stored properties?
174
- // If not, and the class has generally-dependent layout, we have to
175
- // access stored properties through an indirect offset into the field
176
- // offset vector.
177
- bool ClassHasFixedFieldCount = true ;
178
-
179
173
// Does the class have a fixed size up until the current point?
180
174
// If not, we have to access stored properties either ivar offset globals,
181
175
// or through the field offset vector, based on whether the layout has
@@ -304,9 +298,7 @@ namespace {
304
298
//
305
299
// FIXME: We need to implement indirect field/vtable entry access
306
300
// before we can enable this
307
- if (IGM.Context .LangOpts .EnableClassResilience ) {
308
- ClassHasFixedFieldCount = false ;
309
- } else {
301
+ if (!IGM.Context .LangOpts .EnableClassResilience ) {
310
302
addFieldsForClass (superclass, superclassType);
311
303
NumInherited = Elements.size ();
312
304
}
@@ -405,16 +397,7 @@ namespace {
405
397
406
398
// If layout depends on generic parameters, we have to load the
407
399
// offset from the class metadata.
408
-
409
- // If the layout of the class metadata is statically known, then
410
- // there should be a fixed offset to the right offset.
411
- if (ClassHasFixedFieldCount) {
412
- return FieldAccess::ConstantIndirect;
413
- }
414
-
415
- // Otherwise, the offset of the offset is stored in a global variable
416
- // that will be set up by the runtime.
417
- return FieldAccess::NonConstantIndirect;
400
+ return FieldAccess::ConstantIndirect;
418
401
}
419
402
};
420
403
} // end anonymous namespace
0 commit comments