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