Fixed the debug dump for unicode ops.

Fixed bug in ucclass op following anchor1 op - needed to update next pc
value to account for length of ucclass data.


git-svn-id: svn://10.0.0.236/branches/SpiderMonkeyDev_BRANCH@14599 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
rogerl%netscape.com
1998-11-13 18:48:04 +00:00
parent 0d867e309d
commit 6d3eca4275

View File

@@ -15,7 +15,7 @@
* Copyright (C) 1998 Netscape Communications Corporation. All Rights
* Reserved.
*/
#define DEBUG_notme
/*
* JS regular expressions, after Perl.
*/
@@ -353,15 +353,17 @@ DumpRegExp(JSContext *cx, RENode *ren)
len = (jschar *)ren->u.kid2 - cp;
for (i = 0; i < len; i++)
PrintChar(cp[i]);
printf("\n");
break;
case REOP_UCFLAT1:
PrintChar(ren->u.chr);
printf("\n");
break;
case REOP_UCCLASS:
cp = ren->kid;
len = (jschar *)ren->u.kid2 - cp;
len = ren->u.ucclass.kidlen;
printf(" [");
for (i = 0; i < len; i++)
PrintChar(cp[i]);
@@ -2379,6 +2381,8 @@ MatchRegExp(MatchState *state, jsbytecode *pc, const jschar *cp)
bit = 1 << bit; \
matched = pc[3 + byte] & bit; \
} \
if (matched) \
pc2 = pc + size + reopsize[op]; \
matchlen = 1; \
break; \
/* END NONDOT_SINGLE_CASES */