Disable regexp cloning optimization for global/sticky regexps, bug 728021. r=dmandelin

This commit is contained in:
Brian Hackett 2012-03-13 08:37:52 -07:00
parent 941133eed4
commit cc4b062387

View File

@ -6931,7 +6931,7 @@ mjit::Compiler::jsop_regexp()
*/ */
analyze::SSAUseChain *uses = analyze::SSAUseChain *uses =
analysis->useChain(analyze::SSAValue::PushedValue(PC - script->code, 0)); analysis->useChain(analyze::SSAValue::PushedValue(PC - script->code, 0));
if (uses && uses->popped && !uses->next) { if (uses && uses->popped && !uses->next && !reobj->global() && !reobj->sticky()) {
jsbytecode *use = script->code + uses->offset; jsbytecode *use = script->code + uses->offset;
uint32_t which = uses->u.which; uint32_t which = uses->u.which;
if (JSOp(*use) == JSOP_CALLPROP) { if (JSOp(*use) == JSOP_CALLPROP) {