]> git.saurik.com Git - apple/javascriptcore.git/blame - tests/stress/fold-to-primitive-in-cfa.js
JavaScriptCore-7601.1.46.3.tar.gz
[apple/javascriptcore.git] / tests / stress / fold-to-primitive-in-cfa.js
CommitLineData
81345200
A
1function foo(x) {
2 if (DFGTrue())
3 x = "hello";
4 return x + " world";
5}
6
7noInline(foo);
8
9for (var i = 0; i < 100000; ++i) {
10 var result = foo({toString:function() { return "foo" }});
11 if (result != "foo world" && result != "hello world")
12 throw "Error: bad result: " + result;
13}
14