aboutsummaryrefslogtreecommitdiff
path: root/emscripten.py
diff options
context:
space:
mode:
authorVladimir Vukicevic <vladimirv@dugeo.com>2013-02-26 23:04:11 -0500
committerVladimir Vukicevic <vladimirv@dugeo.com>2013-02-26 23:04:11 -0500
commit31186ef9edb06e9bc695fca2c3a14677e8f137a1 (patch)
treecba5aba62602283b6d6a9d3e23f126dd6feb1482 /emscripten.py
parenta28b5d53d75b428b1bee1efd39ac6d01d68d56d2 (diff)
Add CHECK_HEAP_ALIGN to perform runtime alignment checks
Adds a much cheaper CHECK_HEAP_ALIGN option to do heap access alignment checks. Less extensive than SAFE_HEAP, but also much cheaper.
Diffstat (limited to 'emscripten.py')
-rwxr-xr-xemscripten.py1
1 files changed, 1 insertions, 0 deletions
diff --git a/emscripten.py b/emscripten.py
index 704e2b25..1db09a80 100755
--- a/emscripten.py
+++ b/emscripten.py
@@ -345,6 +345,7 @@ def emscript(infile, settings, outfile, libraries=[]):
asm_setup += '\n'.join(['var %s = %s;' % (f.replace('.', '_'), f) for f in math_envs])
basic_funcs = ['abort', 'assert', 'asmPrintInt', 'asmPrintFloat', 'copyTempDouble', 'copyTempFloat'] + [m.replace('.', '_') for m in math_envs]
if settings['SAFE_HEAP']: basic_funcs += ['SAFE_HEAP_LOAD', 'SAFE_HEAP_STORE', 'SAFE_HEAP_CLEAR']
+ if settings['CHECK_HEAP_ALIGN']: basic_funcs += ['CHECK_ALIGN_2', 'CHECK_ALIGN_4', 'CHECK_ALIGN_8']
basic_vars = ['STACKTOP', 'STACK_MAX', 'tempDoublePtr', 'ABORT']
basic_float_vars = ['NaN', 'Infinity']
if forwarded_json['Types']['preciseI64MathUsed']: