zippy/ceptr

add DEFINE instruction

Opened this issue · 3 comments

zippy commented

we need an instruction that allows us to add a new definition in to the receptor definitional space

zippy commented

4be1881 adds a DEFINE instruction... however, the signature is for SYMBOL_DEFINITION and a RESULT_SYMBOL. The code is generalized for all definition types, but our signatures don't allow optionality. So either we'd have to create an optionality semantic type to pass the data in (and return the correct type (i.e. RESULT_STRUCTURE..), or we'd have to create separate instructions for each semantic id type, i.e. DEFINE_SYMOBL, DEFINE_STRUCTURE, etc...
This raises the issue that at the ceptr level we've differentiated semantic types as different "things" whereas at the c level the semanticIDs are just different flavors of the same thing. It's worth keeping this in mind to make sure that's still the right decision.

zippy commented

fb0d141 adds definitions for each semantic type

zippy commented

Need to add a DECLARE instruction for symbols to match what we have in the base_defs so we can do recursive symbol definitions