PeterJensen/mandelbrot — pull request #5 by bnjbvr (2014-09-09 15:26:40+00:00)
Title: Make the asmjs version run and validate even when there's no SIMD available 

Hi @PeterJensen
I like your idea of having two distinct asm.js modules, as it will help both Chromium and versions of Firefox which don't have the SIMD global object. Great job!

Unfortunately, the non SIMD demo didn't compile in the current Firefox release because of a little thing (calls to imul() had to be coerced before). This pull request is based on yours, and adds the following:
- coercion of the call to imul()
- removed the methods unused in mandelX4
- use_simd wasn't needed in any of the asm.js modules => delete it
- rather than compiling a module on demand if SIMD is present, we compile both and do the switch in the draw function itself, using the param.use_simd and HAS_SIMD (const that effectively checks if we have SIMD enabled).

If that's fine for you, I propose to merge this one and close the other one. Please let me know if you have any remarks about this change.
Cheers!