summaryrefslogtreecommitdiffstats
path: root/js/src/jit-test/tests/basic/bug641235.js
diff options
context:
space:
mode:
Diffstat (limited to 'js/src/jit-test/tests/basic/bug641235.js')
-rw-r--r--js/src/jit-test/tests/basic/bug641235.js21
1 files changed, 21 insertions, 0 deletions
diff --git a/js/src/jit-test/tests/basic/bug641235.js b/js/src/jit-test/tests/basic/bug641235.js
new file mode 100644
index 000000000..8534b53c0
--- /dev/null
+++ b/js/src/jit-test/tests/basic/bug641235.js
@@ -0,0 +1,21 @@
+try {
+function g(code) {
+ code = code.replace(/\/\*DUPTRY\d+\*\//, function(k) {
+ var n = parseInt(k.substr(8), 10);
+ return aa("try{}catch(e){}", n);
+ });
+ var f = new Function(code);
+ f()
+}
+function aa(s, n) {
+ if (n == 1) {
+ return s;
+ }
+ var s2 = s + s;
+ var r = n % 2;
+ var d = (n - r) / 2;
+ var m = aa(s2, d);
+ return r ? m + s : m;
+}
+g("switch(x){default:case l:/*DUPTRY5338*/case 0:x}");
+} catch (e) {}