-
-
Notifications
You must be signed in to change notification settings - Fork 670
Rename index arg #1459
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Rename index arg #1459
Conversation
cc @dcodeIO |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Makes sense to rename it in context of compileCallExpression
etc., yeah, except in context of the call_indirect
builtin, where it's still an indexArg
. Perhaps, a better name for indexArg
in call_indirect
might be tableIndex
.
@dcodeIO does this change still make sense? |
Before we had first class functions, we used this
indexArg
local incompileCallIndirect
. From my understanding, this name no longer makes sense because it is not in fact an index into the function table but actually a pointer into a block of memory which contains that index.I picked the name
functionInstance
but I'm not terribly attached to it, I just think thatindexArg
is the wrong name (Unless I'm misreading the code of course)This was tripping me up when I was reviewing the code so I figured I'd submit a patch 🤷