-
Notifications
You must be signed in to change notification settings - Fork 5.4k
Description
This is the last item from #41130. I have extracted it into a separate issue for a cleaner discussion.
Such a method when called via reflection is getting stack arguments with wrong offsets:
public int TestSmallStackArgsMethod(short s1, short s2, short s3, short s4, short s5, short s6, short s7, short s8, short s9, short s10, short s11, short s12)
This minimal test:
sandreenko@678ce4b
because VM logic that moves "Invoke" arguments from the array to the slots does not know about apple specific alignment. Actually, VM operates in "stack slot" terms that do not exist there.
I see two options here:
- a small targeted fix for reflection and leave the other parts as is;
- teach VM to work with byteSize/byteOffset as I did with the Jit (a non-working prototype is here sandreenko@592b51b)
the first is cheap, the second could still be preferable if any other components depend on them (like if we want varags or debugger needs proper sizes/offsets somehow)
What do you think @sdmaclea , @janvorli , @davidwrighton?