diff options
author | Alon Zakai <alonzakai@gmail.com> | 2012-02-26 17:29:24 -0800 |
---|---|---|
committer | Alon Zakai <alonzakai@gmail.com> | 2012-02-26 17:29:24 -0800 |
commit | c207c8c67ca2f13437d589f22dc5d136ea7ac3f6 (patch) | |
tree | 48c7c55b0ddcdb254a0dd60aaaa25141812d2430 | |
parent | ce0eabbbec5184380d3c98feac5b523be7c06b78 (diff) |
remove I64_MODE, it is equal to 1 in USE_TYPED_ARRAYS 2 and only there
-rw-r--r-- | src/analyzer.js | 2 | ||||
-rw-r--r-- | src/compiler.js | 3 | ||||
-rw-r--r-- | src/intertyper.js | 2 | ||||
-rw-r--r-- | src/jsifier.js | 2 | ||||
-rw-r--r-- | src/library.js | 10 | ||||
-rw-r--r-- | src/modules.js | 2 | ||||
-rw-r--r-- | src/parseTools.js | 31 | ||||
-rw-r--r-- | src/preamble.js | 19 | ||||
-rw-r--r-- | src/settings.js | 6 | ||||
-rwxr-xr-x | tests/runner.py | 101 |
10 files changed, 64 insertions, 114 deletions
diff --git a/src/analyzer.js b/src/analyzer.js index ac24f5c4..33441697 100644 --- a/src/analyzer.js +++ b/src/analyzer.js @@ -877,7 +877,7 @@ function analyzer(data, sidePass) { variable.impl = VAR_EMULATED; } else if (variable.origin == 'funcparam') { variable.impl = VAR_EMULATED; - } else if (variable.type == 'i64*' && I64_MODE == 1) { + } else if (variable.type == 'i64*' && USE_TYPED_ARRAYS == 2) { variable.impl = VAR_EMULATED; } else if (MICRO_OPTS && variable.pointingLevels === 0) { // A simple int value, can be implemented as a native variable diff --git a/src/compiler.js b/src/compiler.js index d37bc68b..1876ee1c 100644 --- a/src/compiler.js +++ b/src/compiler.js @@ -138,7 +138,6 @@ EXPORTED_GLOBALS = set(EXPORTED_GLOBALS); // Settings sanity checks assert(!(USE_TYPED_ARRAYS === 2 && QUANTUM_SIZE !== 4), 'For USE_TYPED_ARRAYS == 2, must have normal QUANTUM_SIZE of 4'); -assert(!(USE_TYPED_ARRAYS !== 2 && I64_MODE === 1), 'i64 mode 1 is only supported with typed arrays mode 2'); // Output some info and warnings based on settings @@ -149,7 +148,7 @@ if (!MICRO_OPTS || !RELOOP || ASSERTIONS || CHECK_SIGNS || CHECK_OVERFLOWS || IN print('// Note: For maximum-speed code, see "Optimizing Code" on the Emscripten wiki, https://github.com/kripken/emscripten/wiki/Optimizing-Code'); } -if (DOUBLE_MODE || I64_MODE || CORRECT_SIGNS || CORRECT_OVERFLOWS || CORRECT_ROUNDINGS) { +if (DOUBLE_MODE || CORRECT_SIGNS || CORRECT_OVERFLOWS || CORRECT_ROUNDINGS) { print('// Note: Some Emscripten settings may limit the speed of the generated code.'); } diff --git a/src/intertyper.js b/src/intertyper.js index 6d367b93..bd7b70f9 100644 --- a/src/intertyper.js +++ b/src/intertyper.js @@ -827,7 +827,7 @@ function intertyper(data, sidePass, baseLineNums) { item.params[0].type = item.params[1].type; // TODO: also remove 2nd param? } - if (I64_MODE == 1) { + if (USE_TYPED_ARRAYS == 2) { // Some specific corrections, since 'i64' is special if (item.op in LLVM.SHIFTS) { item.params[1].type = 'i32'; diff --git a/src/jsifier.js b/src/jsifier.js index 70a99020..fccfaa74 100644 --- a/src/jsifier.js +++ b/src/jsifier.js @@ -167,7 +167,7 @@ function JSify(data, functionsOnly, givenFunctions) { } // Add current value(s) var currValue = flatten(values[i]); - if (I64_MODE == 1 && typeData.fields[i] == 'i64') { + if (USE_TYPED_ARRAYS == 2 && typeData.fields[i] == 'i64') { // 'flatten' out the 64-bit value into two 32-bit halves ret[index++] = currValue>>>0; ret[index++] = 0; diff --git a/src/library.js b/src/library.js index 59020bc2..817f87e2 100644 --- a/src/library.js +++ b/src/library.js @@ -2298,7 +2298,7 @@ LibraryManager.library = { var ret; if (type === 'double') { ret = {{{ makeGetValue('varargs', 'argIndex', 'double', undefined, undefined, true) }}}; -#if I64_MODE == 1 +#if USE_TYPED_ARRAYS == 2 } else if (type == 'i64') { ret = [{{{ makeGetValue('varargs', 'argIndex', 'i32', undefined, undefined, true) }}}, {{{ makeGetValue('varargs', 'argIndex+4', 'i32', undefined, undefined, true) }}}]; @@ -2433,7 +2433,7 @@ LibraryManager.library = { var signed = next == 'd'.charCodeAt(0) || next == 'i'.charCodeAt(0); argSize = argSize || 4; var currArg = getNextArg('i' + (argSize * 8)); -#if I64_MODE == 1 +#if USE_TYPED_ARRAYS == 2 // Flatten i64-1 [low, high] into a (slightly rounded) double if (argSize == 8) { currArg = Runtime.makeBigInt(currArg[0], currArg[1], next == 'u'.charCodeAt(0)); @@ -3485,12 +3485,6 @@ LibraryManager.library = { if (bits == 64) { ret = [{{{ splitI64('ret') }}}]; } -#else -#if I64_MODE == 1 - if (bits == 64) { - ret = {{{ splitI64('ret') }}}; - } -#endif #endif return ret; diff --git a/src/modules.js b/src/modules.js index 2896d632..fd22b9fe 100644 --- a/src/modules.js +++ b/src/modules.js @@ -15,7 +15,7 @@ var LLVM = { SHIFTS: set('ashr', 'lshr', 'shl'), PHI_REACHERS: set('branch', 'switch', 'invoke'), EXTENDS: set('sext', 'zext'), - INTRINSICS_32: set('_llvm_memcpy_p0i8_p0i8_i64', '_llvm_memmove_p0i8_p0i8_i64', '_llvm_memset_p0i8_i64'), // intrinsics that need args converted to i32 in I64_MODE 1 + INTRINSICS_32: set('_llvm_memcpy_p0i8_p0i8_i64', '_llvm_memmove_p0i8_p0i8_i64', '_llvm_memset_p0i8_i64'), // intrinsics that need args converted to i32 in USE_TYPED_ARRAYS == 2 }; LLVM.GLOBAL_MODIFIERS = set(keys(LLVM.LINKAGES).concat(['constant', 'global', 'hidden'])); diff --git a/src/parseTools.js b/src/parseTools.js index 5d5886fa..0eb0bac9 100644 --- a/src/parseTools.js +++ b/src/parseTools.js @@ -345,7 +345,7 @@ function finalizeParam(param) { } else if (param.intertype === 'jsvalue') { return param.ident; } else { - if (param.type == 'i64' && I64_MODE == 1) { + if (param.type == 'i64' && USE_TYPED_ARRAYS == 2) { return parseI64Constant(param.ident); } var ret = toNiceIdent(param.ident); @@ -532,7 +532,7 @@ function makeInlineCalculation(expression, value, tempVar) { // Makes a proper runtime value for a 64-bit value from low and high i32s. low and high are assumed to be unsigned. function makeI64(low, high) { high = high || '0'; - if (I64_MODE == 1) { + if (USE_TYPED_ARRAYS == 2) { return '[' + makeSignOp(low, 'i32', 'un', 1, 1) + ',' + makeSignOp(high, 'i32', 'un', 1, 1) + ']'; } else { if (high) return RuntimeGenerator.makeBigInt(low, high); @@ -542,7 +542,7 @@ function makeI64(low, high) { // XXX Make all i64 parts signed -// Splits a number (an integer in a double, possibly > 32 bits) into an I64_MODE 1 i64 value. +// Splits a number (an integer in a double, possibly > 32 bits) into an USE_TYPED_ARRAYS == 2 i64 value. // Will suffer from rounding. mergeI64 does the opposite. function splitI64(value) { // We need to min here, since our input might be a double, and large values are rounded, so they can @@ -555,7 +555,7 @@ function splitI64(value) { } } function mergeI64(value) { - assert(I64_MODE == 1); + assert(USE_TYPED_ARRAYS == 2); if (legalizedI64s) { return RuntimeGenerator.makeBigInt(value + '$0', value + '$1'); } else { @@ -566,12 +566,12 @@ function mergeI64(value) { // Takes an i64 value and changes it into the [low, high] form used in i64 mode 1. In that // mode, this is a no-op function ensureI64_1(value) { - if (I64_MODE == 1) return value; + if (USE_TYPED_ARRAYS == 2) return value; return splitI64(value, 1); } function makeCopyI64(value) { - assert(I64_MODE == 1); + assert(USE_TYPED_ARRAYS == 2); return value + '.slice(0)'; } @@ -679,7 +679,7 @@ function parseArbitraryInt(str, bits) { } function parseI64Constant(str) { - assert(I64_MODE == 1); + assert(USE_TYPED_ARRAYS == 2); if (!isNumber(str)) { // This is a variable. Copy it, so we do not modify the original @@ -696,7 +696,7 @@ function parseNumerical(value, type) { // Hexadecimal double value, as the llvm docs say, // "The one non-intuitive notation for constants is the hexadecimal form of floating point constants." value = IEEEUnHex(value); - } else if (type == 'i64' && I64_MODE == 1) { + } else if (type == 'i64' && USE_TYPED_ARRAYS == 2) { value = parseI64Constant(value); } else if (value == 'null') { // NULL *is* 0, in C/C++. No JS null! (null == 0 is false, etc.) @@ -761,7 +761,7 @@ function calcAllocatedSize(type) { function generateStructTypes(type) { if (isArray(type)) return type; // already in the form of [type, type,...] if (Runtime.isNumberType(type) || isPointerType(type)) { - if (I64_MODE == 1 && type == 'i64') { + if (USE_TYPED_ARRAYS == 2 && type == 'i64') { return ['i64', 0, 0, 0, 'i32', 0, 0, 0]; } return [type].concat(zeros(Runtime.getNativeFieldSize(type))); @@ -778,7 +778,7 @@ function generateStructTypes(type) { var type = typeData.fields[i]; if (!SAFE_HEAP && isPointerType(type)) type = '*'; // do not include unneeded type names without safe heap if (Runtime.isNumberType(type) || isPointerType(type)) { - if (I64_MODE == 1 && type == 'i64') { + if (USE_TYPED_ARRAYS == 2 && type == 'i64') { ret[index++] = 'i64'; ret[index++] = 0; ret[index++] = 0; @@ -1345,7 +1345,7 @@ function finalizeLLVMFunctionCall(item, noIndexizeFunctions) { function getGetElementPtrIndexes(item) { var type = item.params[0].type; - if (I64_MODE == 1) { + if (USE_TYPED_ARRAYS == 2) { // GEP indexes are marked as i64s, but they are just numbers to us item.params.forEach(function(param) { param.type = 'i32' }); } @@ -1445,7 +1445,7 @@ function finalizeLLVMParameter(param, noIndexizeFunctions) { if (ret in Variables.globals && Variables.globals[ret].isString) { ret = "STRING_TABLE." + ret; } - if (param.type == 'i64' && I64_MODE == 1) { + if (param.type == 'i64' && USE_TYPED_ARRAYS == 2) { ret = parseI64Constant(ret); } ret = parseNumerical(ret); @@ -1466,7 +1466,7 @@ function finalizeLLVMParameter(param, noIndexizeFunctions) { } function makeSignOp(value, type, op, force, ignore) { - if (I64_MODE == 1 && type == 'i64') { + if (USE_TYPED_ARRAYS == 2 && type == 'i64') { return value; // these are always assumed to be two 32-bit unsigneds. } @@ -1583,7 +1583,7 @@ function processMathop(item) { return makeInlineCalculation('VALUE-VALUE%1', value, 'tempBigIntI'); } - if ((type == 'i64' || paramTypes[0] == 'i64' || paramTypes[1] == 'i64' || idents[1] == '(i64)') && I64_MODE == 1) { + if ((type == 'i64' || paramTypes[0] == 'i64' || paramTypes[1] == 'i64' || idents[1] == '(i64)') && USE_TYPED_ARRAYS == 2) { var warnI64_1 = function() { warnOnce('Arithmetic on 64-bit integers in mode 1 is rounded and flaky, like mode 0!'); }; @@ -1711,7 +1711,7 @@ function processMathop(item) { return '(tempDoubleF64[0]=' + idents[0] + ',[tempDoubleI32[0],tempDoubleI32[1]])'; } } else { - throw 'Invalid I64_MODE1 bitcast: ' + dump(item) + ' : ' + item.params[0].type; + throw 'Invalid USE_TYPED_ARRAYS == 2 bitcast: ' + dump(item) + ' : ' + item.params[0].type; } } default: throw 'Unsupported i64 mode 1 op: ' + item.op + ' : ' + dump(item); @@ -1838,7 +1838,6 @@ function processMathop(item) { if ((inType in Runtime.INT_TYPES && outType in Runtime.FLOAT_TYPES) || (inType in Runtime.FLOAT_TYPES && outType in Runtime.INT_TYPES)) { assert(USE_TYPED_ARRAYS == 2, 'Can only bitcast ints <-> floats with typed arrays mode 2'); - assert(inType == 'i32' || inType == 'float', 'Can only bitcast ints <-> floats with 32 bits (try I64_MODE=1)'); if (inType in Runtime.INT_TYPES) { return '(tempDoubleI32[0] = ' + idents[0] + ',tempDoubleF32[0])'; } else { diff --git a/src/preamble.js b/src/preamble.js index 1ff78f54..45d2f4b2 100644 --- a/src/preamble.js +++ b/src/preamble.js @@ -70,17 +70,6 @@ function SAFE_HEAP_ACCESS(dest, type, store, ignore) { } } } -#if USE_TYPED_ARRAYS == 2 -var warned64 = false; -function warn64() { - if (!warned64) { - __ATEXIT__.push({ func: function() { - print('Warning: using a 64-bit type with USE_TYPED_ARRAYS == 2. Depending on I64_MODE this may be problematic.'); - } }); - warned64 = true; - } -} -#endif function SAFE_HEAP_STORE(dest, value, type, ignore) { #if SAFE_HEAP_LOG @@ -106,7 +95,7 @@ function SAFE_HEAP_STORE(dest, value, type, ignore) { #if DOUBLE_MODE == 1 case 'double': assert(dest % 4 == 0); break; #else - case 'double': assert(dest % 4 == 0); warn64(); break; + case 'double': assert(dest % 4 == 0); break; #endif } #endif @@ -131,7 +120,7 @@ function SAFE_HEAP_LOAD(dest, type, unsigned, ignore) { #if DOUBLE_MODE == 1 case 'double': assert(dest % 4 == 0); break; #else - case 'double': assert(dest % 4 == 0); warn64(); break; + case 'double': assert(dest % 4 == 0); break; #endif } #endif @@ -341,7 +330,7 @@ var undef = 0; // tempInt is used for 32-bit signed values or smaller. tempBigInt is used // for 32-bit unsigned values or more than 32 bits. TODO: audit all uses of tempInt var tempValue, tempInt, tempBigInt, tempInt2, tempBigInt2, tempPair, tempBigIntI, tempBigIntR, tempBigIntS, tempBigIntP, tempBigIntD; -#if I64_MODE == 1 +#if USE_TYPED_ARRAYS == 2 var tempI64, tempI64b; #endif @@ -549,7 +538,7 @@ function allocate(slab, types, allocator) { assert(type, 'Must know what type to store in allocate!'); #endif -#if I64_MODE == 1 +#if USE_TYPED_ARRAYS == 2 if (type == 'i64') type = 'i32'; // special case: we have one i32 here, and one i32 later #endif diff --git a/src/settings.js b/src/settings.js index 6bca0174..4ceb3750 100644 --- a/src/settings.js +++ b/src/settings.js @@ -55,12 +55,6 @@ var USE_TYPED_ARRAYS = 2; // Use typed arrays for the heap // TODO: require compiling with -malign-double, which does align doubles var USE_FHEAP = 1; // Relevant in USE_TYPED_ARRAYS == 1. If this is disabled, only IHEAP will be used, and FHEAP // not generated at all. This is useful if your code is 100% ints without floats or doubles -var I64_MODE = 1; // How to implement 64-bit integers: - // 0: As doubles. This will work up to about 53 bits. - // 1: As [low, high]. This will support all 64 bits for bit ops, etc. properly, but will still - // use doubles for addition etc., like mode 0. This mode is slower than - // mode 0, so its only benefit is proper support for 64 bit bitops. - // TODO: Full bignum support var DOUBLE_MODE = 1; // How to load and store 64-bit doubles. Without typed arrays or in typed array mode 1, // this doesn't matter - these values are just values like any other. In typed array mode 2, // a potentialy risk is that doubles may be only 32-bit aligned. Forcing 64-bit alignment diff --git a/tests/runner.py b/tests/runner.py index 6964fab0..5d7345fd 100755 --- a/tests/runner.py +++ b/tests/runner.py @@ -428,49 +428,38 @@ if 'benchmark' not in str(sys.argv) and 'sanity' not in str(sys.argv): def test_i64(self): if Settings.USE_TYPED_ARRAYS != 2: return self.skip('i64 mode 1 requires ta2') - for i64_mode in [0,1]: - if i64_mode == 0 and Settings.USE_TYPED_ARRAYS != 0: continue # Typed arrays truncate i64 - if i64_mode == 1 and Settings.QUANTUM_SIZE == 1: continue # TODO: i64 mode 1 for q1 + src = ''' + #include <stdio.h> + int main() + { + long long a = 0x2b00505c10; + long long b = a >> 29; + long long c = a >> 32; + long long d = a >> 34; + printf("*%Ld,%Ld,%Ld,%Ld*\\n", a, b, c, d); + unsigned long long ua = 0x2b00505c10; + unsigned long long ub = ua >> 29; + unsigned long long uc = ua >> 32; + unsigned long long ud = ua >> 34; + printf("*%Ld,%Ld,%Ld,%Ld*\\n", ua, ub, uc, ud); + + long long x = 0x0000def123450789ULL; // any bigger than this, and we + long long y = 0x00020ef123456089ULL; // start to run into the double precision limit! + printf("*%Ld,%Ld,%Ld,%Ld,%Ld*\\n", x, y, x | y, x & y, x ^ y, x >> 2, y << 2); - Settings.I64_MODE = i64_mode - src = ''' - #include <stdio.h> - int main() - { - long long a = 0x2b00505c10; - long long b = a >> 29; - long long c = a >> 32; - long long d = a >> 34; - printf("*%Ld,%Ld,%Ld,%Ld*\\n", a, b, c, d); - unsigned long long ua = 0x2b00505c10; - unsigned long long ub = ua >> 29; - unsigned long long uc = ua >> 32; - unsigned long long ud = ua >> 34; - printf("*%Ld,%Ld,%Ld,%Ld*\\n", ua, ub, uc, ud); - - long long x = 0x0000def123450789ULL; // any bigger than this, and we - long long y = 0x00020ef123456089ULL; // start to run into the double precision limit! - printf("*%Ld,%Ld,%Ld,%Ld,%Ld*\\n", x, y, x | y, x & y, x ^ y, x >> 2, y << 2); - - printf("*"); - long long z = 13; - int n = 0; - while (z > 1) { - printf("%.2f,", (float)z); // these must be integers! - z = z >> 1; - n++; - } - printf("*%d*\\n", n); - return 0; + printf("*"); + long long z = 13; + int n = 0; + while (z > 1) { + printf("%.2f,", (float)z); // these must be integers! + z = z >> 1; + n++; } - ''' - self.do_run(src, '*184688860176,344,43,10*\n*184688860176,344,43,10*\n*245127260211081,579378795077769,808077213656969,16428841631881,791648372025088*\n*13.00,6.00,3.00,*3*') - - if Settings.QUANTUM_SIZE == 1: return self.skip('TODO: i64 mode 1 for q1') - - # Stuff that only works in i64_mode = 1 - - Settings.I64_MODE = 1 + printf("*%d*\\n", n); + return 0; + } + ''' + self.do_run(src, '*184688860176,344,43,10*\n*184688860176,344,43,10*\n*245127260211081,579378795077769,808077213656969,16428841631881,791648372025088*\n*13.00,6.00,3.00,*3*') src = r''' #include <time.h> @@ -2254,9 +2243,6 @@ def process(filename): self.do_run(src, '*96,97,98,101,101*') def test_indirectbr(self): - if Settings.USE_TYPED_ARRAYS == 2: - Settings.I64_MODE = 1 # Unsafe optimizations use 64-bit load/store on two i32s - src = ''' #include <stdio.h> int main(void) { @@ -3438,15 +3424,12 @@ at function.:blag def test_parseInt(self): if Settings.USE_TYPED_ARRAYS != 2: return self.skip('i64 mode 1 requires ta2') if Settings.QUANTUM_SIZE == 1: return self.skip('Q1 and I64_1 do not mix well yet') - Settings.I64_MODE = 1 # Necessary to prevent i64s being truncated into i32s, but we do still get doubling - # FIXME: The output here is wrong, due to double rounding of i64s! src = open(path_from_root('tests', 'parseInt', 'src.c'), 'r').read() expected = open(path_from_root('tests', 'parseInt', 'output.txt'), 'r').read() self.do_run(src, expected) def test_printf(self): if Settings.USE_TYPED_ARRAYS != 2: return self.skip('i64 mode 1 requires ta2') - Settings.I64_MODE = 1 self.banned_js_engines = [NODE_JS, V8_ENGINE] # SpiderMonkey and V8 do different things to float64 typed arrays, un-NaNing, etc. src = open(path_from_root('tests', 'printf', 'test.c'), 'r').read() expected = [open(path_from_root('tests', 'printf', 'output.txt'), 'r').read(), @@ -5610,7 +5593,7 @@ def process(filename): } ''' - if Settings.I64_MODE == 0: # the errors here are very specific to non-i64 mode 1 + if Settings.USE_TYPED_ARRAYS != 2: # the errors here are very specific to non-i64 mode 1 Settings.CORRECT_ROUNDINGS = 0 self.do_run(src.replace('TYPE', 'long long'), '*-3**2**-6**5*') # JS floor operations, always to the negative. This is an undetected error here! self.do_run(src.replace('TYPE', 'int'), '*-2**2**-5**5*') # We get these right, since they are 32-bit and we can shortcut using the |0 trick @@ -5623,7 +5606,7 @@ def process(filename): self.do_run(src.replace('TYPE', 'unsigned int'), '*2147483645**2**-5**5*') # Correct Settings.CORRECT_SIGNS = 0 - if Settings.I64_MODE == 0: # the errors here are very specific to non-i64 mode 1 + if Settings.USE_TYPED_ARRAYS != 2: # the errors here are very specific to non-i64 mode 1 Settings.CORRECT_ROUNDINGS = 2 Settings.CORRECT_ROUNDINGS_LINES = ["src.cpp:13"] # Fix just the last mistake self.do_run(src.replace('TYPE', 'long long'), '*-3**2**-5**5*') @@ -5631,7 +5614,7 @@ def process(filename): self.do_run(src.replace('TYPE', 'unsigned int'), '*-3**2**-5**5*') # No such luck here # And reverse the check with = 2 - if Settings.I64_MODE == 0: # the errors here are very specific to non-i64 mode 1 + if Settings.USE_TYPED_ARRAYS != 2: # the errors here are very specific to non-i64 mode 1 Settings.CORRECT_ROUNDINGS = 3 Settings.CORRECT_ROUNDINGS_LINES = ["src.cpp:999"] self.do_run(src.replace('TYPE', 'long long'), '*-2**2**-5**5*') @@ -5760,11 +5743,6 @@ class %s(T): Settings.CATCH_EXIT_CODE = 0 Settings.EMULATE_UNALIGNED_ACCESSES = int(Settings.USE_TYPED_ARRAYS == 2 and Building.LLVM_OPTS == 2) Settings.DOUBLE_MODE = 1 if Settings.USE_TYPED_ARRAYS and Building.LLVM_OPTS == 0 else 0 - if Settings.USE_TYPED_ARRAYS == 2: - Settings.I64_MODE = 1 - Settings.SAFE_HEAP = 1 # only checks for alignment problems, which is very important with unsafe opts - else: - Settings.I64_MODE = 0 Building.pick_llvm_opts(3) @@ -5798,9 +5776,6 @@ TT = %s del T # T is just a shape for the specific subclasses, we don't test it itself class other(RunnerCore): - def test_reminder(self): - assert 0, 'find appearances of i64 in src/, most are now unneeded' - def test_emcc(self): emcc_debug = os.environ.get('EMCC_DEBUG') @@ -5973,12 +5948,12 @@ Options that are modified or new in %s include: for params, test, text in [ (['-s', 'INLINING_LIMIT=0'], lambda generated: 'function _dump' in generated, 'no inlining without opts'), (['-O1', '-s', 'INLINING_LIMIT=0'], lambda generated: 'function _dump' not in generated, 'inlining'), - (['-s', 'USE_TYPED_ARRAYS=0', '-s', 'I64_MODE=0'], lambda generated: 'new Int32Array' not in generated, 'disable typed arrays'), - (['-s', 'USE_TYPED_ARRAYS=1', '-s', 'I64_MODE=0'], lambda generated: 'IHEAPU = ' in generated, 'typed arrays 1 selected'), + (['-s', 'USE_TYPED_ARRAYS=0'], lambda generated: 'new Int32Array' not in generated, 'disable typed arrays'), + (['-s', 'USE_TYPED_ARRAYS=1'], lambda generated: 'IHEAPU = ' in generated, 'typed arrays 1 selected'), ([], lambda generated: 'Module["_dump"]' not in generated, 'dump is not exported by default'), (['-s', 'EXPORTED_FUNCTIONS=["_main", "_dump"]'], lambda generated: 'Module["_dump"]' in generated, 'dump is now exported'), - (['--typed-arrays', '0', '-s', 'I64_MODE=0'], lambda generated: 'new Int32Array' not in generated, 'disable typed arrays'), - (['--typed-arrays', '1', '-s', 'I64_MODE=0'], lambda generated: 'IHEAPU = ' in generated, 'typed arrays 1 selected'), + (['--typed-arrays', '0'], lambda generated: 'new Int32Array' not in generated, 'disable typed arrays'), + (['--typed-arrays', '1'], lambda generated: 'IHEAPU = ' in generated, 'typed arrays 1 selected'), (['--typed-arrays', '2'], lambda generated: 'new Uint16Array' in generated and 'new Uint32Array' in generated, 'typed arrays 2 selected'), (['--llvm-opts', '1'], lambda generated: '_puts(' in generated, 'llvm opts requested'), ]: @@ -6115,7 +6090,7 @@ f.close() clear() output = Popen([EMCC, path_from_root('tests', 'hello_world_gles.c'), '-o', 'something.html', '-DHAVE_BUILTIN_SINCOS', - '-s', 'USE_TYPED_ARRAYS=0', '-s', 'I64_MODE=0', + '-s', 'USE_TYPED_ARRAYS=0', '--shell-file', path_from_root('tests', 'hello_world_gles_shell.html')], stdout=PIPE, stderr=PIPE).communicate() assert len(output[0]) == 0, output[0] |