Skip to content

Tighten checks in JS.md for imported and table functions #775

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

Merged
merged 2 commits into from
Aug 29, 2016

Conversation

lukewagner
Copy link
Member

This PR fills in some missing checks in the JS API that we've discussed informally but never got recorded. It's possible we'll want to relax the restriction on not being able to assign non-exported-wasm functions to Tables post-MVP, but for now it reduces the MVP impl burden of Tables while still supporting the core use case of dynamic linking.

@@ -160,11 +160,19 @@ function, global, memory and table imports):
* Let `v` be the value of performing [`Get`](http://tc39.github.io/ecma262/#sec-get-o-p)(`v`, `i.export_name`)
* If `i` is a function import:
* If `IsCallable(v)` is `false`, throw a [`TypeError`](https://tc39.github.io/ecma262/#sec-native-error-types-used-in-this-standard-typeerror).
Copy link
Contributor

Choose a reason for hiding this comment

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

Can you make IsCallable(v) a link to the JavaScript standard, i.e. IsCallable(v)

@gahaas
Copy link
Contributor

gahaas commented Aug 29, 2016

looks good to me with nits.

@lukewagner
Copy link
Member Author

Good points, updated.

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