Sign in
webkit
/
WebKit
/
ff4cb3c2323f3937e96e08f4f6fbe6c7755f9da5
/
.
/
JSTests
/
microbenchmarks
/
regexp-set-last-index.js
blob: 16685844df9c4dac4328915fc1a75788b0853fab [
file
] [
log
] [
blame
]
(
function
()
{
var
re
=
/foo/
g
;
var
n
=
10000000
;
for
(
var
i
=
0
;
i
<
n
;
++
i
)
re
.
lastIndex
=
5
;
re
.
exec
(
"foo bar foo"
);
if
(
re
.
lastIndex
!=
"foo bar foo"
.
length
)
throw
"Error: bad value of lastIndx: "
+
re
.
lastIndex
;
})();