aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--tools/js-optimizer.js2
-rw-r--r--tools/test-js-optimizer-asm-pre-output.js1
-rw-r--r--tools/test-js-optimizer-asm-pre.js1
3 files changed, 3 insertions, 1 deletions
diff --git a/tools/js-optimizer.js b/tools/js-optimizer.js
index f69278b0..e7a745e1 100644
--- a/tools/js-optimizer.js
+++ b/tools/js-optimizer.js
@@ -405,7 +405,7 @@ function removeUnneededLabelSettings(ast) {
// Various expression simplifications. Pre run before closure (where we still have metadata), Post run after.
var USEFUL_BINARY_OPS = set('<<', '>>', '|', '&', '^');
-var COMPARE_OPS = set('<', '<=', '>', '>=', '==', '===', '!=');
+var COMPARE_OPS = set('<', '<=', '>', '>=', '==', '===', '!=', '!==');
function simplifyExpressionsPre(ast) {
// Simplify common expressions used to perform integer conversion operations
diff --git a/tools/test-js-optimizer-asm-pre-output.js b/tools/test-js-optimizer-asm-pre-output.js
index d66c28a4..b7afab26 100644
--- a/tools/test-js-optimizer-asm-pre-output.js
+++ b/tools/test-js-optimizer-asm-pre-output.js
@@ -130,6 +130,7 @@ function compare_result_simplification() {
HEAP32[$4] = HEAP32[$5] == HEAP32[$6];
HEAP32[$4] = HEAP32[$5] === HEAP32[$6];
HEAP32[$4] = HEAP32[$5] != HEAP32[$6];
+ HEAP32[$4] = HEAP32[$5] !== HEAP32[$6];
var x = HEAP32[$5] != HEAP32[$6] | 0;
}
function tempDoublePtr($45, $14, $28, $42) {
diff --git a/tools/test-js-optimizer-asm-pre.js b/tools/test-js-optimizer-asm-pre.js
index 5c09043e..b762a60e 100644
--- a/tools/test-js-optimizer-asm-pre.js
+++ b/tools/test-js-optimizer-asm-pre.js
@@ -137,6 +137,7 @@ function compare_result_simplification() {
HEAP32[$4] = (HEAP32[$5] == HEAP32[$6]) & 1;
HEAP32[$4] = (HEAP32[$5] === HEAP32[$6]) & 1;
HEAP32[$4] = (HEAP32[$5] != HEAP32[$6]) & 1;
+ HEAP32[$4] = (HEAP32[$5] !== HEAP32[$6]) & 1;
// Convert the &1 to |0 here, since we don't get an implicit coersion.
var x = (HEAP32[$5] != HEAP32[$6]) & 1;
}