@@ -118,20 +118,19 @@ MLIRValue emitStore(ConstructionContext cc, MLIRValue toStore) {
118118 }
119119 }
120120
121- // TODO: this is not really a struct, but just a plain NamedEntity store
122- private static final class StructNamedEntityStore extends StoreOperation {
121+ private static final class DirectNamedEntityStore extends StoreOperation {
123122 NamedEntity destEntity ;
124- MLIRType structType ;
123+ MLIRType type ;
125124
126- StructNamedEntityStore (NamedEntity destEntity , MLIRType structType ) {
125+ DirectNamedEntityStore (NamedEntity destEntity , MLIRType type ) {
127126 this .destEntity = destEntity ;
128- this .structType = structType ;
127+ this .type = type ;
129128 }
130129
131130 MLIRValue emitStore (ConstructionContext cc , MLIRValue value ) {
132131 if (!cc .hasValue (destEntity )) {
133132 cc .emitLn ("coredsl.set @%s = %s : %s" , destEntity .getName (), value ,
134- structType );
133+ type );
135134 } else {
136135 cc .setValue (destEntity , value );
137136 }
@@ -187,7 +186,7 @@ private MLIRValue resolveStoreStack(MLIRType storedValueType) {
187186
188187 assert storeStack .firstElement () instanceof ArrayNamedEntityStore ||
189188 storeStack .firstElement () instanceof BitFieldNamedEntityStore ||
190- storeStack .firstElement () instanceof StructNamedEntityStore
189+ storeStack .firstElement () instanceof DirectNamedEntityStore
191190 : "Last emitted store must store to a NamedEntity" ;
192191 assert !storeStack .empty ();
193192 while (!storeStack .isEmpty ()) {
@@ -329,7 +328,7 @@ public MLIRValue caseIndexAccessExpression(IndexAccessExpression access) {
329328 entityVal , memberName , entityVal .type );
330329 }
331330 assert entityVal != null ;
332- storeStack .push (new StructNamedEntityStore (targetEntity , structType ));
331+ storeStack .push (new DirectNamedEntityStore (targetEntity , structType ));
333332 storeStack .push (new StructMemberStore (entityVal , memberName ));
334333 } else {
335334 isNestedLvalue = true ;
0 commit comments