repo.or.cz
/
chromium-blink-merge.git
/
blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
log
|
graphiclog1
|
graphiclog2
|
commit
|
commitdiff
|
tree
|
refs
|
edit
|
fork
history
|
raw
|
HEAD
Merge Chromium + Blink git repositories
[chromium-blink-merge.git]
/
third_party
/
WebKit
/
LayoutTests
/
fast
/
js
/
regress
/
script-tests
/
polymorphic-structure.js
blob
a5bac8071875eea74e8ea9ddccb6f17789f4e2d4
1
function foo(o) {
2
return o.f;
3
}
4
5
var o = {f:42};
6
var result = 0;
7
for (var i = 0; i < 500; ++i) {
8
for (var j = 0; j < 10000; ++j)
9
result += foo(o);
10
if (o.g)
11
o = {f:42};
12
else
13
o.g = 43;
14
}
15
16
if (result != 210000000)
17
throw "Bad result: " + result;