Fix simple-match optimization for positive and negative lookahead assertions (254296, r=shaver).
git-svn-id: svn://10.0.0.236/trunk@160646 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
@@ -2504,7 +2504,8 @@ ExecuteREBytecode(REGlobalData *gData, REMatchState *x)
|
||||
pc += ARG_LEN; /* start of ASSERT child */
|
||||
op = (REOp) *pc++;
|
||||
if (REOP_IS_SIMPLE(op) &&
|
||||
!SimpleMatch(gData, x, op, &pc, JS_FALSE)) {
|
||||
(!SimpleMatch(gData, x, op, &pc, JS_FALSE) ||
|
||||
pc != nextpc)) {
|
||||
result = NULL;
|
||||
break;
|
||||
}
|
||||
@@ -2524,7 +2525,8 @@ ExecuteREBytecode(REGlobalData *gData, REMatchState *x)
|
||||
pc += ARG_LEN;
|
||||
op = (REOp) *pc++;
|
||||
if (REOP_IS_SIMPLE(op) /* Note - fail to fail! */ &&
|
||||
SimpleMatch(gData, x, op, &pc, JS_FALSE)) {
|
||||
SimpleMatch(gData, x, op, &pc, JS_FALSE) &&
|
||||
pc == nextpc) {
|
||||
result = NULL;
|
||||
break;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user