You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Implement label validation and typedef resolution in C# ilasm
- Consolidate instruction tokens into main grammar to establish proper lexer
precedence over DOTTEDNAME and ID; reorder methodDecl alternatives to
match instructions first; add custom attribute handling in method bodies
- Implement visitor stubs for debug/symbol directives: VisitLanguageDecl,
VisitEsHead, VisitExportHead, VisitExtSourceSpec, VisitFieldInit
- Add typedef resolution in ResolveTypeDef for type aliases
- Implement label validation: track declared vs referenced labels, report
errors for undefined labels at method end
- Allow recoverable errors in method bodies to still emit assembly
- Add tests for label validation, typedef resolution, and error handling
(FieldDefinitionHandle)GetHandleForList(type.Fields,GetSeenEntities(TableIndex.TypeDef), type =>((TypeDefinitionEntity)type).Fields,i,TableIndex.Field),
181
-
(MethodDefinitionHandle)GetHandleForList(type.Methods,GetSeenEntities(TableIndex.TypeDef), type =>((TypeDefinitionEntity)type).Methods,i,TableIndex.MethodDef));
180
+
GetFieldHandleForList(type.Fields,GetSeenEntities(TableIndex.TypeDef), type =>((TypeDefinitionEntity)type).Fields,i),
181
+
GetMethodHandleForList(type.Methods,GetSeenEntities(TableIndex.TypeDef), type =>((TypeDefinitionEntity)type).Methods,i));
182
182
183
183
builder.AddEventMap(
184
184
(TypeDefinitionHandle)type.Handle,
185
-
(EventDefinitionHandle)GetHandleForList(type.Events,GetSeenEntities(TableIndex.TypeDef), type =>((TypeDefinitionEntity)type).Events,i,TableIndex.Event));
185
+
GetEventHandleForList(type.Events,GetSeenEntities(TableIndex.TypeDef), type =>((TypeDefinitionEntity)type).Events,i));
186
186
builder.AddPropertyMap(
187
187
(TypeDefinitionHandle)type.Handle,
188
-
(PropertyDefinitionHandle)GetHandleForList(type.Properties,GetSeenEntities(TableIndex.TypeDef), type =>((TypeDefinitionEntity)type).Properties,i,TableIndex.Property));
188
+
GetPropertyHandleForList(type.Properties,GetSeenEntities(TableIndex.TypeDef), type =>((TypeDefinitionEntity)type).Properties,i));
189
189
190
190
if(type.PackingSizeis not null||type.ClassSizeis not null)
0 commit comments