diff options
author | Alon Zakai <alonzakai@gmail.com> | 2013-04-05 18:30:25 -0700 |
---|---|---|
committer | Alon Zakai <alonzakai@gmail.com> | 2013-04-05 18:30:25 -0700 |
commit | a89426a58dfca0b1b9af2fa97da996bddc976a0f (patch) | |
tree | 3dddb177215c2dcfa68d27f996489af905ff5699 | |
parent | 0dd006cfc72c023de7557d1c9ee23e779cea5e50 (diff) |
test various chunk sizes for memory allocation
-rw-r--r-- | src/parseTools.js | 2 | ||||
-rw-r--r-- | src/settings.js | 2 | ||||
-rwxr-xr-x | tests/runner.py | 2 |
3 files changed, 4 insertions, 2 deletions
diff --git a/src/parseTools.js b/src/parseTools.js index 20049094..7dafbebe 100644 --- a/src/parseTools.js +++ b/src/parseTools.js @@ -1560,7 +1560,7 @@ function makePointer(slab, pos, allocator, type, ptr, finalMemoryInitialization) } // JS engines sometimes say array initializers are too large. Work around that by chunking and calling concat to combine at runtime - var chunkSize = 10240; + var chunkSize = JS_CHUNK_SIZE; function chunkify(array) { // break very large slabs into parts var ret = ''; diff --git a/src/settings.js b/src/settings.js index 6b054443..f9b47228 100644 --- a/src/settings.js +++ b/src/settings.js @@ -357,6 +357,8 @@ var NECESSARY_BLOCKADDRS = []; // List of (function, block) for all block addres var EMIT_GENERATED_FUNCTIONS = 0; // whether to emit the list of generated functions, needed for external JS optimization passes +var JS_CHUNK_SIZE = 10240; // Used as a maximum size before breaking up expressions and lines into smaller pieces + // Compiler debugging options var DEBUG_TAGS_SHOWING = []; // Some useful items: diff --git a/tests/runner.py b/tests/runner.py index 561d8523..3606ff1d 100755 --- a/tests/runner.py +++ b/tests/runner.py @@ -8918,7 +8918,7 @@ TT = %s exec('o1 = make_run("o1", compiler=CLANG, emcc_args=["-O1", "-s", "SAFE_HEAP=1"])') # Make one run with -O2, but without closure (we enable closure in specific tests, otherwise on everything it is too slow) - exec('o2 = make_run("o2", compiler=CLANG, emcc_args=["-O2"])') + exec('o2 = make_run("o2", compiler=CLANG, emcc_args=["-O2", "-s", "JS_CHUNK_SIZE=10"])') # asm.js exec('asm2 = make_run("asm2", compiler=CLANG, emcc_args=["-O2", "-s", "ASM_JS=1"])') |