Skip a GC test known to be flaky: https://issues.guix.gnu.org/issue/37425 https://github.com/golang/go/issues/27636 --- go/src/runtime/gc_test.go 2019-09-16 23:10:18.200680387 +0200 +++ go/src/runtime/gc_test.go 2019-09-16 23:11:50.324360646 +0200 @@ -27,6 +27,9 @@ func TestGcSys(t *testing.T) { if runtime.GOOS == "linux" && runtime.GOARCH == "arm64" { t.Skip("skipping test; GOOS=linux GOARCH=arm64 https://github.com/golang/go/issues/27636") } + if runtime.GOOS == "linux" { + t.Skip("skipping test; GOOS=linux https://issues.guix.gnu.org/issue/37425") + } got := runTestProg(t, "testprog", "GCSys") want := "OK\n" if got != want { js
Reverse engineer's tool for tracing the flow of data in JS program, based on UglifyJS
aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat
-rw-r--r--lib/compress.js3
-rw-r--r--test/compress/issue-105.js17
2 files changed, 19 insertions, 1 deletions
diff --git a/lib/compress.js b/lib/compress.js
index 982b2b19..bc0b9ee5 100644
--- a/lib/compress.js
+++ b/lib/compress.js
@@ -1739,7 +1739,8 @@ merge(Compressor.prototype, {
if (self.left instanceof AST_String
&& self.left.value == "undefined"
&& self.right instanceof AST_UnaryPrefix
- && self.right.operator == "typeof") {
+ && self.right.operator == "typeof"
+ && compressor.option("unsafe")) {
if (!(self.right.expression instanceof AST_SymbolRef)
|| !self.right.expression.undeclared()) {
self.left = self.right.expression;
diff --git a/test/compress/issue-105.js b/test/compress/issue-105.js
new file mode 100644
index 00000000..349d732d
--- /dev/null
+++ b/test/compress/issue-105.js
@@ -0,0 +1,17 @@
+typeof_eq_undefined: {
+ options = {
+ comparisons: true,
+ unsafe: false
+ };
+ input: { a = typeof b.c != "undefined" }
+ expect: { a = "undefined" != typeof b.c }
+}
+
+typeof_eq_undefined_unsafe: {
+ options = {
+ comparisons: true,
+ unsafe: true
+ };
+ input: { a = typeof b.c != "undefined" }
+ expect: { a = b.c !== void 0 }
+}