From bf026bb21723c293507251aeee024a85fc66b5c4 Mon Sep 17 00:00:00 2001 From: Alon Zakai Date: Fri, 13 Dec 2024 15:58:01 -0800 Subject: [PATCH 1/5] name --- .../{emitDCEGraph2-output.js => emitDCEGraph-dynCall-output.js} | 0 test/js_optimizer/{emitDCEGraph2.js => emitDCEGraph-dynCall.js} | 0 test/test_other.py | 2 +- 3 files changed, 1 insertion(+), 1 deletion(-) rename test/js_optimizer/{emitDCEGraph2-output.js => emitDCEGraph-dynCall-output.js} (100%) rename test/js_optimizer/{emitDCEGraph2.js => emitDCEGraph-dynCall.js} (100%) diff --git a/test/js_optimizer/emitDCEGraph2-output.js b/test/js_optimizer/emitDCEGraph-dynCall-output.js similarity index 100% rename from test/js_optimizer/emitDCEGraph2-output.js rename to test/js_optimizer/emitDCEGraph-dynCall-output.js diff --git a/test/js_optimizer/emitDCEGraph2.js b/test/js_optimizer/emitDCEGraph-dynCall.js similarity index 100% rename from test/js_optimizer/emitDCEGraph2.js rename to test/js_optimizer/emitDCEGraph-dynCall.js diff --git a/test/test_other.py b/test/test_other.py index 0b827f6aad0b5..946527dd6f086 100644 --- a/test/test_other.py +++ b/test/test_other.py @@ -2892,7 +2892,7 @@ def test_extern_prepost(self): 'AJSDCE': (['AJSDCE'],), 'emitDCEGraph': (['emitDCEGraph', '--no-print'],), 'emitDCEGraph-closure': (['emitDCEGraph', '--no-print', '--closure-friendly'], 'emitDCEGraph.js'), - 'emitDCEGraph2': (['emitDCEGraph', '--no-print'],), + 'emitDCEGraph-dynCall': (['emitDCEGraph', '--no-print'],), 'emitDCEGraph3': (['emitDCEGraph', '--no-print'],), 'emitDCEGraph4': (['emitDCEGraph', '--no-print'],), 'emitDCEGraph5': (['emitDCEGraph', '--no-print'],), From 158144b2ee83030026828f229e07e706902c7563 Mon Sep 17 00:00:00 2001 From: Alon Zakai Date: Fri, 13 Dec 2024 15:58:54 -0800 Subject: [PATCH 2/5] name --- .../{emitDCEGraph3-output.js => emitDCEGraph-eval-output.js} | 0 test/js_optimizer/{emitDCEGraph3.js => emitDCEGraph-eval.js} | 0 test/test_other.py | 2 +- 3 files changed, 1 insertion(+), 1 deletion(-) rename test/js_optimizer/{emitDCEGraph3-output.js => emitDCEGraph-eval-output.js} (100%) rename test/js_optimizer/{emitDCEGraph3.js => emitDCEGraph-eval.js} (100%) diff --git a/test/js_optimizer/emitDCEGraph3-output.js b/test/js_optimizer/emitDCEGraph-eval-output.js similarity index 100% rename from test/js_optimizer/emitDCEGraph3-output.js rename to test/js_optimizer/emitDCEGraph-eval-output.js diff --git a/test/js_optimizer/emitDCEGraph3.js b/test/js_optimizer/emitDCEGraph-eval.js similarity index 100% rename from test/js_optimizer/emitDCEGraph3.js rename to test/js_optimizer/emitDCEGraph-eval.js diff --git a/test/test_other.py b/test/test_other.py index 946527dd6f086..27482725ab3c0 100644 --- a/test/test_other.py +++ b/test/test_other.py @@ -2893,7 +2893,7 @@ def test_extern_prepost(self): 'emitDCEGraph': (['emitDCEGraph', '--no-print'],), 'emitDCEGraph-closure': (['emitDCEGraph', '--no-print', '--closure-friendly'], 'emitDCEGraph.js'), 'emitDCEGraph-dynCall': (['emitDCEGraph', '--no-print'],), - 'emitDCEGraph3': (['emitDCEGraph', '--no-print'],), + 'emitDCEGraph-eval': (['emitDCEGraph', '--no-print'],), 'emitDCEGraph4': (['emitDCEGraph', '--no-print'],), 'emitDCEGraph5': (['emitDCEGraph', '--no-print'],), 'emitDCEGraph-scopes': (['emitDCEGraph', '--no-print'],), From d0d3c375cfce41cd534dccf09325e9609f2454c4 Mon Sep 17 00:00:00 2001 From: Alon Zakai Date: Fri, 13 Dec 2024 15:59:32 -0800 Subject: [PATCH 3/5] name --- .../{emitDCEGraph4-output.js => emitDCEGraph-sig-output.js} | 0 test/js_optimizer/{emitDCEGraph4.js => emitDCEGraph-sig.js} | 0 test/test_other.py | 2 +- 3 files changed, 1 insertion(+), 1 deletion(-) rename test/js_optimizer/{emitDCEGraph4-output.js => emitDCEGraph-sig-output.js} (100%) rename test/js_optimizer/{emitDCEGraph4.js => emitDCEGraph-sig.js} (100%) diff --git a/test/js_optimizer/emitDCEGraph4-output.js b/test/js_optimizer/emitDCEGraph-sig-output.js similarity index 100% rename from test/js_optimizer/emitDCEGraph4-output.js rename to test/js_optimizer/emitDCEGraph-sig-output.js diff --git a/test/js_optimizer/emitDCEGraph4.js b/test/js_optimizer/emitDCEGraph-sig.js similarity index 100% rename from test/js_optimizer/emitDCEGraph4.js rename to test/js_optimizer/emitDCEGraph-sig.js diff --git a/test/test_other.py b/test/test_other.py index 27482725ab3c0..8b48975d8e11c 100644 --- a/test/test_other.py +++ b/test/test_other.py @@ -2894,7 +2894,7 @@ def test_extern_prepost(self): 'emitDCEGraph-closure': (['emitDCEGraph', '--no-print', '--closure-friendly'], 'emitDCEGraph.js'), 'emitDCEGraph-dynCall': (['emitDCEGraph', '--no-print'],), 'emitDCEGraph-eval': (['emitDCEGraph', '--no-print'],), - 'emitDCEGraph4': (['emitDCEGraph', '--no-print'],), + 'emitDCEGraph-sig': (['emitDCEGraph', '--no-print'],), 'emitDCEGraph5': (['emitDCEGraph', '--no-print'],), 'emitDCEGraph-scopes': (['emitDCEGraph', '--no-print'],), 'minimal-runtime-applyDCEGraphRemovals': (['applyDCEGraphRemovals'],), From e9494db9ed4896c06f1a9b1d5656e4ea00bf5f92 Mon Sep 17 00:00:00 2001 From: Alon Zakai Date: Fri, 13 Dec 2024 16:00:16 -0800 Subject: [PATCH 4/5] name --- .../{emitDCEGraph5.js => emitDCEGraph-prefixing-output.js} | 0 test/test_other.py | 2 +- 2 files changed, 1 insertion(+), 1 deletion(-) rename test/js_optimizer/{emitDCEGraph5.js => emitDCEGraph-prefixing-output.js} (100%) diff --git a/test/js_optimizer/emitDCEGraph5.js b/test/js_optimizer/emitDCEGraph-prefixing-output.js similarity index 100% rename from test/js_optimizer/emitDCEGraph5.js rename to test/js_optimizer/emitDCEGraph-prefixing-output.js diff --git a/test/test_other.py b/test/test_other.py index 8b48975d8e11c..667e78346256d 100644 --- a/test/test_other.py +++ b/test/test_other.py @@ -2895,7 +2895,7 @@ def test_extern_prepost(self): 'emitDCEGraph-dynCall': (['emitDCEGraph', '--no-print'],), 'emitDCEGraph-eval': (['emitDCEGraph', '--no-print'],), 'emitDCEGraph-sig': (['emitDCEGraph', '--no-print'],), - 'emitDCEGraph5': (['emitDCEGraph', '--no-print'],), + 'emitDCEGraph-prefixing': (['emitDCEGraph', '--no-print'],), 'emitDCEGraph-scopes': (['emitDCEGraph', '--no-print'],), 'minimal-runtime-applyDCEGraphRemovals': (['applyDCEGraphRemovals'],), 'applyDCEGraphRemovals': (['applyDCEGraphRemovals'],), From ea8a22cc56316fb72a643ee5ac1eeca9a530b156 Mon Sep 17 00:00:00 2001 From: Alon Zakai Date: Fri, 13 Dec 2024 16:02:17 -0800 Subject: [PATCH 5/5] oops --- .../emitDCEGraph-prefixing-output.js | 40 ++++++++++++------- test/js_optimizer/emitDCEGraph-prefixing.js | 15 +++++++ test/js_optimizer/emitDCEGraph5-output.js | 25 ------------ 3 files changed, 40 insertions(+), 40 deletions(-) create mode 100644 test/js_optimizer/emitDCEGraph-prefixing.js delete mode 100644 test/js_optimizer/emitDCEGraph5-output.js diff --git a/test/js_optimizer/emitDCEGraph-prefixing-output.js b/test/js_optimizer/emitDCEGraph-prefixing-output.js index 5a8f284fd8110..fed7341393e67 100644 --- a/test/js_optimizer/emitDCEGraph-prefixing-output.js +++ b/test/js_optimizer/emitDCEGraph-prefixing-output.js @@ -1,15 +1,25 @@ -// wasm backend notation has one fewer _ in the wasm -__GLOBAL__I_000101(); // var use -var __GLOBAL__I_000101 = Module["__GLOBAL__I_000101"] = () => wasmExports["_GLOBAL__I_000101"](); - -__ATINIT__.push({ func: function() { __GLOBAL__I_iostream() } }); // var use inside other scope -var __GLOBAL__I_iostream = Module["__GLOBAL__I_iostream"] = () => wasmExports["_GLOBAL__I_iostream.cpp"](); - -Module["__DUB"](); // module use -var __DUB = Module["__DUB"] = () => wasmExports["_DUB"](); - -var __UNUSED = Module["__UNUSED"] = () => wasmExports["_UNUSED"](); - -var wasmImports = { -}; - +[ + { + "name": "emcc$export$__DUB", + "export": "_DUB", + "reaches": [], + "root": true + }, + { + "name": "emcc$export$__GLOBAL__I_000101", + "export": "_GLOBAL__I_000101", + "reaches": [], + "root": true + }, + { + "name": "emcc$export$__GLOBAL__I_iostream", + "export": "_GLOBAL__I_iostream.cpp", + "reaches": [], + "root": true + }, + { + "name": "emcc$export$__UNUSED", + "export": "_UNUSED", + "reaches": [] + } +] diff --git a/test/js_optimizer/emitDCEGraph-prefixing.js b/test/js_optimizer/emitDCEGraph-prefixing.js new file mode 100644 index 0000000000000..5a8f284fd8110 --- /dev/null +++ b/test/js_optimizer/emitDCEGraph-prefixing.js @@ -0,0 +1,15 @@ +// wasm backend notation has one fewer _ in the wasm +__GLOBAL__I_000101(); // var use +var __GLOBAL__I_000101 = Module["__GLOBAL__I_000101"] = () => wasmExports["_GLOBAL__I_000101"](); + +__ATINIT__.push({ func: function() { __GLOBAL__I_iostream() } }); // var use inside other scope +var __GLOBAL__I_iostream = Module["__GLOBAL__I_iostream"] = () => wasmExports["_GLOBAL__I_iostream.cpp"](); + +Module["__DUB"](); // module use +var __DUB = Module["__DUB"] = () => wasmExports["_DUB"](); + +var __UNUSED = Module["__UNUSED"] = () => wasmExports["_UNUSED"](); + +var wasmImports = { +}; + diff --git a/test/js_optimizer/emitDCEGraph5-output.js b/test/js_optimizer/emitDCEGraph5-output.js deleted file mode 100644 index fed7341393e67..0000000000000 --- a/test/js_optimizer/emitDCEGraph5-output.js +++ /dev/null @@ -1,25 +0,0 @@ -[ - { - "name": "emcc$export$__DUB", - "export": "_DUB", - "reaches": [], - "root": true - }, - { - "name": "emcc$export$__GLOBAL__I_000101", - "export": "_GLOBAL__I_000101", - "reaches": [], - "root": true - }, - { - "name": "emcc$export$__GLOBAL__I_iostream", - "export": "_GLOBAL__I_iostream.cpp", - "reaches": [], - "root": true - }, - { - "name": "emcc$export$__UNUSED", - "export": "_UNUSED", - "reaches": [] - } -]