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
We may need to extend our representation a bit, in order to allow importing MASM modules from source. In particular, we may want to have a variant of FunctionIdent called Callee used in our MASM representation, like so:
When translating HIR FunctionIdent to Callee, it would become a path where the module would always be set, and absolute would always be true (since function identifiers in HIR are always absolute).
When translating MASM InvocationTarget to Callee, we'd convert InvocationTarget::AbsolutePath as an absolute callee, InvocationTarget::ProcedurePath as a relative path, InvocationTarget::ProcedureName as a relative path, and InvocationTarget::MastRoot, as a MAST root. Similar translations could be supported for other InvocationTarget-like procedure identifiers, but the MASM opcodes only use InvocationTarget.
The emulator then would need to resolve relative paths at runtime, but could treat absolute paths and MAST roots as, well, absolute references. The emulator currently does not track MAST roots at all, so that would be needed to have full compatibility, but would be a pretty simple thing to add.
The text was updated successfully, but these errors were encountered:
Extracted from #222 (comment)
The text was updated successfully, but these errors were encountered: