diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-07 19:33:14 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-07 19:33:14 +0000 |
commit | 36d22d82aa202bb199967e9512281e9a53db42c9 (patch) | |
tree | 105e8c98ddea1c1e4784a60a5a6410fa416be2de /js/src/jit-test/tests/parser/lazy-flag-consistency.js | |
parent | Initial commit. (diff) | |
download | firefox-esr-36d22d82aa202bb199967e9512281e9a53db42c9.tar.xz firefox-esr-36d22d82aa202bb199967e9512281e9a53db42c9.zip |
Adding upstream version 115.7.0esr.upstream/115.7.0esr
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'js/src/jit-test/tests/parser/lazy-flag-consistency.js')
-rw-r--r-- | js/src/jit-test/tests/parser/lazy-flag-consistency.js | 65 |
1 files changed, 65 insertions, 0 deletions
diff --git a/js/src/jit-test/tests/parser/lazy-flag-consistency.js b/js/src/jit-test/tests/parser/lazy-flag-consistency.js new file mode 100644 index 0000000000..06096beaa6 --- /dev/null +++ b/js/src/jit-test/tests/parser/lazy-flag-consistency.js @@ -0,0 +1,65 @@ +// These tests highlight potential differences between the lazy and non-lazy +// parse modes. The delazification process should be able to assert that script +// flags are consistent. + +function dead_inner_function_1() { + (function() {}) +} +dead_inner_function_1(); + +function dead_inner_function_2() { + if (false) { + function inner() {} + } +} +dead_inner_function_2(); + +function inner_eval_1() { + eval(""); +} +inner_eval_1(); + +function inner_eval_2() { + (function() { + eval(""); + }) +} +inner_eval_2(); + +function inner_eval_3() { + (() => eval("")); +} +inner_eval_3(); + +function inner_delete_1() { + var x; + (function() { delete x; }) +} +inner_delete_1(); + +function inner_delete_2() { + var x; + (() => delete x); +} +inner_delete_2(); + +function inner_this_1() { + (() => this); +} +inner_this_1(); + +function inner_arguments_1() { + (() => arguments); +} +inner_arguments_1(); + +function constructor_wrapper_1() { + return (function() { + this.initialize.apply(this, arguments); + }); +} +constructor_wrapper_1(); + +var runonce_lazy_1 = function (){}(); + +var runonce_lazy_2 = function* (){}(); |