diff --git a/src/jsifier.js b/src/jsifier.js index 1762d44ddd3e8..c58086868c58e 100644 --- a/src/jsifier.js +++ b/src/jsifier.js @@ -528,13 +528,6 @@ function JSify(data, functionsOnly) { var shellParts = read(shellFile).split('{{BODY}}'); print(processMacros(preprocess(shellParts[1], shellFile))); - // Print out some useful metadata - if (RUNNING_JS_OPTS) { - var generatedFunctions = JSON.stringify(keys(Functions.implementedFunctions)); - if (RUNNING_JS_OPTS) { - print('// EMSCRIPTEN_GENERATED_FUNCTIONS: ' + generatedFunctions + '\n'); - } - } PassManager.serialize(); } diff --git a/src/parseTools.js b/src/parseTools.js index 66263c9ce7fd8..376858739a8cd 100644 --- a/src/parseTools.js +++ b/src/parseTools.js @@ -628,7 +628,7 @@ function parseNumerical(value, type) { if (value[0] === '-' && ret === 0) { return '-.0'; } // fix negative 0, toString makes it 0 } if (type === 'double' || type === 'float') { - if (!RUNNING_JS_OPTS) ret = asmEnsureFloat(ret, type); + ret = asmEnsureFloat(ret, type); } return ret.toString(); } else { @@ -747,8 +747,7 @@ function ensureDot(value) { value = value.toString(); // if already dotted, or Infinity or NaN, nothing to do here // if smaller than 1 and running js opts, we always need to force a coercion (0.001 will turn into 1e-3, which has no .) - if ((value.indexOf('.') >= 0 || /[IN]/.test(value)) && (!RUNNING_JS_OPTS || Math.abs(value) >= 1)) return value; - if (RUNNING_JS_OPTS) return '(+' + value + ')'; // JS optimizer will run, we must do +x, and it will be corrected later + if ((value.indexOf('.') >= 0 || /[IN]/.test(value))) return value; var e = value.indexOf('e'); if (e < 0) return value + '.0'; return value.substr(0, e) + '.0' + value.substr(e); @@ -772,7 +771,7 @@ function asmEnsureFloat(value, type) { // ensures that a float type has either 5 function asmInitializer(type) { if (type in Compiletime.FLOAT_TYPES) { if (type === 'float') return 'Math_fround(0)'; - return RUNNING_JS_OPTS ? '+0' : '.0'; + return '.0'; } else { return '0'; } diff --git a/src/settings.js b/src/settings.js index 2c639861b0e4a..b7c5b23f09042 100644 --- a/src/settings.js +++ b/src/settings.js @@ -1045,9 +1045,6 @@ var EXPORT_NAME = 'Module'; // to warnings instead of throwing an exception. var DYNAMIC_EXECUTION = 1; -// whether js opts will be run, after the main compiler -var RUNNING_JS_OPTS = 0; - // whether we are in the generate struct_info bootstrap phase var BOOTSTRAPPING_STRUCT_INFO = 0; @@ -1161,7 +1158,6 @@ var EMIT_EMSCRIPTEN_LICENSE = 0; // to automatically demote i64 to i32 and promote f32 to f64. This is necessary // in order to interface with JavaScript, both for asm.js and wasm. For // non-web/non-JS embeddings, setting this to 0 may be desirable. -// LEGALIZE_JS_FFI=0 is incompatible with RUNNING_JS_OPTS. var LEGALIZE_JS_FFI = 1; // Ports @@ -1692,5 +1688,6 @@ var LEGACY_SETTINGS = [ ['DEAD_FUNCTIONS', [[]], 'The wasm backend does not support dead function removal'], ['WASM_BACKEND', [-1], 'Only the wasm backend is now supported (note that setting it as -s has never been allowed anyhow)'], ['EXPORT_BINDINGS', [0, 1], 'No longer needed'], + ['RUNNING_JS_OPTS', [0], 'Fastcomp cared about running JS which could alter asm.js validation, but not upstream'], ['EXPORT_FUNCTION_TABLES', [0], 'No longer needed'], ];