Sign in
webkit
/
WebKit
/
ed630b29b813d21f8c4da5c865326dddf8e25d5d
/
.
/
JSTests
/
microbenchmarks
/
for-in-object-with-own-named.js
blob: 45f4e0f46002ea880424a884e22c40ac238afe5a [
file
] [
log
] [
blame
]
function
sum
(
o
)
{
let sum
=
0
;
for
(
let p in o
)
sum
+=
o
[
p
];
return
sum
;
}
function
opaqueSet
(
o
)
{
o
.
z
=
3
;
}
let object
=
{
x
:
1
,
y
:
2
};
opaqueSet
(
object
);
for
(
let i
=
0
;
i
<
1e5
;
++
i
)
{
if
(
sum
(
object
)
!==
6
)
throw
new
Error
(
"bad sum"
);
}