+++ /dev/null
-/* This is JavaScriptCore's variant of the PCRE library. While this library
-started out as a copy of PCRE, many of the features of PCRE have been
-removed. This library now supports only the regular expression features
-required by the JavaScript language specification, and has only the functions
-needed by JavaScriptCore and the rest of WebKit.
-
- Originally written by Philip Hazel
- Copyright (c) 1997-2006 University of Cambridge
- Copyright (C) 2002, 2004, 2006, 2007 Apple Inc. All rights reserved.
- Copyright (C) 2007 Eric Seidel <eric@webkit.org>
-
------------------------------------------------------------------------------
-Redistribution and use in source and binary forms, with or without
-modification, are permitted provided that the following conditions are met:
-
- * Redistributions of source code must retain the above copyright notice,
- this list of conditions and the following disclaimer.
-
- * Redistributions in binary form must reproduce the above copyright
- notice, this list of conditions and the following disclaimer in the
- documentation and/or other materials provided with the distribution.
-
- * Neither the name of the University of Cambridge nor the names of its
- contributors may be used to endorse or promote products derived from
- this software without specific prior written permission.
-
-THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
-AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
-IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
-ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
-LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
-CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
-SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
-INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
-CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
-ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
-POSSIBILITY OF SUCH DAMAGE.
------------------------------------------------------------------------------
-*/
-
-/* This module contains the external function jsRegExpExecute(), along with
-supporting internal functions that are not used by other modules. */
-
-#include "config.h"
-
-#include "pcre_internal.h"
-
-#include <string.h>
-#include "ASCIICType.h"
-
-/* Negative values for the firstchar and reqchar variables */
-
-#define REQ_UNSET (-2)
-#define REQ_NONE (-1)
-
-/*************************************************
-* Code parameters and static tables *
-*************************************************/
-
-/* Maximum number of items on the nested bracket stacks at compile time. This
-applies to the nesting of all kinds of parentheses. It does not limit
-un-nested, non-capturing parentheses. This number can be made bigger if
-necessary - it is used to dimension one int and one unsigned char vector at
-compile time. */
-
-#define BRASTACK_SIZE 200
-
-namespace v8 { namespace jscre {
-
-/* Table for handling escaped characters in the range '0'-'z'. Positive returns
-are simple data values; negative values are for special things like \d and so
-on. Zero means further processing is needed (for things like \x), or the escape
-is invalid. */
-
-static const short escapes[] = {
- 0, 0, 0, 0, 0, 0, 0, 0, /* 0 - 7 */
- 0, 0, ':', ';', '<', '=', '>', '?', /* 8 - ? */
- '@', 0, -ESC_B, 0, -ESC_D, 0, 0, 0, /* @ - G */
- 0, 0, 0, 0, 0, 0, 0, 0, /* H - O */
- 0, 0, 0, -ESC_S, 0, 0, 0, -ESC_W, /* P - W */
- 0, 0, 0, '[', '\\', ']', '^', '_', /* X - _ */
- '`', 7, -ESC_b, 0, -ESC_d, 0, '\f', 0, /* ` - g */
- 0, 0, 0, 0, 0, 0, '\n', 0, /* h - o */
- 0, 0, '\r', -ESC_s, '\t', 0, '\v', -ESC_w, /* p - w */
- 0, 0, 0 /* x - z */
-};
-
-/* Error code numbers. They are given names so that they can more easily be
-tracked. */
-
-enum ErrorCode {
- ERR0, ERR1, ERR2, ERR3, ERR4, ERR5, ERR6, ERR7, ERR8, ERR9,
- ERR10, ERR11, ERR12, ERR13, ERR14, ERR15, ERR16, ERR17
-};
-
-/* The texts of compile-time error messages. These are "char *" because they
-are passed to the outside world. */
-
-static const char* errorText(ErrorCode code)
-{
- static const char errorTexts[] =
- /* 1 */
- "\\ at end of pattern\0"
- "\\c at end of pattern\0"
- "character value in \\x{...} sequence is too large\0"
- "numbers out of order in {} quantifier\0"
- /* 5 */
- "number too big in {} quantifier\0"
- "missing terminating ] for character class\0"
- "internal error: code overflow\0"
- "range out of order in character class\0"
- "nothing to repeat\0"
- /* 10 */
- "unmatched parentheses\0"
- "internal error: unexpected repeat\0"
- "unrecognized character after (?\0"
- "failed to get memory\0"
- "missing )\0"
- /* 15 */
- "reference to non-existent subpattern\0"
- "regular expression too large\0"
- "parentheses nested too deeply"
- ;
-
- int i = code;
- const char* text = errorTexts;
- while (i > 1)
- i -= !*text++;
- return text;
-}
-
-/* Structure for passing "static" information around between the functions
-doing the compiling. */
-
-struct CompileData {
- CompileData() {
- top_backref = 0;
- backrefMap = 0;
- req_varyopt = 0;
- needOuterBracket = false;
- numCapturingBrackets = 0;
- }
- int top_backref; /* Maximum back reference */
- unsigned backrefMap; /* Bitmap of low back refs */
- int req_varyopt; /* "After variable item" flag for reqbyte */
- bool needOuterBracket;
- int numCapturingBrackets;
-};
-
-/* Definitions to allow mutual recursion */
-
-static bool compileBracket(int, int*, unsigned char**, const UChar**, const UChar*, ErrorCode*, int, int*, int*, CompileData&);
-static bool bracketIsAnchored(const unsigned char* code);
-static bool bracketNeedsLineStart(const unsigned char* code, unsigned captureMap, unsigned backrefMap);
-static int bracketFindFirstAssertedCharacter(const unsigned char* code, bool inassert);
-
-/*************************************************
-* Handle escapes *
-*************************************************/
-
-/* This function is called when a \ has been encountered. It either returns a
-positive value for a simple escape such as \n, or a negative value which
-encodes one of the more complicated things such as \d. When UTF-8 is enabled,
-a positive value greater than 255 may be returned. On entry, ptr is pointing at
-the \. On exit, it is on the final character of the escape sequence.
-
-Arguments:
- ptrptr points to the pattern position pointer
- errorcodeptr points to the errorcode variable
- bracount number of previous extracting brackets
- options the options bits
- isclass true if inside a character class
-
-Returns: zero or positive => a data character
- negative => a special escape sequence
- on error, errorptr is set
-*/
-
-static int checkEscape(const UChar** ptrptr, const UChar* patternEnd, ErrorCode* errorcodeptr, int bracount, bool isclass)
-{
- const UChar* ptr = *ptrptr + 1;
-
- /* If backslash is at the end of the pattern, it's an error. */
- if (ptr == patternEnd) {
- *errorcodeptr = ERR1;
- *ptrptr = ptr;
- return 0;
- }
-
- int c = *ptr;
-
- /* Non-alphamerics are literals. For digits or letters, do an initial lookup in
- a table. A non-zero result is something that can be returned immediately.
- Otherwise further processing may be required. */
-
- if (c < '0' || c > 'z') { /* Not alphameric */
- } else if (int escapeValue = escapes[c - '0']) {
- c = escapeValue;
- if (isclass) {
- if (-c == ESC_b)
- c = '\b'; /* \b is backslash in a class */
- else if (-c == ESC_B)
- c = 'B'; /* and \B is a capital B in a class (in browsers event though ECMAScript 15.10.2.19 says it raises an error) */
- }
- /* Escapes that need further processing, or are illegal. */
-
- } else {
- switch (c) {
- case '1':
- case '2':
- case '3':
- case '4':
- case '5':
- case '6':
- case '7':
- case '8':
- case '9':
- /* Escape sequences starting with a non-zero digit are backreferences,
- unless there are insufficient brackets, in which case they are octal
- escape sequences. Those sequences end on the first non-octal character
- or when we overflow 0-255, whichever comes first. */
-
- if (!isclass) {
- const UChar* oldptr = ptr;
- c -= '0';
- while ((ptr + 1 < patternEnd) && isASCIIDigit(ptr[1]) && c <= bracount)
- c = c * 10 + *(++ptr) - '0';
- if (c <= bracount) {
- c = -(ESC_REF + c);
- break;
- }
- ptr = oldptr; /* Put the pointer back and fall through */
- }
-
- /* Handle an octal number following \. If the first digit is 8 or 9,
- this is not octal. */
-
- if ((c = *ptr) >= '8')
- break;
-
- /* \0 always starts an octal number, but we may drop through to here with a
- larger first octal digit. */
-
- case '0': {
- c -= '0';
- int i;
- for (i = 1; i <= 2; ++i) {
- if (ptr + i >= patternEnd || ptr[i] < '0' || ptr[i] > '7')
- break;
- int cc = c * 8 + ptr[i] - '0';
- if (cc > 255)
- break;
- c = cc;
- }
- ptr += i - 1;
- break;
- }
-
- case 'x': {
- c = 0;
- int i;
- for (i = 1; i <= 2; ++i) {
- if (ptr + i >= patternEnd || !isASCIIHexDigit(ptr[i])) {
- c = 'x';
- i = 1;
- break;
- }
- int cc = ptr[i];
- if (cc >= 'a')
- cc -= 32; /* Convert to upper case */
- c = c * 16 + cc - ((cc < 'A') ? '0' : ('A' - 10));
- }
- ptr += i - 1;
- break;
- }
-
- case 'u': {
- c = 0;
- int i;
- for (i = 1; i <= 4; ++i) {
- if (ptr + i >= patternEnd || !isASCIIHexDigit(ptr[i])) {
- c = 'u';
- i = 1;
- break;
- }
- int cc = ptr[i];
- if (cc >= 'a')
- cc -= 32; /* Convert to upper case */
- c = c * 16 + cc - ((cc < 'A') ? '0' : ('A' - 10));
- }
- ptr += i - 1;
- break;
- }
-
- case 'c':
- if (++ptr == patternEnd) {
- *errorcodeptr = ERR2;
- return 0;
- }
- c = *ptr;
-
- /* A letter is upper-cased; then the 0x40 bit is flipped. This coding
- is ASCII-specific, but then the whole concept of \cx is ASCII-specific. */
- c = toASCIIUpper(c) ^ 0x40;
- break;
- }
- }
-
- *ptrptr = ptr;
- return c;
-}
-
-/*************************************************
-* Check for counted repeat *
-*************************************************/
-
-/* This function is called when a '{' is encountered in a place where it might
-start a quantifier. It looks ahead to see if it really is a quantifier or not.
-It is only a quantifier if it is one of the forms {ddd} {ddd,} or {ddd,ddd}
-where the ddds are digits.
-
-Arguments:
- p pointer to the first char after '{'
-
-Returns: true or false
-*/
-
-static bool isCountedRepeat(const UChar* p, const UChar* patternEnd)
-{
- if (p >= patternEnd || !isASCIIDigit(*p))
- return false;
- p++;
- while (p < patternEnd && isASCIIDigit(*p))
- p++;
- if (p < patternEnd && *p == '}')
- return true;
-
- if (p >= patternEnd || *p++ != ',')
- return false;
- if (p < patternEnd && *p == '}')
- return true;
-
- if (p >= patternEnd || !isASCIIDigit(*p))
- return false;
- p++;
- while (p < patternEnd && isASCIIDigit(*p))
- p++;
-
- return (p < patternEnd && *p == '}');
-}
-
-/*************************************************
-* Read repeat counts *
-*************************************************/
-
-/* Read an item of the form {n,m} and return the values. This is called only
-after isCountedRepeat() has confirmed that a repeat-count quantifier exists,
-so the syntax is guaranteed to be correct, but we need to check the values.
-
-Arguments:
- p pointer to first char after '{'
- minp pointer to int for min
- maxp pointer to int for max
- returned as -1 if no max
- errorcodeptr points to error code variable
-
-Returns: pointer to '}' on success;
- current ptr on error, with errorcodeptr set non-zero
-*/
-
-static const UChar* readRepeatCounts(const UChar* p, int* minp, int* maxp, ErrorCode* errorcodeptr)
-{
- int min = 0;
- int max = -1;
-
- /* Read the minimum value and do a paranoid check: a negative value indicates
- an integer overflow. */
-
- while (isASCIIDigit(*p))
- min = min * 10 + *p++ - '0';
- if (min < 0 || min > 65535) {
- *errorcodeptr = ERR5;
- return p;
- }
-
- /* Read the maximum value if there is one, and again do a paranoid on its size.
- Also, max must not be less than min. */
-
- if (*p == '}')
- max = min;
- else {
- if (*(++p) != '}') {
- max = 0;
- while (isASCIIDigit(*p))
- max = max * 10 + *p++ - '0';
- if (max < 0 || max > 65535) {
- *errorcodeptr = ERR5;
- return p;
- }
- if (max < min) {
- *errorcodeptr = ERR4;
- return p;
- }
- }
- }
-
- /* Fill in the required variables, and pass back the pointer to the terminating
- '}'. */
-
- *minp = min;
- *maxp = max;
- return p;
-}
-
-/*************************************************
-* Find first significant op code *
-*************************************************/
-
-/* This is called by several functions that scan a compiled expression looking
-for a fixed first character, or an anchoring op code etc. It skips over things
-that do not influence this.
-
-Arguments:
- code pointer to the start of the group
-Returns: pointer to the first significant opcode
-*/
-
-static const unsigned char* firstSignificantOpcode(const unsigned char* code)
-{
- while (*code == OP_BRANUMBER)
- code += 3;
- return code;
-}
-
-static const unsigned char* firstSignificantOpcodeSkippingAssertions(const unsigned char* code)
-{
- while (true) {
- switch (*code) {
- case OP_ASSERT_NOT:
- advanceToEndOfBracket(code);
- code += 1 + LINK_SIZE;
- break;
- case OP_WORD_BOUNDARY:
- case OP_NOT_WORD_BOUNDARY:
- ++code;
- break;
- case OP_BRANUMBER:
- code += 3;
- break;
- default:
- return code;
- }
- }
-}
-
-/*************************************************
-* Get othercase range *
-*************************************************/
-
-/* This function is passed the start and end of a class range, in UTF-8 mode
-with UCP support. It searches up the characters, looking for internal ranges of
-characters in the "other" case. Each call returns the next one, updating the
-start address.
-
-Arguments:
- cptr points to starting character value; updated
- d end value
- ocptr where to put start of othercase range
- odptr where to put end of othercase range
-
-Yield: true when range returned; false when no more
-*/
-
-static bool getOthercaseRange(int* cptr, int d, int* ocptr, int* odptr)
-{
- int c, othercase = 0;
-
- for (c = *cptr; c <= d; c++) {
- if ((othercase = kjs_pcre_ucp_othercase(c)) >= 0)
- break;
- }
-
- if (c > d)
- return false;
-
- *ocptr = othercase;
- int next = othercase + 1;
-
- for (++c; c <= d; c++) {
- if (kjs_pcre_ucp_othercase(c) != next)
- break;
- next++;
- }
-
- *odptr = next - 1;
- *cptr = c;
-
- return true;
-}
-
-/*************************************************
- * Convert character value to UTF-8 *
- *************************************************/
-
-/* This function takes an integer value in the range 0 - 0x7fffffff
- and encodes it as a UTF-8 character in 0 to 6 bytes.
-
- Arguments:
- cvalue the character value
- buffer pointer to buffer for result - at least 6 bytes long
-
- Returns: number of characters placed in the buffer
- */
-
-static int encodeUTF8(int cvalue, unsigned char *buffer)
-{
- int i;
- for (i = 0; i < kjs_pcre_utf8_table1_size; i++)
- if (cvalue <= kjs_pcre_utf8_table1[i])
- break;
- buffer += i;
- for (int j = i; j > 0; j--) {
- *buffer-- = 0x80 | (cvalue & 0x3f);
- cvalue >>= 6;
- }
- *buffer = kjs_pcre_utf8_table2[i] | cvalue;
- return i + 1;
-}
-
-/*************************************************
-* Compile one branch *
-*************************************************/
-
-/* Scan the pattern, compiling it into the code vector.
-
-Arguments:
- options the option bits
- brackets points to number of extracting brackets used
- codeptr points to the pointer to the current code point
- ptrptr points to the current pattern pointer
- errorcodeptr points to error code variable
- firstbyteptr set to initial literal character, or < 0 (REQ_UNSET, REQ_NONE)
- reqbyteptr set to the last literal character required, else < 0
- cd contains pointers to tables etc.
-
-Returns: true on success
- false, with *errorcodeptr set non-zero on error
-*/
-
-static inline bool safelyCheckNextChar(const UChar* ptr, const UChar* patternEnd, UChar expected)
-{
- return ((ptr + 1 < patternEnd) && ptr[1] == expected);
-}
-
-static bool
-compileBranch(int options, int* brackets, unsigned char** codeptr,
- const UChar** ptrptr, const UChar* patternEnd, ErrorCode* errorcodeptr, int *firstbyteptr,
- int* reqbyteptr, CompileData& cd)
-{
- int repeat_type, op_type;
- int repeat_min = 0, repeat_max = 0; /* To please picky compilers */
- int bravalue = 0;
- int reqvary, tempreqvary;
- int c;
- unsigned char* code = *codeptr;
- unsigned char* tempcode;
- bool groupsetfirstbyte = false;
- const UChar* ptr = *ptrptr;
- const UChar* tempptr;
- unsigned char* previous = NULL;
- unsigned char classbits[32];
-
- bool class_utf8;
- unsigned char* class_utf8data;
- unsigned char utf8_char[6];
-
- /* Initialize no first byte, no required byte. REQ_UNSET means "no char
- matching encountered yet". It gets changed to REQ_NONE if we hit something that
- matches a non-fixed char first char; reqbyte just remains unset if we never
- find one.
-
- When we hit a repeat whose minimum is zero, we may have to adjust these values
- to take the zero repeat into account. This is implemented by setting them to
- zerofirstbyte and zeroreqbyte when such a repeat is encountered. The individual
- item types that can be repeated set these backoff variables appropriately. */
-
- int firstbyte = REQ_UNSET;
- int reqbyte = REQ_UNSET;
- int zeroreqbyte = REQ_UNSET;
- int zerofirstbyte = REQ_UNSET;
-
- /* The variable req_caseopt contains either the REQ_IGNORE_CASE value or zero,
- according to the current setting of the ignores-case flag. REQ_IGNORE_CASE is a bit
- value > 255. It is added into the firstbyte or reqbyte variables to record the
- case status of the value. This is used only for ASCII characters. */
-
- int req_caseopt = (options & IgnoreCaseOption) ? REQ_IGNORE_CASE : 0;
-
- /* Switch on next character until the end of the branch */
-
- for (;; ptr++) {
- bool negate_class;
- bool should_flip_negation; /* If a negative special such as \S is used, we should negate the whole class to properly support Unicode. */
- int class_charcount;
- int class_lastchar;
- int skipbytes;
- int subreqbyte;
- int subfirstbyte;
- int mclength;
- unsigned char mcbuffer[8];
-
- /* Next byte in the pattern */
-
- c = ptr < patternEnd ? *ptr : 0;
-
- /* Fill in length of a previous callout, except when the next thing is
- a quantifier. */
-
- bool is_quantifier = c == '*' || c == '+' || c == '?' || (c == '{' && isCountedRepeat(ptr + 1, patternEnd));
-
- switch (c) {
- /* The branch terminates at end of string, |, or ). */
-
- case 0:
- if (ptr < patternEnd)
- goto NORMAL_CHAR;
- // End of string; fall through
- case '|':
- case ')':
- *firstbyteptr = firstbyte;
- *reqbyteptr = reqbyte;
- *codeptr = code;
- *ptrptr = ptr;
- return true;
-
- /* Handle single-character metacharacters. In multiline mode, ^ disables
- the setting of any following char as a first character. */
-
- case '^':
- if (options & MatchAcrossMultipleLinesOption) {
- if (firstbyte == REQ_UNSET)
- firstbyte = REQ_NONE;
- *code++ = OP_BOL;
- } else
- *code++ = OP_CIRC;
- previous = NULL;
- break;
-
- case '$':
- previous = NULL;
- if (options & MatchAcrossMultipleLinesOption)
- *code++ = OP_EOL;
- else
- *code++ = OP_DOLL;
- break;
-
- /* There can never be a first char if '.' is first, whatever happens about
- repeats. The value of reqbyte doesn't change either. */
-
- case '.':
- if (firstbyte == REQ_UNSET)
- firstbyte = REQ_NONE;
- zerofirstbyte = firstbyte;
- zeroreqbyte = reqbyte;
- previous = code;
- *code++ = OP_NOT_NEWLINE;
- break;
-
- /* Character classes. If the included characters are all < 256, we build a
- 32-byte bitmap of the permitted characters, except in the special case
- where there is only one such character. For negated classes, we build the
- map as usual, then invert it at the end. However, we use a different opcode
- so that data characters > 255 can be handled correctly.
-
- If the class contains characters outside the 0-255 range, a different
- opcode is compiled. It may optionally have a bit map for characters < 256,
- but those above are are explicitly listed afterwards. A flag byte tells
- whether the bitmap is present, and whether this is a negated class or not.
- */
-
- case '[': {
- previous = code;
- should_flip_negation = false;
-
- /* PCRE supports POSIX class stuff inside a class. Perl gives an error if
- they are encountered at the top level, so we'll do that too. */
-
- /* If the first character is '^', set the negation flag and skip it. */
-
- if (ptr + 1 >= patternEnd) {
- *errorcodeptr = ERR6;
- return false;
- }
-
- if (ptr[1] == '^') {
- negate_class = true;
- ++ptr;
- } else
- negate_class = false;
-
- /* Keep a count of chars with values < 256 so that we can optimize the case
- of just a single character (as long as it's < 256). For higher valued UTF-8
- characters, we don't yet do any optimization. */
-
- class_charcount = 0;
- class_lastchar = -1;
-
- class_utf8 = false; /* No chars >= 256 */
- class_utf8data = code + LINK_SIZE + 34; /* For UTF-8 items */
-
- /* Initialize the 32-char bit map to all zeros. We have to build the
- map in a temporary bit of store, in case the class contains only 1
- character (< 256), because in that case the compiled code doesn't use the
- bit map. */
-
- memset(classbits, 0, 32 * sizeof(unsigned char));
-
- /* Process characters until ] is reached. The first pass
- through the regex checked the overall syntax, so we don't need to be very
- strict here. At the start of the loop, c contains the first byte of the
- character. */
-
- while ((++ptr < patternEnd) && (c = *ptr) != ']') {
- /* Backslash may introduce a single character, or it may introduce one
- of the specials, which just set a flag. Escaped items are checked for
- validity in the pre-compiling pass. The sequence \b is a special case.
- Inside a class (and only there) it is treated as backspace. Elsewhere
- it marks a word boundary. Other escapes have preset maps ready to
- or into the one we are building. We assume they have more than one
- character in them, so set class_charcount bigger than one. */
-
- if (c == '\\') {
- c = checkEscape(&ptr, patternEnd, errorcodeptr, cd.numCapturingBrackets, true);
- if (c < 0) {
- class_charcount += 2; /* Greater than 1 is what matters */
- switch (-c) {
- case ESC_d:
- for (c = 0; c < 32; c++)
- classbits[c] |= classBitmapForChar(c + cbit_digit);
- continue;
-
- case ESC_D:
- should_flip_negation = true;
- for (c = 0; c < 32; c++)
- classbits[c] |= ~classBitmapForChar(c + cbit_digit);
- continue;
-
- case ESC_w:
- for (c = 0; c < 32; c++)
- classbits[c] |= classBitmapForChar(c + cbit_word);
- continue;
-
- case ESC_W:
- should_flip_negation = true;
- for (c = 0; c < 32; c++)
- classbits[c] |= ~classBitmapForChar(c + cbit_word);
- continue;
-
- case ESC_s:
- for (c = 0; c < 32; c++)
- classbits[c] |= classBitmapForChar(c + cbit_space);
- continue;
-
- case ESC_S:
- should_flip_negation = true;
- for (c = 0; c < 32; c++)
- classbits[c] |= ~classBitmapForChar(c + cbit_space);
- continue;
-
- /* Unrecognized escapes are faulted if PCRE is running in its
- strict mode. By default, for compatibility with Perl, they are
- treated as literals. */
-
- default:
- c = *ptr; /* The final character */
- class_charcount -= 2; /* Undo the default count from above */
- }
- }
-
- /* Fall through if we have a single character (c >= 0). This may be
- > 256 in UTF-8 mode. */
-
- } /* End of backslash handling */
-
- /* A single character may be followed by '-' to form a range. However,
- Perl does not permit ']' to be the end of the range. A '-' character
- here is treated as a literal. */
-
- if ((ptr + 2 < patternEnd) && ptr[1] == '-' && ptr[2] != ']') {
- ptr += 2;
-
- int d = *ptr;
-
- /* The second part of a range can be a single-character escape, but
- not any of the other escapes. Perl 5.6 treats a hyphen as a literal
- in such circumstances. */
-
- if (d == '\\') {
- const UChar* oldptr = ptr;
- d = checkEscape(&ptr, patternEnd, errorcodeptr, cd.numCapturingBrackets, true);
-
- /* \X is literal X; any other special means the '-' was literal */
- if (d < 0) {
- ptr = oldptr - 2;
- goto LONE_SINGLE_CHARACTER; /* A few lines below */
- }
- }
-
- /* The check that the two values are in the correct order happens in
- the pre-pass. Optimize one-character ranges */
-
- if (d == c)
- goto LONE_SINGLE_CHARACTER; /* A few lines below */
-
- /* In UTF-8 mode, if the upper limit is > 255, or > 127 for caseless
- matching, we have to use an XCLASS with extra data items. Caseless
- matching for characters > 127 is available only if UCP support is
- available. */
-
- if ((d > 255 || ((options & IgnoreCaseOption) && d > 127))) {
- class_utf8 = true;
-
- /* With UCP support, we can find the other case equivalents of
- the relevant characters. There may be several ranges. Optimize how
- they fit with the basic range. */
-
- if (options & IgnoreCaseOption) {
- int occ, ocd;
- int cc = c;
- int origd = d;
- while (getOthercaseRange(&cc, origd, &occ, &ocd)) {
- if (occ >= c && ocd <= d)
- continue; /* Skip embedded ranges */
-
- if (occ < c && ocd >= c - 1) /* Extend the basic range */
- { /* if there is overlap, */
- c = occ; /* noting that if occ < c */
- continue; /* we can't have ocd > d */
- } /* because a subrange is */
- if (ocd > d && occ <= d + 1) /* always shorter than */
- { /* the basic range. */
- d = ocd;
- continue;
- }
-
- if (occ == ocd)
- *class_utf8data++ = XCL_SINGLE;
- else {
- *class_utf8data++ = XCL_RANGE;
- class_utf8data += encodeUTF8(occ, class_utf8data);
- }
- class_utf8data += encodeUTF8(ocd, class_utf8data);
- }
- }
-
- /* Now record the original range, possibly modified for UCP caseless
- overlapping ranges. */
-
- *class_utf8data++ = XCL_RANGE;
- class_utf8data += encodeUTF8(c, class_utf8data);
- class_utf8data += encodeUTF8(d, class_utf8data);
-
- /* With UCP support, we are done. Without UCP support, there is no
- caseless matching for UTF-8 characters > 127; we can use the bit map
- for the smaller ones. */
-
- continue; /* With next character in the class */
- }
-
- /* We use the bit map for all cases when not in UTF-8 mode; else
- ranges that lie entirely within 0-127 when there is UCP support; else
- for partial ranges without UCP support. */
-
- for (; c <= d; c++) {
- classbits[c/8] |= (1 << (c&7));
- if (options & IgnoreCaseOption) {
- int uc = flipCase(c);
- classbits[uc/8] |= (1 << (uc&7));
- }
- class_charcount++; /* in case a one-char range */
- class_lastchar = c;
- }
-
- continue; /* Go get the next char in the class */
- }
-
- /* Handle a lone single character - we can get here for a normal
- non-escape char, or after \ that introduces a single character or for an
- apparent range that isn't. */
-
- LONE_SINGLE_CHARACTER:
-
- /* Handle a character that cannot go in the bit map */
-
- if ((c > 255 || ((options & IgnoreCaseOption) && c > 127))) {
- class_utf8 = true;
- *class_utf8data++ = XCL_SINGLE;
- class_utf8data += encodeUTF8(c, class_utf8data);
-
- if (options & IgnoreCaseOption) {
- int othercase;
- if ((othercase = kjs_pcre_ucp_othercase(c)) >= 0) {
- *class_utf8data++ = XCL_SINGLE;
- class_utf8data += encodeUTF8(othercase, class_utf8data);
- }
- }
- } else {
- /* Handle a single-byte character */
- classbits[c/8] |= (1 << (c&7));
- if (options & IgnoreCaseOption) {
- c = flipCase(c);
- classbits[c/8] |= (1 << (c&7));
- }
- class_charcount++;
- class_lastchar = c;
- }
- }
-
- /* If class_charcount is 1, we saw precisely one character whose value is
- less than 256. In non-UTF-8 mode we can always optimize. In UTF-8 mode, we
- can optimize the negative case only if there were no characters >= 128
- because OP_NOT and the related opcodes like OP_NOTSTAR operate on
- single-bytes only. This is an historical hangover. Maybe one day we can
- tidy these opcodes to handle multi-byte characters.
-
- The optimization throws away the bit map. We turn the item into a
- 1-character OP_CHAR[NC] if it's positive, or OP_NOT if it's negative. Note
- that OP_NOT does not support multibyte characters. In the positive case, it
- can cause firstbyte to be set. Otherwise, there can be no first char if
- this item is first, whatever repeat count may follow. In the case of
- reqbyte, save the previous value for reinstating. */
-
- if (class_charcount == 1 && (!class_utf8 && (!negate_class || class_lastchar < 128))) {
- zeroreqbyte = reqbyte;
-
- /* The OP_NOT opcode works on one-byte characters only. */
-
- if (negate_class) {
- if (firstbyte == REQ_UNSET)
- firstbyte = REQ_NONE;
- zerofirstbyte = firstbyte;
- *code++ = OP_NOT;
- *code++ = class_lastchar;
- break;
- }
-
- /* For a single, positive character, get the value into c, and
- then we can handle this with the normal one-character code. */
-
- c = class_lastchar;
- goto NORMAL_CHAR;
- } /* End of 1-char optimization */
-
- /* The general case - not the one-char optimization. If this is the first
- thing in the branch, there can be no first char setting, whatever the
- repeat count. Any reqbyte setting must remain unchanged after any kind of
- repeat. */
-
- if (firstbyte == REQ_UNSET) firstbyte = REQ_NONE;
- zerofirstbyte = firstbyte;
- zeroreqbyte = reqbyte;
-
- /* If there are characters with values > 255, we have to compile an
- extended class, with its own opcode. If there are no characters < 256,
- we can omit the bitmap. */
-
- if (class_utf8 && !should_flip_negation) {
- *class_utf8data++ = XCL_END; /* Marks the end of extra data */
- *code++ = OP_XCLASS;
- code += LINK_SIZE;
- *code = negate_class? XCL_NOT : 0;
-
- /* If the map is required, install it, and move on to the end of
- the extra data */
-
- if (class_charcount > 0) {
- *code++ |= XCL_MAP;
- memcpy(code, classbits, 32);
- code = class_utf8data;
- }
-
- /* If the map is not required, slide down the extra data. */
-
- else {
- int len = class_utf8data - (code + 33);
- memmove(code + 1, code + 33, len);
- code += len + 1;
- }
-
- /* Now fill in the complete length of the item */
-
- putLinkValue(previous + 1, code - previous);
- break; /* End of class handling */
- }
-
- /* If there are no characters > 255, negate the 32-byte map if necessary,
- and copy it into the code vector. If this is the first thing in the branch,
- there can be no first char setting, whatever the repeat count. Any reqbyte
- setting must remain unchanged after any kind of repeat. */
-
- *code++ = (negate_class == should_flip_negation) ? OP_CLASS : OP_NCLASS;
- if (negate_class)
- for (c = 0; c < 32; c++)
- code[c] = ~classbits[c];
- else
- memcpy(code, classbits, 32);
- code += 32;
- break;
- }
-
- /* Various kinds of repeat; '{' is not necessarily a quantifier, but this
- has been tested above. */
-
- case '{':
- if (!is_quantifier)
- goto NORMAL_CHAR;
- ptr = readRepeatCounts(ptr + 1, &repeat_min, &repeat_max, errorcodeptr);
- if (*errorcodeptr)
- goto FAILED;
- goto REPEAT;
-
- case '*':
- repeat_min = 0;
- repeat_max = -1;
- goto REPEAT;
-
- case '+':
- repeat_min = 1;
- repeat_max = -1;
- goto REPEAT;
-
- case '?':
- repeat_min = 0;
- repeat_max = 1;
-
- REPEAT:
- if (!previous) {
- *errorcodeptr = ERR9;
- goto FAILED;
- }
-
- if (repeat_min == 0) {
- firstbyte = zerofirstbyte; /* Adjust for zero repeat */
- reqbyte = zeroreqbyte; /* Ditto */
- }
-
- /* Remember whether this is a variable length repeat */
-
- reqvary = (repeat_min == repeat_max) ? 0 : REQ_VARY;
-
- op_type = 0; /* Default single-char op codes */
-
- /* Save start of previous item, in case we have to move it up to make space
- for an inserted OP_ONCE for the additional '+' extension. */
- /* FIXME: Probably don't need this because we don't use OP_ONCE. */
-
- tempcode = previous;
-
- /* If the next character is '+', we have a possessive quantifier. This
- implies greediness, whatever the setting of the PCRE_UNGREEDY option.
- If the next character is '?' this is a minimizing repeat, by default,
- but if PCRE_UNGREEDY is set, it works the other way round. We change the
- repeat type to the non-default. */
-
- if (safelyCheckNextChar(ptr, patternEnd, '?')) {
- repeat_type = 1;
- ptr++;
- } else
- repeat_type = 0;
-
- /* If previous was a character match, abolish the item and generate a
- repeat item instead. If a char item has a minumum of more than one, ensure
- that it is set in reqbyte - it might not be if a sequence such as x{3} is
- the first thing in a branch because the x will have gone into firstbyte
- instead. */
-
- if (*previous == OP_CHAR || *previous == OP_CHAR_IGNORING_CASE) {
- /* Deal with UTF-8 characters that take up more than one byte. It's
- easier to write this out separately than try to macrify it. Use c to
- hold the length of the character in bytes, plus 0x80 to flag that it's a
- length rather than a small character. */
-
- if (code[-1] & 0x80) {
- unsigned char *lastchar = code - 1;
- while((*lastchar & 0xc0) == 0x80)
- lastchar--;
- c = code - lastchar; /* Length of UTF-8 character */
- memcpy(utf8_char, lastchar, c); /* Save the char */
- c |= 0x80; /* Flag c as a length */
- }
- else {
- c = code[-1];
- if (repeat_min > 1)
- reqbyte = c | req_caseopt | cd.req_varyopt;
- }
-
- goto OUTPUT_SINGLE_REPEAT; /* Code shared with single character types */
- }
-
- else if (*previous == OP_ASCII_CHAR || *previous == OP_ASCII_LETTER_IGNORING_CASE) {
- c = previous[1];
- if (repeat_min > 1)
- reqbyte = c | req_caseopt | cd.req_varyopt;
- goto OUTPUT_SINGLE_REPEAT;
- }
-
- /* If previous was a single negated character ([^a] or similar), we use
- one of the special opcodes, replacing it. The code is shared with single-
- character repeats by setting opt_type to add a suitable offset into
- repeat_type. OP_NOT is currently used only for single-byte chars. */
-
- else if (*previous == OP_NOT) {
- op_type = OP_NOTSTAR - OP_STAR; /* Use "not" opcodes */
- c = previous[1];
- goto OUTPUT_SINGLE_REPEAT;
- }
-
- /* If previous was a character type match (\d or similar), abolish it and
- create a suitable repeat item. The code is shared with single-character
- repeats by setting op_type to add a suitable offset into repeat_type. */
-
- else if (*previous <= OP_NOT_NEWLINE) {
- op_type = OP_TYPESTAR - OP_STAR; /* Use type opcodes */
- c = *previous;
-
- OUTPUT_SINGLE_REPEAT:
- int prop_type = -1;
- int prop_value = -1;
-
- unsigned char* oldcode = code;
- code = previous; /* Usually overwrite previous item */
-
- /* If the maximum is zero then the minimum must also be zero; Perl allows
- this case, so we do too - by simply omitting the item altogether. */
-
- if (repeat_max == 0)
- goto END_REPEAT;
-
- /* Combine the op_type with the repeat_type */
-
- repeat_type += op_type;
-
- /* A minimum of zero is handled either as the special case * or ?, or as
- an UPTO, with the maximum given. */
-
- if (repeat_min == 0) {
- if (repeat_max == -1)
- *code++ = OP_STAR + repeat_type;
- else if (repeat_max == 1)
- *code++ = OP_QUERY + repeat_type;
- else {
- *code++ = OP_UPTO + repeat_type;
- put2ByteValueAndAdvance(code, repeat_max);
- }
- }
-
- /* A repeat minimum of 1 is optimized into some special cases. If the
- maximum is unlimited, we use OP_PLUS. Otherwise, the original item it
- left in place and, if the maximum is greater than 1, we use OP_UPTO with
- one less than the maximum. */
-
- else if (repeat_min == 1) {
- if (repeat_max == -1)
- *code++ = OP_PLUS + repeat_type;
- else {
- code = oldcode; /* leave previous item in place */
- if (repeat_max == 1)
- goto END_REPEAT;
- *code++ = OP_UPTO + repeat_type;
- put2ByteValueAndAdvance(code, repeat_max - 1);
- }
- }
-
- /* The case {n,n} is just an EXACT, while the general case {n,m} is
- handled as an EXACT followed by an UPTO. */
-
- else {
- *code++ = OP_EXACT + op_type; /* NB EXACT doesn't have repeat_type */
- put2ByteValueAndAdvance(code, repeat_min);
-
- /* If the maximum is unlimited, insert an OP_STAR. Before doing so,
- we have to insert the character for the previous code. For a repeated
- Unicode property match, there are two extra bytes that define the
- required property. In UTF-8 mode, long characters have their length in
- c, with the 0x80 bit as a flag. */
-
- if (repeat_max < 0) {
- if (c >= 128) {
- memcpy(code, utf8_char, c & 7);
- code += c & 7;
- } else {
- *code++ = c;
- if (prop_type >= 0) {
- *code++ = prop_type;
- *code++ = prop_value;
- }
- }
- *code++ = OP_STAR + repeat_type;
- }
-
- /* Else insert an UPTO if the max is greater than the min, again
- preceded by the character, for the previously inserted code. */
-
- else if (repeat_max != repeat_min) {
- if (c >= 128) {
- memcpy(code, utf8_char, c & 7);
- code += c & 7;
- } else
- *code++ = c;
- if (prop_type >= 0) {
- *code++ = prop_type;
- *code++ = prop_value;
- }
- repeat_max -= repeat_min;
- *code++ = OP_UPTO + repeat_type;
- put2ByteValueAndAdvance(code, repeat_max);
- }
- }
-
- /* The character or character type itself comes last in all cases. */
-
- if (c >= 128) {
- memcpy(code, utf8_char, c & 7);
- code += c & 7;
- } else
- *code++ = c;
-
- /* For a repeated Unicode property match, there are two extra bytes that
- define the required property. */
-
- if (prop_type >= 0) {
- *code++ = prop_type;
- *code++ = prop_value;
- }
- }
-
- /* If previous was a character class or a back reference, we put the repeat
- stuff after it, but just skip the item if the repeat was {0,0}. */
-
- else if (*previous == OP_CLASS ||
- *previous == OP_NCLASS ||
- *previous == OP_XCLASS ||
- *previous == OP_REF)
- {
- if (repeat_max == 0) {
- code = previous;
- goto END_REPEAT;
- }
-
- if (repeat_min == 0 && repeat_max == -1)
- *code++ = OP_CRSTAR + repeat_type;
- else if (repeat_min == 1 && repeat_max == -1)
- *code++ = OP_CRPLUS + repeat_type;
- else if (repeat_min == 0 && repeat_max == 1)
- *code++ = OP_CRQUERY + repeat_type;
- else {
- *code++ = OP_CRRANGE + repeat_type;
- put2ByteValueAndAdvance(code, repeat_min);
- if (repeat_max == -1)
- repeat_max = 0; /* 2-byte encoding for max */
- put2ByteValueAndAdvance(code, repeat_max);
- }
- }
-
- /* If previous was a bracket group, we may have to replicate it in certain
- cases. */
-
- else if (*previous >= OP_BRA) {
- int ketoffset = 0;
- int len = code - previous;
- unsigned char* bralink = NULL;
-
- /* If the maximum repeat count is unlimited, find the end of the bracket
- by scanning through from the start, and compute the offset back to it
- from the current code pointer. There may be an OP_OPT setting following
- the final KET, so we can't find the end just by going back from the code
- pointer. */
-
- if (repeat_max == -1) {
- const unsigned char* ket = previous;
- advanceToEndOfBracket(ket);
- ketoffset = code - ket;
- }
-
- /* The case of a zero minimum is special because of the need to stick
- OP_BRAZERO in front of it, and because the group appears once in the
- data, whereas in other cases it appears the minimum number of times. For
- this reason, it is simplest to treat this case separately, as otherwise
- the code gets far too messy. There are several special subcases when the
- minimum is zero. */
-
- if (repeat_min == 0) {
- /* If the maximum is also zero, we just omit the group from the output
- altogether. */
-
- if (repeat_max == 0) {
- code = previous;
- goto END_REPEAT;
- }
-
- /* If the maximum is 1 or unlimited, we just have to stick in the
- BRAZERO and do no more at this point. However, we do need to adjust
- any OP_RECURSE calls inside the group that refer to the group itself or
- any internal group, because the offset is from the start of the whole
- regex. Temporarily terminate the pattern while doing this. */
-
- if (repeat_max <= 1) {
- *code = OP_END;
- memmove(previous+1, previous, len);
- code++;
- *previous++ = OP_BRAZERO + repeat_type;
- }
-
- /* If the maximum is greater than 1 and limited, we have to replicate
- in a nested fashion, sticking OP_BRAZERO before each set of brackets.
- The first one has to be handled carefully because it's the original
- copy, which has to be moved up. The remainder can be handled by code
- that is common with the non-zero minimum case below. We have to
- adjust the value of repeat_max, since one less copy is required. */
-
- else {
- *code = OP_END;
- memmove(previous + 2 + LINK_SIZE, previous, len);
- code += 2 + LINK_SIZE;
- *previous++ = OP_BRAZERO + repeat_type;
- *previous++ = OP_BRA;
-
- /* We chain together the bracket offset fields that have to be
- filled in later when the ends of the brackets are reached. */
-
- int offset = (!bralink) ? 0 : previous - bralink;
- bralink = previous;
- putLinkValueAllowZeroAndAdvance(previous, offset);
- }
-
- repeat_max--;
- }
-
- /* If the minimum is greater than zero, replicate the group as many
- times as necessary, and adjust the maximum to the number of subsequent
- copies that we need. If we set a first char from the group, and didn't
- set a required char, copy the latter from the former. */
-
- else {
- if (repeat_min > 1) {
- if (groupsetfirstbyte && reqbyte < 0)
- reqbyte = firstbyte;
- for (int i = 1; i < repeat_min; i++) {
- memcpy(code, previous, len);
- code += len;
- }
- }
- if (repeat_max > 0)
- repeat_max -= repeat_min;
- }
-
- /* This code is common to both the zero and non-zero minimum cases. If
- the maximum is limited, it replicates the group in a nested fashion,
- remembering the bracket starts on a stack. In the case of a zero minimum,
- the first one was set up above. In all cases the repeat_max now specifies
- the number of additional copies needed. */
-
- if (repeat_max >= 0) {
- for (int i = repeat_max - 1; i >= 0; i--) {
- *code++ = OP_BRAZERO + repeat_type;
-
- /* All but the final copy start a new nesting, maintaining the
- chain of brackets outstanding. */
-
- if (i != 0) {
- *code++ = OP_BRA;
- int offset = (!bralink) ? 0 : code - bralink;
- bralink = code;
- putLinkValueAllowZeroAndAdvance(code, offset);
- }
-
- memcpy(code, previous, len);
- code += len;
- }
-
- /* Now chain through the pending brackets, and fill in their length
- fields (which are holding the chain links pro tem). */
-
- while (bralink) {
- int offset = code - bralink + 1;
- unsigned char* bra = code - offset;
- int oldlinkoffset = getLinkValueAllowZero(bra + 1);
- bralink = (!oldlinkoffset) ? 0 : bralink - oldlinkoffset;
- *code++ = OP_KET;
- putLinkValueAndAdvance(code, offset);
- putLinkValue(bra + 1, offset);
- }
- }
-
- /* If the maximum is unlimited, set a repeater in the final copy. We
- can't just offset backwards from the current code point, because we
- don't know if there's been an options resetting after the ket. The
- correct offset was computed above. */
-
- else
- code[-ketoffset] = OP_KETRMAX + repeat_type;
- }
-
- /* Else there's some kind of shambles */
-
- else {
- *errorcodeptr = ERR11;
- goto FAILED;
- }
-
- /* In all case we no longer have a previous item. We also set the
- "follows varying string" flag for subsequently encountered reqbytes if
- it isn't already set and we have just passed a varying length item. */
-
- END_REPEAT:
- previous = NULL;
- cd.req_varyopt |= reqvary;
- break;
-
- /* Start of nested bracket sub-expression, or comment or lookahead or
- lookbehind or option setting or condition. First deal with special things
- that can come after a bracket; all are introduced by ?, and the appearance
- of any of them means that this is not a referencing group. They were
- checked for validity in the first pass over the string, so we don't have to
- check for syntax errors here. */
-
- case '(':
- skipbytes = 0;
-
- if (*(++ptr) == '?') {
- switch (*(++ptr)) {
- case ':': /* Non-extracting bracket */
- bravalue = OP_BRA;
- ptr++;
- break;
-
- case '=': /* Positive lookahead */
- bravalue = OP_ASSERT;
- ptr++;
- break;
-
- case '!': /* Negative lookahead */
- bravalue = OP_ASSERT_NOT;
- ptr++;
- break;
-
- /* Character after (? not specially recognized */
-
- default:
- *errorcodeptr = ERR12;
- goto FAILED;
- }
- }
-
- /* Else we have a referencing group; adjust the opcode. If the bracket
- number is greater than EXTRACT_BASIC_MAX, we set the opcode one higher, and
- arrange for the true number to follow later, in an OP_BRANUMBER item. */
-
- else {
- if (++(*brackets) > EXTRACT_BASIC_MAX) {
- bravalue = OP_BRA + EXTRACT_BASIC_MAX + 1;
- code[1 + LINK_SIZE] = OP_BRANUMBER;
- put2ByteValue(code + 2 + LINK_SIZE, *brackets);
- skipbytes = 3;
- }
- else
- bravalue = OP_BRA + *brackets;
- }
-
- /* Process nested bracketed re. Assertions may not be repeated, but other
- kinds can be. We copy code into a non-variable in order to be able
- to pass its address because some compilers complain otherwise. Pass in a
- new setting for the ims options if they have changed. */
-
- previous = (bravalue >= OP_BRAZERO) ? code : 0;
- *code = bravalue;
- tempcode = code;
- tempreqvary = cd.req_varyopt; /* Save value before bracket */
-
- if (!compileBracket(
- options,
- brackets, /* Extracting bracket count */
- &tempcode, /* Where to put code (updated) */
- &ptr, /* Input pointer (updated) */
- patternEnd,
- errorcodeptr, /* Where to put an error message */
- skipbytes, /* Skip over OP_BRANUMBER */
- &subfirstbyte, /* For possible first char */
- &subreqbyte, /* For possible last char */
- cd)) /* Tables block */
- goto FAILED;
-
- /* At the end of compiling, code is still pointing to the start of the
- group, while tempcode has been updated to point past the end of the group
- and any option resetting that may follow it. The pattern pointer (ptr)
- is on the bracket. */
-
- /* Handle updating of the required and first characters. Update for normal
- brackets of all kinds, and conditions with two branches (see code above).
- If the bracket is followed by a quantifier with zero repeat, we have to
- back off. Hence the definition of zeroreqbyte and zerofirstbyte outside the
- main loop so that they can be accessed for the back off. */
-
- zeroreqbyte = reqbyte;
- zerofirstbyte = firstbyte;
- groupsetfirstbyte = false;
-
- if (bravalue >= OP_BRA) {
- /* If we have not yet set a firstbyte in this branch, take it from the
- subpattern, remembering that it was set here so that a repeat of more
- than one can replicate it as reqbyte if necessary. If the subpattern has
- no firstbyte, set "none" for the whole branch. In both cases, a zero
- repeat forces firstbyte to "none". */
-
- if (firstbyte == REQ_UNSET) {
- if (subfirstbyte >= 0) {
- firstbyte = subfirstbyte;
- groupsetfirstbyte = true;
- }
- else
- firstbyte = REQ_NONE;
- zerofirstbyte = REQ_NONE;
- }
-
- /* If firstbyte was previously set, convert the subpattern's firstbyte
- into reqbyte if there wasn't one, using the vary flag that was in
- existence beforehand. */
-
- else if (subfirstbyte >= 0 && subreqbyte < 0)
- subreqbyte = subfirstbyte | tempreqvary;
-
- /* If the subpattern set a required byte (or set a first byte that isn't
- really the first byte - see above), set it. */
-
- if (subreqbyte >= 0)
- reqbyte = subreqbyte;
- }
-
- /* For a forward assertion, we take the reqbyte, if set. This can be
- helpful if the pattern that follows the assertion doesn't set a different
- char. For example, it's useful for /(?=abcde).+/. We can't set firstbyte
- for an assertion, however because it leads to incorrect effect for patterns
- such as /(?=a)a.+/ when the "real" "a" would then become a reqbyte instead
- of a firstbyte. This is overcome by a scan at the end if there's no
- firstbyte, looking for an asserted first char. */
-
- else if (bravalue == OP_ASSERT && subreqbyte >= 0)
- reqbyte = subreqbyte;
-
- /* Now update the main code pointer to the end of the group. */
-
- code = tempcode;
-
- /* Error if hit end of pattern */
-
- if (ptr >= patternEnd || *ptr != ')') {
- *errorcodeptr = ERR14;
- goto FAILED;
- }
- break;
-
- /* Check \ for being a real metacharacter; if not, fall through and handle
- it as a data character at the start of a string. Escape items are checked
- for validity in the pre-compiling pass. */
-
- case '\\':
- tempptr = ptr;
- c = checkEscape(&ptr, patternEnd, errorcodeptr, cd.numCapturingBrackets, false);
-
- /* Handle metacharacters introduced by \. For ones like \d, the ESC_ values
- are arranged to be the negation of the corresponding OP_values. For the
- back references, the values are ESC_REF plus the reference number. Only
- back references and those types that consume a character may be repeated.
- We can test for values between ESC_b and ESC_w for the latter; this may
- have to change if any new ones are ever created. */
-
- if (c < 0) {
- /* For metasequences that actually match a character, we disable the
- setting of a first character if it hasn't already been set. */
-
- if (firstbyte == REQ_UNSET && -c > ESC_b && -c <= ESC_w)
- firstbyte = REQ_NONE;
-
- /* Set values to reset to if this is followed by a zero repeat. */
-
- zerofirstbyte = firstbyte;
- zeroreqbyte = reqbyte;
-
- /* Back references are handled specially */
-
- if (-c >= ESC_REF) {
- int number = -c - ESC_REF;
- previous = code;
- *code++ = OP_REF;
- put2ByteValueAndAdvance(code, number);
- }
-
- /* For the rest, we can obtain the OP value by negating the escape
- value */
-
- else {
- previous = (-c > ESC_b && -c <= ESC_w) ? code : NULL;
- *code++ = -c;
- }
- continue;
- }
-
- /* Fall through. */
-
- /* Handle a literal character. It is guaranteed not to be whitespace or #
- when the extended flag is set. If we are in UTF-8 mode, it may be a
- multi-byte literal character. */
-
- default:
- NORMAL_CHAR:
-
- previous = code;
-
- if (c < 128) {
- mclength = 1;
- mcbuffer[0] = c;
-
- if ((options & IgnoreCaseOption) && (c | 0x20) >= 'a' && (c | 0x20) <= 'z') {
- *code++ = OP_ASCII_LETTER_IGNORING_CASE;
- *code++ = c | 0x20;
- } else {
- *code++ = OP_ASCII_CHAR;
- *code++ = c;
- }
- } else {
- mclength = encodeUTF8(c, mcbuffer);
-
- *code++ = (options & IgnoreCaseOption) ? OP_CHAR_IGNORING_CASE : OP_CHAR;
- for (c = 0; c < mclength; c++)
- *code++ = mcbuffer[c];
- }
-
- /* Set the first and required bytes appropriately. If no previous first
- byte, set it from this character, but revert to none on a zero repeat.
- Otherwise, leave the firstbyte value alone, and don't change it on a zero
- repeat. */
-
- if (firstbyte == REQ_UNSET) {
- zerofirstbyte = REQ_NONE;
- zeroreqbyte = reqbyte;
-
- /* If the character is more than one byte long, we can set firstbyte
- only if it is not to be matched caselessly. */
-
- if (mclength == 1 || req_caseopt == 0) {
- firstbyte = mcbuffer[0] | req_caseopt;
- if (mclength != 1)
- reqbyte = code[-1] | cd.req_varyopt;
- }
- else
- firstbyte = reqbyte = REQ_NONE;
- }
-
- /* firstbyte was previously set; we can set reqbyte only the length is
- 1 or the matching is caseful. */
-
- else {
- zerofirstbyte = firstbyte;
- zeroreqbyte = reqbyte;
- if (mclength == 1 || req_caseopt == 0)
- reqbyte = code[-1] | req_caseopt | cd.req_varyopt;
- }
-
- break; /* End of literal character handling */
- }
- } /* end of big loop */
-
- /* Control never reaches here by falling through, only by a goto for all the
- error states. Pass back the position in the pattern so that it can be displayed
- to the user for diagnosing the error. */
-
-FAILED:
- *ptrptr = ptr;
- return false;
-}
-
-/*************************************************
-* Compile sequence of alternatives *
-*************************************************/
-
-/* On entry, ptr is pointing past the bracket character, but on return
-it points to the closing bracket, or vertical bar, or end of string.
-The code variable is pointing at the byte into which the BRA operator has been
-stored. If the ims options are changed at the start (for a (?ims: group) or
-during any branch, we need to insert an OP_OPT item at the start of every
-following branch to ensure they get set correctly at run time, and also pass
-the new options into every subsequent branch compile.
-
-Argument:
- options option bits, including any changes for this subpattern
- brackets -> int containing the number of extracting brackets used
- codeptr -> the address of the current code pointer
- ptrptr -> the address of the current pattern pointer
- errorcodeptr -> pointer to error code variable
- skipbytes skip this many bytes at start (for OP_BRANUMBER)
- firstbyteptr place to put the first required character, or a negative number
- reqbyteptr place to put the last required character, or a negative number
- cd points to the data block with tables pointers etc.
-
-Returns: true on success
-*/
-
-static bool
-compileBracket(int options, int* brackets, unsigned char** codeptr,
- const UChar** ptrptr, const UChar* patternEnd, ErrorCode* errorcodeptr, int skipbytes,
- int* firstbyteptr, int* reqbyteptr, CompileData& cd)
-{
- const UChar* ptr = *ptrptr;
- unsigned char* code = *codeptr;
- unsigned char* last_branch = code;
- unsigned char* start_bracket = code;
- int firstbyte = REQ_UNSET;
- int reqbyte = REQ_UNSET;
-
- /* Offset is set zero to mark that this bracket is still open */
-
- putLinkValueAllowZero(code + 1, 0);
- code += 1 + LINK_SIZE + skipbytes;
-
- /* Loop for each alternative branch */
-
- while (true) {
- /* Now compile the branch */
-
- int branchfirstbyte;
- int branchreqbyte;
- if (!compileBranch(options, brackets, &code, &ptr, patternEnd, errorcodeptr,
- &branchfirstbyte, &branchreqbyte, cd)) {
- *ptrptr = ptr;
- return false;
- }
-
- /* If this is the first branch, the firstbyte and reqbyte values for the
- branch become the values for the regex. */
-
- if (*last_branch != OP_ALT) {
- firstbyte = branchfirstbyte;
- reqbyte = branchreqbyte;
- }
-
- /* If this is not the first branch, the first char and reqbyte have to
- match the values from all the previous branches, except that if the previous
- value for reqbyte didn't have REQ_VARY set, it can still match, and we set
- REQ_VARY for the regex. */
-
- else {
- /* If we previously had a firstbyte, but it doesn't match the new branch,
- we have to abandon the firstbyte for the regex, but if there was previously
- no reqbyte, it takes on the value of the old firstbyte. */
-
- if (firstbyte >= 0 && firstbyte != branchfirstbyte) {
- if (reqbyte < 0)
- reqbyte = firstbyte;
- firstbyte = REQ_NONE;
- }
-
- /* If we (now or from before) have no firstbyte, a firstbyte from the
- branch becomes a reqbyte if there isn't a branch reqbyte. */
-
- if (firstbyte < 0 && branchfirstbyte >= 0 && branchreqbyte < 0)
- branchreqbyte = branchfirstbyte;
-
- /* Now ensure that the reqbytes match */
-
- if ((reqbyte & ~REQ_VARY) != (branchreqbyte & ~REQ_VARY))
- reqbyte = REQ_NONE;
- else
- reqbyte |= branchreqbyte; /* To "or" REQ_VARY */
- }
-
- /* Reached end of expression, either ')' or end of pattern. Go back through
- the alternative branches and reverse the chain of offsets, with the field in
- the BRA item now becoming an offset to the first alternative. If there are
- no alternatives, it points to the end of the group. The length in the
- terminating ket is always the length of the whole bracketed item. If any of
- the ims options were changed inside the group, compile a resetting op-code
- following, except at the very end of the pattern. Return leaving the pointer
- at the terminating char. */
-
- if (ptr >= patternEnd || *ptr != '|') {
- int length = code - last_branch;
- do {
- int prev_length = getLinkValueAllowZero(last_branch + 1);
- putLinkValue(last_branch + 1, length);
- length = prev_length;
- last_branch -= length;
- } while (length > 0);
-
- /* Fill in the ket */
-
- *code = OP_KET;
- putLinkValue(code + 1, code - start_bracket);
- code += 1 + LINK_SIZE;
-
- /* Set values to pass back */
-
- *codeptr = code;
- *ptrptr = ptr;
- *firstbyteptr = firstbyte;
- *reqbyteptr = reqbyte;
- return true;
- }
-
- /* Another branch follows; insert an "or" node. Its length field points back
- to the previous branch while the bracket remains open. At the end the chain
- is reversed. It's done like this so that the start of the bracket has a
- zero offset until it is closed, making it possible to detect recursion. */
-
- *code = OP_ALT;
- putLinkValue(code + 1, code - last_branch);
- last_branch = code;
- code += 1 + LINK_SIZE;
- ptr++;
- }
- ASSERT_NOT_REACHED();
-}
-
-/*************************************************
-* Check for anchored expression *
-*************************************************/
-
-/* Try to find out if this is an anchored regular expression. Consider each
-alternative branch. If they all start OP_CIRC, or with a bracket
-all of whose alternatives start OP_CIRC (recurse ad lib), then
-it's anchored.
-
-Arguments:
- code points to start of expression (the bracket)
- captureMap a bitmap of which brackets we are inside while testing; this
- handles up to substring 31; all brackets after that share
- the zero bit
- backrefMap the back reference bitmap
-*/
-
-static bool branchIsAnchored(const unsigned char* code)
-{
- const unsigned char* scode = firstSignificantOpcode(code);
- int op = *scode;
-
- /* Brackets */
- if (op >= OP_BRA || op == OP_ASSERT)
- return bracketIsAnchored(scode);
-
- /* Check for explicit anchoring */
- return op == OP_CIRC;
-}
-
-static bool bracketIsAnchored(const unsigned char* code)
-{
- do {
- if (!branchIsAnchored(code + 1 + LINK_SIZE))
- return false;
- code += getLinkValue(code + 1);
- } while (*code == OP_ALT); /* Loop for each alternative */
- return true;
-}
-
-/*************************************************
-* Check for starting with ^ or .* *
-*************************************************/
-
-/* This is called to find out if every branch starts with ^ or .* so that
-"first char" processing can be done to speed things up in multiline
-matching and for non-DOTALL patterns that start with .* (which must start at
-the beginning or after \n)
-
-Except when the .* appears inside capturing parentheses, and there is a
-subsequent back reference to those parentheses. By keeping a bitmap of the
-first 31 back references, we can catch some of the more common cases more
-precisely; all the greater back references share a single bit.
-
-Arguments:
- code points to start of expression (the bracket)
- captureMap a bitmap of which brackets we are inside while testing; this
- handles up to substring 31; all brackets after that share
- the zero bit
- backrefMap the back reference bitmap
-*/
-
-static bool branchNeedsLineStart(const unsigned char* code, unsigned captureMap, unsigned backrefMap)
-{
- const unsigned char* scode = firstSignificantOpcode(code);
- int op = *scode;
-
- /* Capturing brackets */
- if (op > OP_BRA) {
- int captureNum = op - OP_BRA;
- if (captureNum > EXTRACT_BASIC_MAX)
- captureNum = get2ByteValue(scode + 2 + LINK_SIZE);
- int bracketMask = (captureNum < 32) ? (1 << captureNum) : 1;
- return bracketNeedsLineStart(scode, captureMap | bracketMask, backrefMap);
- }
-
- /* Other brackets */
- if (op == OP_BRA || op == OP_ASSERT)
- return bracketNeedsLineStart(scode, captureMap, backrefMap);
-
- /* .* means "start at start or after \n" if it isn't in brackets that
- may be referenced. */
-
- if (op == OP_TYPESTAR || op == OP_TYPEMINSTAR)
- return scode[1] == OP_NOT_NEWLINE && !(captureMap & backrefMap);
-
- /* Explicit ^ */
- return op == OP_CIRC || op == OP_BOL;
-}
-
-static bool bracketNeedsLineStart(const unsigned char* code, unsigned captureMap, unsigned backrefMap)
-{
- do {
- if (!branchNeedsLineStart(code + 1 + LINK_SIZE, captureMap, backrefMap))
- return false;
- code += getLinkValue(code + 1);
- } while (*code == OP_ALT); /* Loop for each alternative */
- return true;
-}
-
-/*************************************************
-* Check for asserted fixed first char *
-*************************************************/
-
-/* During compilation, the "first char" settings from forward assertions are
-discarded, because they can cause conflicts with actual literals that follow.
-However, if we end up without a first char setting for an unanchored pattern,
-it is worth scanning the regex to see if there is an initial asserted first
-char. If all branches start with the same asserted char, or with a bracket all
-of whose alternatives start with the same asserted char (recurse ad lib), then
-we return that char, otherwise -1.
-
-Arguments:
- code points to start of expression (the bracket)
- options pointer to the options (used to check casing changes)
- inassert true if in an assertion
-
-Returns: -1 or the fixed first char
-*/
-
-static int branchFindFirstAssertedCharacter(const unsigned char* code, bool inassert)
-{
- const unsigned char* scode = firstSignificantOpcodeSkippingAssertions(code);
- int op = *scode;
-
- if (op >= OP_BRA)
- op = OP_BRA;
-
- switch (op) {
- default:
- return -1;
-
- case OP_BRA:
- case OP_ASSERT:
- return bracketFindFirstAssertedCharacter(scode, op == OP_ASSERT);
-
- case OP_EXACT:
- scode += 2;
- /* Fall through */
-
- case OP_CHAR:
- case OP_CHAR_IGNORING_CASE:
- case OP_ASCII_CHAR:
- case OP_ASCII_LETTER_IGNORING_CASE:
- case OP_PLUS:
- case OP_MINPLUS:
- if (!inassert)
- return -1;
- return scode[1];
- }
-}
-
-static int bracketFindFirstAssertedCharacter(const unsigned char* code, bool inassert)
-{
- int c = -1;
- do {
- int d = branchFindFirstAssertedCharacter(code + 1 + LINK_SIZE, inassert);
- if (d < 0)
- return -1;
- if (c < 0)
- c = d;
- else if (c != d)
- return -1;
- code += getLinkValue(code + 1);
- } while (*code == OP_ALT);
- return c;
-}
-
-static inline int multiplyWithOverflowCheck(int a, int b)
-{
- if (!a || !b)
- return 0;
- if (a > MAX_PATTERN_SIZE / b)
- return -1;
- return a * b;
-}
-
-static int calculateCompiledPatternLength(const UChar* pattern, int patternLength, JSRegExpIgnoreCaseOption ignoreCase,
- CompileData& cd, ErrorCode& errorcode)
-{
- /* Make a pass over the pattern to compute the
- amount of store required to hold the compiled code. This does not have to be
- perfect as long as errors are overestimates. */
-
- if (patternLength > MAX_PATTERN_SIZE) {
- errorcode = ERR16;
- return -1;
- }
-
- int length = 1 + LINK_SIZE; /* For initial BRA plus length */
- int branch_extra = 0;
- int lastitemlength = 0;
- unsigned brastackptr = 0;
- int brastack[BRASTACK_SIZE];
- unsigned char bralenstack[BRASTACK_SIZE];
- int bracount = 0;
-
- const UChar* ptr = (const UChar*)(pattern - 1);
- const UChar* patternEnd = (const UChar*)(pattern + patternLength);
-
- while (++ptr < patternEnd) {
- int minRepeats = 0, maxRepeats = 0;
- int c = *ptr;
-
- switch (c) {
- /* A backslashed item may be an escaped data character or it may be a
- character type. */
-
- case '\\':
- c = checkEscape(&ptr, patternEnd, &errorcode, cd.numCapturingBrackets, false);
- if (errorcode != 0)
- return -1;
-
- lastitemlength = 1; /* Default length of last item for repeats */
-
- if (c >= 0) { /* Data character */
- length += 2; /* For a one-byte character */
-
- if (c > 127) {
- int i;
- for (i = 0; i < kjs_pcre_utf8_table1_size; i++)
- if (c <= kjs_pcre_utf8_table1[i]) break;
- length += i;
- lastitemlength += i;
- }
-
- continue;
- }
-
- /* Other escapes need one byte */
-
- length++;
-
- /* A back reference needs an additional 2 bytes, plus either one or 5
- bytes for a repeat. We also need to keep the value of the highest
- back reference. */
-
- if (c <= -ESC_REF) {
- int refnum = -c - ESC_REF;
- cd.backrefMap |= (refnum < 32) ? (1 << refnum) : 1;
- if (refnum > cd.top_backref)
- cd.top_backref = refnum;
- length += 2; /* For single back reference */
- if (safelyCheckNextChar(ptr, patternEnd, '{') && isCountedRepeat(ptr + 2, patternEnd)) {
- ptr = readRepeatCounts(ptr + 2, &minRepeats, &maxRepeats, &errorcode);
- if (errorcode)
- return -1;
- if ((minRepeats == 0 && (maxRepeats == 1 || maxRepeats == -1)) ||
- (minRepeats == 1 && maxRepeats == -1))
- length++;
- else
- length += 5;
- if (safelyCheckNextChar(ptr, patternEnd, '?'))
- ptr++;
- }
- }
- continue;
-
- case '^': /* Single-byte metacharacters */
- case '.':
- case '$':
- length++;
- lastitemlength = 1;
- continue;
-
- case '*': /* These repeats won't be after brackets; */
- case '+': /* those are handled separately */
- case '?':
- length++;
- goto POSSESSIVE;
-
- /* This covers the cases of braced repeats after a single char, metachar,
- class, or back reference. */
-
- case '{':
- if (!isCountedRepeat(ptr + 1, patternEnd))
- goto NORMAL_CHAR;
- ptr = readRepeatCounts(ptr + 1, &minRepeats, &maxRepeats, &errorcode);
- if (errorcode != 0)
- return -1;
-
- /* These special cases just insert one extra opcode */
-
- if ((minRepeats == 0 && (maxRepeats == 1 || maxRepeats == -1)) ||
- (minRepeats == 1 && maxRepeats == -1))
- length++;
-
- /* These cases might insert additional copies of a preceding character. */
-
- else {
- if (minRepeats != 1) {
- length -= lastitemlength; /* Uncount the original char or metachar */
- if (minRepeats > 0)
- length += 3 + lastitemlength;
- }
- length += lastitemlength + ((maxRepeats > 0) ? 3 : 1);
- }
-
- if (safelyCheckNextChar(ptr, patternEnd, '?'))
- ptr++; /* Needs no extra length */
-
- POSSESSIVE: /* Test for possessive quantifier */
- if (safelyCheckNextChar(ptr, patternEnd, '+')) {
- ptr++;
- length += 2 + 2 * LINK_SIZE; /* Allow for atomic brackets */
- }
- continue;
-
- /* An alternation contains an offset to the next branch or ket. If any ims
- options changed in the previous branch(es), and/or if we are in a
- lookbehind assertion, extra space will be needed at the start of the
- branch. This is handled by branch_extra. */
-
- case '|':
- if (brastackptr == 0)
- cd.needOuterBracket = true;
- length += 1 + LINK_SIZE + branch_extra;
- continue;
-
- /* A character class uses 33 characters provided that all the character
- values are less than 256. Otherwise, it uses a bit map for low valued
- characters, and individual items for others. Don't worry about character
- types that aren't allowed in classes - they'll get picked up during the
- compile. A character class that contains only one single-byte character
- uses 2 or 3 bytes, depending on whether it is negated or not. Notice this
- where we can. (In UTF-8 mode we can do this only for chars < 128.) */
-
- case '[': {
- int class_optcount;
- if (*(++ptr) == '^') {
- class_optcount = 10; /* Greater than one */
- ptr++;
- }
- else
- class_optcount = 0;
-
- bool class_utf8 = false;
-
- for (; ptr < patternEnd && *ptr != ']'; ++ptr) {
- /* Check for escapes */
-
- if (*ptr == '\\') {
- c = checkEscape(&ptr, patternEnd, &errorcode, cd.numCapturingBrackets, true);
- if (errorcode != 0)
- return -1;
-
- /* Handle escapes that turn into characters */
-
- if (c >= 0)
- goto NON_SPECIAL_CHARACTER;
-
- /* Escapes that are meta-things. The normal ones just affect the
- bit map, but Unicode properties require an XCLASS extended item. */
-
- else
- class_optcount = 10; /* \d, \s etc; make sure > 1 */
- }
-
- /* Anything else increments the possible optimization count. We have to
- detect ranges here so that we can compute the number of extra ranges for
- caseless wide characters when UCP support is available. If there are wide
- characters, we are going to have to use an XCLASS, even for single
- characters. */
-
- else {
- c = *ptr;
-
- /* Come here from handling \ above when it escapes to a char value */
-
- NON_SPECIAL_CHARACTER:
- class_optcount++;
-
- int d = -1;
- if (safelyCheckNextChar(ptr, patternEnd, '-')) {
- UChar const *hyptr = ptr++;
- if (safelyCheckNextChar(ptr, patternEnd, '\\')) {
- ptr++;
- d = checkEscape(&ptr, patternEnd, &errorcode, cd.numCapturingBrackets, true);
- if (errorcode != 0)
- return -1;
- }
- else if ((ptr + 1 < patternEnd) && ptr[1] != ']')
- d = *++ptr;
- if (d < 0)
- ptr = hyptr; /* go back to hyphen as data */
- }
-
- /* If d >= 0 we have a range. In UTF-8 mode, if the end is > 255, or >
- 127 for caseless matching, we will need to use an XCLASS. */
-
- if (d >= 0) {
- class_optcount = 10; /* Ensure > 1 */
- if (d < c) {
- errorcode = ERR8;
- return -1;
- }
-
- if ((d > 255 || (ignoreCase && d > 127))) {
- unsigned char buffer[6];
- if (!class_utf8) /* Allow for XCLASS overhead */
- {
- class_utf8 = true;
- length += LINK_SIZE + 2;
- }
-
- /* If we have UCP support, find out how many extra ranges are
- needed to map the other case of characters within this range. We
- have to mimic the range optimization here, because extending the
- range upwards might push d over a boundary that makes it use
- another byte in the UTF-8 representation. */
-
- if (ignoreCase) {
- int occ, ocd;
- int cc = c;
- int origd = d;
- while (getOthercaseRange(&cc, origd, &occ, &ocd)) {
- if (occ >= c && ocd <= d)
- continue; /* Skip embedded */
-
- if (occ < c && ocd >= c - 1) /* Extend the basic range */
- { /* if there is overlap, */
- c = occ; /* noting that if occ < c */
- continue; /* we can't have ocd > d */
- } /* because a subrange is */
- if (ocd > d && occ <= d + 1) /* always shorter than */
- { /* the basic range. */
- d = ocd;
- continue;
- }
-
- /* An extra item is needed */
-
- length += 1 + encodeUTF8(occ, buffer) +
- ((occ == ocd) ? 0 : encodeUTF8(ocd, buffer));
- }
- }
-
- /* The length of the (possibly extended) range */
-
- length += 1 + encodeUTF8(c, buffer) + encodeUTF8(d, buffer);
- }
-
- }
-
- /* We have a single character. There is nothing to be done unless we
- are in UTF-8 mode. If the char is > 255, or 127 when caseless, we must
- allow for an XCL_SINGLE item, doubled for caselessness if there is UCP
- support. */
-
- else {
- if ((c > 255 || (ignoreCase && c > 127))) {
- unsigned char buffer[6];
- class_optcount = 10; /* Ensure > 1 */
- if (!class_utf8) /* Allow for XCLASS overhead */
- {
- class_utf8 = true;
- length += LINK_SIZE + 2;
- }
- length += (ignoreCase ? 2 : 1) * (1 + encodeUTF8(c, buffer));
- }
- }
- }
- }
-
- if (ptr >= patternEnd) { /* Missing terminating ']' */
- errorcode = ERR6;
- return -1;
- }
-
- /* We can optimize when there was only one optimizable character.
- Note that this does not detect the case of a negated single character.
- In that case we do an incorrect length computation, but it's not a serious
- problem because the computed length is too large rather than too small. */
-
- if (class_optcount == 1)
- goto NORMAL_CHAR;
-
- /* Here, we handle repeats for the class opcodes. */
- {
- length += 33;
-
- /* A repeat needs either 1 or 5 bytes. If it is a possessive quantifier,
- we also need extra for wrapping the whole thing in a sub-pattern. */
-
- if (safelyCheckNextChar(ptr, patternEnd, '{') && isCountedRepeat(ptr + 2, patternEnd)) {
- ptr = readRepeatCounts(ptr + 2, &minRepeats, &maxRepeats, &errorcode);
- if (errorcode != 0)
- return -1;
- if ((minRepeats == 0 && (maxRepeats == 1 || maxRepeats == -1)) ||
- (minRepeats == 1 && maxRepeats == -1))
- length++;
- else
- length += 5;
- if (safelyCheckNextChar(ptr, patternEnd, '+')) {
- ptr++;
- length += 2 + 2 * LINK_SIZE;
- } else if (safelyCheckNextChar(ptr, patternEnd, '?'))
- ptr++;
- }
- }
- continue;
- }
-
- /* Brackets may be genuine groups or special things */
-
- case '(': {
- int branch_newextra = 0;
- int bracket_length = 1 + LINK_SIZE;
- bool capturing = false;
-
- /* Handle special forms of bracket, which all start (? */
-
- if (safelyCheckNextChar(ptr, patternEnd, '?')) {
- switch (c = (ptr + 2 < patternEnd ? ptr[2] : 0)) {
- /* Non-referencing groups and lookaheads just move the pointer on, and
- then behave like a non-special bracket, except that they don't increment
- the count of extracting brackets. Ditto for the "once only" bracket,
- which is in Perl from version 5.005. */
-
- case ':':
- case '=':
- case '!':
- ptr += 2;
- break;
-
- /* Else loop checking valid options until ) is met. Anything else is an
- error. If we are without any brackets, i.e. at top level, the settings
- act as if specified in the options, so massage the options immediately.
- This is for backward compatibility with Perl 5.004. */
-
- default:
- errorcode = ERR12;
- return -1;
- }
- } else
- capturing = 1;
-
- /* Capturing brackets must be counted so we can process escapes in a
- Perlish way. If the number exceeds EXTRACT_BASIC_MAX we are going to need
- an additional 3 bytes of memory per capturing bracket. */
-
- if (capturing) {
- bracount++;
- if (bracount > EXTRACT_BASIC_MAX)
- bracket_length += 3;
- }
-
- /* Save length for computing whole length at end if there's a repeat that
- requires duplication of the group. Also save the current value of
- branch_extra, and start the new group with the new value. If non-zero, this
- will either be 2 for a (?imsx: group, or 3 for a lookbehind assertion. */
-
- if (brastackptr >= sizeof(brastack)/sizeof(int)) {
- errorcode = ERR17;
- return -1;
- }
-
- bralenstack[brastackptr] = branch_extra;
- branch_extra = branch_newextra;
-
- brastack[brastackptr++] = length;
- length += bracket_length;
- continue;
- }
-
- /* Handle ket. Look for subsequent maxRepeats/minRepeats; for certain sets of values we
- have to replicate this bracket up to that many times. If brastackptr is
- 0 this is an unmatched bracket which will generate an error, but take care
- not to try to access brastack[-1] when computing the length and restoring
- the branch_extra value. */
-
- case ')': {
- int duplength;
- length += 1 + LINK_SIZE;
- if (brastackptr > 0) {
- duplength = length - brastack[--brastackptr];
- branch_extra = bralenstack[brastackptr];
- }
- else
- duplength = 0;
-
- /* Leave ptr at the final char; for readRepeatCounts this happens
- automatically; for the others we need an increment. */
-
- if ((ptr + 1 < patternEnd) && (c = ptr[1]) == '{' && isCountedRepeat(ptr + 2, patternEnd)) {
- ptr = readRepeatCounts(ptr + 2, &minRepeats, &maxRepeats, &errorcode);
- if (errorcode)
- return -1;
- } else if (c == '*') {
- minRepeats = 0;
- maxRepeats = -1;
- ptr++;
- } else if (c == '+') {
- minRepeats = 1;
- maxRepeats = -1;
- ptr++;
- } else if (c == '?') {
- minRepeats = 0;
- maxRepeats = 1;
- ptr++;
- } else {
- minRepeats = 1;
- maxRepeats = 1;
- }
-
- /* If the minimum is zero, we have to allow for an OP_BRAZERO before the
- group, and if the maximum is greater than zero, we have to replicate
- maxval-1 times; each replication acquires an OP_BRAZERO plus a nesting
- bracket set. */
-
- int repeatsLength;
- if (minRepeats == 0) {
- length++;
- if (maxRepeats > 0) {
- repeatsLength = multiplyWithOverflowCheck(maxRepeats - 1, duplength + 3 + 2 * LINK_SIZE);
- if (repeatsLength < 0) {
- errorcode = ERR16;
- return -1;
- }
- length += repeatsLength;
- if (length > MAX_PATTERN_SIZE) {
- errorcode = ERR16;
- return -1;
- }
- }
- }
-
- /* When the minimum is greater than zero, we have to replicate up to
- minval-1 times, with no additions required in the copies. Then, if there
- is a limited maximum we have to replicate up to maxval-1 times allowing
- for a BRAZERO item before each optional copy and nesting brackets for all
- but one of the optional copies. */
-
- else {
- repeatsLength = multiplyWithOverflowCheck(minRepeats - 1, duplength);
- if (repeatsLength < 0) {
- errorcode = ERR16;
- return -1;
- }
- length += repeatsLength;
- if (maxRepeats > minRepeats) { /* Need this test as maxRepeats=-1 means no limit */
- repeatsLength = multiplyWithOverflowCheck(maxRepeats - minRepeats, duplength + 3 + 2 * LINK_SIZE);
- if (repeatsLength < 0) {
- errorcode = ERR16;
- return -1;
- }
- length += repeatsLength - (2 + 2 * LINK_SIZE);
- }
- if (length > MAX_PATTERN_SIZE) {
- errorcode = ERR16;
- return -1;
- }
- }
-
- /* Allow space for once brackets for "possessive quantifier" */
-
- if (safelyCheckNextChar(ptr, patternEnd, '+')) {
- ptr++;
- length += 2 + 2 * LINK_SIZE;
- }
- continue;
- }
-
- /* Non-special character. It won't be space or # in extended mode, so it is
- always a genuine character. If we are in a \Q...\E sequence, check for the
- end; if not, we have a literal. */
-
- default:
- NORMAL_CHAR:
- length += 2; /* For a one-byte character */
- lastitemlength = 1; /* Default length of last item for repeats */
-
- if (c > 127) {
- int i;
- for (i = 0; i < kjs_pcre_utf8_table1_size; i++)
- if (c <= kjs_pcre_utf8_table1[i])
- break;
- length += i;
- lastitemlength += i;
- }
-
- continue;
- }
- }
-
- length += 2 + LINK_SIZE; /* For final KET and END */
-
- cd.numCapturingBrackets = bracount;
- return length;
-}
-
-/*************************************************
-* Compile a Regular Expression *
-*************************************************/
-
-/* This function takes a string and returns a pointer to a block of store
-holding a compiled version of the expression. The original API for this
-function had no error code return variable; it is retained for backwards
-compatibility. The new function is given a new name.
-
-Arguments:
- pattern the regular expression
- options various option bits
- errorcodeptr pointer to error code variable (pcre_compile2() only)
- can be NULL if you don't want a code value
- errorptr pointer to pointer to error text
- erroroffset ptr offset in pattern where error was detected
- tables pointer to character tables or NULL
-
-Returns: pointer to compiled data block, or NULL on error,
- with errorptr and erroroffset set
-*/
-
-static inline JSRegExp* returnError(ErrorCode errorcode, const char** errorptr)
-{
- *errorptr = errorText(errorcode);
- return 0;
-}
-
-JSRegExp* jsRegExpCompile(const UChar* pattern, int patternLength,
- JSRegExpIgnoreCaseOption ignoreCase, JSRegExpMultilineOption multiline,
- unsigned* numSubpatterns, const char** errorptr,
- malloc_t* allocate_function, free_t* free_function)
-{
- /* We can't pass back an error message if errorptr is NULL; I guess the best we
- can do is just return NULL, but we can set a code value if there is a code pointer. */
- if (!errorptr)
- return 0;
- *errorptr = NULL;
-
- CompileData cd;
-
- ErrorCode errorcode = ERR0;
- /* Call this once just to count the brackets. */
- calculateCompiledPatternLength(pattern, patternLength, ignoreCase, cd, errorcode);
- /* Call it again to compute the length. */
- int length = calculateCompiledPatternLength(pattern, patternLength, ignoreCase, cd, errorcode);
- if (errorcode)
- return returnError(errorcode, errorptr);
-
- if (length > MAX_PATTERN_SIZE)
- return returnError(ERR16, errorptr);
-
- size_t size = length + sizeof(JSRegExp);
- JSRegExp* re = reinterpret_cast<JSRegExp*>((*allocate_function)(size));
-
- if (!re)
- return returnError(ERR13, errorptr);
-
- re->options = (ignoreCase ? IgnoreCaseOption : 0) | (multiline ? MatchAcrossMultipleLinesOption : 0);
-
- /* The starting points of the name/number translation table and of the code are
- passed around in the compile data block. */
-
- const unsigned char* codeStart = (const unsigned char*)(re + 1);
-
- /* Set up a starting, non-extracting bracket, then compile the expression. On
- error, errorcode will be set non-zero, so we don't need to look at the result
- of the function here. */
-
- const UChar* ptr = (const UChar*)pattern;
- const UChar* patternEnd = pattern + patternLength;
- unsigned char* code = (unsigned char*)codeStart;
- int firstbyte, reqbyte;
- int bracketCount = 0;
- if (!cd.needOuterBracket)
- compileBranch(re->options, &bracketCount, &code, &ptr, patternEnd, &errorcode, &firstbyte, &reqbyte, cd);
- else {
- *code = OP_BRA;
- compileBracket(re->options, &bracketCount, &code, &ptr, patternEnd, &errorcode, 0, &firstbyte, &reqbyte, cd);
- }
- re->top_bracket = bracketCount;
- re->top_backref = cd.top_backref;
-
- /* If not reached end of pattern on success, there's an excess bracket. */
-
- if (errorcode == 0 && ptr < patternEnd)
- errorcode = ERR10;
-
- /* Fill in the terminating state and check for disastrous overflow, but
- if debugging, leave the test till after things are printed out. */
-
- *code++ = OP_END;
-
- ASSERT(code - codeStart <= length);
- if (code - codeStart > length)
- errorcode = ERR7;
-
- /* Give an error if there's back reference to a non-existent capturing
- subpattern. */
-
- if (re->top_backref > re->top_bracket)
- errorcode = ERR15;
-
- /* Failed to compile, or error while post-processing */
-
- if (errorcode != ERR0) {
- (*free_function)(reinterpret_cast<void*>(re));
- return returnError(errorcode, errorptr);
- }
-
- /* If the anchored option was not passed, set the flag if we can determine that
- the pattern is anchored by virtue of ^ characters or \A or anything else (such
- as starting with .* when DOTALL is set).
-
- Otherwise, if we know what the first character has to be, save it, because that
- speeds up unanchored matches no end. If not, see if we can set the
- UseMultiLineFirstByteOptimizationOption flag. This is helpful for multiline matches when all branches
- start with ^. and also when all branches start with .* for non-DOTALL matches.
- */
-
- if (cd.needOuterBracket ? bracketIsAnchored(codeStart) : branchIsAnchored(codeStart))
- re->options |= IsAnchoredOption;
- else {
- if (firstbyte < 0) {
- firstbyte = (cd.needOuterBracket
- ? bracketFindFirstAssertedCharacter(codeStart, false)
- : branchFindFirstAssertedCharacter(codeStart, false))
- | ((re->options & IgnoreCaseOption) ? REQ_IGNORE_CASE : 0);
- }
- if (firstbyte >= 0) {
- int ch = firstbyte & 255;
- if (ch < 127) {
- re->first_byte = ((firstbyte & REQ_IGNORE_CASE) && flipCase(ch) == ch) ? ch : firstbyte;
- re->options |= UseFirstByteOptimizationOption;
- }
- } else {
- if (cd.needOuterBracket ? bracketNeedsLineStart(codeStart, 0, cd.backrefMap) : branchNeedsLineStart(codeStart, 0, cd.backrefMap))
- re->options |= UseMultiLineFirstByteOptimizationOption;
- }
- }
-
- /* For an anchored pattern, we use the "required byte" only if it follows a
- variable length item in the regex. Remove the caseless flag for non-caseable
- bytes. */
-
- if (reqbyte >= 0 && (!(re->options & IsAnchoredOption) || (reqbyte & REQ_VARY))) {
- int ch = reqbyte & 255;
- if (ch < 127) {
- re->req_byte = ((reqbyte & REQ_IGNORE_CASE) && flipCase(ch) == ch) ? (reqbyte & ~REQ_IGNORE_CASE) : reqbyte;
- re->options |= UseRequiredByteOptimizationOption;
- }
- }
-
- if (numSubpatterns)
- *numSubpatterns = re->top_bracket;
- return re;
-}
-
-void jsRegExpFree(JSRegExp* re, free_t* free_function)
-{
- (*free_function)(reinterpret_cast<void*>(re));
-}
-
-} } // namespace v8::jscre
+++ /dev/null
-/* This is JavaScriptCore's variant of the PCRE library. While this library
-started out as a copy of PCRE, many of the features of PCRE have been
-removed. This library now supports only the regular expression features
-required by the JavaScript language specification, and has only the functions
-needed by JavaScriptCore and the rest of WebKit.
-
- Originally written by Philip Hazel
- Copyright (c) 1997-2006 University of Cambridge
- Copyright (C) 2002, 2004, 2006, 2007 Apple Inc. All rights reserved.
- Copyright (C) 2007 Eric Seidel <eric@webkit.org>
-
------------------------------------------------------------------------------
-Redistribution and use in source and binary forms, with or without
-modification, are permitted provided that the following conditions are met:
-
- * Redistributions of source code must retain the above copyright notice,
- this list of conditions and the following disclaimer.
-
- * Redistributions in binary form must reproduce the above copyright
- notice, this list of conditions and the following disclaimer in the
- documentation and/or other materials provided with the distribution.
-
- * Neither the name of the University of Cambridge nor the names of its
- contributors may be used to endorse or promote products derived from
- this software without specific prior written permission.
-
-THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
-AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
-IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
-ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
-LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
-CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
-SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
-INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
-CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
-ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
-POSSIBILITY OF SUCH DAMAGE.
------------------------------------------------------------------------------
-*/
-
-/* This module contains jsRegExpExecute(), the externally visible function
-that does pattern matching using an NFA algorithm, following the rules from
-the JavaScript specification. There are also some supporting functions. */
-
-#include "config.h"
-
-#include "pcre_internal.h"
-
-#include "ASCIICType.h"
-
-#include <ctype.h>
-#include <limits.h>
-#include <string.h> /* for memcpy */
-
-#ifdef __GNUC__
-#define USE_COMPUTED_GOTO_FOR_MATCH_RECURSION
-//#define USE_COMPUTED_GOTO_FOR_MATCH_OPCODE_LOOP
-#endif
-
-/* Avoid warnings on Windows. */
-#undef min
-#undef max
-
-namespace v8 { namespace jscre {
-
-#ifndef USE_COMPUTED_GOTO_FOR_MATCH_RECURSION
-typedef int ReturnLocation;
-#else
-typedef void* ReturnLocation;
-#endif
-
-/* Structure for building a chain of data for holding the values of
-the subject pointer at the start of each bracket, used to detect when
-an empty string has been matched by a bracket to break infinite loops. */
-struct BracketChainNode {
- BracketChainNode* previousBracket;
- const UChar* bracketStart;
-};
-
-struct MatchFrame {
- ReturnLocation returnLocation;
- struct MatchFrame* previousFrame;
-
- /* Function arguments that may change */
- struct {
- const UChar* subjectPtr;
- const unsigned char* instructionPtr;
- int offsetTop;
- BracketChainNode* bracketChain;
- } args;
-
-
- /* PCRE uses "fake" recursion built off of gotos, thus
- stack-based local variables are not safe to use. Instead we have to
- store local variables on the current MatchFrame. */
- struct {
- const unsigned char* data;
- const unsigned char* startOfRepeatingBracket;
- const UChar* subjectPtrAtStartOfInstruction; // Several instrutions stash away a subjectPtr here for later compare
- const unsigned char* instructionPtrAtStartOfOnce;
-
- int repeatOthercase;
-
- int ctype;
- int fc;
- int fi;
- int length;
- int max;
- int number;
- int offset;
- int saveOffset1;
- int saveOffset2;
- int saveOffset3;
-
- BracketChainNode bracketChainNode;
- } locals;
-};
-
-/* Structure for passing "static" information around between the functions
-doing traditional NFA matching, so that they are thread-safe. */
-
-struct MatchData {
- int* offsetVector; /* Offset vector */
- int offsetEnd; /* One past the end */
- int offsetMax; /* The maximum usable for return data */
- bool offsetOverflow; /* Set if too many extractions */
- const UChar* startSubject; /* Start of the subject string */
- const UChar* endSubject; /* End of the subject string */
- const UChar* endMatchPtr; /* Subject position at end match */
- int endOffsetTop; /* Highwater mark at end of match */
- bool multiline;
- bool ignoreCase;
-};
-
-/* The maximum remaining length of subject we are prepared to search for a
-req_byte match. */
-
-#define REQ_BYTE_MAX 1000
-
-/* The below limit restricts the number of "recursive" match calls in order to
-avoid spending exponential time on complex regular expressions. */
-
-static const unsigned matchLimit = 100000;
-
-#ifdef DEBUG
-/*************************************************
-* Debugging function to print chars *
-*************************************************/
-
-/* Print a sequence of chars in printable format, stopping at the end of the
-subject if the requested.
-
-Arguments:
- p points to characters
- length number to print
- isSubject true if printing from within md.startSubject
- md pointer to matching data block, if isSubject is true
-*/
-
-static void pchars(const UChar* p, int length, bool isSubject, const MatchData& md)
-{
- if (isSubject && length > md.endSubject - p)
- length = md.endSubject - p;
- while (length-- > 0) {
- int c;
- if (isprint(c = *(p++)))
- printf("%c", c);
- else if (c < 256)
- printf("\\x%02x", c);
- else
- printf("\\x{%x}", c);
- }
-}
-#endif
-
-/*************************************************
-* Match a back-reference *
-*************************************************/
-
-/* If a back reference hasn't been set, the length that is passed is greater
-than the number of characters left in the string, so the match fails.
-
-Arguments:
- offset index into the offset vector
- subjectPtr points into the subject
- length length to be matched
- md points to match data block
-
-Returns: true if matched
-*/
-
-static bool matchRef(int offset, const UChar* subjectPtr, int length, const MatchData& md)
-{
- const UChar* p = md.startSubject + md.offsetVector[offset];
-
-#ifdef DEBUG
- if (subjectPtr >= md.endSubject)
- printf("matching subject <null>");
- else {
- printf("matching subject ");
- pchars(subjectPtr, length, true, md);
- }
- printf(" against backref ");
- pchars(p, length, false, md);
- printf("\n");
-#endif
-
- /* Always fail if not enough characters left */
-
- if (length > md.endSubject - subjectPtr)
- return false;
-
- /* Separate the caselesss case for speed */
-
- if (md.ignoreCase) {
- while (length-- > 0) {
- UChar c = *p++;
- int othercase = kjs_pcre_ucp_othercase(c);
- UChar d = *subjectPtr++;
- if (c != d && othercase != d)
- return false;
- }
- }
- else {
- while (length-- > 0)
- if (*p++ != *subjectPtr++)
- return false;
- }
-
- return true;
-}
-
-#ifndef USE_COMPUTED_GOTO_FOR_MATCH_RECURSION
-
-/* Use numbered labels and switch statement at the bottom of the match function. */
-
-#define RMATCH_WHERE(num) num
-#define RRETURN_LABEL RRETURN_SWITCH
-
-#else
-
-/* Use GCC's computed goto extension. */
-
-/* For one test case this is more than 40% faster than the switch statement.
-We could avoid the use of the num argument entirely by using local labels,
-but using it for the GCC case as well as the non-GCC case allows us to share
-a bit more code and notice if we use conflicting numbers.*/
-
-#define RMATCH_WHERE(num) &&RRETURN_##num
-#define RRETURN_LABEL *stack.currentFrame->returnLocation
-
-#endif
-
-#define RECURSIVE_MATCH_COMMON(num) \
- goto RECURSE;\
- RRETURN_##num: \
- stack.popCurrentFrame();
-
-#define RECURSIVE_MATCH(num, ra, rb) \
- do { \
- stack.pushNewFrame((ra), (rb), RMATCH_WHERE(num)); \
- RECURSIVE_MATCH_COMMON(num) \
- } while (0)
-
-#define RECURSIVE_MATCH_STARTNG_NEW_GROUP(num, ra, rb) \
- do { \
- stack.pushNewFrame((ra), (rb), RMATCH_WHERE(num)); \
- startNewGroup(stack.currentFrame); \
- RECURSIVE_MATCH_COMMON(num) \
- } while (0)
-
-#define RRETURN goto RRETURN_LABEL
-
-#define RRETURN_NO_MATCH do { isMatch = false; RRETURN; } while (0)
-
-/*************************************************
-* Match from current position *
-*************************************************/
-
-/* On entry instructionPtr points to the first opcode, and subjectPtr to the first character
-in the subject string, while substringStart holds the value of subjectPtr at the start of the
-last bracketed group - used for breaking infinite loops matching zero-length
-strings. This function is called recursively in many circumstances. Whenever it
-returns a negative (error) response, the outer match() call must also return the
-same response.
-
-Arguments:
- subjectPtr pointer in subject
- instructionPtr position in code
- offsetTop current top pointer
- md pointer to "static" info for the match
-
-Returns: 1 if matched ) these values are >= 0
- 0 if failed to match )
- a negative error value if aborted by an error condition
- (e.g. stopped by repeated call or recursion limit)
-*/
-
-static const unsigned FRAMES_ON_STACK = 16;
-
-struct MatchStack {
- MatchStack()
- : framesEnd(frames + FRAMES_ON_STACK)
- , currentFrame(frames)
- , size(1) // match() creates accesses the first frame w/o calling pushNewFrame
- {
- ASSERT((sizeof(frames) / sizeof(frames[0])) == FRAMES_ON_STACK);
- }
-
- MatchFrame frames[FRAMES_ON_STACK];
- MatchFrame* framesEnd;
- MatchFrame* currentFrame;
- unsigned size;
-
- inline bool canUseStackBufferForNextFrame()
- {
- return size < FRAMES_ON_STACK;
- }
-
- inline MatchFrame* allocateNextFrame()
- {
- if (canUseStackBufferForNextFrame())
- return currentFrame + 1;
- return new MatchFrame;
- }
-
- inline void pushNewFrame(const unsigned char* instructionPtr, BracketChainNode* bracketChain, ReturnLocation returnLocation)
- {
- MatchFrame* newframe = allocateNextFrame();
- newframe->previousFrame = currentFrame;
-
- newframe->args.subjectPtr = currentFrame->args.subjectPtr;
- newframe->args.offsetTop = currentFrame->args.offsetTop;
- newframe->args.instructionPtr = instructionPtr;
- newframe->args.bracketChain = bracketChain;
- newframe->returnLocation = returnLocation;
- size++;
-
- currentFrame = newframe;
- }
-
- inline void popCurrentFrame()
- {
- MatchFrame* oldFrame = currentFrame;
- currentFrame = currentFrame->previousFrame;
- if (size > FRAMES_ON_STACK)
- delete oldFrame;
- size--;
- }
-
- void popAllFrames()
- {
- while (size)
- popCurrentFrame();
- }
-};
-
-static int matchError(int errorCode, MatchStack& stack)
-{
- stack.popAllFrames();
- return errorCode;
-}
-
-/* Get the next UTF-8 character, not advancing the pointer, incrementing length
- if there are extra bytes. This is called when we know we are in UTF-8 mode. */
-
-static inline void getUTF8CharAndIncrementLength(int& c, const unsigned char* subjectPtr, int& len)
-{
- c = *subjectPtr;
- if ((c & 0xc0) == 0xc0) {
- int gcaa = kjs_pcre_utf8_table4[c & 0x3f]; /* Number of additional bytes */
- int gcss = 6 * gcaa;
- c = (c & kjs_pcre_utf8_table3[gcaa]) << gcss;
- for (int gcii = 1; gcii <= gcaa; gcii++) {
- gcss -= 6;
- c |= (subjectPtr[gcii] & 0x3f) << gcss;
- }
- len += gcaa;
- }
-}
-
-static inline void startNewGroup(MatchFrame* currentFrame)
-{
- /* At the start of a bracketed group, add the current subject pointer to the
- stack of such pointers, to be re-instated at the end of the group when we hit
- the closing ket. When match() is called in other circumstances, we don't add to
- this stack. */
-
- currentFrame->locals.bracketChainNode.previousBracket = currentFrame->args.bracketChain;
- currentFrame->locals.bracketChainNode.bracketStart = currentFrame->args.subjectPtr;
- currentFrame->args.bracketChain = ¤tFrame->locals.bracketChainNode;
-}
-
-// FIXME: "minimize" means "not greedy", we should invert the callers to ask for "greedy" to be less confusing
-static inline void repeatInformationFromInstructionOffset(short instructionOffset, bool& minimize, int& minimumRepeats, int& maximumRepeats)
-{
- // Instruction offsets are based off of OP_CRSTAR, OP_STAR, OP_TYPESTAR, OP_NOTSTAR
- static const char minimumRepeatsFromInstructionOffset[] = { 0, 0, 1, 1, 0, 0 };
- static const int maximumRepeatsFromInstructionOffset[] = { INT_MAX, INT_MAX, INT_MAX, INT_MAX, 1, 1 };
-
- ASSERT(instructionOffset >= 0);
- ASSERT(instructionOffset <= (OP_CRMINQUERY - OP_CRSTAR));
-
- minimize = (instructionOffset & 1); // this assumes ordering: Instruction, MinimizeInstruction, Instruction2, MinimizeInstruction2
- minimumRepeats = minimumRepeatsFromInstructionOffset[instructionOffset];
- maximumRepeats = maximumRepeatsFromInstructionOffset[instructionOffset];
-}
-
-static int match(const UChar* subjectPtr, const unsigned char* instructionPtr, int offsetTop, MatchData& md)
-{
- bool isMatch = false;
- int min;
- bool minimize = false; /* Initialization not really needed, but some compilers think so. */
- unsigned matchCount = 0;
-
- MatchStack stack;
-
- /* The opcode jump table. */
-#ifdef USE_COMPUTED_GOTO_FOR_MATCH_OPCODE_LOOP
-#define EMIT_JUMP_TABLE_ENTRY(opcode) &&LABEL_OP_##opcode,
- static void* opcodeJumpTable[256] = { FOR_EACH_OPCODE(EMIT_JUMP_TABLE_ENTRY) };
-#undef EMIT_JUMP_TABLE_ENTRY
-#endif
-
- /* One-time setup of the opcode jump table. */
-#ifdef USE_COMPUTED_GOTO_FOR_MATCH_OPCODE_LOOP
- for (int i = 255; !opcodeJumpTable[i]; i--)
- opcodeJumpTable[i] = &&CAPTURING_BRACKET;
-#endif
-
-#ifdef USE_COMPUTED_GOTO_FOR_MATCH_RECURSION
- // Shark shows this as a hot line
- // Using a static const here makes this line disappear, but makes later access hotter (not sure why)
- stack.currentFrame->returnLocation = &&RETURN;
-#else
- stack.currentFrame->returnLocation = 0;
-#endif
- stack.currentFrame->args.subjectPtr = subjectPtr;
- stack.currentFrame->args.instructionPtr = instructionPtr;
- stack.currentFrame->args.offsetTop = offsetTop;
- stack.currentFrame->args.bracketChain = 0;
- startNewGroup(stack.currentFrame);
-
- /* This is where control jumps back to to effect "recursion" */
-
-RECURSE:
- if (++matchCount > matchLimit)
- return matchError(JSRegExpErrorHitLimit, stack);
-
- /* Now start processing the operations. */
-
-#ifndef USE_COMPUTED_GOTO_FOR_MATCH_OPCODE_LOOP
- while (true)
-#endif
- {
-
-#ifdef USE_COMPUTED_GOTO_FOR_MATCH_OPCODE_LOOP
-#define BEGIN_OPCODE(opcode) LABEL_OP_##opcode
-#define NEXT_OPCODE goto *opcodeJumpTable[*stack.currentFrame->args.instructionPtr]
-#else
-#define BEGIN_OPCODE(opcode) case OP_##opcode
-#define NEXT_OPCODE continue
-#endif
-
-#ifdef USE_COMPUTED_GOTO_FOR_MATCH_OPCODE_LOOP
- NEXT_OPCODE;
-#else
- switch (*stack.currentFrame->args.instructionPtr)
-#endif
- {
- /* Non-capturing bracket: optimized */
-
- BEGIN_OPCODE(BRA):
- NON_CAPTURING_BRACKET:
- DPRINTF(("start bracket 0\n"));
- do {
- RECURSIVE_MATCH_STARTNG_NEW_GROUP(2, stack.currentFrame->args.instructionPtr + 1 + LINK_SIZE, stack.currentFrame->args.bracketChain);
- if (isMatch)
- RRETURN;
- stack.currentFrame->args.instructionPtr += getLinkValue(stack.currentFrame->args.instructionPtr + 1);
- } while (*stack.currentFrame->args.instructionPtr == OP_ALT);
- DPRINTF(("bracket 0 failed\n"));
- RRETURN;
-
- /* Skip over large extraction number data if encountered. */
-
- BEGIN_OPCODE(BRANUMBER):
- stack.currentFrame->args.instructionPtr += 3;
- NEXT_OPCODE;
-
- /* End of the pattern. */
-
- BEGIN_OPCODE(END):
- md.endMatchPtr = stack.currentFrame->args.subjectPtr; /* Record where we ended */
- md.endOffsetTop = stack.currentFrame->args.offsetTop; /* and how many extracts were taken */
- isMatch = true;
- RRETURN;
-
- /* Assertion brackets. Check the alternative branches in turn - the
- matching won't pass the KET for an assertion. If any one branch matches,
- the assertion is true. Lookbehind assertions have an OP_REVERSE item at the
- start of each branch to move the current point backwards, so the code at
- this level is identical to the lookahead case. */
-
- BEGIN_OPCODE(ASSERT):
- do {
- RECURSIVE_MATCH_STARTNG_NEW_GROUP(6, stack.currentFrame->args.instructionPtr + 1 + LINK_SIZE, NULL);
- if (isMatch)
- break;
- stack.currentFrame->args.instructionPtr += getLinkValue(stack.currentFrame->args.instructionPtr + 1);
- } while (*stack.currentFrame->args.instructionPtr == OP_ALT);
- if (*stack.currentFrame->args.instructionPtr == OP_KET)
- RRETURN_NO_MATCH;
-
- /* Continue from after the assertion, updating the offsets high water
- mark, since extracts may have been taken during the assertion. */
-
- advanceToEndOfBracket(stack.currentFrame->args.instructionPtr);
- stack.currentFrame->args.instructionPtr += 1 + LINK_SIZE;
- stack.currentFrame->args.offsetTop = md.endOffsetTop;
- NEXT_OPCODE;
-
- /* Negative assertion: all branches must fail to match */
-
- BEGIN_OPCODE(ASSERT_NOT):
- do {
- RECURSIVE_MATCH_STARTNG_NEW_GROUP(7, stack.currentFrame->args.instructionPtr + 1 + LINK_SIZE, NULL);
- if (isMatch)
- RRETURN_NO_MATCH;
- stack.currentFrame->args.instructionPtr += getLinkValue(stack.currentFrame->args.instructionPtr + 1);
- } while (*stack.currentFrame->args.instructionPtr == OP_ALT);
-
- stack.currentFrame->args.instructionPtr += 1 + LINK_SIZE;
- NEXT_OPCODE;
-
- /* An alternation is the end of a branch; scan along to find the end of the
- bracketed group and go to there. */
-
- BEGIN_OPCODE(ALT):
- advanceToEndOfBracket(stack.currentFrame->args.instructionPtr);
- NEXT_OPCODE;
-
- /* BRAZERO and BRAMINZERO occur just before a bracket group, indicating
- that it may occur zero times. It may repeat infinitely, or not at all -
- i.e. it could be ()* or ()? in the pattern. Brackets with fixed upper
- repeat limits are compiled as a number of copies, with the optional ones
- preceded by BRAZERO or BRAMINZERO. */
-
- BEGIN_OPCODE(BRAZERO): {
- stack.currentFrame->locals.startOfRepeatingBracket = stack.currentFrame->args.instructionPtr + 1;
- RECURSIVE_MATCH_STARTNG_NEW_GROUP(14, stack.currentFrame->locals.startOfRepeatingBracket, stack.currentFrame->args.bracketChain);
- if (isMatch)
- RRETURN;
- advanceToEndOfBracket(stack.currentFrame->locals.startOfRepeatingBracket);
- stack.currentFrame->args.instructionPtr = stack.currentFrame->locals.startOfRepeatingBracket + 1 + LINK_SIZE;
- NEXT_OPCODE;
- }
-
- BEGIN_OPCODE(BRAMINZERO): {
- stack.currentFrame->locals.startOfRepeatingBracket = stack.currentFrame->args.instructionPtr + 1;
- advanceToEndOfBracket(stack.currentFrame->locals.startOfRepeatingBracket);
- RECURSIVE_MATCH_STARTNG_NEW_GROUP(15, stack.currentFrame->locals.startOfRepeatingBracket + 1 + LINK_SIZE, stack.currentFrame->args.bracketChain);
- if (isMatch)
- RRETURN;
- stack.currentFrame->args.instructionPtr++;
- NEXT_OPCODE;
- }
-
- /* End of a group, repeated or non-repeating. If we are at the end of
- an assertion "group", stop matching and return 1, but record the
- current high water mark for use by positive assertions. Do this also
- for the "once" (not-backup up) groups. */
-
- BEGIN_OPCODE(KET):
- BEGIN_OPCODE(KETRMIN):
- BEGIN_OPCODE(KETRMAX):
- stack.currentFrame->locals.instructionPtrAtStartOfOnce = stack.currentFrame->args.instructionPtr - getLinkValue(stack.currentFrame->args.instructionPtr + 1);
- stack.currentFrame->locals.subjectPtrAtStartOfInstruction = stack.currentFrame->args.bracketChain->bracketStart;
-
- /* Back up the stack of bracket start pointers. */
-
- stack.currentFrame->args.bracketChain = stack.currentFrame->args.bracketChain->previousBracket;
-
- if (*stack.currentFrame->locals.instructionPtrAtStartOfOnce == OP_ASSERT || *stack.currentFrame->locals.instructionPtrAtStartOfOnce == OP_ASSERT_NOT) {
- md.endOffsetTop = stack.currentFrame->args.offsetTop;
- isMatch = true;
- RRETURN;
- }
-
- /* In all other cases except a conditional group we have to check the
- group number back at the start and if necessary complete handling an
- extraction by setting the offsets and bumping the high water mark. */
-
- stack.currentFrame->locals.number = *stack.currentFrame->locals.instructionPtrAtStartOfOnce - OP_BRA;
-
- /* For extended extraction brackets (large number), we have to fish out
- the number from a dummy opcode at the start. */
-
- if (stack.currentFrame->locals.number > EXTRACT_BASIC_MAX)
- stack.currentFrame->locals.number = get2ByteValue(stack.currentFrame->locals.instructionPtrAtStartOfOnce + 2 + LINK_SIZE);
- stack.currentFrame->locals.offset = stack.currentFrame->locals.number << 1;
-
-#ifdef DEBUG
- printf("end bracket %d", stack.currentFrame->locals.number);
- printf("\n");
-#endif
-
- /* Test for a numbered group. This includes groups called as a result
- of recursion. Note that whole-pattern recursion is coded as a recurse
- into group 0, so it won't be picked up here. Instead, we catch it when
- the OP_END is reached. */
-
- if (stack.currentFrame->locals.number > 0) {
- if (stack.currentFrame->locals.offset >= md.offsetMax)
- md.offsetOverflow = true;
- else {
- md.offsetVector[stack.currentFrame->locals.offset] =
- md.offsetVector[md.offsetEnd - stack.currentFrame->locals.number];
- md.offsetVector[stack.currentFrame->locals.offset+1] = stack.currentFrame->args.subjectPtr - md.startSubject;
- if (stack.currentFrame->args.offsetTop <= stack.currentFrame->locals.offset)
- stack.currentFrame->args.offsetTop = stack.currentFrame->locals.offset + 2;
- }
- }
-
- /* For a non-repeating ket, just continue at this level. This also
- happens for a repeating ket if no characters were matched in the group.
- This is the forcible breaking of infinite loops as implemented in Perl
- 5.005. If there is an options reset, it will get obeyed in the normal
- course of events. */
-
- if (*stack.currentFrame->args.instructionPtr == OP_KET || stack.currentFrame->args.subjectPtr == stack.currentFrame->locals.subjectPtrAtStartOfInstruction) {
- stack.currentFrame->args.instructionPtr += 1 + LINK_SIZE;
- NEXT_OPCODE;
- }
-
- /* The repeating kets try the rest of the pattern or restart from the
- preceding bracket, in the appropriate order. */
-
- if (*stack.currentFrame->args.instructionPtr == OP_KETRMIN) {
- RECURSIVE_MATCH(16, stack.currentFrame->args.instructionPtr + 1 + LINK_SIZE, stack.currentFrame->args.bracketChain);
- if (isMatch)
- RRETURN;
- RECURSIVE_MATCH_STARTNG_NEW_GROUP(17, stack.currentFrame->locals.instructionPtrAtStartOfOnce, stack.currentFrame->args.bracketChain);
- if (isMatch)
- RRETURN;
- } else { /* OP_KETRMAX */
- RECURSIVE_MATCH_STARTNG_NEW_GROUP(18, stack.currentFrame->locals.instructionPtrAtStartOfOnce, stack.currentFrame->args.bracketChain);
- if (isMatch)
- RRETURN;
- RECURSIVE_MATCH(19, stack.currentFrame->args.instructionPtr + 1 + LINK_SIZE, stack.currentFrame->args.bracketChain);
- if (isMatch)
- RRETURN;
- }
- RRETURN;
-
- /* Start of subject. */
-
- BEGIN_OPCODE(CIRC):
- if (stack.currentFrame->args.subjectPtr != md.startSubject)
- RRETURN_NO_MATCH;
- stack.currentFrame->args.instructionPtr++;
- NEXT_OPCODE;
-
- /* After internal newline if multiline. */
-
- BEGIN_OPCODE(BOL):
- if (stack.currentFrame->args.subjectPtr != md.startSubject && !isNewline(stack.currentFrame->args.subjectPtr[-1]))
- RRETURN_NO_MATCH;
- stack.currentFrame->args.instructionPtr++;
- NEXT_OPCODE;
-
- /* End of subject. */
-
- BEGIN_OPCODE(DOLL):
- if (stack.currentFrame->args.subjectPtr < md.endSubject)
- RRETURN_NO_MATCH;
- stack.currentFrame->args.instructionPtr++;
- NEXT_OPCODE;
-
- /* Before internal newline if multiline. */
-
- BEGIN_OPCODE(EOL):
- if (stack.currentFrame->args.subjectPtr < md.endSubject && !isNewline(*stack.currentFrame->args.subjectPtr))
- RRETURN_NO_MATCH;
- stack.currentFrame->args.instructionPtr++;
- NEXT_OPCODE;
-
- /* Word boundary assertions */
-
- BEGIN_OPCODE(NOT_WORD_BOUNDARY):
- BEGIN_OPCODE(WORD_BOUNDARY): {
- bool currentCharIsWordChar = false;
- bool previousCharIsWordChar = false;
-
- if (stack.currentFrame->args.subjectPtr > md.startSubject)
- previousCharIsWordChar = isWordChar(stack.currentFrame->args.subjectPtr[-1]);
- if (stack.currentFrame->args.subjectPtr < md.endSubject)
- currentCharIsWordChar = isWordChar(*stack.currentFrame->args.subjectPtr);
-
- /* Now see if the situation is what we want */
- bool wordBoundaryDesired = (*stack.currentFrame->args.instructionPtr++ == OP_WORD_BOUNDARY);
- if (wordBoundaryDesired ? currentCharIsWordChar == previousCharIsWordChar : currentCharIsWordChar != previousCharIsWordChar)
- RRETURN_NO_MATCH;
- NEXT_OPCODE;
- }
-
- /* Match a single character type; inline for speed */
-
- BEGIN_OPCODE(NOT_NEWLINE):
- if (stack.currentFrame->args.subjectPtr >= md.endSubject)
- RRETURN_NO_MATCH;
- if (isNewline(*stack.currentFrame->args.subjectPtr++))
- RRETURN_NO_MATCH;
- stack.currentFrame->args.instructionPtr++;
- NEXT_OPCODE;
-
- BEGIN_OPCODE(NOT_DIGIT):
- if (stack.currentFrame->args.subjectPtr >= md.endSubject)
- RRETURN_NO_MATCH;
- if (isASCIIDigit(*stack.currentFrame->args.subjectPtr++))
- RRETURN_NO_MATCH;
- stack.currentFrame->args.instructionPtr++;
- NEXT_OPCODE;
-
- BEGIN_OPCODE(DIGIT):
- if (stack.currentFrame->args.subjectPtr >= md.endSubject)
- RRETURN_NO_MATCH;
- if (!isASCIIDigit(*stack.currentFrame->args.subjectPtr++))
- RRETURN_NO_MATCH;
- stack.currentFrame->args.instructionPtr++;
- NEXT_OPCODE;
-
- BEGIN_OPCODE(NOT_WHITESPACE):
- if (stack.currentFrame->args.subjectPtr >= md.endSubject)
- RRETURN_NO_MATCH;
- if (isSpaceChar(*stack.currentFrame->args.subjectPtr++))
- RRETURN_NO_MATCH;
- stack.currentFrame->args.instructionPtr++;
- NEXT_OPCODE;
-
- BEGIN_OPCODE(WHITESPACE):
- if (stack.currentFrame->args.subjectPtr >= md.endSubject)
- RRETURN_NO_MATCH;
- if (!isSpaceChar(*stack.currentFrame->args.subjectPtr++))
- RRETURN_NO_MATCH;
- stack.currentFrame->args.instructionPtr++;
- NEXT_OPCODE;
-
- BEGIN_OPCODE(NOT_WORDCHAR):
- if (stack.currentFrame->args.subjectPtr >= md.endSubject)
- RRETURN_NO_MATCH;
- if (isWordChar(*stack.currentFrame->args.subjectPtr++))
- RRETURN_NO_MATCH;
- stack.currentFrame->args.instructionPtr++;
- NEXT_OPCODE;
-
- BEGIN_OPCODE(WORDCHAR):
- if (stack.currentFrame->args.subjectPtr >= md.endSubject)
- RRETURN_NO_MATCH;
- if (!isWordChar(*stack.currentFrame->args.subjectPtr++))
- RRETURN_NO_MATCH;
- stack.currentFrame->args.instructionPtr++;
- NEXT_OPCODE;
-
- /* Match a back reference, possibly repeatedly. Look past the end of the
- item to see if there is repeat information following. The code is similar
- to that for character classes, but repeated for efficiency. Then obey
- similar code to character type repeats - written out again for speed.
- However, if the referenced string is the empty string, always treat
- it as matched, any number of times (otherwise there could be infinite
- loops). */
-
- BEGIN_OPCODE(REF):
- stack.currentFrame->locals.offset = get2ByteValue(stack.currentFrame->args.instructionPtr + 1) << 1; /* Doubled ref number */
- stack.currentFrame->args.instructionPtr += 3; /* Advance past item */
-
- /* If the reference is unset, set the length to be longer than the amount
- of subject left; this ensures that every attempt at a match fails. We
- can't just fail here, because of the possibility of quantifiers with zero
- minima. */
-
- if (stack.currentFrame->locals.offset >= stack.currentFrame->args.offsetTop || md.offsetVector[stack.currentFrame->locals.offset] < 0)
- stack.currentFrame->locals.length = 0;
- else
- stack.currentFrame->locals.length = md.offsetVector[stack.currentFrame->locals.offset+1] - md.offsetVector[stack.currentFrame->locals.offset];
-
- /* Set up for repetition, or handle the non-repeated case */
-
- switch (*stack.currentFrame->args.instructionPtr) {
- case OP_CRSTAR:
- case OP_CRMINSTAR:
- case OP_CRPLUS:
- case OP_CRMINPLUS:
- case OP_CRQUERY:
- case OP_CRMINQUERY:
- repeatInformationFromInstructionOffset(*stack.currentFrame->args.instructionPtr++ - OP_CRSTAR, minimize, min, stack.currentFrame->locals.max);
- break;
-
- case OP_CRRANGE:
- case OP_CRMINRANGE:
- minimize = (*stack.currentFrame->args.instructionPtr == OP_CRMINRANGE);
- min = get2ByteValue(stack.currentFrame->args.instructionPtr + 1);
- stack.currentFrame->locals.max = get2ByteValue(stack.currentFrame->args.instructionPtr + 3);
- if (stack.currentFrame->locals.max == 0)
- stack.currentFrame->locals.max = INT_MAX;
- stack.currentFrame->args.instructionPtr += 5;
- break;
-
- default: /* No repeat follows */
- if (!matchRef(stack.currentFrame->locals.offset, stack.currentFrame->args.subjectPtr, stack.currentFrame->locals.length, md))
- RRETURN_NO_MATCH;
- stack.currentFrame->args.subjectPtr += stack.currentFrame->locals.length;
- NEXT_OPCODE;
- }
-
- /* If the length of the reference is zero, just continue with the
- main loop. */
-
- if (stack.currentFrame->locals.length == 0)
- NEXT_OPCODE;
-
- /* First, ensure the minimum number of matches are present. */
-
- for (int i = 1; i <= min; i++) {
- if (!matchRef(stack.currentFrame->locals.offset, stack.currentFrame->args.subjectPtr, stack.currentFrame->locals.length, md))
- RRETURN_NO_MATCH;
- stack.currentFrame->args.subjectPtr += stack.currentFrame->locals.length;
- }
-
- /* If min = max, continue at the same level without recursion.
- They are not both allowed to be zero. */
-
- if (min == stack.currentFrame->locals.max)
- NEXT_OPCODE;
-
- /* If minimizing, keep trying and advancing the pointer */
-
- if (minimize) {
- for (stack.currentFrame->locals.fi = min;; stack.currentFrame->locals.fi++) {
- RECURSIVE_MATCH(20, stack.currentFrame->args.instructionPtr, stack.currentFrame->args.bracketChain);
- if (isMatch)
- RRETURN;
- if (stack.currentFrame->locals.fi >= stack.currentFrame->locals.max || !matchRef(stack.currentFrame->locals.offset, stack.currentFrame->args.subjectPtr, stack.currentFrame->locals.length, md))
- RRETURN;
- stack.currentFrame->args.subjectPtr += stack.currentFrame->locals.length;
- }
- /* Control never reaches here */
- }
-
- /* If maximizing, find the longest string and work backwards */
-
- else {
- stack.currentFrame->locals.subjectPtrAtStartOfInstruction = stack.currentFrame->args.subjectPtr;
- for (int i = min; i < stack.currentFrame->locals.max; i++) {
- if (!matchRef(stack.currentFrame->locals.offset, stack.currentFrame->args.subjectPtr, stack.currentFrame->locals.length, md))
- break;
- stack.currentFrame->args.subjectPtr += stack.currentFrame->locals.length;
- }
- while (stack.currentFrame->args.subjectPtr >= stack.currentFrame->locals.subjectPtrAtStartOfInstruction) {
- RECURSIVE_MATCH(21, stack.currentFrame->args.instructionPtr, stack.currentFrame->args.bracketChain);
- if (isMatch)
- RRETURN;
- stack.currentFrame->args.subjectPtr -= stack.currentFrame->locals.length;
- }
- RRETURN_NO_MATCH;
- }
- /* Control never reaches here */
-
- /* Match a bit-mapped character class, possibly repeatedly. This op code is
- used when all the characters in the class have values in the range 0-255,
- and either the matching is caseful, or the characters are in the range
- 0-127 when UTF-8 processing is enabled. The only difference between
- OP_CLASS and OP_NCLASS occurs when a data character outside the range is
- encountered.
-
- First, look past the end of the item to see if there is repeat information
- following. Then obey similar code to character type repeats - written out
- again for speed. */
-
- BEGIN_OPCODE(NCLASS):
- BEGIN_OPCODE(CLASS):
- stack.currentFrame->locals.data = stack.currentFrame->args.instructionPtr + 1; /* Save for matching */
- stack.currentFrame->args.instructionPtr += 33; /* Advance past the item */
-
- switch (*stack.currentFrame->args.instructionPtr) {
- case OP_CRSTAR:
- case OP_CRMINSTAR:
- case OP_CRPLUS:
- case OP_CRMINPLUS:
- case OP_CRQUERY:
- case OP_CRMINQUERY:
- repeatInformationFromInstructionOffset(*stack.currentFrame->args.instructionPtr++ - OP_CRSTAR, minimize, min, stack.currentFrame->locals.max);
- break;
-
- case OP_CRRANGE:
- case OP_CRMINRANGE:
- minimize = (*stack.currentFrame->args.instructionPtr == OP_CRMINRANGE);
- min = get2ByteValue(stack.currentFrame->args.instructionPtr + 1);
- stack.currentFrame->locals.max = get2ByteValue(stack.currentFrame->args.instructionPtr + 3);
- if (stack.currentFrame->locals.max == 0)
- stack.currentFrame->locals.max = INT_MAX;
- stack.currentFrame->args.instructionPtr += 5;
- break;
-
- default: /* No repeat follows */
- min = stack.currentFrame->locals.max = 1;
- break;
- }
-
- /* First, ensure the minimum number of matches are present. */
-
- for (int i = 1; i <= min; i++) {
- if (stack.currentFrame->args.subjectPtr >= md.endSubject)
- RRETURN_NO_MATCH;
- int c = *stack.currentFrame->args.subjectPtr++;
- if (c > 255) {
- if (stack.currentFrame->locals.data[-1] == OP_CLASS)
- RRETURN_NO_MATCH;
- } else {
- if (!(stack.currentFrame->locals.data[c / 8] & (1 << (c & 7))))
- RRETURN_NO_MATCH;
- }
- }
-
- /* If max == min we can continue with the main loop without the
- need to recurse. */
-
- if (min == stack.currentFrame->locals.max)
- NEXT_OPCODE;
-
- /* If minimizing, keep testing the rest of the expression and advancing
- the pointer while it matches the class. */
- if (minimize) {
- for (stack.currentFrame->locals.fi = min;; stack.currentFrame->locals.fi++) {
- RECURSIVE_MATCH(22, stack.currentFrame->args.instructionPtr, stack.currentFrame->args.bracketChain);
- if (isMatch)
- RRETURN;
- if (stack.currentFrame->locals.fi >= stack.currentFrame->locals.max || stack.currentFrame->args.subjectPtr >= md.endSubject)
- RRETURN;
- int c = *stack.currentFrame->args.subjectPtr++;
- if (c > 255) {
- if (stack.currentFrame->locals.data[-1] == OP_CLASS)
- RRETURN;
- } else {
- if ((stack.currentFrame->locals.data[c/8] & (1 << (c&7))) == 0)
- RRETURN;
- }
- }
- /* Control never reaches here */
- }
- /* If maximizing, find the longest possible run, then work backwards. */
- else {
- stack.currentFrame->locals.subjectPtrAtStartOfInstruction = stack.currentFrame->args.subjectPtr;
-
- for (int i = min; i < stack.currentFrame->locals.max; i++) {
- if (stack.currentFrame->args.subjectPtr >= md.endSubject)
- break;
- int c = *stack.currentFrame->args.subjectPtr;
- if (c > 255) {
- if (stack.currentFrame->locals.data[-1] == OP_CLASS)
- break;
- } else {
- if (!(stack.currentFrame->locals.data[c / 8] & (1 << (c & 7))))
- break;
- }
- ++stack.currentFrame->args.subjectPtr;
- }
- for (;;) {
- RECURSIVE_MATCH(24, stack.currentFrame->args.instructionPtr, stack.currentFrame->args.bracketChain);
- if (isMatch)
- RRETURN;
- if (stack.currentFrame->args.subjectPtr-- == stack.currentFrame->locals.subjectPtrAtStartOfInstruction)
- break; /* Stop if tried at original pos */
- }
-
- RRETURN;
- }
- /* Control never reaches here */
-
- /* Match an extended character class. */
-
- BEGIN_OPCODE(XCLASS):
- stack.currentFrame->locals.data = stack.currentFrame->args.instructionPtr + 1 + LINK_SIZE; /* Save for matching */
- stack.currentFrame->args.instructionPtr += getLinkValue(stack.currentFrame->args.instructionPtr + 1); /* Advance past the item */
-
- switch (*stack.currentFrame->args.instructionPtr) {
- case OP_CRSTAR:
- case OP_CRMINSTAR:
- case OP_CRPLUS:
- case OP_CRMINPLUS:
- case OP_CRQUERY:
- case OP_CRMINQUERY:
- repeatInformationFromInstructionOffset(*stack.currentFrame->args.instructionPtr++ - OP_CRSTAR, minimize, min, stack.currentFrame->locals.max);
- break;
-
- case OP_CRRANGE:
- case OP_CRMINRANGE:
- minimize = (*stack.currentFrame->args.instructionPtr == OP_CRMINRANGE);
- min = get2ByteValue(stack.currentFrame->args.instructionPtr + 1);
- stack.currentFrame->locals.max = get2ByteValue(stack.currentFrame->args.instructionPtr + 3);
- if (stack.currentFrame->locals.max == 0)
- stack.currentFrame->locals.max = INT_MAX;
- stack.currentFrame->args.instructionPtr += 5;
- break;
-
- default: /* No repeat follows */
- min = stack.currentFrame->locals.max = 1;
- }
-
- /* First, ensure the minimum number of matches are present. */
-
- for (int i = 1; i <= min; i++) {
- if (stack.currentFrame->args.subjectPtr >= md.endSubject)
- RRETURN_NO_MATCH;
- int c = *stack.currentFrame->args.subjectPtr++;
- if (!kjs_pcre_xclass(c, stack.currentFrame->locals.data))
- RRETURN_NO_MATCH;
- }
-
- /* If max == min we can continue with the main loop without the
- need to recurse. */
-
- if (min == stack.currentFrame->locals.max)
- NEXT_OPCODE;
-
- /* If minimizing, keep testing the rest of the expression and advancing
- the pointer while it matches the class. */
-
- if (minimize) {
- for (stack.currentFrame->locals.fi = min;; stack.currentFrame->locals.fi++) {
- RECURSIVE_MATCH(26, stack.currentFrame->args.instructionPtr, stack.currentFrame->args.bracketChain);
- if (isMatch)
- RRETURN;
- if (stack.currentFrame->locals.fi >= stack.currentFrame->locals.max || stack.currentFrame->args.subjectPtr >= md.endSubject)
- RRETURN;
- int c = *stack.currentFrame->args.subjectPtr++;
- if (!kjs_pcre_xclass(c, stack.currentFrame->locals.data))
- RRETURN;
- }
- /* Control never reaches here */
- }
-
- /* If maximizing, find the longest possible run, then work backwards. */
-
- else {
- stack.currentFrame->locals.subjectPtrAtStartOfInstruction = stack.currentFrame->args.subjectPtr;
- for (int i = min; i < stack.currentFrame->locals.max; i++) {
- if (stack.currentFrame->args.subjectPtr >= md.endSubject)
- break;
- int c = *stack.currentFrame->args.subjectPtr;
- if (!kjs_pcre_xclass(c, stack.currentFrame->locals.data))
- break;
- ++stack.currentFrame->args.subjectPtr;
- }
- for(;;) {
- RECURSIVE_MATCH(27, stack.currentFrame->args.instructionPtr, stack.currentFrame->args.bracketChain);
- if (isMatch)
- RRETURN;
- if (stack.currentFrame->args.subjectPtr-- == stack.currentFrame->locals.subjectPtrAtStartOfInstruction)
- break; /* Stop if tried at original pos */
- }
- RRETURN;
- }
-
- /* Control never reaches here */
-
- /* Match a single character, casefully */
-
- BEGIN_OPCODE(CHAR):
- stack.currentFrame->locals.length = 1;
- stack.currentFrame->args.instructionPtr++;
- getUTF8CharAndIncrementLength(stack.currentFrame->locals.fc, stack.currentFrame->args.instructionPtr, stack.currentFrame->locals.length);
- stack.currentFrame->args.instructionPtr += stack.currentFrame->locals.length;
- if (stack.currentFrame->args.subjectPtr >= md.endSubject)
- RRETURN_NO_MATCH;
- if (stack.currentFrame->locals.fc != *stack.currentFrame->args.subjectPtr++)
- RRETURN_NO_MATCH;
- NEXT_OPCODE;
-
- /* Match a single character, caselessly */
-
- BEGIN_OPCODE(CHAR_IGNORING_CASE): {
- stack.currentFrame->locals.length = 1;
- stack.currentFrame->args.instructionPtr++;
- getUTF8CharAndIncrementLength(stack.currentFrame->locals.fc, stack.currentFrame->args.instructionPtr, stack.currentFrame->locals.length);
- stack.currentFrame->args.instructionPtr += stack.currentFrame->locals.length;
- if (stack.currentFrame->args.subjectPtr >= md.endSubject)
- RRETURN_NO_MATCH;
- int dc = *stack.currentFrame->args.subjectPtr++;
- if (stack.currentFrame->locals.fc != dc && kjs_pcre_ucp_othercase(stack.currentFrame->locals.fc) != dc)
- RRETURN_NO_MATCH;
- NEXT_OPCODE;
- }
-
- /* Match a single ASCII character. */
-
- BEGIN_OPCODE(ASCII_CHAR):
- if (md.endSubject == stack.currentFrame->args.subjectPtr)
- RRETURN_NO_MATCH;
- if (*stack.currentFrame->args.subjectPtr != stack.currentFrame->args.instructionPtr[1])
- RRETURN_NO_MATCH;
- ++stack.currentFrame->args.subjectPtr;
- stack.currentFrame->args.instructionPtr += 2;
- NEXT_OPCODE;
-
- /* Match one of two cases of an ASCII letter. */
-
- BEGIN_OPCODE(ASCII_LETTER_IGNORING_CASE):
- if (md.endSubject == stack.currentFrame->args.subjectPtr)
- RRETURN_NO_MATCH;
- if ((*stack.currentFrame->args.subjectPtr | 0x20) != stack.currentFrame->args.instructionPtr[1])
- RRETURN_NO_MATCH;
- ++stack.currentFrame->args.subjectPtr;
- stack.currentFrame->args.instructionPtr += 2;
- NEXT_OPCODE;
-
- /* Match a single character repeatedly; different opcodes share code. */
-
- BEGIN_OPCODE(EXACT):
- min = stack.currentFrame->locals.max = get2ByteValue(stack.currentFrame->args.instructionPtr + 1);
- minimize = false;
- stack.currentFrame->args.instructionPtr += 3;
- goto REPEATCHAR;
-
- BEGIN_OPCODE(UPTO):
- BEGIN_OPCODE(MINUPTO):
- min = 0;
- stack.currentFrame->locals.max = get2ByteValue(stack.currentFrame->args.instructionPtr + 1);
- minimize = *stack.currentFrame->args.instructionPtr == OP_MINUPTO;
- stack.currentFrame->args.instructionPtr += 3;
- goto REPEATCHAR;
-
- BEGIN_OPCODE(STAR):
- BEGIN_OPCODE(MINSTAR):
- BEGIN_OPCODE(PLUS):
- BEGIN_OPCODE(MINPLUS):
- BEGIN_OPCODE(QUERY):
- BEGIN_OPCODE(MINQUERY):
- repeatInformationFromInstructionOffset(*stack.currentFrame->args.instructionPtr++ - OP_STAR, minimize, min, stack.currentFrame->locals.max);
-
- /* Common code for all repeated single-character matches. We can give
- up quickly if there are fewer than the minimum number of characters left in
- the subject. */
-
- REPEATCHAR:
-
- stack.currentFrame->locals.length = 1;
- getUTF8CharAndIncrementLength(stack.currentFrame->locals.fc, stack.currentFrame->args.instructionPtr, stack.currentFrame->locals.length);
- if (min * (stack.currentFrame->locals.fc > 0xFFFF ? 2 : 1) > md.endSubject - stack.currentFrame->args.subjectPtr)
- RRETURN_NO_MATCH;
- stack.currentFrame->args.instructionPtr += stack.currentFrame->locals.length;
-
- if (stack.currentFrame->locals.fc <= 0xFFFF) {
- int othercase = md.ignoreCase ? kjs_pcre_ucp_othercase(stack.currentFrame->locals.fc) : -1;
-
- for (int i = 1; i <= min; i++) {
- if (*stack.currentFrame->args.subjectPtr != stack.currentFrame->locals.fc && *stack.currentFrame->args.subjectPtr != othercase)
- RRETURN_NO_MATCH;
- ++stack.currentFrame->args.subjectPtr;
- }
-
- if (min == stack.currentFrame->locals.max)
- NEXT_OPCODE;
-
- if (minimize) {
- stack.currentFrame->locals.repeatOthercase = othercase;
- for (stack.currentFrame->locals.fi = min;; stack.currentFrame->locals.fi++) {
- RECURSIVE_MATCH(28, stack.currentFrame->args.instructionPtr, stack.currentFrame->args.bracketChain);
- if (isMatch)
- RRETURN;
- if (stack.currentFrame->locals.fi >= stack.currentFrame->locals.max || stack.currentFrame->args.subjectPtr >= md.endSubject)
- RRETURN;
- if (*stack.currentFrame->args.subjectPtr != stack.currentFrame->locals.fc && *stack.currentFrame->args.subjectPtr != stack.currentFrame->locals.repeatOthercase)
- RRETURN;
- ++stack.currentFrame->args.subjectPtr;
- }
- /* Control never reaches here */
- } else {
- stack.currentFrame->locals.subjectPtrAtStartOfInstruction = stack.currentFrame->args.subjectPtr;
- for (int i = min; i < stack.currentFrame->locals.max; i++) {
- if (stack.currentFrame->args.subjectPtr >= md.endSubject)
- break;
- if (*stack.currentFrame->args.subjectPtr != stack.currentFrame->locals.fc && *stack.currentFrame->args.subjectPtr != othercase)
- break;
- ++stack.currentFrame->args.subjectPtr;
- }
- while (stack.currentFrame->args.subjectPtr >= stack.currentFrame->locals.subjectPtrAtStartOfInstruction) {
- RECURSIVE_MATCH(29, stack.currentFrame->args.instructionPtr, stack.currentFrame->args.bracketChain);
- if (isMatch)
- RRETURN;
- --stack.currentFrame->args.subjectPtr;
- }
- RRETURN_NO_MATCH;
- }
- /* Control never reaches here */
- } else {
- /* No case on surrogate pairs, so no need to bother with "othercase". */
-
- for (int i = 1; i <= min; i++) {
- if (*stack.currentFrame->args.subjectPtr != stack.currentFrame->locals.fc)
- RRETURN_NO_MATCH;
- stack.currentFrame->args.subjectPtr += 2;
- }
-
- if (min == stack.currentFrame->locals.max)
- NEXT_OPCODE;
-
- if (minimize) {
- for (stack.currentFrame->locals.fi = min;; stack.currentFrame->locals.fi++) {
- RECURSIVE_MATCH(30, stack.currentFrame->args.instructionPtr, stack.currentFrame->args.bracketChain);
- if (isMatch)
- RRETURN;
- if (stack.currentFrame->locals.fi >= stack.currentFrame->locals.max || stack.currentFrame->args.subjectPtr >= md.endSubject)
- RRETURN;
- if (*stack.currentFrame->args.subjectPtr != stack.currentFrame->locals.fc)
- RRETURN;
- stack.currentFrame->args.subjectPtr += 2;
- }
- /* Control never reaches here */
- } else {
- stack.currentFrame->locals.subjectPtrAtStartOfInstruction = stack.currentFrame->args.subjectPtr;
- for (int i = min; i < stack.currentFrame->locals.max; i++) {
- if (stack.currentFrame->args.subjectPtr > md.endSubject - 2)
- break;
- if (*stack.currentFrame->args.subjectPtr != stack.currentFrame->locals.fc)
- break;
- stack.currentFrame->args.subjectPtr += 2;
- }
- while (stack.currentFrame->args.subjectPtr >= stack.currentFrame->locals.subjectPtrAtStartOfInstruction) {
- RECURSIVE_MATCH(31, stack.currentFrame->args.instructionPtr, stack.currentFrame->args.bracketChain);
- if (isMatch)
- RRETURN;
- stack.currentFrame->args.subjectPtr -= 2;
- }
- RRETURN_NO_MATCH;
- }
- /* Control never reaches here */
- }
- /* Control never reaches here */
-
- /* Match a negated single one-byte character. */
-
- BEGIN_OPCODE(NOT): {
- if (stack.currentFrame->args.subjectPtr >= md.endSubject)
- RRETURN_NO_MATCH;
- stack.currentFrame->args.instructionPtr++;
- int c = *stack.currentFrame->args.subjectPtr++;
- if (md.ignoreCase) {
- if (c < 128)
- c = toLowerCase(c);
- if (toLowerCase(*stack.currentFrame->args.instructionPtr++) == c)
- RRETURN_NO_MATCH;
- } else {
- if (*stack.currentFrame->args.instructionPtr++ == c)
- RRETURN_NO_MATCH;
- }
- NEXT_OPCODE;
- }
-
- /* Match a negated single one-byte character repeatedly. This is almost a
- repeat of the code for a repeated single character, but I haven't found a
- nice way of commoning these up that doesn't require a test of the
- positive/negative option for each character match. Maybe that wouldn't add
- very much to the time taken, but character matching *is* what this is all
- about... */
-
- BEGIN_OPCODE(NOTEXACT):
- min = stack.currentFrame->locals.max = get2ByteValue(stack.currentFrame->args.instructionPtr + 1);
- minimize = false;
- stack.currentFrame->args.instructionPtr += 3;
- goto REPEATNOTCHAR;
-
- BEGIN_OPCODE(NOTUPTO):
- BEGIN_OPCODE(NOTMINUPTO):
- min = 0;
- stack.currentFrame->locals.max = get2ByteValue(stack.currentFrame->args.instructionPtr + 1);
- minimize = *stack.currentFrame->args.instructionPtr == OP_NOTMINUPTO;
- stack.currentFrame->args.instructionPtr += 3;
- goto REPEATNOTCHAR;
-
- BEGIN_OPCODE(NOTSTAR):
- BEGIN_OPCODE(NOTMINSTAR):
- BEGIN_OPCODE(NOTPLUS):
- BEGIN_OPCODE(NOTMINPLUS):
- BEGIN_OPCODE(NOTQUERY):
- BEGIN_OPCODE(NOTMINQUERY):
- repeatInformationFromInstructionOffset(*stack.currentFrame->args.instructionPtr++ - OP_NOTSTAR, minimize, min, stack.currentFrame->locals.max);
-
- /* Common code for all repeated single-byte matches. We can give up quickly
- if there are fewer than the minimum number of bytes left in the
- subject. */
-
- REPEATNOTCHAR:
- if (min > md.endSubject - stack.currentFrame->args.subjectPtr)
- RRETURN_NO_MATCH;
- stack.currentFrame->locals.fc = *stack.currentFrame->args.instructionPtr++;
-
- /* The code is duplicated for the caseless and caseful cases, for speed,
- since matching characters is likely to be quite common. First, ensure the
- minimum number of matches are present. If min = max, continue at the same
- level without recursing. Otherwise, if minimizing, keep trying the rest of
- the expression and advancing one matching character if failing, up to the
- maximum. Alternatively, if maximizing, find the maximum number of
- characters and work backwards. */
-
- DPRINTF(("negative matching %c{%d,%d}\n", stack.currentFrame->locals.fc, min, stack.currentFrame->locals.max));
-
- if (md.ignoreCase) {
- if (stack.currentFrame->locals.fc < 128)
- stack.currentFrame->locals.fc = toLowerCase(stack.currentFrame->locals.fc);
-
- for (int i = 1; i <= min; i++) {
- int d = *stack.currentFrame->args.subjectPtr++;
- if (d < 128)
- d = toLowerCase(d);
- if (stack.currentFrame->locals.fc == d)
- RRETURN_NO_MATCH;
- }
-
- if (min == stack.currentFrame->locals.max)
- NEXT_OPCODE;
-
- if (minimize) {
- for (stack.currentFrame->locals.fi = min;; stack.currentFrame->locals.fi++) {
- RECURSIVE_MATCH(38, stack.currentFrame->args.instructionPtr, stack.currentFrame->args.bracketChain);
- if (isMatch)
- RRETURN;
- int d = *stack.currentFrame->args.subjectPtr++;
- if (d < 128)
- d = toLowerCase(d);
- if (stack.currentFrame->locals.fi >= stack.currentFrame->locals.max || stack.currentFrame->args.subjectPtr >= md.endSubject || stack.currentFrame->locals.fc == d)
- RRETURN;
- }
- /* Control never reaches here */
- }
-
- /* Maximize case */
-
- else {
- stack.currentFrame->locals.subjectPtrAtStartOfInstruction = stack.currentFrame->args.subjectPtr;
-
- for (int i = min; i < stack.currentFrame->locals.max; i++) {
- if (stack.currentFrame->args.subjectPtr >= md.endSubject)
- break;
- int d = *stack.currentFrame->args.subjectPtr;
- if (d < 128)
- d = toLowerCase(d);
- if (stack.currentFrame->locals.fc == d)
- break;
- ++stack.currentFrame->args.subjectPtr;
- }
- for (;;) {
- RECURSIVE_MATCH(40, stack.currentFrame->args.instructionPtr, stack.currentFrame->args.bracketChain);
- if (isMatch)
- RRETURN;
- if (stack.currentFrame->args.subjectPtr-- == stack.currentFrame->locals.subjectPtrAtStartOfInstruction)
- break; /* Stop if tried at original pos */
- }
-
- RRETURN;
- }
- /* Control never reaches here */
- }
-
- /* Caseful comparisons */
-
- else {
- for (int i = 1; i <= min; i++) {
- int d = *stack.currentFrame->args.subjectPtr++;
- if (stack.currentFrame->locals.fc == d)
- RRETURN_NO_MATCH;
- }
-
- if (min == stack.currentFrame->locals.max)
- NEXT_OPCODE;
-
- if (minimize) {
- for (stack.currentFrame->locals.fi = min;; stack.currentFrame->locals.fi++) {
- RECURSIVE_MATCH(42, stack.currentFrame->args.instructionPtr, stack.currentFrame->args.bracketChain);
- if (isMatch)
- RRETURN;
- int d = *stack.currentFrame->args.subjectPtr++;
- if (stack.currentFrame->locals.fi >= stack.currentFrame->locals.max || stack.currentFrame->args.subjectPtr >= md.endSubject || stack.currentFrame->locals.fc == d)
- RRETURN;
- }
- /* Control never reaches here */
- }
-
- /* Maximize case */
-
- else {
- stack.currentFrame->locals.subjectPtrAtStartOfInstruction = stack.currentFrame->args.subjectPtr;
-
- for (int i = min; i < stack.currentFrame->locals.max; i++) {
- if (stack.currentFrame->args.subjectPtr >= md.endSubject)
- break;
- int d = *stack.currentFrame->args.subjectPtr;
- if (stack.currentFrame->locals.fc == d)
- break;
- ++stack.currentFrame->args.subjectPtr;
- }
- for (;;) {
- RECURSIVE_MATCH(44, stack.currentFrame->args.instructionPtr, stack.currentFrame->args.bracketChain);
- if (isMatch)
- RRETURN;
- if (stack.currentFrame->args.subjectPtr-- == stack.currentFrame->locals.subjectPtrAtStartOfInstruction)
- break; /* Stop if tried at original pos */
- }
-
- RRETURN;
- }
- }
- /* Control never reaches here */
-
- /* Match a single character type repeatedly; several different opcodes
- share code. This is very similar to the code for single characters, but we
- repeat it in the interests of efficiency. */
-
- BEGIN_OPCODE(TYPEEXACT):
- min = stack.currentFrame->locals.max = get2ByteValue(stack.currentFrame->args.instructionPtr + 1);
- minimize = true;
- stack.currentFrame->args.instructionPtr += 3;
- goto REPEATTYPE;
-
- BEGIN_OPCODE(TYPEUPTO):
- BEGIN_OPCODE(TYPEMINUPTO):
- min = 0;
- stack.currentFrame->locals.max = get2ByteValue(stack.currentFrame->args.instructionPtr + 1);
- minimize = *stack.currentFrame->args.instructionPtr == OP_TYPEMINUPTO;
- stack.currentFrame->args.instructionPtr += 3;
- goto REPEATTYPE;
-
- BEGIN_OPCODE(TYPESTAR):
- BEGIN_OPCODE(TYPEMINSTAR):
- BEGIN_OPCODE(TYPEPLUS):
- BEGIN_OPCODE(TYPEMINPLUS):
- BEGIN_OPCODE(TYPEQUERY):
- BEGIN_OPCODE(TYPEMINQUERY):
- repeatInformationFromInstructionOffset(*stack.currentFrame->args.instructionPtr++ - OP_TYPESTAR, minimize, min, stack.currentFrame->locals.max);
-
- /* Common code for all repeated single character type matches. Note that
- in UTF-8 mode, '.' matches a character of any length, but for the other
- character types, the valid characters are all one-byte long. */
-
- REPEATTYPE:
- stack.currentFrame->locals.ctype = *stack.currentFrame->args.instructionPtr++; /* Code for the character type */
-
- /* First, ensure the minimum number of matches are present. Use inline
- code for maximizing the speed, and do the type test once at the start
- (i.e. keep it out of the loop). Also we can test that there are at least
- the minimum number of characters before we start. */
-
- if (min > md.endSubject - stack.currentFrame->args.subjectPtr)
- RRETURN_NO_MATCH;
- if (min > 0) {
- switch (stack.currentFrame->locals.ctype) {
- case OP_NOT_NEWLINE:
- for (int i = 1; i <= min; i++) {
- if (isNewline(*stack.currentFrame->args.subjectPtr))
- RRETURN_NO_MATCH;
- ++stack.currentFrame->args.subjectPtr;
- }
- break;
-
- case OP_NOT_DIGIT:
- for (int i = 1; i <= min; i++) {
- if (isASCIIDigit(*stack.currentFrame->args.subjectPtr))
- RRETURN_NO_MATCH;
- ++stack.currentFrame->args.subjectPtr;
- }
- break;
-
- case OP_DIGIT:
- for (int i = 1; i <= min; i++) {
- if (!isASCIIDigit(*stack.currentFrame->args.subjectPtr))
- RRETURN_NO_MATCH;
- ++stack.currentFrame->args.subjectPtr;
- }
- break;
-
- case OP_NOT_WHITESPACE:
- for (int i = 1; i <= min; i++) {
- if (isSpaceChar(*stack.currentFrame->args.subjectPtr))
- RRETURN_NO_MATCH;
- ++stack.currentFrame->args.subjectPtr;
- }
- break;
-
- case OP_WHITESPACE:
- for (int i = 1; i <= min; i++) {
- if (!isSpaceChar(*stack.currentFrame->args.subjectPtr))
- RRETURN_NO_MATCH;
- ++stack.currentFrame->args.subjectPtr;
- }
- break;
-
- case OP_NOT_WORDCHAR:
- for (int i = 1; i <= min; i++) {
- if (isWordChar(*stack.currentFrame->args.subjectPtr))
- RRETURN_NO_MATCH;
- ++stack.currentFrame->args.subjectPtr;
- }
- break;
-
- case OP_WORDCHAR:
- for (int i = 1; i <= min; i++) {
- if (!isWordChar(*stack.currentFrame->args.subjectPtr))
- RRETURN_NO_MATCH;
- ++stack.currentFrame->args.subjectPtr;
- }
- break;
-
- default:
- ASSERT_NOT_REACHED();
- return matchError(JSRegExpErrorInternal, stack);
- } /* End switch(stack.currentFrame->locals.ctype) */
- }
-
- /* If min = max, continue at the same level without recursing */
-
- if (min == stack.currentFrame->locals.max)
- NEXT_OPCODE;
-
- /* If minimizing, we have to test the rest of the pattern before each
- subsequent match. */
-
- if (minimize) {
- for (stack.currentFrame->locals.fi = min;; stack.currentFrame->locals.fi++) {
- RECURSIVE_MATCH(48, stack.currentFrame->args.instructionPtr, stack.currentFrame->args.bracketChain);
- if (isMatch)
- RRETURN;
- if (stack.currentFrame->locals.fi >= stack.currentFrame->locals.max || stack.currentFrame->args.subjectPtr >= md.endSubject)
- RRETURN;
-
- int c = *stack.currentFrame->args.subjectPtr++;
- switch (stack.currentFrame->locals.ctype) {
- case OP_NOT_NEWLINE:
- if (isNewline(c))
- RRETURN;
- break;
-
- case OP_NOT_DIGIT:
- if (isASCIIDigit(c))
- RRETURN;
- break;
-
- case OP_DIGIT:
- if (!isASCIIDigit(c))
- RRETURN;
- break;
-
- case OP_NOT_WHITESPACE:
- if (isSpaceChar(c))
- RRETURN;
- break;
-
- case OP_WHITESPACE:
- if (!isSpaceChar(c))
- RRETURN;
- break;
-
- case OP_NOT_WORDCHAR:
- if (isWordChar(c))
- RRETURN;
- break;
-
- case OP_WORDCHAR:
- if (!isWordChar(c))
- RRETURN;
- break;
-
- default:
- ASSERT_NOT_REACHED();
- return matchError(JSRegExpErrorInternal, stack);
- }
- }
- /* Control never reaches here */
- }
-
- /* If maximizing it is worth using inline code for speed, doing the type
- test once at the start (i.e. keep it out of the loop). */
-
- else {
- stack.currentFrame->locals.subjectPtrAtStartOfInstruction = stack.currentFrame->args.subjectPtr; /* Remember where we started */
-
- switch (stack.currentFrame->locals.ctype) {
- case OP_NOT_NEWLINE:
- for (int i = min; i < stack.currentFrame->locals.max; i++) {
- if (stack.currentFrame->args.subjectPtr >= md.endSubject || isNewline(*stack.currentFrame->args.subjectPtr))
- break;
- stack.currentFrame->args.subjectPtr++;
- }
- break;
-
- case OP_NOT_DIGIT:
- for (int i = min; i < stack.currentFrame->locals.max; i++) {
- if (stack.currentFrame->args.subjectPtr >= md.endSubject)
- break;
- int c = *stack.currentFrame->args.subjectPtr;
- if (isASCIIDigit(c))
- break;
- ++stack.currentFrame->args.subjectPtr;
- }
- break;
-
- case OP_DIGIT:
- for (int i = min; i < stack.currentFrame->locals.max; i++) {
- if (stack.currentFrame->args.subjectPtr >= md.endSubject)
- break;
- int c = *stack.currentFrame->args.subjectPtr;
- if (!isASCIIDigit(c))
- break;
- ++stack.currentFrame->args.subjectPtr;
- }
- break;
-
- case OP_NOT_WHITESPACE:
- for (int i = min; i < stack.currentFrame->locals.max; i++) {
- if (stack.currentFrame->args.subjectPtr >= md.endSubject)
- break;
- int c = *stack.currentFrame->args.subjectPtr;
- if (isSpaceChar(c))
- break;
- ++stack.currentFrame->args.subjectPtr;
- }
- break;
-
- case OP_WHITESPACE:
- for (int i = min; i < stack.currentFrame->locals.max; i++) {
- if (stack.currentFrame->args.subjectPtr >= md.endSubject)
- break;
- int c = *stack.currentFrame->args.subjectPtr;
- if (!isSpaceChar(c))
- break;
- ++stack.currentFrame->args.subjectPtr;
- }
- break;
-
- case OP_NOT_WORDCHAR:
- for (int i = min; i < stack.currentFrame->locals.max; i++) {
- if (stack.currentFrame->args.subjectPtr >= md.endSubject)
- break;
- int c = *stack.currentFrame->args.subjectPtr;
- if (isWordChar(c))
- break;
- ++stack.currentFrame->args.subjectPtr;
- }
- break;
-
- case OP_WORDCHAR:
- for (int i = min; i < stack.currentFrame->locals.max; i++) {
- if (stack.currentFrame->args.subjectPtr >= md.endSubject)
- break;
- int c = *stack.currentFrame->args.subjectPtr;
- if (!isWordChar(c))
- break;
- ++stack.currentFrame->args.subjectPtr;
- }
- break;
-
- default:
- ASSERT_NOT_REACHED();
- return matchError(JSRegExpErrorInternal, stack);
- }
-
- /* stack.currentFrame->args.subjectPtr is now past the end of the maximum run */
-
- for (;;) {
- RECURSIVE_MATCH(52, stack.currentFrame->args.instructionPtr, stack.currentFrame->args.bracketChain);
- if (isMatch)
- RRETURN;
- if (stack.currentFrame->args.subjectPtr-- == stack.currentFrame->locals.subjectPtrAtStartOfInstruction)
- break; /* Stop if tried at original pos */
- }
-
- /* Get here if we can't make it match with any permitted repetitions */
-
- RRETURN;
- }
- /* Control never reaches here */
-
- BEGIN_OPCODE(CRMINPLUS):
- BEGIN_OPCODE(CRMINQUERY):
- BEGIN_OPCODE(CRMINRANGE):
- BEGIN_OPCODE(CRMINSTAR):
- BEGIN_OPCODE(CRPLUS):
- BEGIN_OPCODE(CRQUERY):
- BEGIN_OPCODE(CRRANGE):
- BEGIN_OPCODE(CRSTAR):
- ASSERT_NOT_REACHED();
- return matchError(JSRegExpErrorInternal, stack);
-
-#ifdef USE_COMPUTED_GOTO_FOR_MATCH_OPCODE_LOOP
- CAPTURING_BRACKET:
-#else
- default:
-#endif
- /* Opening capturing bracket. If there is space in the offset vector, save
- the current subject position in the working slot at the top of the vector. We
- mustn't change the current values of the data slot, because they may be set
- from a previous iteration of this group, and be referred to by a reference
- inside the group.
-
- If the bracket fails to match, we need to restore this value and also the
- values of the final offsets, in case they were set by a previous iteration of
- the same bracket.
-
- If there isn't enough space in the offset vector, treat this as if it were a
- non-capturing bracket. Don't worry about setting the flag for the error case
- here; that is handled in the code for KET. */
-
- ASSERT(*stack.currentFrame->args.instructionPtr > OP_BRA);
-
- stack.currentFrame->locals.number = *stack.currentFrame->args.instructionPtr - OP_BRA;
-
- /* For extended extraction brackets (large number), we have to fish out the
- number from a dummy opcode at the start. */
-
- if (stack.currentFrame->locals.number > EXTRACT_BASIC_MAX)
- stack.currentFrame->locals.number = get2ByteValue(stack.currentFrame->args.instructionPtr + 2 + LINK_SIZE);
- stack.currentFrame->locals.offset = stack.currentFrame->locals.number << 1;
-
-#ifdef DEBUG
- printf("start bracket %d subject=", stack.currentFrame->locals.number);
- pchars(stack.currentFrame->args.subjectPtr, 16, true, md);
- printf("\n");
-#endif
-
- if (stack.currentFrame->locals.offset < md.offsetMax) {
- stack.currentFrame->locals.saveOffset1 = md.offsetVector[stack.currentFrame->locals.offset];
- stack.currentFrame->locals.saveOffset2 = md.offsetVector[stack.currentFrame->locals.offset + 1];
- stack.currentFrame->locals.saveOffset3 = md.offsetVector[md.offsetEnd - stack.currentFrame->locals.number];
-
- DPRINTF(("saving %d %d %d\n", stack.currentFrame->locals.saveOffset1, stack.currentFrame->locals.saveOffset2, stack.currentFrame->locals.saveOffset3));
- md.offsetVector[md.offsetEnd - stack.currentFrame->locals.number] = stack.currentFrame->args.subjectPtr - md.startSubject;
-
- do {
- RECURSIVE_MATCH_STARTNG_NEW_GROUP(1, stack.currentFrame->args.instructionPtr + 1 + LINK_SIZE, stack.currentFrame->args.bracketChain);
- if (isMatch)
- RRETURN;
- stack.currentFrame->args.instructionPtr += getLinkValue(stack.currentFrame->args.instructionPtr + 1);
- } while (*stack.currentFrame->args.instructionPtr == OP_ALT);
-
- DPRINTF(("bracket %d failed\n", stack.currentFrame->locals.number));
-
- md.offsetVector[stack.currentFrame->locals.offset] = stack.currentFrame->locals.saveOffset1;
- md.offsetVector[stack.currentFrame->locals.offset + 1] = stack.currentFrame->locals.saveOffset2;
- md.offsetVector[md.offsetEnd - stack.currentFrame->locals.number] = stack.currentFrame->locals.saveOffset3;
-
- RRETURN;
- }
-
- /* Insufficient room for saving captured contents */
-
- goto NON_CAPTURING_BRACKET;
- }
-
- /* Do not stick any code in here without much thought; it is assumed
- that "continue" in the code above comes out to here to repeat the main
- loop. */
-
- } /* End of main loop */
-
- ASSERT_NOT_REACHED();
-
-#ifndef USE_COMPUTED_GOTO_FOR_MATCH_RECURSION
-
-RRETURN_SWITCH:
- switch (stack.currentFrame->returnLocation) {
- case 0: goto RETURN;
- case 1: goto RRETURN_1;
- case 2: goto RRETURN_2;
- case 6: goto RRETURN_6;
- case 7: goto RRETURN_7;
- case 14: goto RRETURN_14;
- case 15: goto RRETURN_15;
- case 16: goto RRETURN_16;
- case 17: goto RRETURN_17;
- case 18: goto RRETURN_18;
- case 19: goto RRETURN_19;
- case 20: goto RRETURN_20;
- case 21: goto RRETURN_21;
- case 22: goto RRETURN_22;
- case 24: goto RRETURN_24;
- case 26: goto RRETURN_26;
- case 27: goto RRETURN_27;
- case 28: goto RRETURN_28;
- case 29: goto RRETURN_29;
- case 30: goto RRETURN_30;
- case 31: goto RRETURN_31;
- case 38: goto RRETURN_38;
- case 40: goto RRETURN_40;
- case 42: goto RRETURN_42;
- case 44: goto RRETURN_44;
- case 48: goto RRETURN_48;
- case 52: goto RRETURN_52;
- }
-
- ASSERT_NOT_REACHED();
- return matchError(JSRegExpErrorInternal, stack);
-
-#endif
-
-RETURN:
- return isMatch;
-}
-
-
-/*************************************************
-* Execute a Regular Expression *
-*************************************************/
-
-/* This function applies a compiled re to a subject string and picks out
-portions of the string if it matches. Two elements in the vector are set for
-each substring: the offsets to the start and end of the substring.
-
-Arguments:
- re points to the compiled expression
- extra_data points to extra data or is NULL
- subject points to the subject string
- length length of subject string (may contain binary zeros)
- start_offset where to start in the subject string
- options option bits
- offsets points to a vector of ints to be filled in with offsets
- offsetcount the number of elements in the vector
-
-Returns: > 0 => success; value is the number of elements filled in
- = 0 => success, but offsets is not big enough
- -1 => failed to match
- < -1 => some kind of unexpected problem
-*/
-
-static void tryFirstByteOptimization(const UChar*& subjectPtr, const UChar* endSubject, int first_byte, bool first_byte_caseless, bool useMultiLineFirstCharOptimization, const UChar* originalSubjectStart)
-{
- // If first_byte is set, try scanning to the first instance of that byte
- // no need to try and match against any earlier part of the subject string.
- if (first_byte >= 0) {
- UChar first_char = first_byte;
- if (first_byte_caseless)
- while (subjectPtr < endSubject) {
- int c = *subjectPtr;
- if (c > 127)
- break;
- if (toLowerCase(c) == first_char)
- break;
- subjectPtr++;
- }
- else {
- while (subjectPtr < endSubject && *subjectPtr != first_char)
- subjectPtr++;
- }
- } else if (useMultiLineFirstCharOptimization) {
- /* Or to just after \n for a multiline match if possible */
- // I'm not sure why this != originalSubjectStart check is necessary -- ecs 11/18/07
- if (subjectPtr > originalSubjectStart) {
- while (subjectPtr < endSubject && !isNewline(subjectPtr[-1]))
- subjectPtr++;
- }
- }
-}
-
-static bool tryRequiredByteOptimization(const UChar*& subjectPtr, const UChar* endSubject, int req_byte, int req_byte2, bool req_byte_caseless, bool hasFirstByte, const UChar*& reqBytePtr)
-{
- /* If req_byte is set, we know that that character must appear in the subject
- for the match to succeed. If the first character is set, req_byte must be
- later in the subject; otherwise the test starts at the match point. This
- optimization can save a huge amount of backtracking in patterns with nested
- unlimited repeats that aren't going to match. Writing separate code for
- cased/caseless versions makes it go faster, as does using an autoincrement
- and backing off on a match.
-
- HOWEVER: when the subject string is very, very long, searching to its end can
- take a long time, and give bad performance on quite ordinary patterns. This
- showed up when somebody was matching /^C/ on a 32-megabyte string... so we
- don't do this when the string is sufficiently long.
- */
-
- if (req_byte >= 0 && endSubject - subjectPtr < REQ_BYTE_MAX) {
- const UChar* p = subjectPtr + (hasFirstByte ? 1 : 0);
-
- /* We don't need to repeat the search if we haven't yet reached the
- place we found it at last time. */
-
- if (p > reqBytePtr) {
- if (req_byte_caseless) {
- while (p < endSubject) {
- int pp = *p++;
- if (pp == req_byte || pp == req_byte2) {
- p--;
- break;
- }
- }
- } else {
- while (p < endSubject) {
- if (*p++ == req_byte) {
- p--;
- break;
- }
- }
- }
-
- /* If we can't find the required character, break the matching loop */
-
- if (p >= endSubject)
- return true;
-
- /* If we have found the required character, save the point where we
- found it, so that we don't search again next time round the loop if
- the start hasn't passed this character yet. */
-
- reqBytePtr = p;
- }
- }
- return false;
-}
-
-int jsRegExpExecute(const JSRegExp* re,
- const UChar* subject, int length, int start_offset, int* offsets,
- int offsetcount)
-{
- ASSERT(re);
- ASSERT(subject);
- ASSERT(offsetcount >= 0);
- ASSERT(offsets || offsetcount == 0);
-
- MatchData matchBlock;
- matchBlock.startSubject = subject;
- matchBlock.endSubject = matchBlock.startSubject + length;
- const UChar* endSubject = matchBlock.endSubject;
-
- matchBlock.multiline = (re->options & MatchAcrossMultipleLinesOption);
- matchBlock.ignoreCase = (re->options & IgnoreCaseOption);
-
- /* If the expression has got more back references than the offsets supplied can
- hold, we get a temporary chunk of working store to use during the matching.
- Otherwise, we can use the vector supplied, rounding down its size to a multiple
- of 3. */
-
- int ocount = offsetcount - (offsetcount % 3);
-
- // FIXME: This is lame that we have to second-guess our caller here.
- // The API should change to either fail-hard when we don't have enough offset space
- // or that we shouldn't ask our callers to pre-allocate in the first place.
- bool using_temporary_offsets = false;
- if (re->top_backref > 0 && re->top_backref >= ocount/3) {
- ocount = re->top_backref * 3 + 3;
- matchBlock.offsetVector = new int[ocount];
- if (!matchBlock.offsetVector)
- return JSRegExpErrorNoMemory;
- using_temporary_offsets = true;
- } else
- matchBlock.offsetVector = offsets;
-
- matchBlock.offsetEnd = ocount;
- matchBlock.offsetMax = (2*ocount)/3;
- matchBlock.offsetOverflow = false;
-
- /* Compute the minimum number of offsets that we need to reset each time. Doing
- this makes a huge difference to execution time when there aren't many brackets
- in the pattern. */
-
- int resetcount = 2 + re->top_bracket * 2;
- if (resetcount > offsetcount)
- resetcount = ocount;
-
- /* Reset the working variable associated with each extraction. These should
- never be used unless previously set, but they get saved and restored, and so we
- initialize them to avoid reading uninitialized locations. */
-
- if (matchBlock.offsetVector) {
- int* iptr = matchBlock.offsetVector + ocount;
- int* iend = iptr - resetcount/2 + 1;
- while (--iptr >= iend)
- *iptr = -1;
- }
-
- /* Set up the first character to match, if available. The first_byte value is
- never set for an anchored regular expression, but the anchoring may be forced
- at run time, so we have to test for anchoring. The first char may be unset for
- an unanchored pattern, of course. If there's no first char and the pattern was
- studied, there may be a bitmap of possible first characters. */
-
- bool first_byte_caseless = false;
- int first_byte = -1;
- if (re->options & UseFirstByteOptimizationOption) {
- first_byte = re->first_byte & 255;
- if ((first_byte_caseless = (re->first_byte & REQ_IGNORE_CASE)))
- first_byte = toLowerCase(first_byte);
- }
-
- /* For anchored or unanchored matches, there may be a "last known required
- character" set. */
-
- bool req_byte_caseless = false;
- int req_byte = -1;
- int req_byte2 = -1;
- if (re->options & UseRequiredByteOptimizationOption) {
- req_byte = re->req_byte & 255; // FIXME: This optimization could be made to work for UTF16 chars as well...
- req_byte_caseless = (re->req_byte & REQ_IGNORE_CASE);
- req_byte2 = flipCase(req_byte);
- }
-
- /* Loop for handling unanchored repeated matching attempts; for anchored regexs
- the loop runs just once. */
-
- const UChar* startMatch = subject + start_offset;
- const UChar* reqBytePtr = startMatch - 1;
- bool useMultiLineFirstCharOptimization = re->options & UseMultiLineFirstByteOptimizationOption;
-
- do {
- /* Reset the maximum number of extractions we might see. */
- if (matchBlock.offsetVector) {
- int* iptr = matchBlock.offsetVector;
- int* iend = iptr + resetcount;
- while (iptr < iend)
- *iptr++ = -1;
- }
-
- tryFirstByteOptimization(startMatch, endSubject, first_byte, first_byte_caseless, useMultiLineFirstCharOptimization, matchBlock.startSubject + start_offset);
- if (tryRequiredByteOptimization(startMatch, endSubject, req_byte, req_byte2, req_byte_caseless, first_byte >= 0, reqBytePtr))
- break;
-
- /* When a match occurs, substrings will be set for all internal extractions;
- we just need to set up the whole thing as substring 0 before returning. If
- there were too many extractions, set the return code to zero. In the case
- where we had to get some local store to hold offsets for backreferences, copy
- those back references that we can. In this case there need not be overflow
- if certain parts of the pattern were not used. */
-
- /* The code starts after the JSRegExp block and the capture name table. */
- const unsigned char* start_code = (const unsigned char*)(re + 1);
-
- int returnCode = match(startMatch, start_code, 2, matchBlock);
-
- /* When the result is no match, advance the pointer to the next character
- and continue. */
- if (returnCode == 0) {
- startMatch++;
- continue;
- }
-
- if (returnCode != 1) {
- ASSERT(returnCode == JSRegExpErrorHitLimit || returnCode == JSRegExpErrorNoMemory);
- DPRINTF((">>>> error: returning %d\n", returnCode));
- return returnCode;
- }
-
- /* We have a match! Copy the offset information from temporary store if
- necessary */
-
- if (using_temporary_offsets) {
- if (offsetcount >= 4) {
- memcpy(offsets + 2, matchBlock.offsetVector + 2, (offsetcount - 2) * sizeof(int));
- DPRINTF(("Copied offsets from temporary memory\n"));
- }
- if (matchBlock.endOffsetTop > offsetcount)
- matchBlock.offsetOverflow = true;
-
- DPRINTF(("Freeing temporary memory\n"));
- delete [] matchBlock.offsetVector;
- }
-
- returnCode = matchBlock.offsetOverflow ? 0 : matchBlock.endOffsetTop / 2;
-
- if (offsetcount < 2)
- returnCode = 0;
- else {
- offsets[0] = startMatch - matchBlock.startSubject;
- offsets[1] = matchBlock.endMatchPtr - matchBlock.startSubject;
- }
-
- DPRINTF((">>>> returning %d\n", returnCode));
- return returnCode;
- } while (!(re->options & IsAnchoredOption) && startMatch <= endSubject);
-
- if (using_temporary_offsets) {
- DPRINTF(("Freeing temporary memory\n"));
- delete [] matchBlock.offsetVector;
- }
-
- DPRINTF((">>>> returning PCRE_ERROR_NOMATCH\n"));
- return JSRegExpErrorNoMatch;
-}
-
-} } // namespace v8::jscre
+++ /dev/null
-/* This source module is automatically generated from the Unicode
-property table. See ucpinternal.h for a description of the layout. */
-
-static const cnode ucp_table[] = {
- { 0x09800000, 0x0000001f },
- { 0x09000020, 0x74000000 },
- { 0x09800021, 0x54000002 },
- { 0x09000024, 0x5c000000 },
- { 0x09800025, 0x54000002 },
- { 0x09000028, 0x58000000 },
- { 0x09000029, 0x48000000 },
- { 0x0900002a, 0x54000000 },
- { 0x0900002b, 0x64000000 },
- { 0x0900002c, 0x54000000 },
- { 0x0900002d, 0x44000000 },
- { 0x0980002e, 0x54000001 },
- { 0x09800030, 0x34000009 },
- { 0x0980003a, 0x54000001 },
- { 0x0980003c, 0x64000002 },
- { 0x0980003f, 0x54000001 },
- { 0x21000041, 0x24000020 },
- { 0x21000042, 0x24000020 },
- { 0x21000043, 0x24000020 },
- { 0x21000044, 0x24000020 },
- { 0x21000045, 0x24000020 },
- { 0x21000046, 0x24000020 },
- { 0x21000047, 0x24000020 },
- { 0x21000048, 0x24000020 },
- { 0x21000049, 0x24000020 },
- { 0x2100004a, 0x24000020 },
- { 0x2100004b, 0x24000020 },
- { 0x2100004c, 0x24000020 },
- { 0x2100004d, 0x24000020 },
- { 0x2100004e, 0x24000020 },
- { 0x2100004f, 0x24000020 },
- { 0x21000050, 0x24000020 },
- { 0x21000051, 0x24000020 },
- { 0x21000052, 0x24000020 },
- { 0x21000053, 0x24000020 },
- { 0x21000054, 0x24000020 },
- { 0x21000055, 0x24000020 },
- { 0x21000056, 0x24000020 },
- { 0x21000057, 0x24000020 },
- { 0x21000058, 0x24000020 },
- { 0x21000059, 0x24000020 },
- { 0x2100005a, 0x24000020 },
- { 0x0900005b, 0x58000000 },
- { 0x0900005c, 0x54000000 },
- { 0x0900005d, 0x48000000 },
- { 0x0900005e, 0x60000000 },
- { 0x0900005f, 0x40000000 },
- { 0x09000060, 0x60000000 },
- { 0x21000061, 0x1400ffe0 },
- { 0x21000062, 0x1400ffe0 },
- { 0x21000063, 0x1400ffe0 },
- { 0x21000064, 0x1400ffe0 },
- { 0x21000065, 0x1400ffe0 },
- { 0x21000066, 0x1400ffe0 },
- { 0x21000067, 0x1400ffe0 },
- { 0x21000068, 0x1400ffe0 },
- { 0x21000069, 0x1400ffe0 },
- { 0x2100006a, 0x1400ffe0 },
- { 0x2100006b, 0x1400ffe0 },
- { 0x2100006c, 0x1400ffe0 },
- { 0x2100006d, 0x1400ffe0 },
- { 0x2100006e, 0x1400ffe0 },
- { 0x2100006f, 0x1400ffe0 },
- { 0x21000070, 0x1400ffe0 },
- { 0x21000071, 0x1400ffe0 },
- { 0x21000072, 0x1400ffe0 },
- { 0x21000073, 0x1400ffe0 },
- { 0x21000074, 0x1400ffe0 },
- { 0x21000075, 0x1400ffe0 },
- { 0x21000076, 0x1400ffe0 },
- { 0x21000077, 0x1400ffe0 },
- { 0x21000078, 0x1400ffe0 },
- { 0x21000079, 0x1400ffe0 },
- { 0x2100007a, 0x1400ffe0 },
- { 0x0900007b, 0x58000000 },
- { 0x0900007c, 0x64000000 },
- { 0x0900007d, 0x48000000 },
- { 0x0900007e, 0x64000000 },
- { 0x0980007f, 0x00000020 },
- { 0x090000a0, 0x74000000 },
- { 0x090000a1, 0x54000000 },
- { 0x098000a2, 0x5c000003 },
- { 0x098000a6, 0x68000001 },
- { 0x090000a8, 0x60000000 },
- { 0x090000a9, 0x68000000 },
- { 0x210000aa, 0x14000000 },
- { 0x090000ab, 0x50000000 },
- { 0x090000ac, 0x64000000 },
- { 0x090000ad, 0x04000000 },
- { 0x090000ae, 0x68000000 },
- { 0x090000af, 0x60000000 },
- { 0x090000b0, 0x68000000 },
- { 0x090000b1, 0x64000000 },
- { 0x098000b2, 0x3c000001 },
- { 0x090000b4, 0x60000000 },
- { 0x090000b5, 0x140002e7 },
- { 0x090000b6, 0x68000000 },
- { 0x090000b7, 0x54000000 },
- { 0x090000b8, 0x60000000 },
- { 0x090000b9, 0x3c000000 },
- { 0x210000ba, 0x14000000 },
- { 0x090000bb, 0x4c000000 },
- { 0x098000bc, 0x3c000002 },
- { 0x090000bf, 0x54000000 },
- { 0x210000c0, 0x24000020 },
- { 0x210000c1, 0x24000020 },
- { 0x210000c2, 0x24000020 },
- { 0x210000c3, 0x24000020 },
- { 0x210000c4, 0x24000020 },
- { 0x210000c5, 0x24000020 },
- { 0x210000c6, 0x24000020 },
- { 0x210000c7, 0x24000020 },
- { 0x210000c8, 0x24000020 },
- { 0x210000c9, 0x24000020 },
- { 0x210000ca, 0x24000020 },
- { 0x210000cb, 0x24000020 },
- { 0x210000cc, 0x24000020 },
- { 0x210000cd, 0x24000020 },
- { 0x210000ce, 0x24000020 },
- { 0x210000cf, 0x24000020 },
- { 0x210000d0, 0x24000020 },
- { 0x210000d1, 0x24000020 },
- { 0x210000d2, 0x24000020 },
- { 0x210000d3, 0x24000020 },
- { 0x210000d4, 0x24000020 },
- { 0x210000d5, 0x24000020 },
- { 0x210000d6, 0x24000020 },
- { 0x090000d7, 0x64000000 },
- { 0x210000d8, 0x24000020 },
- { 0x210000d9, 0x24000020 },
- { 0x210000da, 0x24000020 },
- { 0x210000db, 0x24000020 },
- { 0x210000dc, 0x24000020 },
- { 0x210000dd, 0x24000020 },
- { 0x210000de, 0x24000020 },
- { 0x210000df, 0x14000000 },
- { 0x210000e0, 0x1400ffe0 },
- { 0x210000e1, 0x1400ffe0 },
- { 0x210000e2, 0x1400ffe0 },
- { 0x210000e3, 0x1400ffe0 },
- { 0x210000e4, 0x1400ffe0 },
- { 0x210000e5, 0x1400ffe0 },
- { 0x210000e6, 0x1400ffe0 },
- { 0x210000e7, 0x1400ffe0 },
- { 0x210000e8, 0x1400ffe0 },
- { 0x210000e9, 0x1400ffe0 },
- { 0x210000ea, 0x1400ffe0 },
- { 0x210000eb, 0x1400ffe0 },
- { 0x210000ec, 0x1400ffe0 },
- { 0x210000ed, 0x1400ffe0 },
- { 0x210000ee, 0x1400ffe0 },
- { 0x210000ef, 0x1400ffe0 },
- { 0x210000f0, 0x1400ffe0 },
- { 0x210000f1, 0x1400ffe0 },
- { 0x210000f2, 0x1400ffe0 },
- { 0x210000f3, 0x1400ffe0 },
- { 0x210000f4, 0x1400ffe0 },
- { 0x210000f5, 0x1400ffe0 },
- { 0x210000f6, 0x1400ffe0 },
- { 0x090000f7, 0x64000000 },
- { 0x210000f8, 0x1400ffe0 },
- { 0x210000f9, 0x1400ffe0 },
- { 0x210000fa, 0x1400ffe0 },
- { 0x210000fb, 0x1400ffe0 },
- { 0x210000fc, 0x1400ffe0 },
- { 0x210000fd, 0x1400ffe0 },
- { 0x210000fe, 0x1400ffe0 },
- { 0x210000ff, 0x14000079 },
- { 0x21000100, 0x24000001 },
- { 0x21000101, 0x1400ffff },
- { 0x21000102, 0x24000001 },
- { 0x21000103, 0x1400ffff },
- { 0x21000104, 0x24000001 },
- { 0x21000105, 0x1400ffff },
- { 0x21000106, 0x24000001 },
- { 0x21000107, 0x1400ffff },
- { 0x21000108, 0x24000001 },
- { 0x21000109, 0x1400ffff },
- { 0x2100010a, 0x24000001 },
- { 0x2100010b, 0x1400ffff },
- { 0x2100010c, 0x24000001 },
- { 0x2100010d, 0x1400ffff },
- { 0x2100010e, 0x24000001 },
- { 0x2100010f, 0x1400ffff },
- { 0x21000110, 0x24000001 },
- { 0x21000111, 0x1400ffff },
- { 0x21000112, 0x24000001 },
- { 0x21000113, 0x1400ffff },
- { 0x21000114, 0x24000001 },
- { 0x21000115, 0x1400ffff },
- { 0x21000116, 0x24000001 },
- { 0x21000117, 0x1400ffff },
- { 0x21000118, 0x24000001 },
- { 0x21000119, 0x1400ffff },
- { 0x2100011a, 0x24000001 },
- { 0x2100011b, 0x1400ffff },
- { 0x2100011c, 0x24000001 },
- { 0x2100011d, 0x1400ffff },
- { 0x2100011e, 0x24000001 },
- { 0x2100011f, 0x1400ffff },
- { 0x21000120, 0x24000001 },
- { 0x21000121, 0x1400ffff },
- { 0x21000122, 0x24000001 },
- { 0x21000123, 0x1400ffff },
- { 0x21000124, 0x24000001 },
- { 0x21000125, 0x1400ffff },
- { 0x21000126, 0x24000001 },
- { 0x21000127, 0x1400ffff },
- { 0x21000128, 0x24000001 },
- { 0x21000129, 0x1400ffff },
- { 0x2100012a, 0x24000001 },
- { 0x2100012b, 0x1400ffff },
- { 0x2100012c, 0x24000001 },
- { 0x2100012d, 0x1400ffff },
- { 0x2100012e, 0x24000001 },
- { 0x2100012f, 0x1400ffff },
- { 0x21000130, 0x2400ff39 },
- { 0x21000131, 0x1400ff18 },
- { 0x21000132, 0x24000001 },
- { 0x21000133, 0x1400ffff },
- { 0x21000134, 0x24000001 },
- { 0x21000135, 0x1400ffff },
- { 0x21000136, 0x24000001 },
- { 0x21000137, 0x1400ffff },
- { 0x21000138, 0x14000000 },
- { 0x21000139, 0x24000001 },
- { 0x2100013a, 0x1400ffff },
- { 0x2100013b, 0x24000001 },
- { 0x2100013c, 0x1400ffff },
- { 0x2100013d, 0x24000001 },
- { 0x2100013e, 0x1400ffff },
- { 0x2100013f, 0x24000001 },
- { 0x21000140, 0x1400ffff },
- { 0x21000141, 0x24000001 },
- { 0x21000142, 0x1400ffff },
- { 0x21000143, 0x24000001 },
- { 0x21000144, 0x1400ffff },
- { 0x21000145, 0x24000001 },
- { 0x21000146, 0x1400ffff },
- { 0x21000147, 0x24000001 },
- { 0x21000148, 0x1400ffff },
- { 0x21000149, 0x14000000 },
- { 0x2100014a, 0x24000001 },
- { 0x2100014b, 0x1400ffff },
- { 0x2100014c, 0x24000001 },
- { 0x2100014d, 0x1400ffff },
- { 0x2100014e, 0x24000001 },
- { 0x2100014f, 0x1400ffff },
- { 0x21000150, 0x24000001 },
- { 0x21000151, 0x1400ffff },
- { 0x21000152, 0x24000001 },
- { 0x21000153, 0x1400ffff },
- { 0x21000154, 0x24000001 },
- { 0x21000155, 0x1400ffff },
- { 0x21000156, 0x24000001 },
- { 0x21000157, 0x1400ffff },
- { 0x21000158, 0x24000001 },
- { 0x21000159, 0x1400ffff },
- { 0x2100015a, 0x24000001 },
- { 0x2100015b, 0x1400ffff },
- { 0x2100015c, 0x24000001 },
- { 0x2100015d, 0x1400ffff },
- { 0x2100015e, 0x24000001 },
- { 0x2100015f, 0x1400ffff },
- { 0x21000160, 0x24000001 },
- { 0x21000161, 0x1400ffff },
- { 0x21000162, 0x24000001 },
- { 0x21000163, 0x1400ffff },
- { 0x21000164, 0x24000001 },
- { 0x21000165, 0x1400ffff },
- { 0x21000166, 0x24000001 },
- { 0x21000167, 0x1400ffff },
- { 0x21000168, 0x24000001 },
- { 0x21000169, 0x1400ffff },
- { 0x2100016a, 0x24000001 },
- { 0x2100016b, 0x1400ffff },
- { 0x2100016c, 0x24000001 },
- { 0x2100016d, 0x1400ffff },
- { 0x2100016e, 0x24000001 },
- { 0x2100016f, 0x1400ffff },
- { 0x21000170, 0x24000001 },
- { 0x21000171, 0x1400ffff },
- { 0x21000172, 0x24000001 },
- { 0x21000173, 0x1400ffff },
- { 0x21000174, 0x24000001 },
- { 0x21000175, 0x1400ffff },
- { 0x21000176, 0x24000001 },
- { 0x21000177, 0x1400ffff },
- { 0x21000178, 0x2400ff87 },
- { 0x21000179, 0x24000001 },
- { 0x2100017a, 0x1400ffff },
- { 0x2100017b, 0x24000001 },
- { 0x2100017c, 0x1400ffff },
- { 0x2100017d, 0x24000001 },
- { 0x2100017e, 0x1400ffff },
- { 0x2100017f, 0x1400fed4 },
- { 0x21000180, 0x14000000 },
- { 0x21000181, 0x240000d2 },
- { 0x21000182, 0x24000001 },
- { 0x21000183, 0x1400ffff },
- { 0x21000184, 0x24000001 },
- { 0x21000185, 0x1400ffff },
- { 0x21000186, 0x240000ce },
- { 0x21000187, 0x24000001 },
- { 0x21000188, 0x1400ffff },
- { 0x21000189, 0x240000cd },
- { 0x2100018a, 0x240000cd },
- { 0x2100018b, 0x24000001 },
- { 0x2100018c, 0x1400ffff },
- { 0x2100018d, 0x14000000 },
- { 0x2100018e, 0x2400004f },
- { 0x2100018f, 0x240000ca },
- { 0x21000190, 0x240000cb },
- { 0x21000191, 0x24000001 },
- { 0x21000192, 0x1400ffff },
- { 0x21000193, 0x240000cd },
- { 0x21000194, 0x240000cf },
- { 0x21000195, 0x14000061 },
- { 0x21000196, 0x240000d3 },
- { 0x21000197, 0x240000d1 },
- { 0x21000198, 0x24000001 },
- { 0x21000199, 0x1400ffff },
- { 0x2100019a, 0x140000a3 },
- { 0x2100019b, 0x14000000 },
- { 0x2100019c, 0x240000d3 },
- { 0x2100019d, 0x240000d5 },
- { 0x2100019e, 0x14000082 },
- { 0x2100019f, 0x240000d6 },
- { 0x210001a0, 0x24000001 },
- { 0x210001a1, 0x1400ffff },
- { 0x210001a2, 0x24000001 },
- { 0x210001a3, 0x1400ffff },
- { 0x210001a4, 0x24000001 },
- { 0x210001a5, 0x1400ffff },
- { 0x210001a6, 0x240000da },
- { 0x210001a7, 0x24000001 },
- { 0x210001a8, 0x1400ffff },
- { 0x210001a9, 0x240000da },
- { 0x218001aa, 0x14000001 },
- { 0x210001ac, 0x24000001 },
- { 0x210001ad, 0x1400ffff },
- { 0x210001ae, 0x240000da },
- { 0x210001af, 0x24000001 },
- { 0x210001b0, 0x1400ffff },
- { 0x210001b1, 0x240000d9 },
- { 0x210001b2, 0x240000d9 },
- { 0x210001b3, 0x24000001 },
- { 0x210001b4, 0x1400ffff },
- { 0x210001b5, 0x24000001 },
- { 0x210001b6, 0x1400ffff },
- { 0x210001b7, 0x240000db },
- { 0x210001b8, 0x24000001 },
- { 0x210001b9, 0x1400ffff },
- { 0x210001ba, 0x14000000 },
- { 0x210001bb, 0x1c000000 },
- { 0x210001bc, 0x24000001 },
- { 0x210001bd, 0x1400ffff },
- { 0x210001be, 0x14000000 },
- { 0x210001bf, 0x14000038 },
- { 0x218001c0, 0x1c000003 },
- { 0x210001c4, 0x24000002 },
- { 0x210001c5, 0x2000ffff },
- { 0x210001c6, 0x1400fffe },
- { 0x210001c7, 0x24000002 },
- { 0x210001c8, 0x2000ffff },
- { 0x210001c9, 0x1400fffe },
- { 0x210001ca, 0x24000002 },
- { 0x210001cb, 0x2000ffff },
- { 0x210001cc, 0x1400fffe },
- { 0x210001cd, 0x24000001 },
- { 0x210001ce, 0x1400ffff },
- { 0x210001cf, 0x24000001 },
- { 0x210001d0, 0x1400ffff },
- { 0x210001d1, 0x24000001 },
- { 0x210001d2, 0x1400ffff },
- { 0x210001d3, 0x24000001 },
- { 0x210001d4, 0x1400ffff },
- { 0x210001d5, 0x24000001 },
- { 0x210001d6, 0x1400ffff },
- { 0x210001d7, 0x24000001 },
- { 0x210001d8, 0x1400ffff },
- { 0x210001d9, 0x24000001 },
- { 0x210001da, 0x1400ffff },
- { 0x210001db, 0x24000001 },
- { 0x210001dc, 0x1400ffff },
- { 0x210001dd, 0x1400ffb1 },
- { 0x210001de, 0x24000001 },
- { 0x210001df, 0x1400ffff },
- { 0x210001e0, 0x24000001 },
- { 0x210001e1, 0x1400ffff },
- { 0x210001e2, 0x24000001 },
- { 0x210001e3, 0x1400ffff },
- { 0x210001e4, 0x24000001 },
- { 0x210001e5, 0x1400ffff },
- { 0x210001e6, 0x24000001 },
- { 0x210001e7, 0x1400ffff },
- { 0x210001e8, 0x24000001 },
- { 0x210001e9, 0x1400ffff },
- { 0x210001ea, 0x24000001 },
- { 0x210001eb, 0x1400ffff },
- { 0x210001ec, 0x24000001 },
- { 0x210001ed, 0x1400ffff },
- { 0x210001ee, 0x24000001 },
- { 0x210001ef, 0x1400ffff },
- { 0x210001f0, 0x14000000 },
- { 0x210001f1, 0x24000002 },
- { 0x210001f2, 0x2000ffff },
- { 0x210001f3, 0x1400fffe },
- { 0x210001f4, 0x24000001 },
- { 0x210001f5, 0x1400ffff },
- { 0x210001f6, 0x2400ff9f },
- { 0x210001f7, 0x2400ffc8 },
- { 0x210001f8, 0x24000001 },
- { 0x210001f9, 0x1400ffff },
- { 0x210001fa, 0x24000001 },
- { 0x210001fb, 0x1400ffff },
- { 0x210001fc, 0x24000001 },
- { 0x210001fd, 0x1400ffff },
- { 0x210001fe, 0x24000001 },
- { 0x210001ff, 0x1400ffff },
- { 0x21000200, 0x24000001 },
- { 0x21000201, 0x1400ffff },
- { 0x21000202, 0x24000001 },
- { 0x21000203, 0x1400ffff },
- { 0x21000204, 0x24000001 },
- { 0x21000205, 0x1400ffff },
- { 0x21000206, 0x24000001 },
- { 0x21000207, 0x1400ffff },
- { 0x21000208, 0x24000001 },
- { 0x21000209, 0x1400ffff },
- { 0x2100020a, 0x24000001 },
- { 0x2100020b, 0x1400ffff },
- { 0x2100020c, 0x24000001 },
- { 0x2100020d, 0x1400ffff },
- { 0x2100020e, 0x24000001 },
- { 0x2100020f, 0x1400ffff },
- { 0x21000210, 0x24000001 },
- { 0x21000211, 0x1400ffff },
- { 0x21000212, 0x24000001 },
- { 0x21000213, 0x1400ffff },
- { 0x21000214, 0x24000001 },
- { 0x21000215, 0x1400ffff },
- { 0x21000216, 0x24000001 },
- { 0x21000217, 0x1400ffff },
- { 0x21000218, 0x24000001 },
- { 0x21000219, 0x1400ffff },
- { 0x2100021a, 0x24000001 },
- { 0x2100021b, 0x1400ffff },
- { 0x2100021c, 0x24000001 },
- { 0x2100021d, 0x1400ffff },
- { 0x2100021e, 0x24000001 },
- { 0x2100021f, 0x1400ffff },
- { 0x21000220, 0x2400ff7e },
- { 0x21000221, 0x14000000 },
- { 0x21000222, 0x24000001 },
- { 0x21000223, 0x1400ffff },
- { 0x21000224, 0x24000001 },
- { 0x21000225, 0x1400ffff },
- { 0x21000226, 0x24000001 },
- { 0x21000227, 0x1400ffff },
- { 0x21000228, 0x24000001 },
- { 0x21000229, 0x1400ffff },
- { 0x2100022a, 0x24000001 },
- { 0x2100022b, 0x1400ffff },
- { 0x2100022c, 0x24000001 },
- { 0x2100022d, 0x1400ffff },
- { 0x2100022e, 0x24000001 },
- { 0x2100022f, 0x1400ffff },
- { 0x21000230, 0x24000001 },
- { 0x21000231, 0x1400ffff },
- { 0x21000232, 0x24000001 },
- { 0x21000233, 0x1400ffff },
- { 0x21800234, 0x14000005 },
- { 0x2100023a, 0x24000000 },
- { 0x2100023b, 0x24000001 },
- { 0x2100023c, 0x1400ffff },
- { 0x2100023d, 0x2400ff5d },
- { 0x2100023e, 0x24000000 },
- { 0x2180023f, 0x14000001 },
- { 0x21000241, 0x24000053 },
- { 0x21800250, 0x14000002 },
- { 0x21000253, 0x1400ff2e },
- { 0x21000254, 0x1400ff32 },
- { 0x21000255, 0x14000000 },
- { 0x21000256, 0x1400ff33 },
- { 0x21000257, 0x1400ff33 },
- { 0x21000258, 0x14000000 },
- { 0x21000259, 0x1400ff36 },
- { 0x2100025a, 0x14000000 },
- { 0x2100025b, 0x1400ff35 },
- { 0x2180025c, 0x14000003 },
- { 0x21000260, 0x1400ff33 },
- { 0x21800261, 0x14000001 },
- { 0x21000263, 0x1400ff31 },
- { 0x21800264, 0x14000003 },
- { 0x21000268, 0x1400ff2f },
- { 0x21000269, 0x1400ff2d },
- { 0x2180026a, 0x14000004 },
- { 0x2100026f, 0x1400ff2d },
- { 0x21800270, 0x14000001 },
- { 0x21000272, 0x1400ff2b },
- { 0x21800273, 0x14000001 },
- { 0x21000275, 0x1400ff2a },
- { 0x21800276, 0x14000009 },
- { 0x21000280, 0x1400ff26 },
- { 0x21800281, 0x14000001 },
- { 0x21000283, 0x1400ff26 },
- { 0x21800284, 0x14000003 },
- { 0x21000288, 0x1400ff26 },
- { 0x21000289, 0x14000000 },
- { 0x2100028a, 0x1400ff27 },
- { 0x2100028b, 0x1400ff27 },
- { 0x2180028c, 0x14000005 },
- { 0x21000292, 0x1400ff25 },
- { 0x21000293, 0x14000000 },
- { 0x21000294, 0x1400ffad },
- { 0x21800295, 0x1400001a },
- { 0x218002b0, 0x18000011 },
- { 0x098002c2, 0x60000003 },
- { 0x098002c6, 0x1800000b },
- { 0x098002d2, 0x6000000d },
- { 0x218002e0, 0x18000004 },
- { 0x098002e5, 0x60000008 },
- { 0x090002ee, 0x18000000 },
- { 0x098002ef, 0x60000010 },
- { 0x1b800300, 0x30000044 },
- { 0x1b000345, 0x30000054 },
- { 0x1b800346, 0x30000029 },
- { 0x13800374, 0x60000001 },
- { 0x1300037a, 0x18000000 },
- { 0x0900037e, 0x54000000 },
- { 0x13800384, 0x60000001 },
- { 0x13000386, 0x24000026 },
- { 0x09000387, 0x54000000 },
- { 0x13000388, 0x24000025 },
- { 0x13000389, 0x24000025 },
- { 0x1300038a, 0x24000025 },
- { 0x1300038c, 0x24000040 },
- { 0x1300038e, 0x2400003f },
- { 0x1300038f, 0x2400003f },
- { 0x13000390, 0x14000000 },
- { 0x13000391, 0x24000020 },
- { 0x13000392, 0x24000020 },
- { 0x13000393, 0x24000020 },
- { 0x13000394, 0x24000020 },
- { 0x13000395, 0x24000020 },
- { 0x13000396, 0x24000020 },
- { 0x13000397, 0x24000020 },
- { 0x13000398, 0x24000020 },
- { 0x13000399, 0x24000020 },
- { 0x1300039a, 0x24000020 },
- { 0x1300039b, 0x24000020 },
- { 0x1300039c, 0x24000020 },
- { 0x1300039d, 0x24000020 },
- { 0x1300039e, 0x24000020 },
- { 0x1300039f, 0x24000020 },
- { 0x130003a0, 0x24000020 },
- { 0x130003a1, 0x24000020 },
- { 0x130003a3, 0x24000020 },
- { 0x130003a4, 0x24000020 },
- { 0x130003a5, 0x24000020 },
- { 0x130003a6, 0x24000020 },
- { 0x130003a7, 0x24000020 },
- { 0x130003a8, 0x24000020 },
- { 0x130003a9, 0x24000020 },
- { 0x130003aa, 0x24000020 },
- { 0x130003ab, 0x24000020 },
- { 0x130003ac, 0x1400ffda },
- { 0x130003ad, 0x1400ffdb },
- { 0x130003ae, 0x1400ffdb },
- { 0x130003af, 0x1400ffdb },
- { 0x130003b0, 0x14000000 },
- { 0x130003b1, 0x1400ffe0 },
- { 0x130003b2, 0x1400ffe0 },
- { 0x130003b3, 0x1400ffe0 },
- { 0x130003b4, 0x1400ffe0 },
- { 0x130003b5, 0x1400ffe0 },
- { 0x130003b6, 0x1400ffe0 },
- { 0x130003b7, 0x1400ffe0 },
- { 0x130003b8, 0x1400ffe0 },
- { 0x130003b9, 0x1400ffe0 },
- { 0x130003ba, 0x1400ffe0 },
- { 0x130003bb, 0x1400ffe0 },
- { 0x130003bc, 0x1400ffe0 },
- { 0x130003bd, 0x1400ffe0 },
- { 0x130003be, 0x1400ffe0 },
- { 0x130003bf, 0x1400ffe0 },
- { 0x130003c0, 0x1400ffe0 },
- { 0x130003c1, 0x1400ffe0 },
- { 0x130003c2, 0x1400ffe1 },
- { 0x130003c3, 0x1400ffe0 },
- { 0x130003c4, 0x1400ffe0 },
- { 0x130003c5, 0x1400ffe0 },
- { 0x130003c6, 0x1400ffe0 },
- { 0x130003c7, 0x1400ffe0 },
- { 0x130003c8, 0x1400ffe0 },
- { 0x130003c9, 0x1400ffe0 },
- { 0x130003ca, 0x1400ffe0 },
- { 0x130003cb, 0x1400ffe0 },
- { 0x130003cc, 0x1400ffc0 },
- { 0x130003cd, 0x1400ffc1 },
- { 0x130003ce, 0x1400ffc1 },
- { 0x130003d0, 0x1400ffc2 },
- { 0x130003d1, 0x1400ffc7 },
- { 0x138003d2, 0x24000002 },
- { 0x130003d5, 0x1400ffd1 },
- { 0x130003d6, 0x1400ffca },
- { 0x130003d7, 0x14000000 },
- { 0x130003d8, 0x24000001 },
- { 0x130003d9, 0x1400ffff },
- { 0x130003da, 0x24000001 },
- { 0x130003db, 0x1400ffff },
- { 0x130003dc, 0x24000001 },
- { 0x130003dd, 0x1400ffff },
- { 0x130003de, 0x24000001 },
- { 0x130003df, 0x1400ffff },
- { 0x130003e0, 0x24000001 },
- { 0x130003e1, 0x1400ffff },
- { 0x0a0003e2, 0x24000001 },
- { 0x0a0003e3, 0x1400ffff },
- { 0x0a0003e4, 0x24000001 },
- { 0x0a0003e5, 0x1400ffff },
- { 0x0a0003e6, 0x24000001 },
- { 0x0a0003e7, 0x1400ffff },
- { 0x0a0003e8, 0x24000001 },
- { 0x0a0003e9, 0x1400ffff },
- { 0x0a0003ea, 0x24000001 },
- { 0x0a0003eb, 0x1400ffff },
- { 0x0a0003ec, 0x24000001 },
- { 0x0a0003ed, 0x1400ffff },
- { 0x0a0003ee, 0x24000001 },
- { 0x0a0003ef, 0x1400ffff },
- { 0x130003f0, 0x1400ffaa },
- { 0x130003f1, 0x1400ffb0 },
- { 0x130003f2, 0x14000007 },
- { 0x130003f3, 0x14000000 },
- { 0x130003f4, 0x2400ffc4 },
- { 0x130003f5, 0x1400ffa0 },
- { 0x130003f6, 0x64000000 },
- { 0x130003f7, 0x24000001 },
- { 0x130003f8, 0x1400ffff },
- { 0x130003f9, 0x2400fff9 },
- { 0x130003fa, 0x24000001 },
- { 0x130003fb, 0x1400ffff },
- { 0x130003fc, 0x14000000 },
- { 0x138003fd, 0x24000002 },
- { 0x0c000400, 0x24000050 },
- { 0x0c000401, 0x24000050 },
- { 0x0c000402, 0x24000050 },
- { 0x0c000403, 0x24000050 },
- { 0x0c000404, 0x24000050 },
- { 0x0c000405, 0x24000050 },
- { 0x0c000406, 0x24000050 },
- { 0x0c000407, 0x24000050 },
- { 0x0c000408, 0x24000050 },
- { 0x0c000409, 0x24000050 },
- { 0x0c00040a, 0x24000050 },
- { 0x0c00040b, 0x24000050 },
- { 0x0c00040c, 0x24000050 },
- { 0x0c00040d, 0x24000050 },
- { 0x0c00040e, 0x24000050 },
- { 0x0c00040f, 0x24000050 },
- { 0x0c000410, 0x24000020 },
- { 0x0c000411, 0x24000020 },
- { 0x0c000412, 0x24000020 },
- { 0x0c000413, 0x24000020 },
- { 0x0c000414, 0x24000020 },
- { 0x0c000415, 0x24000020 },
- { 0x0c000416, 0x24000020 },
- { 0x0c000417, 0x24000020 },
- { 0x0c000418, 0x24000020 },
- { 0x0c000419, 0x24000020 },
- { 0x0c00041a, 0x24000020 },
- { 0x0c00041b, 0x24000020 },
- { 0x0c00041c, 0x24000020 },
- { 0x0c00041d, 0x24000020 },
- { 0x0c00041e, 0x24000020 },
- { 0x0c00041f, 0x24000020 },
- { 0x0c000420, 0x24000020 },
- { 0x0c000421, 0x24000020 },
- { 0x0c000422, 0x24000020 },
- { 0x0c000423, 0x24000020 },
- { 0x0c000424, 0x24000020 },
- { 0x0c000425, 0x24000020 },
- { 0x0c000426, 0x24000020 },
- { 0x0c000427, 0x24000020 },
- { 0x0c000428, 0x24000020 },
- { 0x0c000429, 0x24000020 },
- { 0x0c00042a, 0x24000020 },
- { 0x0c00042b, 0x24000020 },
- { 0x0c00042c, 0x24000020 },
- { 0x0c00042d, 0x24000020 },
- { 0x0c00042e, 0x24000020 },
- { 0x0c00042f, 0x24000020 },
- { 0x0c000430, 0x1400ffe0 },
- { 0x0c000431, 0x1400ffe0 },
- { 0x0c000432, 0x1400ffe0 },
- { 0x0c000433, 0x1400ffe0 },
- { 0x0c000434, 0x1400ffe0 },
- { 0x0c000435, 0x1400ffe0 },
- { 0x0c000436, 0x1400ffe0 },
- { 0x0c000437, 0x1400ffe0 },
- { 0x0c000438, 0x1400ffe0 },
- { 0x0c000439, 0x1400ffe0 },
- { 0x0c00043a, 0x1400ffe0 },
- { 0x0c00043b, 0x1400ffe0 },
- { 0x0c00043c, 0x1400ffe0 },
- { 0x0c00043d, 0x1400ffe0 },
- { 0x0c00043e, 0x1400ffe0 },
- { 0x0c00043f, 0x1400ffe0 },
- { 0x0c000440, 0x1400ffe0 },
- { 0x0c000441, 0x1400ffe0 },
- { 0x0c000442, 0x1400ffe0 },
- { 0x0c000443, 0x1400ffe0 },
- { 0x0c000444, 0x1400ffe0 },
- { 0x0c000445, 0x1400ffe0 },
- { 0x0c000446, 0x1400ffe0 },
- { 0x0c000447, 0x1400ffe0 },
- { 0x0c000448, 0x1400ffe0 },
- { 0x0c000449, 0x1400ffe0 },
- { 0x0c00044a, 0x1400ffe0 },
- { 0x0c00044b, 0x1400ffe0 },
- { 0x0c00044c, 0x1400ffe0 },
- { 0x0c00044d, 0x1400ffe0 },
- { 0x0c00044e, 0x1400ffe0 },
- { 0x0c00044f, 0x1400ffe0 },
- { 0x0c000450, 0x1400ffb0 },
- { 0x0c000451, 0x1400ffb0 },
- { 0x0c000452, 0x1400ffb0 },
- { 0x0c000453, 0x1400ffb0 },
- { 0x0c000454, 0x1400ffb0 },
- { 0x0c000455, 0x1400ffb0 },
- { 0x0c000456, 0x1400ffb0 },
- { 0x0c000457, 0x1400ffb0 },
- { 0x0c000458, 0x1400ffb0 },
- { 0x0c000459, 0x1400ffb0 },
- { 0x0c00045a, 0x1400ffb0 },
- { 0x0c00045b, 0x1400ffb0 },
- { 0x0c00045c, 0x1400ffb0 },
- { 0x0c00045d, 0x1400ffb0 },
- { 0x0c00045e, 0x1400ffb0 },
- { 0x0c00045f, 0x1400ffb0 },
- { 0x0c000460, 0x24000001 },
- { 0x0c000461, 0x1400ffff },
- { 0x0c000462, 0x24000001 },
- { 0x0c000463, 0x1400ffff },
- { 0x0c000464, 0x24000001 },
- { 0x0c000465, 0x1400ffff },
- { 0x0c000466, 0x24000001 },
- { 0x0c000467, 0x1400ffff },
- { 0x0c000468, 0x24000001 },
- { 0x0c000469, 0x1400ffff },
- { 0x0c00046a, 0x24000001 },
- { 0x0c00046b, 0x1400ffff },
- { 0x0c00046c, 0x24000001 },
- { 0x0c00046d, 0x1400ffff },
- { 0x0c00046e, 0x24000001 },
- { 0x0c00046f, 0x1400ffff },
- { 0x0c000470, 0x24000001 },
- { 0x0c000471, 0x1400ffff },
- { 0x0c000472, 0x24000001 },
- { 0x0c000473, 0x1400ffff },
- { 0x0c000474, 0x24000001 },
- { 0x0c000475, 0x1400ffff },
- { 0x0c000476, 0x24000001 },
- { 0x0c000477, 0x1400ffff },
- { 0x0c000478, 0x24000001 },
- { 0x0c000479, 0x1400ffff },
- { 0x0c00047a, 0x24000001 },
- { 0x0c00047b, 0x1400ffff },
- { 0x0c00047c, 0x24000001 },
- { 0x0c00047d, 0x1400ffff },
- { 0x0c00047e, 0x24000001 },
- { 0x0c00047f, 0x1400ffff },
- { 0x0c000480, 0x24000001 },
- { 0x0c000481, 0x1400ffff },
- { 0x0c000482, 0x68000000 },
- { 0x0c800483, 0x30000003 },
- { 0x0c800488, 0x2c000001 },
- { 0x0c00048a, 0x24000001 },
- { 0x0c00048b, 0x1400ffff },
- { 0x0c00048c, 0x24000001 },
- { 0x0c00048d, 0x1400ffff },
- { 0x0c00048e, 0x24000001 },
- { 0x0c00048f, 0x1400ffff },
- { 0x0c000490, 0x24000001 },
- { 0x0c000491, 0x1400ffff },
- { 0x0c000492, 0x24000001 },
- { 0x0c000493, 0x1400ffff },
- { 0x0c000494, 0x24000001 },
- { 0x0c000495, 0x1400ffff },
- { 0x0c000496, 0x24000001 },
- { 0x0c000497, 0x1400ffff },
- { 0x0c000498, 0x24000001 },
- { 0x0c000499, 0x1400ffff },
- { 0x0c00049a, 0x24000001 },
- { 0x0c00049b, 0x1400ffff },
- { 0x0c00049c, 0x24000001 },
- { 0x0c00049d, 0x1400ffff },
- { 0x0c00049e, 0x24000001 },
- { 0x0c00049f, 0x1400ffff },
- { 0x0c0004a0, 0x24000001 },
- { 0x0c0004a1, 0x1400ffff },
- { 0x0c0004a2, 0x24000001 },
- { 0x0c0004a3, 0x1400ffff },
- { 0x0c0004a4, 0x24000001 },
- { 0x0c0004a5, 0x1400ffff },
- { 0x0c0004a6, 0x24000001 },
- { 0x0c0004a7, 0x1400ffff },
- { 0x0c0004a8, 0x24000001 },
- { 0x0c0004a9, 0x1400ffff },
- { 0x0c0004aa, 0x24000001 },
- { 0x0c0004ab, 0x1400ffff },
- { 0x0c0004ac, 0x24000001 },
- { 0x0c0004ad, 0x1400ffff },
- { 0x0c0004ae, 0x24000001 },
- { 0x0c0004af, 0x1400ffff },
- { 0x0c0004b0, 0x24000001 },
- { 0x0c0004b1, 0x1400ffff },
- { 0x0c0004b2, 0x24000001 },
- { 0x0c0004b3, 0x1400ffff },
- { 0x0c0004b4, 0x24000001 },
- { 0x0c0004b5, 0x1400ffff },
- { 0x0c0004b6, 0x24000001 },
- { 0x0c0004b7, 0x1400ffff },
- { 0x0c0004b8, 0x24000001 },
- { 0x0c0004b9, 0x1400ffff },
- { 0x0c0004ba, 0x24000001 },
- { 0x0c0004bb, 0x1400ffff },
- { 0x0c0004bc, 0x24000001 },
- { 0x0c0004bd, 0x1400ffff },
- { 0x0c0004be, 0x24000001 },
- { 0x0c0004bf, 0x1400ffff },
- { 0x0c0004c0, 0x24000000 },
- { 0x0c0004c1, 0x24000001 },
- { 0x0c0004c2, 0x1400ffff },
- { 0x0c0004c3, 0x24000001 },
- { 0x0c0004c4, 0x1400ffff },
- { 0x0c0004c5, 0x24000001 },
- { 0x0c0004c6, 0x1400ffff },
- { 0x0c0004c7, 0x24000001 },
- { 0x0c0004c8, 0x1400ffff },
- { 0x0c0004c9, 0x24000001 },
- { 0x0c0004ca, 0x1400ffff },
- { 0x0c0004cb, 0x24000001 },
- { 0x0c0004cc, 0x1400ffff },
- { 0x0c0004cd, 0x24000001 },
- { 0x0c0004ce, 0x1400ffff },
- { 0x0c0004d0, 0x24000001 },
- { 0x0c0004d1, 0x1400ffff },
- { 0x0c0004d2, 0x24000001 },
- { 0x0c0004d3, 0x1400ffff },
- { 0x0c0004d4, 0x24000001 },
- { 0x0c0004d5, 0x1400ffff },
- { 0x0c0004d6, 0x24000001 },
- { 0x0c0004d7, 0x1400ffff },
- { 0x0c0004d8, 0x24000001 },
- { 0x0c0004d9, 0x1400ffff },
- { 0x0c0004da, 0x24000001 },
- { 0x0c0004db, 0x1400ffff },
- { 0x0c0004dc, 0x24000001 },
- { 0x0c0004dd, 0x1400ffff },
- { 0x0c0004de, 0x24000001 },
- { 0x0c0004df, 0x1400ffff },
- { 0x0c0004e0, 0x24000001 },
- { 0x0c0004e1, 0x1400ffff },
- { 0x0c0004e2, 0x24000001 },
- { 0x0c0004e3, 0x1400ffff },
- { 0x0c0004e4, 0x24000001 },
- { 0x0c0004e5, 0x1400ffff },
- { 0x0c0004e6, 0x24000001 },
- { 0x0c0004e7, 0x1400ffff },
- { 0x0c0004e8, 0x24000001 },
- { 0x0c0004e9, 0x1400ffff },
- { 0x0c0004ea, 0x24000001 },
- { 0x0c0004eb, 0x1400ffff },
- { 0x0c0004ec, 0x24000001 },
- { 0x0c0004ed, 0x1400ffff },
- { 0x0c0004ee, 0x24000001 },
- { 0x0c0004ef, 0x1400ffff },
- { 0x0c0004f0, 0x24000001 },
- { 0x0c0004f1, 0x1400ffff },
- { 0x0c0004f2, 0x24000001 },
- { 0x0c0004f3, 0x1400ffff },
- { 0x0c0004f4, 0x24000001 },
- { 0x0c0004f5, 0x1400ffff },
- { 0x0c0004f6, 0x24000001 },
- { 0x0c0004f7, 0x1400ffff },
- { 0x0c0004f8, 0x24000001 },
- { 0x0c0004f9, 0x1400ffff },
- { 0x0c000500, 0x24000001 },
- { 0x0c000501, 0x1400ffff },
- { 0x0c000502, 0x24000001 },
- { 0x0c000503, 0x1400ffff },
- { 0x0c000504, 0x24000001 },
- { 0x0c000505, 0x1400ffff },
- { 0x0c000506, 0x24000001 },
- { 0x0c000507, 0x1400ffff },
- { 0x0c000508, 0x24000001 },
- { 0x0c000509, 0x1400ffff },
- { 0x0c00050a, 0x24000001 },
- { 0x0c00050b, 0x1400ffff },
- { 0x0c00050c, 0x24000001 },
- { 0x0c00050d, 0x1400ffff },
- { 0x0c00050e, 0x24000001 },
- { 0x0c00050f, 0x1400ffff },
- { 0x01000531, 0x24000030 },
- { 0x01000532, 0x24000030 },
- { 0x01000533, 0x24000030 },
- { 0x01000534, 0x24000030 },
- { 0x01000535, 0x24000030 },
- { 0x01000536, 0x24000030 },
- { 0x01000537, 0x24000030 },
- { 0x01000538, 0x24000030 },
- { 0x01000539, 0x24000030 },
- { 0x0100053a, 0x24000030 },
- { 0x0100053b, 0x24000030 },
- { 0x0100053c, 0x24000030 },
- { 0x0100053d, 0x24000030 },
- { 0x0100053e, 0x24000030 },
- { 0x0100053f, 0x24000030 },
- { 0x01000540, 0x24000030 },
- { 0x01000541, 0x24000030 },
- { 0x01000542, 0x24000030 },
- { 0x01000543, 0x24000030 },
- { 0x01000544, 0x24000030 },
- { 0x01000545, 0x24000030 },
- { 0x01000546, 0x24000030 },
- { 0x01000547, 0x24000030 },
- { 0x01000548, 0x24000030 },
- { 0x01000549, 0x24000030 },
- { 0x0100054a, 0x24000030 },
- { 0x0100054b, 0x24000030 },
- { 0x0100054c, 0x24000030 },
- { 0x0100054d, 0x24000030 },
- { 0x0100054e, 0x24000030 },
- { 0x0100054f, 0x24000030 },
- { 0x01000550, 0x24000030 },
- { 0x01000551, 0x24000030 },
- { 0x01000552, 0x24000030 },
- { 0x01000553, 0x24000030 },
- { 0x01000554, 0x24000030 },
- { 0x01000555, 0x24000030 },
- { 0x01000556, 0x24000030 },
- { 0x01000559, 0x18000000 },
- { 0x0180055a, 0x54000005 },
- { 0x01000561, 0x1400ffd0 },
- { 0x01000562, 0x1400ffd0 },
- { 0x01000563, 0x1400ffd0 },
- { 0x01000564, 0x1400ffd0 },
- { 0x01000565, 0x1400ffd0 },
- { 0x01000566, 0x1400ffd0 },
- { 0x01000567, 0x1400ffd0 },
- { 0x01000568, 0x1400ffd0 },
- { 0x01000569, 0x1400ffd0 },
- { 0x0100056a, 0x1400ffd0 },
- { 0x0100056b, 0x1400ffd0 },
- { 0x0100056c, 0x1400ffd0 },
- { 0x0100056d, 0x1400ffd0 },
- { 0x0100056e, 0x1400ffd0 },
- { 0x0100056f, 0x1400ffd0 },
- { 0x01000570, 0x1400ffd0 },
- { 0x01000571, 0x1400ffd0 },
- { 0x01000572, 0x1400ffd0 },
- { 0x01000573, 0x1400ffd0 },
- { 0x01000574, 0x1400ffd0 },
- { 0x01000575, 0x1400ffd0 },
- { 0x01000576, 0x1400ffd0 },
- { 0x01000577, 0x1400ffd0 },
- { 0x01000578, 0x1400ffd0 },
- { 0x01000579, 0x1400ffd0 },
- { 0x0100057a, 0x1400ffd0 },
- { 0x0100057b, 0x1400ffd0 },
- { 0x0100057c, 0x1400ffd0 },
- { 0x0100057d, 0x1400ffd0 },
- { 0x0100057e, 0x1400ffd0 },
- { 0x0100057f, 0x1400ffd0 },
- { 0x01000580, 0x1400ffd0 },
- { 0x01000581, 0x1400ffd0 },
- { 0x01000582, 0x1400ffd0 },
- { 0x01000583, 0x1400ffd0 },
- { 0x01000584, 0x1400ffd0 },
- { 0x01000585, 0x1400ffd0 },
- { 0x01000586, 0x1400ffd0 },
- { 0x01000587, 0x14000000 },
- { 0x09000589, 0x54000000 },
- { 0x0100058a, 0x44000000 },
- { 0x19800591, 0x30000028 },
- { 0x198005bb, 0x30000002 },
- { 0x190005be, 0x54000000 },
- { 0x190005bf, 0x30000000 },
- { 0x190005c0, 0x54000000 },
- { 0x198005c1, 0x30000001 },
- { 0x190005c3, 0x54000000 },
- { 0x198005c4, 0x30000001 },
- { 0x190005c6, 0x54000000 },
- { 0x190005c7, 0x30000000 },
- { 0x198005d0, 0x1c00001a },
- { 0x198005f0, 0x1c000002 },
- { 0x198005f3, 0x54000001 },
- { 0x09800600, 0x04000003 },
- { 0x0000060b, 0x5c000000 },
- { 0x0980060c, 0x54000001 },
- { 0x0080060e, 0x68000001 },
- { 0x00800610, 0x30000005 },
- { 0x0900061b, 0x54000000 },
- { 0x0080061e, 0x54000001 },
- { 0x00800621, 0x1c000019 },
- { 0x09000640, 0x18000000 },
- { 0x00800641, 0x1c000009 },
- { 0x1b80064b, 0x30000013 },
- { 0x09800660, 0x34000009 },
- { 0x0080066a, 0x54000003 },
- { 0x0080066e, 0x1c000001 },
- { 0x1b000670, 0x30000000 },
- { 0x00800671, 0x1c000062 },
- { 0x000006d4, 0x54000000 },
- { 0x000006d5, 0x1c000000 },
- { 0x008006d6, 0x30000006 },
- { 0x090006dd, 0x04000000 },
- { 0x000006de, 0x2c000000 },
- { 0x008006df, 0x30000005 },
- { 0x008006e5, 0x18000001 },
- { 0x008006e7, 0x30000001 },
- { 0x000006e9, 0x68000000 },
- { 0x008006ea, 0x30000003 },
- { 0x008006ee, 0x1c000001 },
- { 0x008006f0, 0x34000009 },
- { 0x008006fa, 0x1c000002 },
- { 0x008006fd, 0x68000001 },
- { 0x000006ff, 0x1c000000 },
- { 0x31800700, 0x5400000d },
- { 0x3100070f, 0x04000000 },
- { 0x31000710, 0x1c000000 },
- { 0x31000711, 0x30000000 },
- { 0x31800712, 0x1c00001d },
- { 0x31800730, 0x3000001a },
- { 0x3180074d, 0x1c000020 },
- { 0x37800780, 0x1c000025 },
- { 0x378007a6, 0x3000000a },
- { 0x370007b1, 0x1c000000 },
- { 0x0e800901, 0x30000001 },
- { 0x0e000903, 0x28000000 },
- { 0x0e800904, 0x1c000035 },
- { 0x0e00093c, 0x30000000 },
- { 0x0e00093d, 0x1c000000 },
- { 0x0e80093e, 0x28000002 },
- { 0x0e800941, 0x30000007 },
- { 0x0e800949, 0x28000003 },
- { 0x0e00094d, 0x30000000 },
- { 0x0e000950, 0x1c000000 },
- { 0x0e800951, 0x30000003 },
- { 0x0e800958, 0x1c000009 },
- { 0x0e800962, 0x30000001 },
- { 0x09800964, 0x54000001 },
- { 0x0e800966, 0x34000009 },
- { 0x09000970, 0x54000000 },
- { 0x0e00097d, 0x1c000000 },
- { 0x02000981, 0x30000000 },
- { 0x02800982, 0x28000001 },
- { 0x02800985, 0x1c000007 },
- { 0x0280098f, 0x1c000001 },
- { 0x02800993, 0x1c000015 },
- { 0x028009aa, 0x1c000006 },
- { 0x020009b2, 0x1c000000 },
- { 0x028009b6, 0x1c000003 },
- { 0x020009bc, 0x30000000 },
- { 0x020009bd, 0x1c000000 },
- { 0x028009be, 0x28000002 },
- { 0x028009c1, 0x30000003 },
- { 0x028009c7, 0x28000001 },
- { 0x028009cb, 0x28000001 },
- { 0x020009cd, 0x30000000 },
- { 0x020009ce, 0x1c000000 },
- { 0x020009d7, 0x28000000 },
- { 0x028009dc, 0x1c000001 },
- { 0x028009df, 0x1c000002 },
- { 0x028009e2, 0x30000001 },
- { 0x028009e6, 0x34000009 },
- { 0x028009f0, 0x1c000001 },
- { 0x028009f2, 0x5c000001 },
- { 0x028009f4, 0x3c000005 },
- { 0x020009fa, 0x68000000 },
- { 0x15800a01, 0x30000001 },
- { 0x15000a03, 0x28000000 },
- { 0x15800a05, 0x1c000005 },
- { 0x15800a0f, 0x1c000001 },
- { 0x15800a13, 0x1c000015 },
- { 0x15800a2a, 0x1c000006 },
- { 0x15800a32, 0x1c000001 },
- { 0x15800a35, 0x1c000001 },
- { 0x15800a38, 0x1c000001 },
- { 0x15000a3c, 0x30000000 },
- { 0x15800a3e, 0x28000002 },
- { 0x15800a41, 0x30000001 },
- { 0x15800a47, 0x30000001 },
- { 0x15800a4b, 0x30000002 },
- { 0x15800a59, 0x1c000003 },
- { 0x15000a5e, 0x1c000000 },
- { 0x15800a66, 0x34000009 },
- { 0x15800a70, 0x30000001 },
- { 0x15800a72, 0x1c000002 },
- { 0x14800a81, 0x30000001 },
- { 0x14000a83, 0x28000000 },
- { 0x14800a85, 0x1c000008 },
- { 0x14800a8f, 0x1c000002 },
- { 0x14800a93, 0x1c000015 },
- { 0x14800aaa, 0x1c000006 },
- { 0x14800ab2, 0x1c000001 },
- { 0x14800ab5, 0x1c000004 },
- { 0x14000abc, 0x30000000 },
- { 0x14000abd, 0x1c000000 },
- { 0x14800abe, 0x28000002 },
- { 0x14800ac1, 0x30000004 },
- { 0x14800ac7, 0x30000001 },
- { 0x14000ac9, 0x28000000 },
- { 0x14800acb, 0x28000001 },
- { 0x14000acd, 0x30000000 },
- { 0x14000ad0, 0x1c000000 },
- { 0x14800ae0, 0x1c000001 },
- { 0x14800ae2, 0x30000001 },
- { 0x14800ae6, 0x34000009 },
- { 0x14000af1, 0x5c000000 },
- { 0x2b000b01, 0x30000000 },
- { 0x2b800b02, 0x28000001 },
- { 0x2b800b05, 0x1c000007 },
- { 0x2b800b0f, 0x1c000001 },
- { 0x2b800b13, 0x1c000015 },
- { 0x2b800b2a, 0x1c000006 },
- { 0x2b800b32, 0x1c000001 },
- { 0x2b800b35, 0x1c000004 },
- { 0x2b000b3c, 0x30000000 },
- { 0x2b000b3d, 0x1c000000 },
- { 0x2b000b3e, 0x28000000 },
- { 0x2b000b3f, 0x30000000 },
- { 0x2b000b40, 0x28000000 },
- { 0x2b800b41, 0x30000002 },
- { 0x2b800b47, 0x28000001 },
- { 0x2b800b4b, 0x28000001 },
- { 0x2b000b4d, 0x30000000 },
- { 0x2b000b56, 0x30000000 },
- { 0x2b000b57, 0x28000000 },
- { 0x2b800b5c, 0x1c000001 },
- { 0x2b800b5f, 0x1c000002 },
- { 0x2b800b66, 0x34000009 },
- { 0x2b000b70, 0x68000000 },
- { 0x2b000b71, 0x1c000000 },
- { 0x35000b82, 0x30000000 },
- { 0x35000b83, 0x1c000000 },
- { 0x35800b85, 0x1c000005 },
- { 0x35800b8e, 0x1c000002 },
- { 0x35800b92, 0x1c000003 },
- { 0x35800b99, 0x1c000001 },
- { 0x35000b9c, 0x1c000000 },
- { 0x35800b9e, 0x1c000001 },
- { 0x35800ba3, 0x1c000001 },
- { 0x35800ba8, 0x1c000002 },
- { 0x35800bae, 0x1c00000b },
- { 0x35800bbe, 0x28000001 },
- { 0x35000bc0, 0x30000000 },
- { 0x35800bc1, 0x28000001 },
- { 0x35800bc6, 0x28000002 },
- { 0x35800bca, 0x28000002 },
- { 0x35000bcd, 0x30000000 },
- { 0x35000bd7, 0x28000000 },
- { 0x35800be6, 0x34000009 },
- { 0x35800bf0, 0x3c000002 },
- { 0x35800bf3, 0x68000005 },
- { 0x35000bf9, 0x5c000000 },
- { 0x35000bfa, 0x68000000 },
- { 0x36800c01, 0x28000002 },
- { 0x36800c05, 0x1c000007 },
- { 0x36800c0e, 0x1c000002 },
- { 0x36800c12, 0x1c000016 },
- { 0x36800c2a, 0x1c000009 },
- { 0x36800c35, 0x1c000004 },
- { 0x36800c3e, 0x30000002 },
- { 0x36800c41, 0x28000003 },
- { 0x36800c46, 0x30000002 },
- { 0x36800c4a, 0x30000003 },
- { 0x36800c55, 0x30000001 },
- { 0x36800c60, 0x1c000001 },
- { 0x36800c66, 0x34000009 },
- { 0x1c800c82, 0x28000001 },
- { 0x1c800c85, 0x1c000007 },
- { 0x1c800c8e, 0x1c000002 },
- { 0x1c800c92, 0x1c000016 },
- { 0x1c800caa, 0x1c000009 },
- { 0x1c800cb5, 0x1c000004 },
- { 0x1c000cbc, 0x30000000 },
- { 0x1c000cbd, 0x1c000000 },
- { 0x1c000cbe, 0x28000000 },
- { 0x1c000cbf, 0x30000000 },
- { 0x1c800cc0, 0x28000004 },
- { 0x1c000cc6, 0x30000000 },
- { 0x1c800cc7, 0x28000001 },
- { 0x1c800cca, 0x28000001 },
- { 0x1c800ccc, 0x30000001 },
- { 0x1c800cd5, 0x28000001 },
- { 0x1c000cde, 0x1c000000 },
- { 0x1c800ce0, 0x1c000001 },
- { 0x1c800ce6, 0x34000009 },
- { 0x24800d02, 0x28000001 },
- { 0x24800d05, 0x1c000007 },
- { 0x24800d0e, 0x1c000002 },
- { 0x24800d12, 0x1c000016 },
- { 0x24800d2a, 0x1c00000f },
- { 0x24800d3e, 0x28000002 },
- { 0x24800d41, 0x30000002 },
- { 0x24800d46, 0x28000002 },
- { 0x24800d4a, 0x28000002 },
- { 0x24000d4d, 0x30000000 },
- { 0x24000d57, 0x28000000 },
- { 0x24800d60, 0x1c000001 },
- { 0x24800d66, 0x34000009 },
- { 0x2f800d82, 0x28000001 },
- { 0x2f800d85, 0x1c000011 },
- { 0x2f800d9a, 0x1c000017 },
- { 0x2f800db3, 0x1c000008 },
- { 0x2f000dbd, 0x1c000000 },
- { 0x2f800dc0, 0x1c000006 },
- { 0x2f000dca, 0x30000000 },
- { 0x2f800dcf, 0x28000002 },
- { 0x2f800dd2, 0x30000002 },
- { 0x2f000dd6, 0x30000000 },
- { 0x2f800dd8, 0x28000007 },
- { 0x2f800df2, 0x28000001 },
- { 0x2f000df4, 0x54000000 },
- { 0x38800e01, 0x1c00002f },
- { 0x38000e31, 0x30000000 },
- { 0x38800e32, 0x1c000001 },
- { 0x38800e34, 0x30000006 },
- { 0x09000e3f, 0x5c000000 },
- { 0x38800e40, 0x1c000005 },
- { 0x38000e46, 0x18000000 },
- { 0x38800e47, 0x30000007 },
- { 0x38000e4f, 0x54000000 },
- { 0x38800e50, 0x34000009 },
- { 0x38800e5a, 0x54000001 },
- { 0x20800e81, 0x1c000001 },
- { 0x20000e84, 0x1c000000 },
- { 0x20800e87, 0x1c000001 },
- { 0x20000e8a, 0x1c000000 },
- { 0x20000e8d, 0x1c000000 },
- { 0x20800e94, 0x1c000003 },
- { 0x20800e99, 0x1c000006 },
- { 0x20800ea1, 0x1c000002 },
- { 0x20000ea5, 0x1c000000 },
- { 0x20000ea7, 0x1c000000 },
- { 0x20800eaa, 0x1c000001 },
- { 0x20800ead, 0x1c000003 },
- { 0x20000eb1, 0x30000000 },
- { 0x20800eb2, 0x1c000001 },
- { 0x20800eb4, 0x30000005 },
- { 0x20800ebb, 0x30000001 },
- { 0x20000ebd, 0x1c000000 },
- { 0x20800ec0, 0x1c000004 },
- { 0x20000ec6, 0x18000000 },
- { 0x20800ec8, 0x30000005 },
- { 0x20800ed0, 0x34000009 },
- { 0x20800edc, 0x1c000001 },
- { 0x39000f00, 0x1c000000 },
- { 0x39800f01, 0x68000002 },
- { 0x39800f04, 0x5400000e },
- { 0x39800f13, 0x68000004 },
- { 0x39800f18, 0x30000001 },
- { 0x39800f1a, 0x68000005 },
- { 0x39800f20, 0x34000009 },
- { 0x39800f2a, 0x3c000009 },
- { 0x39000f34, 0x68000000 },
- { 0x39000f35, 0x30000000 },
- { 0x39000f36, 0x68000000 },
- { 0x39000f37, 0x30000000 },
- { 0x39000f38, 0x68000000 },
- { 0x39000f39, 0x30000000 },
- { 0x39000f3a, 0x58000000 },
- { 0x39000f3b, 0x48000000 },
- { 0x39000f3c, 0x58000000 },
- { 0x39000f3d, 0x48000000 },
- { 0x39800f3e, 0x28000001 },
- { 0x39800f40, 0x1c000007 },
- { 0x39800f49, 0x1c000021 },
- { 0x39800f71, 0x3000000d },
- { 0x39000f7f, 0x28000000 },
- { 0x39800f80, 0x30000004 },
- { 0x39000f85, 0x54000000 },
- { 0x39800f86, 0x30000001 },
- { 0x39800f88, 0x1c000003 },
- { 0x39800f90, 0x30000007 },
- { 0x39800f99, 0x30000023 },
- { 0x39800fbe, 0x68000007 },
- { 0x39000fc6, 0x30000000 },
- { 0x39800fc7, 0x68000005 },
- { 0x39000fcf, 0x68000000 },
- { 0x39800fd0, 0x54000001 },
- { 0x26801000, 0x1c000021 },
- { 0x26801023, 0x1c000004 },
- { 0x26801029, 0x1c000001 },
- { 0x2600102c, 0x28000000 },
- { 0x2680102d, 0x30000003 },
- { 0x26001031, 0x28000000 },
- { 0x26001032, 0x30000000 },
- { 0x26801036, 0x30000001 },
- { 0x26001038, 0x28000000 },
- { 0x26001039, 0x30000000 },
- { 0x26801040, 0x34000009 },
- { 0x2680104a, 0x54000005 },
- { 0x26801050, 0x1c000005 },
- { 0x26801056, 0x28000001 },
- { 0x26801058, 0x30000001 },
- { 0x100010a0, 0x24001c60 },
- { 0x100010a1, 0x24001c60 },
- { 0x100010a2, 0x24001c60 },
- { 0x100010a3, 0x24001c60 },
- { 0x100010a4, 0x24001c60 },
- { 0x100010a5, 0x24001c60 },
- { 0x100010a6, 0x24001c60 },
- { 0x100010a7, 0x24001c60 },
- { 0x100010a8, 0x24001c60 },
- { 0x100010a9, 0x24001c60 },
- { 0x100010aa, 0x24001c60 },
- { 0x100010ab, 0x24001c60 },
- { 0x100010ac, 0x24001c60 },
- { 0x100010ad, 0x24001c60 },
- { 0x100010ae, 0x24001c60 },
- { 0x100010af, 0x24001c60 },
- { 0x100010b0, 0x24001c60 },
- { 0x100010b1, 0x24001c60 },
- { 0x100010b2, 0x24001c60 },
- { 0x100010b3, 0x24001c60 },
- { 0x100010b4, 0x24001c60 },
- { 0x100010b5, 0x24001c60 },
- { 0x100010b6, 0x24001c60 },
- { 0x100010b7, 0x24001c60 },
- { 0x100010b8, 0x24001c60 },
- { 0x100010b9, 0x24001c60 },
- { 0x100010ba, 0x24001c60 },
- { 0x100010bb, 0x24001c60 },
- { 0x100010bc, 0x24001c60 },
- { 0x100010bd, 0x24001c60 },
- { 0x100010be, 0x24001c60 },
- { 0x100010bf, 0x24001c60 },
- { 0x100010c0, 0x24001c60 },
- { 0x100010c1, 0x24001c60 },
- { 0x100010c2, 0x24001c60 },
- { 0x100010c3, 0x24001c60 },
- { 0x100010c4, 0x24001c60 },
- { 0x100010c5, 0x24001c60 },
- { 0x108010d0, 0x1c00002a },
- { 0x090010fb, 0x54000000 },
- { 0x100010fc, 0x18000000 },
- { 0x17801100, 0x1c000059 },
- { 0x1780115f, 0x1c000043 },
- { 0x178011a8, 0x1c000051 },
- { 0x0f801200, 0x1c000048 },
- { 0x0f80124a, 0x1c000003 },
- { 0x0f801250, 0x1c000006 },
- { 0x0f001258, 0x1c000000 },
- { 0x0f80125a, 0x1c000003 },
- { 0x0f801260, 0x1c000028 },
- { 0x0f80128a, 0x1c000003 },
- { 0x0f801290, 0x1c000020 },
- { 0x0f8012b2, 0x1c000003 },
- { 0x0f8012b8, 0x1c000006 },
- { 0x0f0012c0, 0x1c000000 },
- { 0x0f8012c2, 0x1c000003 },
- { 0x0f8012c8, 0x1c00000e },
- { 0x0f8012d8, 0x1c000038 },
- { 0x0f801312, 0x1c000003 },
- { 0x0f801318, 0x1c000042 },
- { 0x0f00135f, 0x30000000 },
- { 0x0f001360, 0x68000000 },
- { 0x0f801361, 0x54000007 },
- { 0x0f801369, 0x3c000013 },
- { 0x0f801380, 0x1c00000f },
- { 0x0f801390, 0x68000009 },
- { 0x088013a0, 0x1c000054 },
- { 0x07801401, 0x1c00026b },
- { 0x0780166d, 0x54000001 },
- { 0x0780166f, 0x1c000007 },
- { 0x28001680, 0x74000000 },
- { 0x28801681, 0x1c000019 },
- { 0x2800169b, 0x58000000 },
- { 0x2800169c, 0x48000000 },
- { 0x2d8016a0, 0x1c00004a },
- { 0x098016eb, 0x54000002 },
- { 0x2d8016ee, 0x38000002 },
- { 0x32801700, 0x1c00000c },
- { 0x3280170e, 0x1c000003 },
- { 0x32801712, 0x30000002 },
- { 0x18801720, 0x1c000011 },
- { 0x18801732, 0x30000002 },
- { 0x09801735, 0x54000001 },
- { 0x06801740, 0x1c000011 },
- { 0x06801752, 0x30000001 },
- { 0x33801760, 0x1c00000c },
- { 0x3380176e, 0x1c000002 },
- { 0x33801772, 0x30000001 },
- { 0x1f801780, 0x1c000033 },
- { 0x1f8017b4, 0x04000001 },
- { 0x1f0017b6, 0x28000000 },
- { 0x1f8017b7, 0x30000006 },
- { 0x1f8017be, 0x28000007 },
- { 0x1f0017c6, 0x30000000 },
- { 0x1f8017c7, 0x28000001 },
- { 0x1f8017c9, 0x3000000a },
- { 0x1f8017d4, 0x54000002 },
- { 0x1f0017d7, 0x18000000 },
- { 0x1f8017d8, 0x54000002 },
- { 0x1f0017db, 0x5c000000 },
- { 0x1f0017dc, 0x1c000000 },
- { 0x1f0017dd, 0x30000000 },
- { 0x1f8017e0, 0x34000009 },
- { 0x1f8017f0, 0x3c000009 },
- { 0x25801800, 0x54000005 },
- { 0x25001806, 0x44000000 },
- { 0x25801807, 0x54000003 },
- { 0x2580180b, 0x30000002 },
- { 0x2500180e, 0x74000000 },
- { 0x25801810, 0x34000009 },
- { 0x25801820, 0x1c000022 },
- { 0x25001843, 0x18000000 },
- { 0x25801844, 0x1c000033 },
- { 0x25801880, 0x1c000028 },
- { 0x250018a9, 0x30000000 },
- { 0x22801900, 0x1c00001c },
- { 0x22801920, 0x30000002 },
- { 0x22801923, 0x28000003 },
- { 0x22801927, 0x30000001 },
- { 0x22801929, 0x28000002 },
- { 0x22801930, 0x28000001 },
- { 0x22001932, 0x30000000 },
- { 0x22801933, 0x28000005 },
- { 0x22801939, 0x30000002 },
- { 0x22001940, 0x68000000 },
- { 0x22801944, 0x54000001 },
- { 0x22801946, 0x34000009 },
- { 0x34801950, 0x1c00001d },
- { 0x34801970, 0x1c000004 },
- { 0x27801980, 0x1c000029 },
- { 0x278019b0, 0x28000010 },
- { 0x278019c1, 0x1c000006 },
- { 0x278019c8, 0x28000001 },
- { 0x278019d0, 0x34000009 },
- { 0x278019de, 0x54000001 },
- { 0x1f8019e0, 0x6800001f },
- { 0x05801a00, 0x1c000016 },
- { 0x05801a17, 0x30000001 },
- { 0x05801a19, 0x28000002 },
- { 0x05801a1e, 0x54000001 },
- { 0x21801d00, 0x1400002b },
- { 0x21801d2c, 0x18000035 },
- { 0x21801d62, 0x14000015 },
- { 0x0c001d78, 0x18000000 },
- { 0x21801d79, 0x14000021 },
- { 0x21801d9b, 0x18000024 },
- { 0x1b801dc0, 0x30000003 },
- { 0x21001e00, 0x24000001 },
- { 0x21001e01, 0x1400ffff },
- { 0x21001e02, 0x24000001 },
- { 0x21001e03, 0x1400ffff },
- { 0x21001e04, 0x24000001 },
- { 0x21001e05, 0x1400ffff },
- { 0x21001e06, 0x24000001 },
- { 0x21001e07, 0x1400ffff },
- { 0x21001e08, 0x24000001 },
- { 0x21001e09, 0x1400ffff },
- { 0x21001e0a, 0x24000001 },
- { 0x21001e0b, 0x1400ffff },
- { 0x21001e0c, 0x24000001 },
- { 0x21001e0d, 0x1400ffff },
- { 0x21001e0e, 0x24000001 },
- { 0x21001e0f, 0x1400ffff },
- { 0x21001e10, 0x24000001 },
- { 0x21001e11, 0x1400ffff },
- { 0x21001e12, 0x24000001 },
- { 0x21001e13, 0x1400ffff },
- { 0x21001e14, 0x24000001 },
- { 0x21001e15, 0x1400ffff },
- { 0x21001e16, 0x24000001 },
- { 0x21001e17, 0x1400ffff },
- { 0x21001e18, 0x24000001 },
- { 0x21001e19, 0x1400ffff },
- { 0x21001e1a, 0x24000001 },
- { 0x21001e1b, 0x1400ffff },
- { 0x21001e1c, 0x24000001 },
- { 0x21001e1d, 0x1400ffff },
- { 0x21001e1e, 0x24000001 },
- { 0x21001e1f, 0x1400ffff },
- { 0x21001e20, 0x24000001 },
- { 0x21001e21, 0x1400ffff },
- { 0x21001e22, 0x24000001 },
- { 0x21001e23, 0x1400ffff },
- { 0x21001e24, 0x24000001 },
- { 0x21001e25, 0x1400ffff },
- { 0x21001e26, 0x24000001 },
- { 0x21001e27, 0x1400ffff },
- { 0x21001e28, 0x24000001 },
- { 0x21001e29, 0x1400ffff },
- { 0x21001e2a, 0x24000001 },
- { 0x21001e2b, 0x1400ffff },
- { 0x21001e2c, 0x24000001 },
- { 0x21001e2d, 0x1400ffff },
- { 0x21001e2e, 0x24000001 },
- { 0x21001e2f, 0x1400ffff },
- { 0x21001e30, 0x24000001 },
- { 0x21001e31, 0x1400ffff },
- { 0x21001e32, 0x24000001 },
- { 0x21001e33, 0x1400ffff },
- { 0x21001e34, 0x24000001 },
- { 0x21001e35, 0x1400ffff },
- { 0x21001e36, 0x24000001 },
- { 0x21001e37, 0x1400ffff },
- { 0x21001e38, 0x24000001 },
- { 0x21001e39, 0x1400ffff },
- { 0x21001e3a, 0x24000001 },
- { 0x21001e3b, 0x1400ffff },
- { 0x21001e3c, 0x24000001 },
- { 0x21001e3d, 0x1400ffff },
- { 0x21001e3e, 0x24000001 },
- { 0x21001e3f, 0x1400ffff },
- { 0x21001e40, 0x24000001 },
- { 0x21001e41, 0x1400ffff },
- { 0x21001e42, 0x24000001 },
- { 0x21001e43, 0x1400ffff },
- { 0x21001e44, 0x24000001 },
- { 0x21001e45, 0x1400ffff },
- { 0x21001e46, 0x24000001 },
- { 0x21001e47, 0x1400ffff },
- { 0x21001e48, 0x24000001 },
- { 0x21001e49, 0x1400ffff },
- { 0x21001e4a, 0x24000001 },
- { 0x21001e4b, 0x1400ffff },
- { 0x21001e4c, 0x24000001 },
- { 0x21001e4d, 0x1400ffff },
- { 0x21001e4e, 0x24000001 },
- { 0x21001e4f, 0x1400ffff },
- { 0x21001e50, 0x24000001 },
- { 0x21001e51, 0x1400ffff },
- { 0x21001e52, 0x24000001 },
- { 0x21001e53, 0x1400ffff },
- { 0x21001e54, 0x24000001 },
- { 0x21001e55, 0x1400ffff },
- { 0x21001e56, 0x24000001 },
- { 0x21001e57, 0x1400ffff },
- { 0x21001e58, 0x24000001 },
- { 0x21001e59, 0x1400ffff },
- { 0x21001e5a, 0x24000001 },
- { 0x21001e5b, 0x1400ffff },
- { 0x21001e5c, 0x24000001 },
- { 0x21001e5d, 0x1400ffff },
- { 0x21001e5e, 0x24000001 },
- { 0x21001e5f, 0x1400ffff },
- { 0x21001e60, 0x24000001 },
- { 0x21001e61, 0x1400ffff },
- { 0x21001e62, 0x24000001 },
- { 0x21001e63, 0x1400ffff },
- { 0x21001e64, 0x24000001 },
- { 0x21001e65, 0x1400ffff },
- { 0x21001e66, 0x24000001 },
- { 0x21001e67, 0x1400ffff },
- { 0x21001e68, 0x24000001 },
- { 0x21001e69, 0x1400ffff },
- { 0x21001e6a, 0x24000001 },
- { 0x21001e6b, 0x1400ffff },
- { 0x21001e6c, 0x24000001 },
- { 0x21001e6d, 0x1400ffff },
- { 0x21001e6e, 0x24000001 },
- { 0x21001e6f, 0x1400ffff },
- { 0x21001e70, 0x24000001 },
- { 0x21001e71, 0x1400ffff },
- { 0x21001e72, 0x24000001 },
- { 0x21001e73, 0x1400ffff },
- { 0x21001e74, 0x24000001 },
- { 0x21001e75, 0x1400ffff },
- { 0x21001e76, 0x24000001 },
- { 0x21001e77, 0x1400ffff },
- { 0x21001e78, 0x24000001 },
- { 0x21001e79, 0x1400ffff },
- { 0x21001e7a, 0x24000001 },
- { 0x21001e7b, 0x1400ffff },
- { 0x21001e7c, 0x24000001 },
- { 0x21001e7d, 0x1400ffff },
- { 0x21001e7e, 0x24000001 },
- { 0x21001e7f, 0x1400ffff },
- { 0x21001e80, 0x24000001 },
- { 0x21001e81, 0x1400ffff },
- { 0x21001e82, 0x24000001 },
- { 0x21001e83, 0x1400ffff },
- { 0x21001e84, 0x24000001 },
- { 0x21001e85, 0x1400ffff },
- { 0x21001e86, 0x24000001 },
- { 0x21001e87, 0x1400ffff },
- { 0x21001e88, 0x24000001 },
- { 0x21001e89, 0x1400ffff },
- { 0x21001e8a, 0x24000001 },
- { 0x21001e8b, 0x1400ffff },
- { 0x21001e8c, 0x24000001 },
- { 0x21001e8d, 0x1400ffff },
- { 0x21001e8e, 0x24000001 },
- { 0x21001e8f, 0x1400ffff },
- { 0x21001e90, 0x24000001 },
- { 0x21001e91, 0x1400ffff },
- { 0x21001e92, 0x24000001 },
- { 0x21001e93, 0x1400ffff },
- { 0x21001e94, 0x24000001 },
- { 0x21001e95, 0x1400ffff },
- { 0x21801e96, 0x14000004 },
- { 0x21001e9b, 0x1400ffc5 },
- { 0x21001ea0, 0x24000001 },
- { 0x21001ea1, 0x1400ffff },
- { 0x21001ea2, 0x24000001 },
- { 0x21001ea3, 0x1400ffff },
- { 0x21001ea4, 0x24000001 },
- { 0x21001ea5, 0x1400ffff },
- { 0x21001ea6, 0x24000001 },
- { 0x21001ea7, 0x1400ffff },
- { 0x21001ea8, 0x24000001 },
- { 0x21001ea9, 0x1400ffff },
- { 0x21001eaa, 0x24000001 },
- { 0x21001eab, 0x1400ffff },
- { 0x21001eac, 0x24000001 },
- { 0x21001ead, 0x1400ffff },
- { 0x21001eae, 0x24000001 },
- { 0x21001eaf, 0x1400ffff },
- { 0x21001eb0, 0x24000001 },
- { 0x21001eb1, 0x1400ffff },
- { 0x21001eb2, 0x24000001 },
- { 0x21001eb3, 0x1400ffff },
- { 0x21001eb4, 0x24000001 },
- { 0x21001eb5, 0x1400ffff },
- { 0x21001eb6, 0x24000001 },
- { 0x21001eb7, 0x1400ffff },
- { 0x21001eb8, 0x24000001 },
- { 0x21001eb9, 0x1400ffff },
- { 0x21001eba, 0x24000001 },
- { 0x21001ebb, 0x1400ffff },
- { 0x21001ebc, 0x24000001 },
- { 0x21001ebd, 0x1400ffff },
- { 0x21001ebe, 0x24000001 },
- { 0x21001ebf, 0x1400ffff },
- { 0x21001ec0, 0x24000001 },
- { 0x21001ec1, 0x1400ffff },
- { 0x21001ec2, 0x24000001 },
- { 0x21001ec3, 0x1400ffff },
- { 0x21001ec4, 0x24000001 },
- { 0x21001ec5, 0x1400ffff },
- { 0x21001ec6, 0x24000001 },
- { 0x21001ec7, 0x1400ffff },
- { 0x21001ec8, 0x24000001 },
- { 0x21001ec9, 0x1400ffff },
- { 0x21001eca, 0x24000001 },
- { 0x21001ecb, 0x1400ffff },
- { 0x21001ecc, 0x24000001 },
- { 0x21001ecd, 0x1400ffff },
- { 0x21001ece, 0x24000001 },
- { 0x21001ecf, 0x1400ffff },
- { 0x21001ed0, 0x24000001 },
- { 0x21001ed1, 0x1400ffff },
- { 0x21001ed2, 0x24000001 },
- { 0x21001ed3, 0x1400ffff },
- { 0x21001ed4, 0x24000001 },
- { 0x21001ed5, 0x1400ffff },
- { 0x21001ed6, 0x24000001 },
- { 0x21001ed7, 0x1400ffff },
- { 0x21001ed8, 0x24000001 },
- { 0x21001ed9, 0x1400ffff },
- { 0x21001eda, 0x24000001 },
- { 0x21001edb, 0x1400ffff },
- { 0x21001edc, 0x24000001 },
- { 0x21001edd, 0x1400ffff },
- { 0x21001ede, 0x24000001 },
- { 0x21001edf, 0x1400ffff },
- { 0x21001ee0, 0x24000001 },
- { 0x21001ee1, 0x1400ffff },
- { 0x21001ee2, 0x24000001 },
- { 0x21001ee3, 0x1400ffff },
- { 0x21001ee4, 0x24000001 },
- { 0x21001ee5, 0x1400ffff },
- { 0x21001ee6, 0x24000001 },
- { 0x21001ee7, 0x1400ffff },
- { 0x21001ee8, 0x24000001 },
- { 0x21001ee9, 0x1400ffff },
- { 0x21001eea, 0x24000001 },
- { 0x21001eeb, 0x1400ffff },
- { 0x21001eec, 0x24000001 },
- { 0x21001eed, 0x1400ffff },
- { 0x21001eee, 0x24000001 },
- { 0x21001eef, 0x1400ffff },
- { 0x21001ef0, 0x24000001 },
- { 0x21001ef1, 0x1400ffff },
- { 0x21001ef2, 0x24000001 },
- { 0x21001ef3, 0x1400ffff },
- { 0x21001ef4, 0x24000001 },
- { 0x21001ef5, 0x1400ffff },
- { 0x21001ef6, 0x24000001 },
- { 0x21001ef7, 0x1400ffff },
- { 0x21001ef8, 0x24000001 },
- { 0x21001ef9, 0x1400ffff },
- { 0x13001f00, 0x14000008 },
- { 0x13001f01, 0x14000008 },
- { 0x13001f02, 0x14000008 },
- { 0x13001f03, 0x14000008 },
- { 0x13001f04, 0x14000008 },
- { 0x13001f05, 0x14000008 },
- { 0x13001f06, 0x14000008 },
- { 0x13001f07, 0x14000008 },
- { 0x13001f08, 0x2400fff8 },
- { 0x13001f09, 0x2400fff8 },
- { 0x13001f0a, 0x2400fff8 },
- { 0x13001f0b, 0x2400fff8 },
- { 0x13001f0c, 0x2400fff8 },
- { 0x13001f0d, 0x2400fff8 },
- { 0x13001f0e, 0x2400fff8 },
- { 0x13001f0f, 0x2400fff8 },
- { 0x13001f10, 0x14000008 },
- { 0x13001f11, 0x14000008 },
- { 0x13001f12, 0x14000008 },
- { 0x13001f13, 0x14000008 },
- { 0x13001f14, 0x14000008 },
- { 0x13001f15, 0x14000008 },
- { 0x13001f18, 0x2400fff8 },
- { 0x13001f19, 0x2400fff8 },
- { 0x13001f1a, 0x2400fff8 },
- { 0x13001f1b, 0x2400fff8 },
- { 0x13001f1c, 0x2400fff8 },
- { 0x13001f1d, 0x2400fff8 },
- { 0x13001f20, 0x14000008 },
- { 0x13001f21, 0x14000008 },
- { 0x13001f22, 0x14000008 },
- { 0x13001f23, 0x14000008 },
- { 0x13001f24, 0x14000008 },
- { 0x13001f25, 0x14000008 },
- { 0x13001f26, 0x14000008 },
- { 0x13001f27, 0x14000008 },
- { 0x13001f28, 0x2400fff8 },
- { 0x13001f29, 0x2400fff8 },
- { 0x13001f2a, 0x2400fff8 },
- { 0x13001f2b, 0x2400fff8 },
- { 0x13001f2c, 0x2400fff8 },
- { 0x13001f2d, 0x2400fff8 },
- { 0x13001f2e, 0x2400fff8 },
- { 0x13001f2f, 0x2400fff8 },
- { 0x13001f30, 0x14000008 },
- { 0x13001f31, 0x14000008 },
- { 0x13001f32, 0x14000008 },
- { 0x13001f33, 0x14000008 },
- { 0x13001f34, 0x14000008 },
- { 0x13001f35, 0x14000008 },
- { 0x13001f36, 0x14000008 },
- { 0x13001f37, 0x14000008 },
- { 0x13001f38, 0x2400fff8 },
- { 0x13001f39, 0x2400fff8 },
- { 0x13001f3a, 0x2400fff8 },
- { 0x13001f3b, 0x2400fff8 },
- { 0x13001f3c, 0x2400fff8 },
- { 0x13001f3d, 0x2400fff8 },
- { 0x13001f3e, 0x2400fff8 },
- { 0x13001f3f, 0x2400fff8 },
- { 0x13001f40, 0x14000008 },
- { 0x13001f41, 0x14000008 },
- { 0x13001f42, 0x14000008 },
- { 0x13001f43, 0x14000008 },
- { 0x13001f44, 0x14000008 },
- { 0x13001f45, 0x14000008 },
- { 0x13001f48, 0x2400fff8 },
- { 0x13001f49, 0x2400fff8 },
- { 0x13001f4a, 0x2400fff8 },
- { 0x13001f4b, 0x2400fff8 },
- { 0x13001f4c, 0x2400fff8 },
- { 0x13001f4d, 0x2400fff8 },
- { 0x13001f50, 0x14000000 },
- { 0x13001f51, 0x14000008 },
- { 0x13001f52, 0x14000000 },
- { 0x13001f53, 0x14000008 },
- { 0x13001f54, 0x14000000 },
- { 0x13001f55, 0x14000008 },
- { 0x13001f56, 0x14000000 },
- { 0x13001f57, 0x14000008 },
- { 0x13001f59, 0x2400fff8 },
- { 0x13001f5b, 0x2400fff8 },
- { 0x13001f5d, 0x2400fff8 },
- { 0x13001f5f, 0x2400fff8 },
- { 0x13001f60, 0x14000008 },
- { 0x13001f61, 0x14000008 },
- { 0x13001f62, 0x14000008 },
- { 0x13001f63, 0x14000008 },
- { 0x13001f64, 0x14000008 },
- { 0x13001f65, 0x14000008 },
- { 0x13001f66, 0x14000008 },
- { 0x13001f67, 0x14000008 },
- { 0x13001f68, 0x2400fff8 },
- { 0x13001f69, 0x2400fff8 },
- { 0x13001f6a, 0x2400fff8 },
- { 0x13001f6b, 0x2400fff8 },
- { 0x13001f6c, 0x2400fff8 },
- { 0x13001f6d, 0x2400fff8 },
- { 0x13001f6e, 0x2400fff8 },
- { 0x13001f6f, 0x2400fff8 },
- { 0x13001f70, 0x1400004a },
- { 0x13001f71, 0x1400004a },
- { 0x13001f72, 0x14000056 },
- { 0x13001f73, 0x14000056 },
- { 0x13001f74, 0x14000056 },
- { 0x13001f75, 0x14000056 },
- { 0x13001f76, 0x14000064 },
- { 0x13001f77, 0x14000064 },
- { 0x13001f78, 0x14000080 },
- { 0x13001f79, 0x14000080 },
- { 0x13001f7a, 0x14000070 },
- { 0x13001f7b, 0x14000070 },
- { 0x13001f7c, 0x1400007e },
- { 0x13001f7d, 0x1400007e },
- { 0x13001f80, 0x14000008 },
- { 0x13001f81, 0x14000008 },
- { 0x13001f82, 0x14000008 },
- { 0x13001f83, 0x14000008 },
- { 0x13001f84, 0x14000008 },
- { 0x13001f85, 0x14000008 },
- { 0x13001f86, 0x14000008 },
- { 0x13001f87, 0x14000008 },
- { 0x13001f88, 0x2000fff8 },
- { 0x13001f89, 0x2000fff8 },
- { 0x13001f8a, 0x2000fff8 },
- { 0x13001f8b, 0x2000fff8 },
- { 0x13001f8c, 0x2000fff8 },
- { 0x13001f8d, 0x2000fff8 },
- { 0x13001f8e, 0x2000fff8 },
- { 0x13001f8f, 0x2000fff8 },
- { 0x13001f90, 0x14000008 },
- { 0x13001f91, 0x14000008 },
- { 0x13001f92, 0x14000008 },
- { 0x13001f93, 0x14000008 },
- { 0x13001f94, 0x14000008 },
- { 0x13001f95, 0x14000008 },
- { 0x13001f96, 0x14000008 },
- { 0x13001f97, 0x14000008 },
- { 0x13001f98, 0x2000fff8 },
- { 0x13001f99, 0x2000fff8 },
- { 0x13001f9a, 0x2000fff8 },
- { 0x13001f9b, 0x2000fff8 },
- { 0x13001f9c, 0x2000fff8 },
- { 0x13001f9d, 0x2000fff8 },
- { 0x13001f9e, 0x2000fff8 },
- { 0x13001f9f, 0x2000fff8 },
- { 0x13001fa0, 0x14000008 },
- { 0x13001fa1, 0x14000008 },
- { 0x13001fa2, 0x14000008 },
- { 0x13001fa3, 0x14000008 },
- { 0x13001fa4, 0x14000008 },
- { 0x13001fa5, 0x14000008 },
- { 0x13001fa6, 0x14000008 },
- { 0x13001fa7, 0x14000008 },
- { 0x13001fa8, 0x2000fff8 },
- { 0x13001fa9, 0x2000fff8 },
- { 0x13001faa, 0x2000fff8 },
- { 0x13001fab, 0x2000fff8 },
- { 0x13001fac, 0x2000fff8 },
- { 0x13001fad, 0x2000fff8 },
- { 0x13001fae, 0x2000fff8 },
- { 0x13001faf, 0x2000fff8 },
- { 0x13001fb0, 0x14000008 },
- { 0x13001fb1, 0x14000008 },
- { 0x13001fb2, 0x14000000 },
- { 0x13001fb3, 0x14000009 },
- { 0x13001fb4, 0x14000000 },
- { 0x13801fb6, 0x14000001 },
- { 0x13001fb8, 0x2400fff8 },
- { 0x13001fb9, 0x2400fff8 },
- { 0x13001fba, 0x2400ffb6 },
- { 0x13001fbb, 0x2400ffb6 },
- { 0x13001fbc, 0x2000fff7 },
- { 0x13001fbd, 0x60000000 },
- { 0x13001fbe, 0x1400e3db },
- { 0x13801fbf, 0x60000002 },
- { 0x13001fc2, 0x14000000 },
- { 0x13001fc3, 0x14000009 },
- { 0x13001fc4, 0x14000000 },
- { 0x13801fc6, 0x14000001 },
- { 0x13001fc8, 0x2400ffaa },
- { 0x13001fc9, 0x2400ffaa },
- { 0x13001fca, 0x2400ffaa },
- { 0x13001fcb, 0x2400ffaa },
- { 0x13001fcc, 0x2000fff7 },
- { 0x13801fcd, 0x60000002 },
- { 0x13001fd0, 0x14000008 },
- { 0x13001fd1, 0x14000008 },
- { 0x13801fd2, 0x14000001 },
- { 0x13801fd6, 0x14000001 },
- { 0x13001fd8, 0x2400fff8 },
- { 0x13001fd9, 0x2400fff8 },
- { 0x13001fda, 0x2400ff9c },
- { 0x13001fdb, 0x2400ff9c },
- { 0x13801fdd, 0x60000002 },
- { 0x13001fe0, 0x14000008 },
- { 0x13001fe1, 0x14000008 },
- { 0x13801fe2, 0x14000002 },
- { 0x13001fe5, 0x14000007 },
- { 0x13801fe6, 0x14000001 },
- { 0x13001fe8, 0x2400fff8 },
- { 0x13001fe9, 0x2400fff8 },
- { 0x13001fea, 0x2400ff90 },
- { 0x13001feb, 0x2400ff90 },
- { 0x13001fec, 0x2400fff9 },
- { 0x13801fed, 0x60000002 },
- { 0x13001ff2, 0x14000000 },
- { 0x13001ff3, 0x14000009 },
- { 0x13001ff4, 0x14000000 },
- { 0x13801ff6, 0x14000001 },
- { 0x13001ff8, 0x2400ff80 },
- { 0x13001ff9, 0x2400ff80 },
- { 0x13001ffa, 0x2400ff82 },
- { 0x13001ffb, 0x2400ff82 },
- { 0x13001ffc, 0x2000fff7 },
- { 0x13801ffd, 0x60000001 },
- { 0x09802000, 0x7400000a },
- { 0x0980200b, 0x04000004 },
- { 0x09802010, 0x44000005 },
- { 0x09802016, 0x54000001 },
- { 0x09002018, 0x50000000 },
- { 0x09002019, 0x4c000000 },
- { 0x0900201a, 0x58000000 },
- { 0x0980201b, 0x50000001 },
- { 0x0900201d, 0x4c000000 },
- { 0x0900201e, 0x58000000 },
- { 0x0900201f, 0x50000000 },
- { 0x09802020, 0x54000007 },
- { 0x09002028, 0x6c000000 },
- { 0x09002029, 0x70000000 },
- { 0x0980202a, 0x04000004 },
- { 0x0900202f, 0x74000000 },
- { 0x09802030, 0x54000008 },
- { 0x09002039, 0x50000000 },
- { 0x0900203a, 0x4c000000 },
- { 0x0980203b, 0x54000003 },
- { 0x0980203f, 0x40000001 },
- { 0x09802041, 0x54000002 },
- { 0x09002044, 0x64000000 },
- { 0x09002045, 0x58000000 },
- { 0x09002046, 0x48000000 },
- { 0x09802047, 0x5400000a },
- { 0x09002052, 0x64000000 },
- { 0x09002053, 0x54000000 },
- { 0x09002054, 0x40000000 },
- { 0x09802055, 0x54000009 },
- { 0x0900205f, 0x74000000 },
- { 0x09802060, 0x04000003 },
- { 0x0980206a, 0x04000005 },
- { 0x09002070, 0x3c000000 },
- { 0x21002071, 0x14000000 },
- { 0x09802074, 0x3c000005 },
- { 0x0980207a, 0x64000002 },
- { 0x0900207d, 0x58000000 },
- { 0x0900207e, 0x48000000 },
- { 0x2100207f, 0x14000000 },
- { 0x09802080, 0x3c000009 },
- { 0x0980208a, 0x64000002 },
- { 0x0900208d, 0x58000000 },
- { 0x0900208e, 0x48000000 },
- { 0x21802090, 0x18000004 },
- { 0x098020a0, 0x5c000015 },
- { 0x1b8020d0, 0x3000000c },
- { 0x1b8020dd, 0x2c000003 },
- { 0x1b0020e1, 0x30000000 },
- { 0x1b8020e2, 0x2c000002 },
- { 0x1b8020e5, 0x30000006 },
- { 0x09802100, 0x68000001 },
- { 0x09002102, 0x24000000 },
- { 0x09802103, 0x68000003 },
- { 0x09002107, 0x24000000 },
- { 0x09802108, 0x68000001 },
- { 0x0900210a, 0x14000000 },
- { 0x0980210b, 0x24000002 },
- { 0x0980210e, 0x14000001 },
- { 0x09802110, 0x24000002 },
- { 0x09002113, 0x14000000 },
- { 0x09002114, 0x68000000 },
- { 0x09002115, 0x24000000 },
- { 0x09802116, 0x68000002 },
- { 0x09802119, 0x24000004 },
- { 0x0980211e, 0x68000005 },
- { 0x09002124, 0x24000000 },
- { 0x09002125, 0x68000000 },
- { 0x13002126, 0x2400e2a3 },
- { 0x09002127, 0x68000000 },
- { 0x09002128, 0x24000000 },
- { 0x09002129, 0x68000000 },
- { 0x2100212a, 0x2400df41 },
- { 0x2100212b, 0x2400dfba },
- { 0x0980212c, 0x24000001 },
- { 0x0900212e, 0x68000000 },
- { 0x0900212f, 0x14000000 },
- { 0x09802130, 0x24000001 },
- { 0x09002132, 0x68000000 },
- { 0x09002133, 0x24000000 },
- { 0x09002134, 0x14000000 },
- { 0x09802135, 0x1c000003 },
- { 0x09002139, 0x14000000 },
- { 0x0980213a, 0x68000001 },
- { 0x0980213c, 0x14000001 },
- { 0x0980213e, 0x24000001 },
- { 0x09802140, 0x64000004 },
- { 0x09002145, 0x24000000 },
- { 0x09802146, 0x14000003 },
- { 0x0900214a, 0x68000000 },
- { 0x0900214b, 0x64000000 },
- { 0x0900214c, 0x68000000 },
- { 0x09802153, 0x3c00000c },
- { 0x09002160, 0x38000010 },
- { 0x09002161, 0x38000010 },
- { 0x09002162, 0x38000010 },
- { 0x09002163, 0x38000010 },
- { 0x09002164, 0x38000010 },
- { 0x09002165, 0x38000010 },
- { 0x09002166, 0x38000010 },
- { 0x09002167, 0x38000010 },
- { 0x09002168, 0x38000010 },
- { 0x09002169, 0x38000010 },
- { 0x0900216a, 0x38000010 },
- { 0x0900216b, 0x38000010 },
- { 0x0900216c, 0x38000010 },
- { 0x0900216d, 0x38000010 },
- { 0x0900216e, 0x38000010 },
- { 0x0900216f, 0x38000010 },
- { 0x09002170, 0x3800fff0 },
- { 0x09002171, 0x3800fff0 },
- { 0x09002172, 0x3800fff0 },
- { 0x09002173, 0x3800fff0 },
- { 0x09002174, 0x3800fff0 },
- { 0x09002175, 0x3800fff0 },
- { 0x09002176, 0x3800fff0 },
- { 0x09002177, 0x3800fff0 },
- { 0x09002178, 0x3800fff0 },
- { 0x09002179, 0x3800fff0 },
- { 0x0900217a, 0x3800fff0 },
- { 0x0900217b, 0x3800fff0 },
- { 0x0900217c, 0x3800fff0 },
- { 0x0900217d, 0x3800fff0 },
- { 0x0900217e, 0x3800fff0 },
- { 0x0900217f, 0x3800fff0 },
- { 0x09802180, 0x38000003 },
- { 0x09802190, 0x64000004 },
- { 0x09802195, 0x68000004 },
- { 0x0980219a, 0x64000001 },
- { 0x0980219c, 0x68000003 },
- { 0x090021a0, 0x64000000 },
- { 0x098021a1, 0x68000001 },
- { 0x090021a3, 0x64000000 },
- { 0x098021a4, 0x68000001 },
- { 0x090021a6, 0x64000000 },
- { 0x098021a7, 0x68000006 },
- { 0x090021ae, 0x64000000 },
- { 0x098021af, 0x6800001e },
- { 0x098021ce, 0x64000001 },
- { 0x098021d0, 0x68000001 },
- { 0x090021d2, 0x64000000 },
- { 0x090021d3, 0x68000000 },
- { 0x090021d4, 0x64000000 },
- { 0x098021d5, 0x6800001e },
- { 0x098021f4, 0x6400010b },
- { 0x09802300, 0x68000007 },
- { 0x09802308, 0x64000003 },
- { 0x0980230c, 0x68000013 },
- { 0x09802320, 0x64000001 },
- { 0x09802322, 0x68000006 },
- { 0x09002329, 0x58000000 },
- { 0x0900232a, 0x48000000 },
- { 0x0980232b, 0x68000050 },
- { 0x0900237c, 0x64000000 },
- { 0x0980237d, 0x6800001d },
- { 0x0980239b, 0x64000018 },
- { 0x090023b4, 0x58000000 },
- { 0x090023b5, 0x48000000 },
- { 0x090023b6, 0x54000000 },
- { 0x098023b7, 0x68000024 },
- { 0x09802400, 0x68000026 },
- { 0x09802440, 0x6800000a },
- { 0x09802460, 0x3c00003b },
- { 0x0980249c, 0x68000019 },
- { 0x090024b6, 0x6800001a },
- { 0x090024b7, 0x6800001a },
- { 0x090024b8, 0x6800001a },
- { 0x090024b9, 0x6800001a },
- { 0x090024ba, 0x6800001a },
- { 0x090024bb, 0x6800001a },
- { 0x090024bc, 0x6800001a },
- { 0x090024bd, 0x6800001a },
- { 0x090024be, 0x6800001a },
- { 0x090024bf, 0x6800001a },
- { 0x090024c0, 0x6800001a },
- { 0x090024c1, 0x6800001a },
- { 0x090024c2, 0x6800001a },
- { 0x090024c3, 0x6800001a },
- { 0x090024c4, 0x6800001a },
- { 0x090024c5, 0x6800001a },
- { 0x090024c6, 0x6800001a },
- { 0x090024c7, 0x6800001a },
- { 0x090024c8, 0x6800001a },
- { 0x090024c9, 0x6800001a },
- { 0x090024ca, 0x6800001a },
- { 0x090024cb, 0x6800001a },
- { 0x090024cc, 0x6800001a },
- { 0x090024cd, 0x6800001a },
- { 0x090024ce, 0x6800001a },
- { 0x090024cf, 0x6800001a },
- { 0x090024d0, 0x6800ffe6 },
- { 0x090024d1, 0x6800ffe6 },
- { 0x090024d2, 0x6800ffe6 },
- { 0x090024d3, 0x6800ffe6 },
- { 0x090024d4, 0x6800ffe6 },
- { 0x090024d5, 0x6800ffe6 },
- { 0x090024d6, 0x6800ffe6 },
- { 0x090024d7, 0x6800ffe6 },
- { 0x090024d8, 0x6800ffe6 },
- { 0x090024d9, 0x6800ffe6 },
- { 0x090024da, 0x6800ffe6 },
- { 0x090024db, 0x6800ffe6 },
- { 0x090024dc, 0x6800ffe6 },
- { 0x090024dd, 0x6800ffe6 },
- { 0x090024de, 0x6800ffe6 },
- { 0x090024df, 0x6800ffe6 },
- { 0x090024e0, 0x6800ffe6 },
- { 0x090024e1, 0x6800ffe6 },
- { 0x090024e2, 0x6800ffe6 },
- { 0x090024e3, 0x6800ffe6 },
- { 0x090024e4, 0x6800ffe6 },
- { 0x090024e5, 0x6800ffe6 },
- { 0x090024e6, 0x6800ffe6 },
- { 0x090024e7, 0x6800ffe6 },
- { 0x090024e8, 0x6800ffe6 },
- { 0x090024e9, 0x6800ffe6 },
- { 0x098024ea, 0x3c000015 },
- { 0x09802500, 0x680000b6 },
- { 0x090025b7, 0x64000000 },
- { 0x098025b8, 0x68000008 },
- { 0x090025c1, 0x64000000 },
- { 0x098025c2, 0x68000035 },
- { 0x098025f8, 0x64000007 },
- { 0x09802600, 0x6800006e },
- { 0x0900266f, 0x64000000 },
- { 0x09802670, 0x6800002c },
- { 0x098026a0, 0x68000011 },
- { 0x09802701, 0x68000003 },
- { 0x09802706, 0x68000003 },
- { 0x0980270c, 0x6800001b },
- { 0x09802729, 0x68000022 },
- { 0x0900274d, 0x68000000 },
- { 0x0980274f, 0x68000003 },
- { 0x09002756, 0x68000000 },
- { 0x09802758, 0x68000006 },
- { 0x09802761, 0x68000006 },
- { 0x09002768, 0x58000000 },
- { 0x09002769, 0x48000000 },
- { 0x0900276a, 0x58000000 },
- { 0x0900276b, 0x48000000 },
- { 0x0900276c, 0x58000000 },
- { 0x0900276d, 0x48000000 },
- { 0x0900276e, 0x58000000 },
- { 0x0900276f, 0x48000000 },
- { 0x09002770, 0x58000000 },
- { 0x09002771, 0x48000000 },
- { 0x09002772, 0x58000000 },
- { 0x09002773, 0x48000000 },
- { 0x09002774, 0x58000000 },
- { 0x09002775, 0x48000000 },
- { 0x09802776, 0x3c00001d },
- { 0x09002794, 0x68000000 },
- { 0x09802798, 0x68000017 },
- { 0x098027b1, 0x6800000d },
- { 0x098027c0, 0x64000004 },
- { 0x090027c5, 0x58000000 },
- { 0x090027c6, 0x48000000 },
- { 0x098027d0, 0x64000015 },
- { 0x090027e6, 0x58000000 },
- { 0x090027e7, 0x48000000 },
- { 0x090027e8, 0x58000000 },
- { 0x090027e9, 0x48000000 },
- { 0x090027ea, 0x58000000 },
- { 0x090027eb, 0x48000000 },
- { 0x098027f0, 0x6400000f },
- { 0x04802800, 0x680000ff },
- { 0x09802900, 0x64000082 },
- { 0x09002983, 0x58000000 },
- { 0x09002984, 0x48000000 },
- { 0x09002985, 0x58000000 },
- { 0x09002986, 0x48000000 },
- { 0x09002987, 0x58000000 },
- { 0x09002988, 0x48000000 },
- { 0x09002989, 0x58000000 },
- { 0x0900298a, 0x48000000 },
- { 0x0900298b, 0x58000000 },
- { 0x0900298c, 0x48000000 },
- { 0x0900298d, 0x58000000 },
- { 0x0900298e, 0x48000000 },
- { 0x0900298f, 0x58000000 },
- { 0x09002990, 0x48000000 },
- { 0x09002991, 0x58000000 },
- { 0x09002992, 0x48000000 },
- { 0x09002993, 0x58000000 },
- { 0x09002994, 0x48000000 },
- { 0x09002995, 0x58000000 },
- { 0x09002996, 0x48000000 },
- { 0x09002997, 0x58000000 },
- { 0x09002998, 0x48000000 },
- { 0x09802999, 0x6400003e },
- { 0x090029d8, 0x58000000 },
- { 0x090029d9, 0x48000000 },
- { 0x090029da, 0x58000000 },
- { 0x090029db, 0x48000000 },
- { 0x098029dc, 0x6400001f },
- { 0x090029fc, 0x58000000 },
- { 0x090029fd, 0x48000000 },
- { 0x098029fe, 0x64000101 },
- { 0x09802b00, 0x68000013 },
- { 0x11002c00, 0x24000030 },
- { 0x11002c01, 0x24000030 },
- { 0x11002c02, 0x24000030 },
- { 0x11002c03, 0x24000030 },
- { 0x11002c04, 0x24000030 },
- { 0x11002c05, 0x24000030 },
- { 0x11002c06, 0x24000030 },
- { 0x11002c07, 0x24000030 },
- { 0x11002c08, 0x24000030 },
- { 0x11002c09, 0x24000030 },
- { 0x11002c0a, 0x24000030 },
- { 0x11002c0b, 0x24000030 },
- { 0x11002c0c, 0x24000030 },
- { 0x11002c0d, 0x24000030 },
- { 0x11002c0e, 0x24000030 },
- { 0x11002c0f, 0x24000030 },
- { 0x11002c10, 0x24000030 },
- { 0x11002c11, 0x24000030 },
- { 0x11002c12, 0x24000030 },
- { 0x11002c13, 0x24000030 },
- { 0x11002c14, 0x24000030 },
- { 0x11002c15, 0x24000030 },
- { 0x11002c16, 0x24000030 },
- { 0x11002c17, 0x24000030 },
- { 0x11002c18, 0x24000030 },
- { 0x11002c19, 0x24000030 },
- { 0x11002c1a, 0x24000030 },
- { 0x11002c1b, 0x24000030 },
- { 0x11002c1c, 0x24000030 },
- { 0x11002c1d, 0x24000030 },
- { 0x11002c1e, 0x24000030 },
- { 0x11002c1f, 0x24000030 },
- { 0x11002c20, 0x24000030 },
- { 0x11002c21, 0x24000030 },
- { 0x11002c22, 0x24000030 },
- { 0x11002c23, 0x24000030 },
- { 0x11002c24, 0x24000030 },
- { 0x11002c25, 0x24000030 },
- { 0x11002c26, 0x24000030 },
- { 0x11002c27, 0x24000030 },
- { 0x11002c28, 0x24000030 },
- { 0x11002c29, 0x24000030 },
- { 0x11002c2a, 0x24000030 },
- { 0x11002c2b, 0x24000030 },
- { 0x11002c2c, 0x24000030 },
- { 0x11002c2d, 0x24000030 },
- { 0x11002c2e, 0x24000030 },
- { 0x11002c30, 0x1400ffd0 },
- { 0x11002c31, 0x1400ffd0 },
- { 0x11002c32, 0x1400ffd0 },
- { 0x11002c33, 0x1400ffd0 },
- { 0x11002c34, 0x1400ffd0 },
- { 0x11002c35, 0x1400ffd0 },
- { 0x11002c36, 0x1400ffd0 },
- { 0x11002c37, 0x1400ffd0 },
- { 0x11002c38, 0x1400ffd0 },
- { 0x11002c39, 0x1400ffd0 },
- { 0x11002c3a, 0x1400ffd0 },
- { 0x11002c3b, 0x1400ffd0 },
- { 0x11002c3c, 0x1400ffd0 },
- { 0x11002c3d, 0x1400ffd0 },
- { 0x11002c3e, 0x1400ffd0 },
- { 0x11002c3f, 0x1400ffd0 },
- { 0x11002c40, 0x1400ffd0 },
- { 0x11002c41, 0x1400ffd0 },
- { 0x11002c42, 0x1400ffd0 },
- { 0x11002c43, 0x1400ffd0 },
- { 0x11002c44, 0x1400ffd0 },
- { 0x11002c45, 0x1400ffd0 },
- { 0x11002c46, 0x1400ffd0 },
- { 0x11002c47, 0x1400ffd0 },
- { 0x11002c48, 0x1400ffd0 },
- { 0x11002c49, 0x1400ffd0 },
- { 0x11002c4a, 0x1400ffd0 },
- { 0x11002c4b, 0x1400ffd0 },
- { 0x11002c4c, 0x1400ffd0 },
- { 0x11002c4d, 0x1400ffd0 },
- { 0x11002c4e, 0x1400ffd0 },
- { 0x11002c4f, 0x1400ffd0 },
- { 0x11002c50, 0x1400ffd0 },
- { 0x11002c51, 0x1400ffd0 },
- { 0x11002c52, 0x1400ffd0 },
- { 0x11002c53, 0x1400ffd0 },
- { 0x11002c54, 0x1400ffd0 },
- { 0x11002c55, 0x1400ffd0 },
- { 0x11002c56, 0x1400ffd0 },
- { 0x11002c57, 0x1400ffd0 },
- { 0x11002c58, 0x1400ffd0 },
- { 0x11002c59, 0x1400ffd0 },
- { 0x11002c5a, 0x1400ffd0 },
- { 0x11002c5b, 0x1400ffd0 },
- { 0x11002c5c, 0x1400ffd0 },
- { 0x11002c5d, 0x1400ffd0 },
- { 0x11002c5e, 0x1400ffd0 },
- { 0x0a002c80, 0x24000001 },
- { 0x0a002c81, 0x1400ffff },
- { 0x0a002c82, 0x24000001 },
- { 0x0a002c83, 0x1400ffff },
- { 0x0a002c84, 0x24000001 },
- { 0x0a002c85, 0x1400ffff },
- { 0x0a002c86, 0x24000001 },
- { 0x0a002c87, 0x1400ffff },
- { 0x0a002c88, 0x24000001 },
- { 0x0a002c89, 0x1400ffff },
- { 0x0a002c8a, 0x24000001 },
- { 0x0a002c8b, 0x1400ffff },
- { 0x0a002c8c, 0x24000001 },
- { 0x0a002c8d, 0x1400ffff },
- { 0x0a002c8e, 0x24000001 },
- { 0x0a002c8f, 0x1400ffff },
- { 0x0a002c90, 0x24000001 },
- { 0x0a002c91, 0x1400ffff },
- { 0x0a002c92, 0x24000001 },
- { 0x0a002c93, 0x1400ffff },
- { 0x0a002c94, 0x24000001 },
- { 0x0a002c95, 0x1400ffff },
- { 0x0a002c96, 0x24000001 },
- { 0x0a002c97, 0x1400ffff },
- { 0x0a002c98, 0x24000001 },
- { 0x0a002c99, 0x1400ffff },
- { 0x0a002c9a, 0x24000001 },
- { 0x0a002c9b, 0x1400ffff },
- { 0x0a002c9c, 0x24000001 },
- { 0x0a002c9d, 0x1400ffff },
- { 0x0a002c9e, 0x24000001 },
- { 0x0a002c9f, 0x1400ffff },
- { 0x0a002ca0, 0x24000001 },
- { 0x0a002ca1, 0x1400ffff },
- { 0x0a002ca2, 0x24000001 },
- { 0x0a002ca3, 0x1400ffff },
- { 0x0a002ca4, 0x24000001 },
- { 0x0a002ca5, 0x1400ffff },
- { 0x0a002ca6, 0x24000001 },
- { 0x0a002ca7, 0x1400ffff },
- { 0x0a002ca8, 0x24000001 },
- { 0x0a002ca9, 0x1400ffff },
- { 0x0a002caa, 0x24000001 },
- { 0x0a002cab, 0x1400ffff },
- { 0x0a002cac, 0x24000001 },
- { 0x0a002cad, 0x1400ffff },
- { 0x0a002cae, 0x24000001 },
- { 0x0a002caf, 0x1400ffff },
- { 0x0a002cb0, 0x24000001 },
- { 0x0a002cb1, 0x1400ffff },
- { 0x0a002cb2, 0x24000001 },
- { 0x0a002cb3, 0x1400ffff },
- { 0x0a002cb4, 0x24000001 },
- { 0x0a002cb5, 0x1400ffff },
- { 0x0a002cb6, 0x24000001 },
- { 0x0a002cb7, 0x1400ffff },
- { 0x0a002cb8, 0x24000001 },
- { 0x0a002cb9, 0x1400ffff },
- { 0x0a002cba, 0x24000001 },
- { 0x0a002cbb, 0x1400ffff },
- { 0x0a002cbc, 0x24000001 },
- { 0x0a002cbd, 0x1400ffff },
- { 0x0a002cbe, 0x24000001 },
- { 0x0a002cbf, 0x1400ffff },
- { 0x0a002cc0, 0x24000001 },
- { 0x0a002cc1, 0x1400ffff },
- { 0x0a002cc2, 0x24000001 },
- { 0x0a002cc3, 0x1400ffff },
- { 0x0a002cc4, 0x24000001 },
- { 0x0a002cc5, 0x1400ffff },
- { 0x0a002cc6, 0x24000001 },
- { 0x0a002cc7, 0x1400ffff },
- { 0x0a002cc8, 0x24000001 },
- { 0x0a002cc9, 0x1400ffff },
- { 0x0a002cca, 0x24000001 },
- { 0x0a002ccb, 0x1400ffff },
- { 0x0a002ccc, 0x24000001 },
- { 0x0a002ccd, 0x1400ffff },
- { 0x0a002cce, 0x24000001 },
- { 0x0a002ccf, 0x1400ffff },
- { 0x0a002cd0, 0x24000001 },
- { 0x0a002cd1, 0x1400ffff },
- { 0x0a002cd2, 0x24000001 },
- { 0x0a002cd3, 0x1400ffff },
- { 0x0a002cd4, 0x24000001 },
- { 0x0a002cd5, 0x1400ffff },
- { 0x0a002cd6, 0x24000001 },
- { 0x0a002cd7, 0x1400ffff },
- { 0x0a002cd8, 0x24000001 },
- { 0x0a002cd9, 0x1400ffff },
- { 0x0a002cda, 0x24000001 },
- { 0x0a002cdb, 0x1400ffff },
- { 0x0a002cdc, 0x24000001 },
- { 0x0a002cdd, 0x1400ffff },
- { 0x0a002cde, 0x24000001 },
- { 0x0a002cdf, 0x1400ffff },
- { 0x0a002ce0, 0x24000001 },
- { 0x0a002ce1, 0x1400ffff },
- { 0x0a002ce2, 0x24000001 },
- { 0x0a002ce3, 0x1400ffff },
- { 0x0a002ce4, 0x14000000 },
- { 0x0a802ce5, 0x68000005 },
- { 0x0a802cf9, 0x54000003 },
- { 0x0a002cfd, 0x3c000000 },
- { 0x0a802cfe, 0x54000001 },
- { 0x10002d00, 0x1400e3a0 },
- { 0x10002d01, 0x1400e3a0 },
- { 0x10002d02, 0x1400e3a0 },
- { 0x10002d03, 0x1400e3a0 },
- { 0x10002d04, 0x1400e3a0 },
- { 0x10002d05, 0x1400e3a0 },
- { 0x10002d06, 0x1400e3a0 },
- { 0x10002d07, 0x1400e3a0 },
- { 0x10002d08, 0x1400e3a0 },
- { 0x10002d09, 0x1400e3a0 },
- { 0x10002d0a, 0x1400e3a0 },
- { 0x10002d0b, 0x1400e3a0 },
- { 0x10002d0c, 0x1400e3a0 },
- { 0x10002d0d, 0x1400e3a0 },
- { 0x10002d0e, 0x1400e3a0 },
- { 0x10002d0f, 0x1400e3a0 },
- { 0x10002d10, 0x1400e3a0 },
- { 0x10002d11, 0x1400e3a0 },
- { 0x10002d12, 0x1400e3a0 },
- { 0x10002d13, 0x1400e3a0 },
- { 0x10002d14, 0x1400e3a0 },
- { 0x10002d15, 0x1400e3a0 },
- { 0x10002d16, 0x1400e3a0 },
- { 0x10002d17, 0x1400e3a0 },
- { 0x10002d18, 0x1400e3a0 },
- { 0x10002d19, 0x1400e3a0 },
- { 0x10002d1a, 0x1400e3a0 },
- { 0x10002d1b, 0x1400e3a0 },
- { 0x10002d1c, 0x1400e3a0 },
- { 0x10002d1d, 0x1400e3a0 },
- { 0x10002d1e, 0x1400e3a0 },
- { 0x10002d1f, 0x1400e3a0 },
- { 0x10002d20, 0x1400e3a0 },
- { 0x10002d21, 0x1400e3a0 },
- { 0x10002d22, 0x1400e3a0 },
- { 0x10002d23, 0x1400e3a0 },
- { 0x10002d24, 0x1400e3a0 },
- { 0x10002d25, 0x1400e3a0 },
- { 0x3a802d30, 0x1c000035 },
- { 0x3a002d6f, 0x18000000 },
- { 0x0f802d80, 0x1c000016 },
- { 0x0f802da0, 0x1c000006 },
- { 0x0f802da8, 0x1c000006 },
- { 0x0f802db0, 0x1c000006 },
- { 0x0f802db8, 0x1c000006 },
- { 0x0f802dc0, 0x1c000006 },
- { 0x0f802dc8, 0x1c000006 },
- { 0x0f802dd0, 0x1c000006 },
- { 0x0f802dd8, 0x1c000006 },
- { 0x09802e00, 0x54000001 },
- { 0x09002e02, 0x50000000 },
- { 0x09002e03, 0x4c000000 },
- { 0x09002e04, 0x50000000 },
- { 0x09002e05, 0x4c000000 },
- { 0x09802e06, 0x54000002 },
- { 0x09002e09, 0x50000000 },
- { 0x09002e0a, 0x4c000000 },
- { 0x09002e0b, 0x54000000 },
- { 0x09002e0c, 0x50000000 },
- { 0x09002e0d, 0x4c000000 },
- { 0x09802e0e, 0x54000008 },
- { 0x09002e17, 0x44000000 },
- { 0x09002e1c, 0x50000000 },
- { 0x09002e1d, 0x4c000000 },
- { 0x16802e80, 0x68000019 },
- { 0x16802e9b, 0x68000058 },
- { 0x16802f00, 0x680000d5 },
- { 0x09802ff0, 0x6800000b },
- { 0x09003000, 0x74000000 },
- { 0x09803001, 0x54000002 },
- { 0x09003004, 0x68000000 },
- { 0x16003005, 0x18000000 },
- { 0x09003006, 0x1c000000 },
- { 0x16003007, 0x38000000 },
- { 0x09003008, 0x58000000 },
- { 0x09003009, 0x48000000 },
- { 0x0900300a, 0x58000000 },
- { 0x0900300b, 0x48000000 },
- { 0x0900300c, 0x58000000 },
- { 0x0900300d, 0x48000000 },
- { 0x0900300e, 0x58000000 },
- { 0x0900300f, 0x48000000 },
- { 0x09003010, 0x58000000 },
- { 0x09003011, 0x48000000 },
- { 0x09803012, 0x68000001 },
- { 0x09003014, 0x58000000 },
- { 0x09003015, 0x48000000 },
- { 0x09003016, 0x58000000 },
- { 0x09003017, 0x48000000 },
- { 0x09003018, 0x58000000 },
- { 0x09003019, 0x48000000 },
- { 0x0900301a, 0x58000000 },
- { 0x0900301b, 0x48000000 },
- { 0x0900301c, 0x44000000 },
- { 0x0900301d, 0x58000000 },
- { 0x0980301e, 0x48000001 },
- { 0x09003020, 0x68000000 },
- { 0x16803021, 0x38000008 },
- { 0x1b80302a, 0x30000005 },
- { 0x09003030, 0x44000000 },
- { 0x09803031, 0x18000004 },
- { 0x09803036, 0x68000001 },
- { 0x16803038, 0x38000002 },
- { 0x1600303b, 0x18000000 },
- { 0x0900303c, 0x1c000000 },
- { 0x0900303d, 0x54000000 },
- { 0x0980303e, 0x68000001 },
- { 0x1a803041, 0x1c000055 },
- { 0x1b803099, 0x30000001 },
- { 0x0980309b, 0x60000001 },
- { 0x1a80309d, 0x18000001 },
- { 0x1a00309f, 0x1c000000 },
- { 0x090030a0, 0x44000000 },
- { 0x1d8030a1, 0x1c000059 },
- { 0x090030fb, 0x54000000 },
- { 0x098030fc, 0x18000002 },
- { 0x1d0030ff, 0x1c000000 },
- { 0x03803105, 0x1c000027 },
- { 0x17803131, 0x1c00005d },
- { 0x09803190, 0x68000001 },
- { 0x09803192, 0x3c000003 },
- { 0x09803196, 0x68000009 },
- { 0x038031a0, 0x1c000017 },
- { 0x098031c0, 0x6800000f },
- { 0x1d8031f0, 0x1c00000f },
- { 0x17803200, 0x6800001e },
- { 0x09803220, 0x3c000009 },
- { 0x0980322a, 0x68000019 },
- { 0x09003250, 0x68000000 },
- { 0x09803251, 0x3c00000e },
- { 0x17803260, 0x6800001f },
- { 0x09803280, 0x3c000009 },
- { 0x0980328a, 0x68000026 },
- { 0x098032b1, 0x3c00000e },
- { 0x098032c0, 0x6800003e },
- { 0x09803300, 0x680000ff },
- { 0x16803400, 0x1c0019b5 },
- { 0x09804dc0, 0x6800003f },
- { 0x16804e00, 0x1c0051bb },
- { 0x3c80a000, 0x1c000014 },
- { 0x3c00a015, 0x18000000 },
- { 0x3c80a016, 0x1c000476 },
- { 0x3c80a490, 0x68000036 },
- { 0x0980a700, 0x60000016 },
- { 0x3080a800, 0x1c000001 },
- { 0x3000a802, 0x28000000 },
- { 0x3080a803, 0x1c000002 },
- { 0x3000a806, 0x30000000 },
- { 0x3080a807, 0x1c000003 },
- { 0x3000a80b, 0x30000000 },
- { 0x3080a80c, 0x1c000016 },
- { 0x3080a823, 0x28000001 },
- { 0x3080a825, 0x30000001 },
- { 0x3000a827, 0x28000000 },
- { 0x3080a828, 0x68000003 },
- { 0x1780ac00, 0x1c002ba3 },
- { 0x0980d800, 0x1000037f },
- { 0x0980db80, 0x1000007f },
- { 0x0980dc00, 0x100003ff },
- { 0x0980e000, 0x0c0018ff },
- { 0x1680f900, 0x1c00012d },
- { 0x1680fa30, 0x1c00003a },
- { 0x1680fa70, 0x1c000069 },
- { 0x2180fb00, 0x14000006 },
- { 0x0180fb13, 0x14000004 },
- { 0x1900fb1d, 0x1c000000 },
- { 0x1900fb1e, 0x30000000 },
- { 0x1980fb1f, 0x1c000009 },
- { 0x1900fb29, 0x64000000 },
- { 0x1980fb2a, 0x1c00000c },
- { 0x1980fb38, 0x1c000004 },
- { 0x1900fb3e, 0x1c000000 },
- { 0x1980fb40, 0x1c000001 },
- { 0x1980fb43, 0x1c000001 },
- { 0x1980fb46, 0x1c00006b },
- { 0x0080fbd3, 0x1c00016a },
- { 0x0900fd3e, 0x58000000 },
- { 0x0900fd3f, 0x48000000 },
- { 0x0080fd50, 0x1c00003f },
- { 0x0080fd92, 0x1c000035 },
- { 0x0080fdf0, 0x1c00000b },
- { 0x0000fdfc, 0x5c000000 },
- { 0x0900fdfd, 0x68000000 },
- { 0x1b80fe00, 0x3000000f },
- { 0x0980fe10, 0x54000006 },
- { 0x0900fe17, 0x58000000 },
- { 0x0900fe18, 0x48000000 },
- { 0x0900fe19, 0x54000000 },
- { 0x1b80fe20, 0x30000003 },
- { 0x0900fe30, 0x54000000 },
- { 0x0980fe31, 0x44000001 },
- { 0x0980fe33, 0x40000001 },
- { 0x0900fe35, 0x58000000 },
- { 0x0900fe36, 0x48000000 },
- { 0x0900fe37, 0x58000000 },
- { 0x0900fe38, 0x48000000 },
- { 0x0900fe39, 0x58000000 },
- { 0x0900fe3a, 0x48000000 },
- { 0x0900fe3b, 0x58000000 },
- { 0x0900fe3c, 0x48000000 },
- { 0x0900fe3d, 0x58000000 },
- { 0x0900fe3e, 0x48000000 },
- { 0x0900fe3f, 0x58000000 },
- { 0x0900fe40, 0x48000000 },
- { 0x0900fe41, 0x58000000 },
- { 0x0900fe42, 0x48000000 },
- { 0x0900fe43, 0x58000000 },
- { 0x0900fe44, 0x48000000 },
- { 0x0980fe45, 0x54000001 },
- { 0x0900fe47, 0x58000000 },
- { 0x0900fe48, 0x48000000 },
- { 0x0980fe49, 0x54000003 },
- { 0x0980fe4d, 0x40000002 },
- { 0x0980fe50, 0x54000002 },
- { 0x0980fe54, 0x54000003 },
- { 0x0900fe58, 0x44000000 },
- { 0x0900fe59, 0x58000000 },
- { 0x0900fe5a, 0x48000000 },
- { 0x0900fe5b, 0x58000000 },
- { 0x0900fe5c, 0x48000000 },
- { 0x0900fe5d, 0x58000000 },
- { 0x0900fe5e, 0x48000000 },
- { 0x0980fe5f, 0x54000002 },
- { 0x0900fe62, 0x64000000 },
- { 0x0900fe63, 0x44000000 },
- { 0x0980fe64, 0x64000002 },
- { 0x0900fe68, 0x54000000 },
- { 0x0900fe69, 0x5c000000 },
- { 0x0980fe6a, 0x54000001 },
- { 0x0080fe70, 0x1c000004 },
- { 0x0080fe76, 0x1c000086 },
- { 0x0900feff, 0x04000000 },
- { 0x0980ff01, 0x54000002 },
- { 0x0900ff04, 0x5c000000 },
- { 0x0980ff05, 0x54000002 },
- { 0x0900ff08, 0x58000000 },
- { 0x0900ff09, 0x48000000 },
- { 0x0900ff0a, 0x54000000 },
- { 0x0900ff0b, 0x64000000 },
- { 0x0900ff0c, 0x54000000 },
- { 0x0900ff0d, 0x44000000 },
- { 0x0980ff0e, 0x54000001 },
- { 0x0980ff10, 0x34000009 },
- { 0x0980ff1a, 0x54000001 },
- { 0x0980ff1c, 0x64000002 },
- { 0x0980ff1f, 0x54000001 },
- { 0x2100ff21, 0x24000020 },
- { 0x2100ff22, 0x24000020 },
- { 0x2100ff23, 0x24000020 },
- { 0x2100ff24, 0x24000020 },
- { 0x2100ff25, 0x24000020 },
- { 0x2100ff26, 0x24000020 },
- { 0x2100ff27, 0x24000020 },
- { 0x2100ff28, 0x24000020 },
- { 0x2100ff29, 0x24000020 },
- { 0x2100ff2a, 0x24000020 },
- { 0x2100ff2b, 0x24000020 },
- { 0x2100ff2c, 0x24000020 },
- { 0x2100ff2d, 0x24000020 },
- { 0x2100ff2e, 0x24000020 },
- { 0x2100ff2f, 0x24000020 },
- { 0x2100ff30, 0x24000020 },
- { 0x2100ff31, 0x24000020 },
- { 0x2100ff32, 0x24000020 },
- { 0x2100ff33, 0x24000020 },
- { 0x2100ff34, 0x24000020 },
- { 0x2100ff35, 0x24000020 },
- { 0x2100ff36, 0x24000020 },
- { 0x2100ff37, 0x24000020 },
- { 0x2100ff38, 0x24000020 },
- { 0x2100ff39, 0x24000020 },
- { 0x2100ff3a, 0x24000020 },
- { 0x0900ff3b, 0x58000000 },
- { 0x0900ff3c, 0x54000000 },
- { 0x0900ff3d, 0x48000000 },
- { 0x0900ff3e, 0x60000000 },
- { 0x0900ff3f, 0x40000000 },
- { 0x0900ff40, 0x60000000 },
- { 0x2100ff41, 0x1400ffe0 },
- { 0x2100ff42, 0x1400ffe0 },
- { 0x2100ff43, 0x1400ffe0 },
- { 0x2100ff44, 0x1400ffe0 },
- { 0x2100ff45, 0x1400ffe0 },
- { 0x2100ff46, 0x1400ffe0 },
- { 0x2100ff47, 0x1400ffe0 },
- { 0x2100ff48, 0x1400ffe0 },
- { 0x2100ff49, 0x1400ffe0 },
- { 0x2100ff4a, 0x1400ffe0 },
- { 0x2100ff4b, 0x1400ffe0 },
- { 0x2100ff4c, 0x1400ffe0 },
- { 0x2100ff4d, 0x1400ffe0 },
- { 0x2100ff4e, 0x1400ffe0 },
- { 0x2100ff4f, 0x1400ffe0 },
- { 0x2100ff50, 0x1400ffe0 },
- { 0x2100ff51, 0x1400ffe0 },
- { 0x2100ff52, 0x1400ffe0 },
- { 0x2100ff53, 0x1400ffe0 },
- { 0x2100ff54, 0x1400ffe0 },
- { 0x2100ff55, 0x1400ffe0 },
- { 0x2100ff56, 0x1400ffe0 },
- { 0x2100ff57, 0x1400ffe0 },
- { 0x2100ff58, 0x1400ffe0 },
- { 0x2100ff59, 0x1400ffe0 },
- { 0x2100ff5a, 0x1400ffe0 },
- { 0x0900ff5b, 0x58000000 },
- { 0x0900ff5c, 0x64000000 },
- { 0x0900ff5d, 0x48000000 },
- { 0x0900ff5e, 0x64000000 },
- { 0x0900ff5f, 0x58000000 },
- { 0x0900ff60, 0x48000000 },
- { 0x0900ff61, 0x54000000 },
- { 0x0900ff62, 0x58000000 },
- { 0x0900ff63, 0x48000000 },
- { 0x0980ff64, 0x54000001 },
- { 0x1d80ff66, 0x1c000009 },
- { 0x0900ff70, 0x18000000 },
- { 0x1d80ff71, 0x1c00002c },
- { 0x0980ff9e, 0x18000001 },
- { 0x1780ffa0, 0x1c00001e },
- { 0x1780ffc2, 0x1c000005 },
- { 0x1780ffca, 0x1c000005 },
- { 0x1780ffd2, 0x1c000005 },
- { 0x1780ffda, 0x1c000002 },
- { 0x0980ffe0, 0x5c000001 },
- { 0x0900ffe2, 0x64000000 },
- { 0x0900ffe3, 0x60000000 },
- { 0x0900ffe4, 0x68000000 },
- { 0x0980ffe5, 0x5c000001 },
- { 0x0900ffe8, 0x68000000 },
- { 0x0980ffe9, 0x64000003 },
- { 0x0980ffed, 0x68000001 },
- { 0x0980fff9, 0x04000002 },
- { 0x0980fffc, 0x68000001 },
- { 0x23810000, 0x1c00000b },
- { 0x2381000d, 0x1c000019 },
- { 0x23810028, 0x1c000012 },
- { 0x2381003c, 0x1c000001 },
- { 0x2381003f, 0x1c00000e },
- { 0x23810050, 0x1c00000d },
- { 0x23810080, 0x1c00007a },
- { 0x09810100, 0x54000001 },
- { 0x09010102, 0x68000000 },
- { 0x09810107, 0x3c00002c },
- { 0x09810137, 0x68000008 },
- { 0x13810140, 0x38000034 },
- { 0x13810175, 0x3c000003 },
- { 0x13810179, 0x68000010 },
- { 0x1301018a, 0x3c000000 },
- { 0x29810300, 0x1c00001e },
- { 0x29810320, 0x3c000003 },
- { 0x12810330, 0x1c000019 },
- { 0x1201034a, 0x38000000 },
- { 0x3b810380, 0x1c00001d },
- { 0x3b01039f, 0x54000000 },
- { 0x2a8103a0, 0x1c000023 },
- { 0x2a8103c8, 0x1c000007 },
- { 0x2a0103d0, 0x68000000 },
- { 0x2a8103d1, 0x38000004 },
- { 0x0d010400, 0x24000028 },
- { 0x0d010401, 0x24000028 },
- { 0x0d010402, 0x24000028 },
- { 0x0d010403, 0x24000028 },
- { 0x0d010404, 0x24000028 },
- { 0x0d010405, 0x24000028 },
- { 0x0d010406, 0x24000028 },
- { 0x0d010407, 0x24000028 },
- { 0x0d010408, 0x24000028 },
- { 0x0d010409, 0x24000028 },
- { 0x0d01040a, 0x24000028 },
- { 0x0d01040b, 0x24000028 },
- { 0x0d01040c, 0x24000028 },
- { 0x0d01040d, 0x24000028 },
- { 0x0d01040e, 0x24000028 },
- { 0x0d01040f, 0x24000028 },
- { 0x0d010410, 0x24000028 },
- { 0x0d010411, 0x24000028 },
- { 0x0d010412, 0x24000028 },
- { 0x0d010413, 0x24000028 },
- { 0x0d010414, 0x24000028 },
- { 0x0d010415, 0x24000028 },
- { 0x0d010416, 0x24000028 },
- { 0x0d010417, 0x24000028 },
- { 0x0d010418, 0x24000028 },
- { 0x0d010419, 0x24000028 },
- { 0x0d01041a, 0x24000028 },
- { 0x0d01041b, 0x24000028 },
- { 0x0d01041c, 0x24000028 },
- { 0x0d01041d, 0x24000028 },
- { 0x0d01041e, 0x24000028 },
- { 0x0d01041f, 0x24000028 },
- { 0x0d010420, 0x24000028 },
- { 0x0d010421, 0x24000028 },
- { 0x0d010422, 0x24000028 },
- { 0x0d010423, 0x24000028 },
- { 0x0d010424, 0x24000028 },
- { 0x0d010425, 0x24000028 },
- { 0x0d010426, 0x24000028 },
- { 0x0d010427, 0x24000028 },
- { 0x0d010428, 0x1400ffd8 },
- { 0x0d010429, 0x1400ffd8 },
- { 0x0d01042a, 0x1400ffd8 },
- { 0x0d01042b, 0x1400ffd8 },
- { 0x0d01042c, 0x1400ffd8 },
- { 0x0d01042d, 0x1400ffd8 },
- { 0x0d01042e, 0x1400ffd8 },
- { 0x0d01042f, 0x1400ffd8 },
- { 0x0d010430, 0x1400ffd8 },
- { 0x0d010431, 0x1400ffd8 },
- { 0x0d010432, 0x1400ffd8 },
- { 0x0d010433, 0x1400ffd8 },
- { 0x0d010434, 0x1400ffd8 },
- { 0x0d010435, 0x1400ffd8 },
- { 0x0d010436, 0x1400ffd8 },
- { 0x0d010437, 0x1400ffd8 },
- { 0x0d010438, 0x1400ffd8 },
- { 0x0d010439, 0x1400ffd8 },
- { 0x0d01043a, 0x1400ffd8 },
- { 0x0d01043b, 0x1400ffd8 },
- { 0x0d01043c, 0x1400ffd8 },
- { 0x0d01043d, 0x1400ffd8 },
- { 0x0d01043e, 0x1400ffd8 },
- { 0x0d01043f, 0x1400ffd8 },
- { 0x0d010440, 0x1400ffd8 },
- { 0x0d010441, 0x1400ffd8 },
- { 0x0d010442, 0x1400ffd8 },
- { 0x0d010443, 0x1400ffd8 },
- { 0x0d010444, 0x1400ffd8 },
- { 0x0d010445, 0x1400ffd8 },
- { 0x0d010446, 0x1400ffd8 },
- { 0x0d010447, 0x1400ffd8 },
- { 0x0d010448, 0x1400ffd8 },
- { 0x0d010449, 0x1400ffd8 },
- { 0x0d01044a, 0x1400ffd8 },
- { 0x0d01044b, 0x1400ffd8 },
- { 0x0d01044c, 0x1400ffd8 },
- { 0x0d01044d, 0x1400ffd8 },
- { 0x0d01044e, 0x1400ffd8 },
- { 0x0d01044f, 0x1400ffd8 },
- { 0x2e810450, 0x1c00004d },
- { 0x2c8104a0, 0x34000009 },
- { 0x0b810800, 0x1c000005 },
- { 0x0b010808, 0x1c000000 },
- { 0x0b81080a, 0x1c00002b },
- { 0x0b810837, 0x1c000001 },
- { 0x0b01083c, 0x1c000000 },
- { 0x0b01083f, 0x1c000000 },
- { 0x1e010a00, 0x1c000000 },
- { 0x1e810a01, 0x30000002 },
- { 0x1e810a05, 0x30000001 },
- { 0x1e810a0c, 0x30000003 },
- { 0x1e810a10, 0x1c000003 },
- { 0x1e810a15, 0x1c000002 },
- { 0x1e810a19, 0x1c00001a },
- { 0x1e810a38, 0x30000002 },
- { 0x1e010a3f, 0x30000000 },
- { 0x1e810a40, 0x3c000007 },
- { 0x1e810a50, 0x54000008 },
- { 0x0981d000, 0x680000f5 },
- { 0x0981d100, 0x68000026 },
- { 0x0981d12a, 0x6800003a },
- { 0x0981d165, 0x28000001 },
- { 0x1b81d167, 0x30000002 },
- { 0x0981d16a, 0x68000002 },
- { 0x0981d16d, 0x28000005 },
- { 0x0981d173, 0x04000007 },
- { 0x1b81d17b, 0x30000007 },
- { 0x0981d183, 0x68000001 },
- { 0x1b81d185, 0x30000006 },
- { 0x0981d18c, 0x6800001d },
- { 0x1b81d1aa, 0x30000003 },
- { 0x0981d1ae, 0x6800002f },
- { 0x1381d200, 0x68000041 },
- { 0x1381d242, 0x30000002 },
- { 0x1301d245, 0x68000000 },
- { 0x0981d300, 0x68000056 },
- { 0x0981d400, 0x24000019 },
- { 0x0981d41a, 0x14000019 },
- { 0x0981d434, 0x24000019 },
- { 0x0981d44e, 0x14000006 },
- { 0x0981d456, 0x14000011 },
- { 0x0981d468, 0x24000019 },
- { 0x0981d482, 0x14000019 },
- { 0x0901d49c, 0x24000000 },
- { 0x0981d49e, 0x24000001 },
- { 0x0901d4a2, 0x24000000 },
- { 0x0981d4a5, 0x24000001 },
- { 0x0981d4a9, 0x24000003 },
- { 0x0981d4ae, 0x24000007 },
- { 0x0981d4b6, 0x14000003 },
- { 0x0901d4bb, 0x14000000 },
- { 0x0981d4bd, 0x14000006 },
- { 0x0981d4c5, 0x1400000a },
- { 0x0981d4d0, 0x24000019 },
- { 0x0981d4ea, 0x14000019 },
- { 0x0981d504, 0x24000001 },
- { 0x0981d507, 0x24000003 },
- { 0x0981d50d, 0x24000007 },
- { 0x0981d516, 0x24000006 },
- { 0x0981d51e, 0x14000019 },
- { 0x0981d538, 0x24000001 },
- { 0x0981d53b, 0x24000003 },
- { 0x0981d540, 0x24000004 },
- { 0x0901d546, 0x24000000 },
- { 0x0981d54a, 0x24000006 },
- { 0x0981d552, 0x14000019 },
- { 0x0981d56c, 0x24000019 },
- { 0x0981d586, 0x14000019 },
- { 0x0981d5a0, 0x24000019 },
- { 0x0981d5ba, 0x14000019 },
- { 0x0981d5d4, 0x24000019 },
- { 0x0981d5ee, 0x14000019 },
- { 0x0981d608, 0x24000019 },
- { 0x0981d622, 0x14000019 },
- { 0x0981d63c, 0x24000019 },
- { 0x0981d656, 0x14000019 },
- { 0x0981d670, 0x24000019 },
- { 0x0981d68a, 0x1400001b },
- { 0x0981d6a8, 0x24000018 },
- { 0x0901d6c1, 0x64000000 },
- { 0x0981d6c2, 0x14000018 },
- { 0x0901d6db, 0x64000000 },
- { 0x0981d6dc, 0x14000005 },
- { 0x0981d6e2, 0x24000018 },
- { 0x0901d6fb, 0x64000000 },
- { 0x0981d6fc, 0x14000018 },
- { 0x0901d715, 0x64000000 },
- { 0x0981d716, 0x14000005 },
- { 0x0981d71c, 0x24000018 },
- { 0x0901d735, 0x64000000 },
- { 0x0981d736, 0x14000018 },
- { 0x0901d74f, 0x64000000 },
- { 0x0981d750, 0x14000005 },
- { 0x0981d756, 0x24000018 },
- { 0x0901d76f, 0x64000000 },
- { 0x0981d770, 0x14000018 },
- { 0x0901d789, 0x64000000 },
- { 0x0981d78a, 0x14000005 },
- { 0x0981d790, 0x24000018 },
- { 0x0901d7a9, 0x64000000 },
- { 0x0981d7aa, 0x14000018 },
- { 0x0901d7c3, 0x64000000 },
- { 0x0981d7c4, 0x14000005 },
- { 0x0981d7ce, 0x34000031 },
- { 0x16820000, 0x1c00a6d6 },
- { 0x1682f800, 0x1c00021d },
- { 0x090e0001, 0x04000000 },
- { 0x098e0020, 0x0400005f },
- { 0x1b8e0100, 0x300000ef },
- { 0x098f0000, 0x0c00fffd },
- { 0x09900000, 0x0c00fffd },
-};