Proper label scoping in macro #81
Labels
A-assembler
Area: assembler
C-enhance
Category: a request for an improvement
E-medium
Experience: of moderate difficulty
In #69 we added a random postfix to label names to create a scope. It would be nice to have better guarantees about the scope and not rely on the small possibility of label collisions.
A few ideas we had:
Ingest
to support expanding macros. This is not trivial because theIndependent
scope is truly independent and needs no external data to fully assemble its ops. This is not the same assumption that instruction macros make, because they can use labels from the outer scope and when concretized they need to have an understanding of where they've been invoked in terms of concrete ops.Scope
enum in the assembler module and expand theLabel
type to be aname
andscope
. This seems messy and it's annoying to have anotherScope
type.The text was updated successfully, but these errors were encountered: