Sign in
webkit
/
WebKit
/
4ae349a8f8cbe5c18f6b8f2f24277ba5b8cf7e08
/
.
/
JSTests
/
microbenchmarks
/
instanceof-sometimes-hit.js
blob: 882fb1350ce46c674d0a8d47d5cebcb55ef796f5 [
file
] [
log
] [
blame
]
(
function
()
{
class
Foo
{
}
var
foo
=
new
Foo
();
class
Bar
{
}
var
bar
=
new
Bar
();
for
(
var
i
=
0
;
i
<
5000000
;
++
i
)
{
var
o
;
if
(
i
&
1
)
o
=
foo
;
else
o
=
bar
;
if
((
o instanceof
Foo
)
!=
!!(
i
&
1
))
throw
"Error: bad result at i = "
+
i
;
}
})();