Skip to content

Emit the dynCall functions in emulated function pointer mode to make … #7656

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

Closed
wants to merge 1 commit into from

Conversation

vargaz
Copy link
Contributor

@vargaz vargaz commented Dec 13, 2018

…invokes with non-legal signatures work.

Fixes #7399.

Copy link
Member

@kripken kripken left a comment

Choose a reason for hiding this comment

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

Thanks @vargaz! I think this is the right direction. Code mostly looks good, aside from one comment I added. There is also a failing test on CI that needs to be investigated.

ret = ('return ' if sig[0] != 'v' else '') + shared.JS.make_coercion('FUNCTION_TABLE_%s[index&%s](%s)' % (sig, sig_mask, coerced_args), sig[0])
if not shared.Settings.EMULATED_FUNCTION_POINTERS:
function_tables_impls.append('''
if shared.Settings.EMULATED_FUNCTION_POINTERS:
Copy link
Member

Choose a reason for hiding this comment

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

I think this part of the patch could be simplified by setting sig to X if EMULATED_FUNCTION_POINTERS? That would avoid duplicated code in the if-else here (the return handling, the make_coercion call, etc.

Possibly we need a notion of an effective_sig if just changing the sig itself here or higher up does not make sense.

@vargaz
Copy link
Contributor Author

vargaz commented Feb 22, 2019

No longer needed.

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