Comments (7)
There are several asm.js demos, so clearly function pointers work, but the spec doesn't mention them. So how do they work? :)
from validator.
Just like function pointers in emscripten in general - function pointers are indexes into a table of functions. There is a separate table for each function type though, mandated by asm.
from validator.
For each function type? Wow, why is that? That might make embind trickier.
Can you point me to where this is in the spec?
Sent from my iPhone
On Mar 25, 2013, at 3:29 PM, Alon Zakai [email protected] wrote:
Just like function pointers in emscripten in general - function pointers are indexes into a table of functions. There is a separate table for each function type though, mandated by asm.
—
Reply to this email directly or view it on GitHub.
from validator.
Hm, I think I understand why it's necessary to segregate function tables now. Indeed, this will make embind tricky, but I'll reach out directly when it's time to bring embind to asm.js.
Sent from my iPhone
On Mar 25, 2013, at 3:44 PM, Chad Austin [email protected] wrote:
For each function type? Wow, why is that? That might make embind trickier.
Can you point me to where this is in the spec?
Sent from my iPhone
On Mar 25, 2013, at 3:29 PM, Alon Zakai [email protected] wrote:
Just like function pointers in emscripten in general - function pointers are indexes into a table of functions. There is a separate table for each function type though, mandated by asm.
—
Reply to this email directly or view it on GitHub.
from validator.
This is in the spec now.
from validator.
I've just looked at the asm.js spec at http://asmjs.org/spec/latest/#value-types , and there is no provision for function pointers as values. Why was this closed?
from validator.
What was added was support for function tables:
http://asmjs.org/spec/latest/#function-table-types
Function tables and indices thereinto can provide function-pointer functionality.
from validator.
Related Issues (20)
- Accept comma-separated function table declarations HOT 2
- Command line utility? HOT 1
- Validator accepts code that it shouldn't HOT 4
- congrats HOT 1
- Allow constants in case blocks
- undefined cannot "flow freely" but can "escape"
- Spec allows standard library functions to be exported HOT 1
- Heap indexing expressions should be subtypes of intish
- Fround annotations break hoisting semantics HOT 1
- If doesn't work? HOT 4
- Mentioned on The Changelog "#189: JSON API with Yehuda Katz"
- Assignment operators are not validated HOT 1
- Foreign function invocations do not validate HOT 1
- Consider allowing x|=0 as a valid Parameter Type Annotation
- Byte Addressing for TypedArray views of heaps - why, and what does it accomplish? HOT 4
- anything with fround doesn't validate
- Warning Chrome : Invalid asm.js: Unexpected token
- Grammar incorrect in document
- Request: Fast integer overflow checks HOT 1
- is this repository maintained? HOT 4
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from validator.