Sign in
webkit
/
WebKit
/
fd97eb341789d64d21b450ae8c97e12e74f9a2f2
/
.
/
JSTests
/
microbenchmarks
/
getter.js
blob: f2f1873d953e464ada6b4cbb2eb744094a322bf0 [
file
] [
log
] [
blame
]
(
function
()
{
var
o
=
{
_f
:
42
};
o
.
__defineGetter__
(
"f"
,
function
()
{
return
this
.
_f
;
});
var
result
=
0
;
var
n
=
2000000
;
for
(
var
i
=
0
;
i
<
n
;
++
i
)
result
+=
o
.
f
;
if
(
result
!=
n
*
42
)
throw
"Error: bad result: "
+
result
;
})();