Can you have untyped arrays on Asm.js?
-
20-12-2019 - |
Question
For example, is it possible to construct the following array on Asm.js:
var arr = [1,2,[3,4],"test"];
Solution
No. asm.js uses a single ArrayBuffer for its memory heap. It does not support nested arrays (although you can have overlapping typed arrays using the same buffer) nor strings. That said you could handle a c-style string yourself, but the asm.js module could only access it as bytes.
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow