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
/
int-or-other-add-then-get-by-val.js
blob
6a9b35fb4f65717fa0d1f6813c0487d3ff04ab4a
1
var p = {f:true};
2
3
function foo(a, b, d) {
4
var c;
5
if (p.f)
6
c = b;
7
return d[a + c];
8
}
9
10
var result = 0;
11
var array = [42, 43, 44];
12
for (var i = 0; i < 1000000; ++i)
13
result += foo(1 - i, i + 1, array);
14
15
if (result != 44000000)
16
throw "Bad result: " + result;
17