repo.or.cz
/
qtwebkit.git
/
blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
log
|
graphiclog1
|
graphiclog2
|
commit
|
commitdiff
|
tree
|
refs
|
edit
|
fork
history
|
raw
|
HEAD
Update ReadMe.md
[qtwebkit.git]
/
JSTests
/
microbenchmarks
/
arguments-out-of-bounds.js
blob
2f088f4508b07fe6ff3016f6b93dd39870bd6427
1
function foo() { return arguments; }
2
noInline(foo);
3
4
function bar(o) {
5
var tmp = o[0];
6
var result = 0;
7
for (var i = 0; i < 1000; ++i) {
8
if (tmp)
9
result += tmp * i;
10
}
11
return result;
12
}
13
noInline(bar);
14
15
var result = 0;
16
var o = foo();
17
for (var i = 0; i < 10000; ++i)
18
result += bar(o);
19
20
if (result !== 0)
21
throw "Error: bad result: " + result;