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