Sign in
webkit
/
WebKit
/
2538ba1dc66c1a9ab694bc167c5d56293dae7e8e
/
.
/
JSTests
/
microbenchmarks
/
in-by-val-inside-for-in-loop.js
blob: 273ac2db5ef00c19b21205eeef2be9487ea746c3 [
file
] [
log
] [
blame
]
function
assert
(
b
)
{
if
(!
b
)
throw
new
Error
;
}
function
count
(
o
)
{
let c
=
0
;
for
(
let p in o
)
{
if
(
p in o
)
++
c
;
}
return
c
;
}
noInline
(
count
);
let o
=
{
a
:
20
,
b
:
30
,
c
:
40
,
d
:
50
};
for
(
let i
=
0
;
i
<
300000
;
++
i
)
{
assert
(
count
(
o
)
===
4
);
}