Sign in
webkit
/
WebKit
/
293423b2e3bc99a3b6b08c9e39c59d8eb89f00e1
/
.
/
JSTests
/
microbenchmarks
/
branch-on-string-as-boolean.js
blob: e015492888b5765b47319c1043183965e663471c [
file
] [
log
] [
blame
]
// This test branches on the boolean value of a string, which should be fast in the DFG.
function
foo
(
string
)
{
var
bar
;
for
(
var
i
=
0
;
i
<
10000000
;
++
i
)
{
if
(
string
)
bar
++;
}
return
bar
;
}
result
=
foo
(
'hurr im a string'
);