Sign in
webkit
/
WebKit
/
36f2b40ab7a77a55ad95fd9774a954dcad7e6be8
/
.
/
JSTests
/
microbenchmarks
/
int-or-other-add.js
blob: 1cb48a955064f2b598e3d2dfbdcf9743ecb0889b [
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
!=
1000000000000
)
throw
"Bad result: "
+
result
;