diff options
author | Alon Zakai <alonzakai@gmail.com> | 2012-11-13 18:29:12 -0800 |
---|---|---|
committer | Alon Zakai <alonzakai@gmail.com> | 2012-12-07 14:23:18 -0800 |
commit | b140e7ee7354afcc215e1fc3593ea385e15ae92a (patch) | |
tree | f3662c10e5e6f5c56a669ad86eac170f91c8302a /src/preamble.js | |
parent | ab399ca532fb1deb7607f6cc2feb01186d75ec2b (diff) |
set up asm.js 'module'
Diffstat (limited to 'src/preamble.js')
-rw-r--r-- | src/preamble.js | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/src/preamble.js b/src/preamble.js index 9342bf2b..a27c9890 100644 --- a/src/preamble.js +++ b/src/preamble.js @@ -889,3 +889,16 @@ Module["preloadedAudios"] = {}; // maps url to audio data // === Body === +#if ASM_JS +var asm = (function(env, buffer) { + 'use asm'; + var HEAP8 = new env.Int8Array(buffer); + var HEAP16 = new env.Int16Array(buffer); + var HEAP32 = new env.Int32Array(buffer); + var HEAPU8 = new env.Uint8Array(buffer); + var HEAPU16 = new env.Uint16Array(buffer); + var HEAPU32 = new env.Uint32Array(buffer); + var HEAPF32 = new env.Float32Array(buffer); + var HEAPF64 = new env.Float64Array(buffer); +#endif + |