Skip to content

wasm: Refactor fully to use symbolic indices#417

Merged
LPTK merged 17 commits intohkust-taco:hkmc2from
Derppening:refactor/use-symidx
Mar 14, 2026
Merged

wasm: Refactor fully to use symbolic indices#417
LPTK merged 17 commits intohkust-taco:hkmc2from
Derppening:refactor/use-symidx

Conversation

@Derppening
Copy link
Contributor

Refactor all usages of numeric indices to symbolic indices, so that all top-level module constructs are named.

No functionality changes, except all functions are exposed as element segments. This allows any function to be called using call_ref for consistency.

@Derppening Derppening requested a review from LPTK March 14, 2026 09:29
Copy link
Contributor

@LPTK LPTK left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Neat, thanks!

But is there any plan to move away from the deprecated stuff? Did you leave it there to help the FYP students? Also, does it really need to be deprecated?

@Derppening
Copy link
Contributor Author

Neat, thanks!

But is there any plan to move away from the deprecated stuff?

The implementation has fully moved away from the deprecated stuff. The only locations that still retains numeric indices is getType and getFunc for (temporary) backwards compatibility.

Did you leave it there to help the FYP students?

Yes. I have tried to make all changes API-compatible to ensure that their changes can be applied on top of this with minimal changes.

Also, does it really need to be deprecated?

I am not sure. It just seems like a good idea to force people to move away from using numeric indices before it is fully removed or made private within the Ctx implementation.

@LPTK LPTK merged commit 0daa7b7 into hkust-taco:hkmc2 Mar 14, 2026
1 check passed
@LPTK LPTK deleted the refactor/use-symidx branch March 14, 2026 10:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants