Skip to content
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

Add support for calling Reify functions with parameters. #12

Open
aabtop opened this issue May 24, 2020 · 0 comments
Open

Add support for calling Reify functions with parameters. #12

aabtop opened this issue May 24, 2020 · 0 comments

Comments

@aabtop
Copy link
Owner

aabtop commented May 24, 2020

Currently we're able to call functions that take no parameters, but we don't support calling Reify functions that require parameters. This would be useful, for example, to enable functions that take a time parameter to express animations.

In order for this to work, we'll need a system for converting from C++ Immut Ref types to V8 bindings types. We have logic for going the other direction already to support function return values.

We will need to parse and understand function type signatures that contain parameters, then convert these parameters to V8 bindings types, and then setup V8 bindings functionality to invoke the function calls with the appropriate parameters.

In order to maintain efficiency, we will want to keep a registry of C++ Immut Ref objects known to be associated with V8 objects, so that we can avoid re-creating these. For example, if a V8 function returns an object, and we then pass that as a parameter to another V8 function, it should not have to convert it to a V8 object because it already exists as a V8 object.

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

No branches or pull requests

1 participant