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
/
let-for-in.js
blob
e464500f996112408f14388ddb22da793f8c35f9
1
function foo(o) {
2
var count = 0;
3
for (let p in o) {
4
if (o[p])
5
count++;
6
}
7
return count;
8
}
9
noInline(foo);
10
11
function Bar() {
12
this.line = 1;
13
this.column = 2;
14
this.stack = "str";
15
}
16
17
var total = 0;
18
for (let j = 0; j < 100000; ++j)
19
total += foo(new Bar);
20
if (total != 300000)
21
throw new Error("Bad result: " + total);