Sign in
webkit
/
WebKit
/
49c45f529348e27f11122daecbee33e4fa730919
/
.
/
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
);
}