repo.or.cz
/
mozilla-central.git
/
blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
log
|
graphiclog1
|
graphiclog2
|
commit
|
commitdiff
|
tree
|
refs
|
edit
|
fork
history
|
raw
|
HEAD
Disable recursion for heavyweight functions (bug 583757, r=jorendorff).
[mozilla-central.git]
/
js
/
src
/
trace-test
/
tests
/
basic
/
bug583757.js
blob
3a7f910bab83eadb076f4c428559c9c38e8a7426
1
var arr = [];
2
3
function f() {}
4
5
function g(n, h) {
6
var a = f;
7
if (n <= 0)
8
return f;
9
10
var t = g(n - 1, h);
11
var r = function(x) {
12
if (x)
13
return a;
14
return a(h(function() { return t(); }));
15
};
16
arr.push(r);
17
return r;
18
}
19
20
g(80, f);
21
g(80, f);
22
g(80, f);
23
for (var i = 0; i < arr.length; i++)
24
assertEq(arr[i](1), f);