CountBleck
CountBleck
That's not the same thing as compiling to asm.js, because it prevents the usage of AS-specific features and may not have the same performance, depending on the code. The author...
If you're *able* to do all of those, then there's no semantic difference (maybe a performance difference but idk). However, if you use AS-specific features (`load`, `store`, etc.), you won't...
> That's a technically incorrect assumption. I conceded that if you're *able* to use your AS code on those runtimes (i.e. your code is **completely compatible with TypeScript/JavaScript concepts**), then...
> My interest is in using JavaScript as source code for cross-compilation. That requires a lot of testing in various runtimes, engines, and testing cross-compilation to native executable, WASM, and...
It's not the priority of many (perhaps most) users. AS is used because it's familiar, simple, and *performant*. Anyways, we're derailing this issue.
The `ptr` parameter is the pointer (i.e. location in memory) that you're storing the value to. If you wanted to store 123 as a 32-bit integer to the location 456,...
It should work if you pass in a `WebAssembly.Module` instance instead of an `ArrayBuffer`. Confusingly, `WebAssembly.instantiate` has two different return types, depending on the type of the argument.
My initial suspicion is that the same file is read and parsed twice, with different internal names...
Entrypoints are compiled together...I don't *think* they affect whether this bug occurs.
On second thought, it looks like the cause *is* the second entry point, because you specify `lib/utils/module.ts`, which will resolve to a different internal name than that of the `utils/module`...