summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/settings.js5
-rwxr-xr-xtests/runner.py4
-rw-r--r--tests/test_core.py5
3 files changed, 10 insertions, 4 deletions
diff --git a/src/settings.js b/src/settings.js
index 3827927d..03b4ed64 100644
--- a/src/settings.js
+++ b/src/settings.js
@@ -141,6 +141,11 @@ var OUTLINING_LIMIT = 0; // A function size above which we try to automatically
// tools/find_bigfuncs.py on that to get a sorted list by size.
// Another possibility is to look in the web console in firefox,
// which will note slowly-compiling functions.
+ // You will probably want to experiment with various values to
+ // see the impact on compilation time, code size and runtime
+ // throughput. It is hard to say what values to start testing
+ // with, but something around 20,000 to 100,000 might make sense.
+ // (The unit size is number of AST nodes.)
// Generated code debugging options
var SAFE_HEAP = 0; // Check each write to the heap, for example, this will give a clear
diff --git a/tests/runner.py b/tests/runner.py
index 827d65a9..bbbc23e5 100755
--- a/tests/runner.py
+++ b/tests/runner.py
@@ -156,11 +156,7 @@ process(sys.argv[1])
''')
transform.close()
transform_args = ['--js-transform', "%s %s" % (PYTHON, transform_filename)]
- if '--memory-init-file' in self.emcc_args:
- try_delete(filename + '.o.js.mem')
Building.emcc(filename + '.o.ll', Settings.serialize() + self.emcc_args + transform_args + Building.COMPILER_TEST_OPTS, filename + '.o.js')
- if '--memory-init-file' in self.emcc_args:
- assert os.path.exists(filename + '.o.js.mem')
if post2: post2(filename + '.o.js')
# Build JavaScript code from source code
diff --git a/tests/test_core.py b/tests/test_core.py
index 54509f2c..7facf395 100644
--- a/tests/test_core.py
+++ b/tests/test_core.py
@@ -6789,8 +6789,13 @@ def process(filename):
other.close()
src = open(path_from_root('tests', 'files.cpp'), 'r').read()
+
+ mem_file = 'src.cpp.o.js.mem'
+ try_delete(mem_file)
self.do_run(src, ('size: 7\ndata: 100,-56,50,25,10,77,123\nloop: 100 -56 50 25 10 77 123 \ninput:hi there!\ntexto\n$\n5 : 10,30,20,11,88\nother=some data.\nseeked=me da.\nseeked=ata.\nseeked=ta.\nfscanfed: 10 - hello\nok.\ntexte\n', 'size: 7\ndata: 100,-56,50,25,10,77,123\nloop: 100 -56 50 25 10 77 123 \ninput:hi there!\ntexto\ntexte\n$\n5 : 10,30,20,11,88\nother=some data.\nseeked=me da.\nseeked=ata.\nseeked=ta.\nfscanfed: 10 - hello\nok.\n'),
post_build=post, extra_emscripten_args=['-H', 'libc/fcntl.h'])
+ if self.emcc_args and '--memory-init-file' in self.emcc_args:
+ assert os.path.exists(mem_file)
def test_files_m(self):
# Test for Module.stdin etc.