mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-10-11 12:25:53 +00:00
Bug 694752: Test JSOP_REGEXP inline path on recompilation. (test only)
--HG-- extra : rebase_source : 16c8cbb20b028af184114c2dcdf288209f94755d
This commit is contained in:
parent
9d86c5cff9
commit
700d60d62e
15
js/src/jit-test/tests/basic/regexp-test-direct-bug-694752.js
Normal file
15
js/src/jit-test/tests/basic/regexp-test-direct-bug-694752.js
Normal file
@ -0,0 +1,15 @@
|
||||
function whoo() {
|
||||
// Cause mjit to use the script's RegExpObject directly when it compiles this function.
|
||||
assertEq(/foo.*baz/.test('foobarbaz'), true);
|
||||
}
|
||||
|
||||
var orig_test = RegExp.prototype.test
|
||||
for (var i = 0; i < 50; ++i)
|
||||
whoo();
|
||||
eval('RegExp.prototype.test = function(str) { return orig_test.call(this, str) }')
|
||||
for (var i = 0; i < 50; ++i)
|
||||
whoo();
|
||||
RegExp.prototype.test = orig_test;
|
||||
gc();
|
||||
whoo();
|
||||
|
Loading…
Reference in New Issue
Block a user