Skip to content

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

Merged
lukewagner merged 2 commits intomasterfrom
tighter-checks
Aug 29, 2016
Merged

Tighten checks in JS.md for imported and table functions#775
lukewagner merged 2 commits intomasterfrom
tighter-checks

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.

JS.md Outdated
@@ -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