diff options
author | Alon Zakai <alonzakai@gmail.com> | 2013-05-09 18:01:35 -0700 |
---|---|---|
committer | Alon Zakai <alonzakai@gmail.com> | 2013-05-09 18:01:35 -0700 |
commit | 598bef06e3063686aaf368684b10268c0af83a7a (patch) | |
tree | 2d9a748af9ab5a85b415f885dda6c7160ed5a7ca /src/settings.js | |
parent | 895696aca0830a741b5b33f1ca1fc1e3c8b23c47 (diff) |
FORCE_ALIGNED_MEMORY option
Diffstat (limited to 'src/settings.js')
-rw-r--r-- | src/settings.js | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/src/settings.js b/src/settings.js index d029598a..8766277b 100644 --- a/src/settings.js +++ b/src/settings.js @@ -89,6 +89,12 @@ var UNALIGNED_MEMORY = 0; // If enabled, all memory accesses are assumed to be u // typed arrays mode 2 where alignment is relevant.) In unaligned memory mode, you // can run nonportable code that typically would break in JS (or on ARM for that // matter, which also cannot do unaligned reads/writes), at the cost of slowness +var FORCE_ALIGNED_MEMORY = 0; // If enabled, assumes all reads and writes are fully aligned for the type they + // use. This is true in proper C code (no undefined behavior), but is sadly + // common enough that we can't do it by default. See SAFE_HEAP and CHECK_HEAP_ALIGN + // for ways to help find places in your code where unaligned reads/writes are done - + // you might be able to refactor your codebase to prevent them, which leads to + // smaller and faster code, or even the option to turn this flag on. var PRECISE_I64_MATH = 1; // If enabled, i64 addition etc. is emulated - which is slow but precise. If disabled, // we use the 'double trick' which is fast but incurs rounding at high values. // Note that we do not catch 32-bit multiplication by default (which must be done in |