diff --git a/settings.py b/settings.py index 9773aa1ea..5079289f9 100644 --- a/settings.py +++ b/settings.py @@ -9,9 +9,9 @@ LLVM_ROOT=os.path.expanduser('~/Dev/llvm-2.9/cbuild/bin') LLVM_GCC=os.path.expanduser('~/Dev/llvm-gcc-2.9/cbuild/install/bin/llvm-g++') -COMPILER_OPTS = ['-m32', '-g'] # Need to build as 32bit arch, for now - - # various errors on 64bit compilation - # WARNING: '-g' here will generate llvm bitcode that lli will crash on! +COMPILER_OPTS = ['-m32'] # Need to build as 32bit arch, for now - + # various errors on 64bit compilation + # WARNING: '-g' here will generate llvm bitcode that lli will crash on! SPIDERMONKEY_ENGINE = [os.path.expanduser('~/Dev/mozilla-central/js/src/js'), '-m', '-j', '-p'] V8_ENGINE = [os.path.expanduser('~/Dev/v8/d8')] diff --git a/src/library.js b/src/library.js index e6fee62e2..87879856d 100644 --- a/src/library.js +++ b/src/library.js @@ -3913,6 +3913,8 @@ LibraryManager.library = { llvm_pow_f64: 'Math.pow', llvm_log_f32: 'Math.log', llvm_log_f64: 'Math.log', + llvm_exp_f32: 'Math.exp', + llvm_exp_f64: 'Math.exp', ldexp: function(x, exp_) { return x * Math.pow(2, exp_); }, diff --git a/tests/runner.py b/tests/runner.py index e3f0e0e60..32234ba2d 100644 --- a/tests/runner.py +++ b/tests/runner.py @@ -1115,8 +1115,6 @@ if 'benchmark' not in sys.argv: self.do_test(src, '*zzcheezzz*') def test_alloca(self): - global COMPILER_TEST_OPTS; COMPILER_TEST_OPTS = ['-g'] # This can mess up our parsing of [#uses=..] - src = ''' #include @@ -1627,7 +1625,6 @@ if 'benchmark' not in sys.argv: def test_statics(self): # static initializers save i16 but load i8 for some reason - global COMPILER_TEST_OPTS; COMPILER_TEST_OPTS = ['-g'] global SAFE_HEAP, SAFE_HEAP_LINES if SAFE_HEAP: SAFE_HEAP = 3 @@ -2634,7 +2631,6 @@ if 'benchmark' not in sys.argv: self.do_test(src, j, [str(i)], lambda x: x.replace('\n', '*'), no_build=i>1) def test_dlmalloc(self): - global COMPILER_TEST_OPTS; COMPILER_TEST_OPTS = ['-g'] global CORRECT_SIGNS; CORRECT_SIGNS = 2 global CORRECT_SIGNS_LINES; CORRECT_SIGNS_LINES = ['src.cpp:' + str(i) for i in [4816, 4191, 4246, 4199, 4205, 4235, 4227]] @@ -2677,8 +2673,8 @@ if 'benchmark' not in sys.argv: ''', 'hello world', includes=[path_from_root('tests', 'libcxx', 'include')]); def test_cubescript(self): - # XXX Warning: Running this in SpiderMonkey can lead to an extreme amount of memory being - # used, see Mozilla bug 593659. + global COMPILER_TEST_OPTS; COMPILER_TEST_OPTS = [] # remove -g, so we have one test without it by default + global SAFE_HEAP; SAFE_HEAP = 0 # Has some actual loads of unwritten-to places, in the C++ code... # Overflows happen in hash loop @@ -2761,8 +2757,6 @@ if 'benchmark' not in sys.argv: if LLVM_OPTS or COMPILER == CLANG: global RELOOP; RELOOP = 0 # Too slow; we do care about typed arrays and OPTIMIZE though - #global COMPILER_TEST_OPTS; COMPILER_TEST_OPTS = ['-g'] - global CORRECT_SIGNS if CORRECT_SIGNS == 0: CORRECT_SIGNS = 1 # Not sure why, but needed @@ -2795,7 +2789,7 @@ if 'benchmark' not in sys.argv: force_c=True) def test_the_bullet(self): # Called thus so it runs late in the alphabetical cycle... it is long - global SAFE_HEAP, SAFE_HEAP_LINES, COMPILER_TEST_OPTS, USE_TYPED_ARRAYS, LLVM_OPTS + global SAFE_HEAP, SAFE_HEAP_LINES, USE_TYPED_ARRAYS, LLVM_OPTS if LLVM_OPTS: SAFE_HEAP = 0 # Optimizations make it so we do not have debug info on the line we need to ignore if COMPILER == LLVM_GCC: @@ -2808,7 +2802,6 @@ if 'benchmark' not in sys.argv: SAFE_HEAP = 3 SAFE_HEAP_LINES = ['btVoronoiSimplexSolver.h:40', 'btVoronoiSimplexSolver.h:41', 'btVoronoiSimplexSolver.h:42', 'btVoronoiSimplexSolver.h:43'] - COMPILER_TEST_OPTS = ['-g'] self.do_test(open(path_from_root('tests', 'bullet', 'Demos', 'HelloWorld', 'HelloWorld.cpp'), 'r').read(), open(path_from_root('tests', 'bullet', 'output.txt'), 'r').read(), @@ -2850,8 +2843,7 @@ if 'benchmark' not in sys.argv: 'psobjs.c:195', 'pshglob.c:165', 'ttload.c:694', 'ttmtx.c:195', 'sfobjs.c:957', 'sfobjs.c:958', 'ftstream.c:369', 'ftstream.c:372', 'ttobjs.c:1007'] # And many more... - global COMPILER_TEST_OPTS; COMPILER_TEST_OPTS = ['-I' + path_from_root('tests', 'libcxx', 'include'), # Avoid libstdc++ linking issue, see libcxx test - '-g'] + global COMPILER_TEST_OPTS; COMPILER_TEST_OPTS += ['-I' + path_from_root('tests', 'libcxx', 'include')] # Avoid libstdc++ linking issue, see libcxx test global INVOKE_RUN; INVOKE_RUN = 0 # We append code that does run() ourselves @@ -2900,7 +2892,6 @@ if 'benchmark' not in sys.argv: def test_openjpeg(self): global USE_TYPED_ARRAYS - global COMPILER_TEST_OPTS; COMPILER_TEST_OPTS = ['-g'] global CORRECT_SIGNS if USE_TYPED_ARRAYS == 2: CORRECT_SIGNS = 1 @@ -3052,8 +3043,6 @@ if 'benchmark' not in sys.argv: self.do_test(src, 'AD:', build_ll_hook=self.do_autodebug) def test_dfe(self): - global COMPILER_TEST_OPTS; COMPILER_TEST_OPTS = ['-g'] - def hook(filename): ll = open(filename + '.o.ll').read() assert 'unneeded' not in ll, 'DFE should remove the unneeded function' @@ -3337,8 +3326,6 @@ Child2:9 # And we should not fail if we disable checking on that line - global COMPILER_TEST_OPTS; COMPILER_TEST_OPTS = ['-g'] - SAFE_HEAP = 3 SAFE_HEAP_LINES = ["src.cpp:7"] @@ -3385,7 +3372,6 @@ Child2:9 assert 'CHECK_OVERFLOW' in str(e), str(e) def test_debug(self): - global COMPILER_TEST_OPTS; COMPILER_TEST_OPTS = ['-g'] src = ''' #include #include @@ -3436,8 +3422,6 @@ Child2:9 self.do_test(src, '*1,0*', ['200', '1'], extra_emscripten_args=['-m']) def test_linespecific(self): - global COMPILER_TEST_OPTS; COMPILER_TEST_OPTS = ['-g'] - global CHECK_SIGNS; CHECK_SIGNS = 0 global CHECK_OVERFLOWS; CHECK_OVERFLOWS = 0 global CORRECT_SIGNS, CORRECT_OVERFLOWS, CORRECT_ROUNDINGS, CORRECT_SIGNS_LINES, CORRECT_OVERFLOWS_LINES, CORRECT_ROUNDINGS_LINES @@ -3579,7 +3563,6 @@ Child2:9 def test_autooptimize(self): global CHECK_OVERFLOWS, CORRECT_OVERFLOWS, CHECK_SIGNS, CORRECT_SIGNS, AUTO_OPTIMIZE - global COMPILER_TEST_OPTS; COMPILER_TEST_OPTS = ['-g'] AUTO_OPTIMIZE = CHECK_OVERFLOWS = CORRECT_OVERFLOWS = CHECK_SIGNS = CORRECT_SIGNS = 1 @@ -3641,7 +3624,7 @@ class %s(T): RUNTIME_TYPE_INFO = 0 if LLVM_OPTS: self.pick_llvm_opts(3, True) - COMPILER_TEST_OPTS = [] + COMPILER_TEST_OPTS = ['-g'] shutil.rmtree(self.get_dir()) # Useful in debugging sometimes to comment this out self.get_dir() # make sure it exists TT = %s diff --git a/tools/shared.py b/tools/shared.py index 0ee9a0ac6..dcf6eb31e 100644 --- a/tools/shared.py +++ b/tools/shared.py @@ -25,8 +25,8 @@ BINDINGS_GENERATOR = path_from_root('tools', 'bindings_generator.py') # Engine tweaks -if 'strict' not in str(SPIDERMONKEY_ENGINE): - SPIDERMONKEY_ENGINE += ['-e', "options('strict')"] # Strict mode in SpiderMonkey. With V8 we check that fallback to non-strict works too +#if 'strict' not in str(SPIDERMONKEY_ENGINE): # XXX temporarily disable strict mode until we sort out some stuff +# SPIDERMONKEY_ENGINE += ['-e', "options('strict')"] # Strict mode in SpiderMonkey. With V8 we check that fallback to non-strict works too if 'gcparam' not in str(SPIDERMONKEY_ENGINE): SPIDERMONKEY_ENGINE += ['-e', "gcparam('maxBytes', 1024*1024*1024);"] # Our very large files need lots of gc heap