Skip to content

Commit 3ee9d95

Browse files
committed
test fixes and set sign and overflow correction to 1 when in asm mode
1 parent 869a1b7 commit 3ee9d95

3 files changed

Lines changed: 11 additions & 3443 deletions

File tree

emcc

Lines changed: 11 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -851,13 +851,20 @@ try:
851851
exec('shared.Settings.' + key + ' = ' + value)
852852

853853
# Apply effects from settings
854+
if shared.Settings.ASM_JS:
855+
if closure:
856+
print >> sys.stderr, 'emcc: warning: disabling closure because it is not compatible with asm.js code generation'
857+
closure = False
858+
if shared.Settings.CORRECT_SIGNS != 1:
859+
print >> sys.stderr, 'emcc: warning: setting CORRECT_SIGNS to 1 for asm.js code generation'
860+
shared.Settings.CORRECT_SIGNS = 1
861+
if shared.Settings.CORRECT_OVERFLOWS != 1:
862+
print >> sys.stderr, 'emcc: warning: setting CORRECT_OVERFLOWS to 1 for asm.js code generation'
863+
shared.Settings.CORRECT_OVERFLOWS = 1
864+
854865
if shared.Settings.CORRECT_SIGNS >= 2 or shared.Settings.CORRECT_OVERFLOWS >= 2 or shared.Settings.CORRECT_ROUNDINGS >= 2:
855866
keep_debug = True # must keep debug info to do line-by-line operations
856867

857-
if closure and shared.Settings.ASM_JS:
858-
print >> sys.stderr, 'emcc: warning: disabling closure because it is not compatible with asm.js code generation'
859-
closure = False
860-
861868
if minify_whitespace is None:
862869
minify_whitespace = closure # if closure is run, minify whitespace
863870

tests/runner.py

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6151,10 +6151,7 @@ def test_sqlite(self):
61516151
if self.emcc_args is None: return self.skip('Very slow without ta2, and we would also need to include dlmalloc manually without emcc')
61526152
if Settings.QUANTUM_SIZE == 1: return self.skip('TODO FIXME')
61536153

6154-
pgo_data = read_pgo_data(path_from_root('tests', 'sqlite', 'sqlite-autooptimize.fails.txt'))
6155-
61566154
Settings.CORRECT_SIGNS = 1 # XXX: in default, we fail with 2 here, even though the pgo_data should be correct (and works in s_0_0). Investigate this.
6157-
Settings.CORRECT_SIGNS_LINES = pgo_data['signs_lines']
61586155
Settings.CORRECT_OVERFLOWS = 0
61596156
Settings.CORRECT_ROUNDINGS = 0
61606157
if self.emcc_args is None: Settings.SAFE_HEAP = 0 # uses time.h to set random bytes, other stuff

0 commit comments

Comments
 (0)