Sign in
webkit
/
WebKit
/
d9f4aeb0c9628407e7f02d9ddeb9bc793e57d330
/
.
/
JSTests
/
microbenchmarks
/
int-or-other-mul-then-get-by-val.js
blob: 87ab8f7f346cf0c61a6de24ede27fce32d1d6f6d [
file
] [
log
] [
blame
]
var
p
=
{
f
:
true
};
function
foo
(
a
,
b
,
d
)
{
var
c
;
if
(
p
.
f
)
c
=
b
;
return
d
[
a
*
c
];
}
var
result
=
0
;
var
array
=
[
42
,
43
,
44
];
for
(
var
i
=
0
;
i
<
400000
;
++
i
)
result
+=
foo
(
i
%
2
,
i
%
3
,
array
);
if
(
result
!=
16999999
)
throw
"Bad result: "
+
result
;