Completely rewrites com.minres.coredsl.scoping.CoreDslScopeProvider from scratch.
Model changes:
EnumMemberDeclaration is now a subtype of NamedEntity. This is necessary so EntityReferences can target enum members.
Added intrinsic functions bitalignof and bitoffsetof as counterparts of alignof and offsetof.
Currently supported tasks:
Resolving instruction set names (also from imported files).
Resolving struct, union and enum type names (both within the same ISA the type is declared in and in derived ISAs).
Resolving function parameters, instruction encoding fields and local variables (including for loop index declaration).
Resolving isa state elements, functions and enum members (also those declared in super types).
Resolving member names for member access expressions ((a.b).*).
Resolving member names for offsetof expressions (offsetof(struct T, *) and offsetof(expressionOfTypeT, *)).
I assumed enum members should be scoped the same way as in C, so they are simply added to the global ISA scope as constants.
@eyck is it possible to disable generation of CoreDslScopeProvider.java when the mwe2 workflow is run? The implementation is located in an .xtend file, but the .java file is regererated anyway. I believe you previously solved this by moving the actual implementation to XtCoreDslScopeProvider.xtend and subclassing the auto-generated class, but that feels like an ugly hack.
Fixed it by providing an empty stub file myself. Not the prettiest solution, but still better than before.
Completely rewrites
com.minres.coredsl.scoping.CoreDslScopeProvider
from scratch.Model changes:
EnumMemberDeclaration
is now a subtype ofNamedEntity
. This is necessary soEntityReference
s can target enum members.bitalignof
andbitoffsetof
as counterparts ofalignof
andoffsetof
.Currently supported tasks:
(a.b).*
).offsetof(struct T, *)
andoffsetof(expressionOfTypeT, *)
).I assumed enum members should be scoped the same way as in C, so they are simply added to the global ISA scope as constants.
@eyck is it possible to disable generation ofFixed it by providing an empty stub file myself. Not the prettiest solution, but still better than before.CoreDslScopeProvider.java
when the mwe2 workflow is run? The implementation is located in an .xtend file, but the .java file is regererated anyway. I believe you previously solved this by moving the actual implementation toXtCoreDslScopeProvider.xtend
and subclassing the auto-generated class, but that feels like an ugly hack.