Sign in
webkit
/
WebKit
/
4a12667b4cecb17e84375f8db50c9b2d39b06fe4
/
.
/
JSTests
/
microbenchmarks
/
instanceof-always-hit-two.js
blob: 017b8ef8dbc451623e25d21ec5c5598e1dc09ff3 [
file
] [
log
] [
blame
]
(
function
()
{
class
Foo
{
}
var
foo
=
new
Foo
();
class
Bar
extends
Foo
{
}
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
))
throw
"Error: bad result"
;
}
})();