Sign in
webkit
/
WebKit
/
4a12667b4cecb17e84375f8db50c9b2d39b06fe4
/
.
/
JSTests
/
microbenchmarks
/
int-or-other-sub.js
blob: b671a25b53f15ea3a11c2765ccefe6c79907d3f8 [
file
] [
log
] [
blame
]
var
p
=
{
f
:
true
};
function
foo
(
a
,
b
)
{
var
c
;
if
(
p
.
f
)
c
=
b
;
return
a
-
c
;
}
var
result
=
0
;
for
(
var
i
=
0
;
i
<
1000000
;
++
i
)
result
+=
foo
(
i
,
i
+
1
);
if
(
result
!=
-
1000000
)
throw
"Bad result: "
+
result
;