diff --git a/js2/src/regexp/regexp.h b/js2/src/regexp/regexp.h index 630524ad400..270507c8828 100644 --- a/js2/src/regexp/regexp.h +++ b/js2/src/regexp/regexp.h @@ -45,24 +45,12 @@ typedef char16 jschar; typedef uint8 jsbytecode; -typedef struct RECharSet { - bool converted; - bool sense; - uint16 length; - union { - uint8 *bits; - struct { - uint16 startIndex; - uint16 length; - } src; - } u; -} RECharSet; - #define JSREG_FOLD 0x01 /* fold uppercase to lowercase */ #define JSREG_GLOB 0x02 /* global exec, creates array of matches */ #define JSREG_MULTILINE 0x04 /* treat ^ and $ as begin and end of line */ +typedef struct RECharSet RECharSet; struct JS2RegExp { uint32 parenCount:24, /* number of parenthesized submatches */ diff --git a/js2/src/regexpwrapper.cpp b/js2/src/regexpwrapper.cpp index 9e752baec61..a6dbd8b1f49 100644 --- a/js2/src/regexpwrapper.cpp +++ b/js2/src/regexpwrapper.cpp @@ -56,6 +56,18 @@ #include "bytecodecontainer.h" #include "js2metadata.h" +typedef struct RECharSet { + bool converted; + bool sense; + uint16 length; + union { + uint8 *bits; + struct { + uint16 startIndex; + uint16 length; + } src; + } u; +} RECharSet; namespace JavaScript { namespace MetaData { @@ -121,6 +133,7 @@ typedef char16 JSString; typedef char16 JSSubString; + typedef struct REMatchState { const jschar *cp; RECapture parens[1]; /* first of 're->parenCount' captures,