Ignore:
Timestamp:
Nov 29, 2007, 3:20:26 AM (18 years ago)
Author:
[email protected]
Message:

2007-11-28 Eric Seidel <[email protected]>

Reviewed by Sam.

Section off MatchData arguments into args struct

  • pcre/pcre_exec.cpp: (MatchStack::pushNewFrame): (match):
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/JavaScriptCore/pcre/pcre_exec.cpp

    r28156 r28157  
    8282
    8383struct MatchFrame {
    84   ReturnLocation returnLocation;
    85 
    86   struct MatchFrame* previousFrame;
    87 
    88   /* Function arguments that may change */
    89 
    90   UChar* eptr;
    91   const uschar* ecode;
    92   int offset_top;
    93   eptrblock* eptrb;
    94 
    95   /* Function local variables */
    96 
    97   const uschar* data;
    98   const uschar* next;
    99   const UChar* pp;
    100   const uschar* prev;
    101   const UChar* saved_eptr;
    102 
    103   int repeat_othercase;
    104 
    105   int ctype;
    106   int fc;
    107   int fi;
    108   int length;
    109   int max;
    110   int number;
    111   int offset;
    112   int save_offset1, save_offset2, save_offset3;
    113 
    114   eptrblock newptrb;
     84    ReturnLocation returnLocation;
     85   
     86    struct MatchFrame* previousFrame;
     87   
     88    /* Function arguments that may change */
     89   
     90    struct {
     91        UChar* eptr;
     92        const uschar* ecode;
     93        int offset_top;
     94        eptrblock* eptrb;
     95    } args;
     96   
     97   
     98    /* Because PCRE uses "fake" recursion built off of gotos,
     99     stack-based local variables are not safe to use, we have to instead
     100     store variables off of the current MatchFrame.
     101     The rest of this structure consists of such variables: */
     102   
     103    const uschar* data;
     104    const uschar* next;
     105    const UChar* pp;
     106    const uschar* prev;
     107    const UChar* saved_eptr;
     108   
     109    int repeat_othercase;
     110   
     111    int ctype;
     112    int fc;
     113    int fi;
     114    int length;
     115    int max;
     116    int number;
     117    int offset;
     118    int save_offset1;
     119    int save_offset2;
     120    int save_offset3;
     121   
     122    eptrblock newptrb;
    115123};
    116124
     
    352360        newframe->previousFrame = currentFrame;
    353361
    354         newframe->eptr = currentFrame->eptr;
    355         newframe->offset_top = currentFrame->offset_top;
    356         newframe->ecode = ecode;
    357         newframe->eptrb = eptrb;
     362        newframe->args.eptr = currentFrame->args.eptr;
     363        newframe->args.offset_top = currentFrame->args.offset_top;
     364        newframe->args.ecode = ecode;
     365        newframe->args.eptrb = eptrb;
    358366        newframe->returnLocation = returnLocation;
    359367
     
    444452#endif
    445453   
    446     stack.currentFrame->eptr = eptr;
    447     stack.currentFrame->ecode = ecode;
    448     stack.currentFrame->offset_top = offset_top;
    449     stack.currentFrame->eptrb = NULL;
     454    stack.currentFrame->args.eptr = eptr;
     455    stack.currentFrame->args.ecode = ecode;
     456    stack.currentFrame->args.offset_top = offset_top;
     457    stack.currentFrame->args.eptrb = NULL;
    450458   
    451459    /* This is where control jumps back to to effect "recursion" */
     
    475483   
    476484    if (is_group_start) {
    477         stack.currentFrame->newptrb.epb_prev = stack.currentFrame->eptrb;
    478         stack.currentFrame->newptrb.epb_saved_eptr = stack.currentFrame->eptr;
    479         stack.currentFrame->eptrb = &stack.currentFrame->newptrb;
     485        stack.currentFrame->newptrb.epb_prev = stack.currentFrame->args.eptrb;
     486        stack.currentFrame->newptrb.epb_saved_eptr = stack.currentFrame->args.eptr;
     487        stack.currentFrame->args.eptrb = &stack.currentFrame->newptrb;
    480488    }
    481489   
     
    489497#ifdef USE_COMPUTED_GOTO_FOR_MATCH_OPCODE_LOOP
    490498#define BEGIN_OPCODE(opcode) LABEL_OP_##opcode
    491 #define NEXT_OPCODE goto *opcode_jump_table[*stack.currentFrame->ecode]
     499#define NEXT_OPCODE goto *opcode_jump_table[*stack.currentFrame->args.ecode]
    492500#else
    493501#define BEGIN_OPCODE(opcode) case OP_##opcode
     
    498506        NEXT_OPCODE;
    499507#else
    500         switch (*stack.currentFrame->ecode)
     508        switch (*stack.currentFrame->args.ecode)
    501509#endif
    502510        {
     
    507515                DPRINTF(("start bracket 0\n"));
    508516                do {
    509                     RMATCH(2, stack.currentFrame->ecode + 1 + LINK_SIZE, stack.currentFrame->eptrb, match_isgroup);
     517                    RMATCH(2, stack.currentFrame->args.ecode + 1 + LINK_SIZE, stack.currentFrame->args.eptrb, match_isgroup);
    510518                    if (is_match)
    511519                        RRETURN;
    512                     stack.currentFrame->ecode += GET(stack.currentFrame->ecode, 1);
    513                 } while (*stack.currentFrame->ecode == OP_ALT);
     520                    stack.currentFrame->args.ecode += GET(stack.currentFrame->args.ecode, 1);
     521                } while (*stack.currentFrame->args.ecode == OP_ALT);
    514522                DPRINTF(("bracket 0 failed\n"));
    515523                RRETURN;
     
    518526               
    519527                BEGIN_OPCODE(BRANUMBER):
    520                 stack.currentFrame->ecode += 3;
     528                stack.currentFrame->args.ecode += 3;
    521529                NEXT_OPCODE;
    522530               
     
    524532               
    525533                BEGIN_OPCODE(END):
    526                 md.end_match_ptr = stack.currentFrame->eptr;          /* Record where we ended */
    527                 md.end_offset_top = stack.currentFrame->offset_top;   /* and how many extracts were taken */
     534                md.end_match_ptr = stack.currentFrame->args.eptr;          /* Record where we ended */
     535                md.end_offset_top = stack.currentFrame->args.offset_top;   /* and how many extracts were taken */
    528536                is_match = true;
    529537                RRETURN;
     
    537545                BEGIN_OPCODE(ASSERT):
    538546                do {
    539                     RMATCH(6, stack.currentFrame->ecode + 1 + LINK_SIZE, NULL, match_isgroup);
     547                    RMATCH(6, stack.currentFrame->args.ecode + 1 + LINK_SIZE, NULL, match_isgroup);
    540548                    if (is_match)
    541549                        break;
    542                     stack.currentFrame->ecode += GET(stack.currentFrame->ecode, 1);
    543                 } while (*stack.currentFrame->ecode == OP_ALT);
    544                 if (*stack.currentFrame->ecode == OP_KET)
     550                    stack.currentFrame->args.ecode += GET(stack.currentFrame->args.ecode, 1);
     551                } while (*stack.currentFrame->args.ecode == OP_ALT);
     552                if (*stack.currentFrame->args.ecode == OP_KET)
    545553                    RRETURN_NO_MATCH;
    546554               
     
    548556                 mark, since extracts may have been taken during the assertion. */
    549557               
    550                 do stack.currentFrame->ecode += GET(stack.currentFrame->ecode,1); while (*stack.currentFrame->ecode == OP_ALT);
    551                 stack.currentFrame->ecode += 1 + LINK_SIZE;
    552                 stack.currentFrame->offset_top = md.end_offset_top;
     558                do stack.currentFrame->args.ecode += GET(stack.currentFrame->args.ecode,1); while (*stack.currentFrame->args.ecode == OP_ALT);
     559                stack.currentFrame->args.ecode += 1 + LINK_SIZE;
     560                stack.currentFrame->args.offset_top = md.end_offset_top;
    553561                NEXT_OPCODE;
    554562               
     
    557565                BEGIN_OPCODE(ASSERT_NOT):
    558566                do {
    559                     RMATCH(7, stack.currentFrame->ecode + 1 + LINK_SIZE, NULL, match_isgroup);
     567                    RMATCH(7, stack.currentFrame->args.ecode + 1 + LINK_SIZE, NULL, match_isgroup);
    560568                    if (is_match)
    561569                        RRETURN_NO_MATCH;
    562                     stack.currentFrame->ecode += GET(stack.currentFrame->ecode,1);
    563                 } while (*stack.currentFrame->ecode == OP_ALT);
    564                
    565                 stack.currentFrame->ecode += 1 + LINK_SIZE;
     570                    stack.currentFrame->args.ecode += GET(stack.currentFrame->args.ecode,1);
     571                } while (*stack.currentFrame->args.ecode == OP_ALT);
     572               
     573                stack.currentFrame->args.ecode += 1 + LINK_SIZE;
    566574                NEXT_OPCODE;
    567575               
     
    574582               
    575583                BEGIN_OPCODE(ONCE):
    576                 stack.currentFrame->prev = stack.currentFrame->ecode;
    577                 stack.currentFrame->saved_eptr = stack.currentFrame->eptr;
     584                stack.currentFrame->prev = stack.currentFrame->args.ecode;
     585                stack.currentFrame->saved_eptr = stack.currentFrame->args.eptr;
    578586               
    579587                do {
    580                     RMATCH(9, stack.currentFrame->ecode + 1 + LINK_SIZE, stack.currentFrame->eptrb, match_isgroup);
     588                    RMATCH(9, stack.currentFrame->args.ecode + 1 + LINK_SIZE, stack.currentFrame->args.eptrb, match_isgroup);
    581589                    if (is_match)
    582590                        break;
    583                     stack.currentFrame->ecode += GET(stack.currentFrame->ecode,1);
    584                 } while (*stack.currentFrame->ecode == OP_ALT);
     591                    stack.currentFrame->args.ecode += GET(stack.currentFrame->args.ecode,1);
     592                } while (*stack.currentFrame->args.ecode == OP_ALT);
    585593               
    586594                /* If hit the end of the group (which could be repeated), fail */
    587595               
    588                 if (*stack.currentFrame->ecode != OP_ONCE && *stack.currentFrame->ecode != OP_ALT)
     596                if (*stack.currentFrame->args.ecode != OP_ONCE && *stack.currentFrame->args.ecode != OP_ALT)
    589597                    RRETURN;
    590598               
     
    592600                 mark, since extracts may have been taken. */
    593601               
    594                 do stack.currentFrame->ecode += GET(stack.currentFrame->ecode,1); while (*stack.currentFrame->ecode == OP_ALT);
    595                
    596                 stack.currentFrame->offset_top = md.end_offset_top;
    597                 stack.currentFrame->eptr = md.end_match_ptr;
     602                do stack.currentFrame->args.ecode += GET(stack.currentFrame->args.ecode,1); while (*stack.currentFrame->args.ecode == OP_ALT);
     603               
     604                stack.currentFrame->args.offset_top = md.end_offset_top;
     605                stack.currentFrame->args.eptr = md.end_match_ptr;
    598606               
    599607                /* For a non-repeating ket, just continue at this level. This also
     
    603611                 course of events. */
    604612               
    605                 if (*stack.currentFrame->ecode == OP_KET || stack.currentFrame->eptr == stack.currentFrame->saved_eptr) {
    606                     stack.currentFrame->ecode += 1+LINK_SIZE;
     613                if (*stack.currentFrame->args.ecode == OP_KET || stack.currentFrame->args.eptr == stack.currentFrame->saved_eptr) {
     614                    stack.currentFrame->args.ecode += 1+LINK_SIZE;
    607615                    NEXT_OPCODE;
    608616                }
     
    613621                 opcode. */
    614622               
    615                 if (*stack.currentFrame->ecode == OP_KETRMIN) {
    616                     RMATCH(10, stack.currentFrame->ecode + 1 + LINK_SIZE, stack.currentFrame->eptrb, 0);
     623                if (*stack.currentFrame->args.ecode == OP_KETRMIN) {
     624                    RMATCH(10, stack.currentFrame->args.ecode + 1 + LINK_SIZE, stack.currentFrame->args.eptrb, 0);
    617625                    if (is_match)
    618626                        RRETURN;
    619                     RMATCH(11, stack.currentFrame->prev, stack.currentFrame->eptrb, match_isgroup);
     627                    RMATCH(11, stack.currentFrame->prev, stack.currentFrame->args.eptrb, match_isgroup);
    620628                    if (is_match)
    621629                        RRETURN;
    622630                } else { /* OP_KETRMAX */
    623                     RMATCH(12, stack.currentFrame->prev, stack.currentFrame->eptrb, match_isgroup);
     631                    RMATCH(12, stack.currentFrame->prev, stack.currentFrame->args.eptrb, match_isgroup);
    624632                    if (is_match)
    625633                        RRETURN;
    626                     RMATCH(13, stack.currentFrame->ecode + 1+LINK_SIZE, stack.currentFrame->eptrb, 0);
     634                    RMATCH(13, stack.currentFrame->args.ecode + 1+LINK_SIZE, stack.currentFrame->args.eptrb, 0);
    627635                    if (is_match)
    628636                        RRETURN;
     
    634642               
    635643                BEGIN_OPCODE(ALT):
    636                 do stack.currentFrame->ecode += GET(stack.currentFrame->ecode,1); while (*stack.currentFrame->ecode == OP_ALT);
     644                do stack.currentFrame->args.ecode += GET(stack.currentFrame->args.ecode,1); while (*stack.currentFrame->args.ecode == OP_ALT);
    637645                NEXT_OPCODE;
    638646               
     
    645653                BEGIN_OPCODE(BRAZERO):
    646654                {
    647                     stack.currentFrame->next = stack.currentFrame->ecode+1;
    648                     RMATCH(14, stack.currentFrame->next, stack.currentFrame->eptrb, match_isgroup);
     655                    stack.currentFrame->next = stack.currentFrame->args.ecode+1;
     656                    RMATCH(14, stack.currentFrame->next, stack.currentFrame->args.eptrb, match_isgroup);
    649657                    if (is_match)
    650658                        RRETURN;
    651659                    do stack.currentFrame->next += GET(stack.currentFrame->next,1); while (*stack.currentFrame->next == OP_ALT);
    652                     stack.currentFrame->ecode = stack.currentFrame->next + 1+LINK_SIZE;
     660                    stack.currentFrame->args.ecode = stack.currentFrame->next + 1+LINK_SIZE;
    653661                }
    654662                NEXT_OPCODE;
     
    656664                BEGIN_OPCODE(BRAMINZERO):
    657665                {
    658                     stack.currentFrame->next = stack.currentFrame->ecode+1;
     666                    stack.currentFrame->next = stack.currentFrame->args.ecode+1;
    659667                    do stack.currentFrame->next += GET(stack.currentFrame->next,1); while (*stack.currentFrame->next == OP_ALT);
    660                     RMATCH(15, stack.currentFrame->next + 1+LINK_SIZE, stack.currentFrame->eptrb, match_isgroup);
     668                    RMATCH(15, stack.currentFrame->next + 1+LINK_SIZE, stack.currentFrame->args.eptrb, match_isgroup);
    661669                    if (is_match)
    662670                        RRETURN;
    663                     stack.currentFrame->ecode++;
     671                    stack.currentFrame->args.ecode++;
    664672                }
    665673                NEXT_OPCODE;
     
    673681                BEGIN_OPCODE(KETRMIN):
    674682                BEGIN_OPCODE(KETRMAX):
    675                 stack.currentFrame->prev = stack.currentFrame->ecode - GET(stack.currentFrame->ecode, 1);
    676                 stack.currentFrame->saved_eptr = stack.currentFrame->eptrb->epb_saved_eptr;
     683                stack.currentFrame->prev = stack.currentFrame->args.ecode - GET(stack.currentFrame->args.ecode, 1);
     684                stack.currentFrame->saved_eptr = stack.currentFrame->args.eptrb->epb_saved_eptr;
    677685               
    678686                /* Back up the stack of bracket start pointers. */
    679687               
    680                 stack.currentFrame->eptrb = stack.currentFrame->eptrb->epb_prev;
     688                stack.currentFrame->args.eptrb = stack.currentFrame->args.eptrb->epb_prev;
    681689               
    682690                if (*stack.currentFrame->prev == OP_ASSERT || *stack.currentFrame->prev == OP_ASSERT_NOT || *stack.currentFrame->prev == OP_ONCE) {
    683                     md.end_match_ptr = stack.currentFrame->eptr;      /* For ONCE */
    684                     md.end_offset_top = stack.currentFrame->offset_top;
     691                    md.end_match_ptr = stack.currentFrame->args.eptr;      /* For ONCE */
     692                    md.end_offset_top = stack.currentFrame->args.offset_top;
    685693                    is_match = true;
    686694                    RRETURN;
     
    716724                        md.offset_vector[stack.currentFrame->offset] =
    717725                        md.offset_vector[md.offset_end - stack.currentFrame->number];
    718                         md.offset_vector[stack.currentFrame->offset+1] = stack.currentFrame->eptr - md.start_subject;
    719                         if (stack.currentFrame->offset_top <= stack.currentFrame->offset)
    720                             stack.currentFrame->offset_top = stack.currentFrame->offset + 2;
     726                        md.offset_vector[stack.currentFrame->offset+1] = stack.currentFrame->args.eptr - md.start_subject;
     727                        if (stack.currentFrame->args.offset_top <= stack.currentFrame->offset)
     728                            stack.currentFrame->args.offset_top = stack.currentFrame->offset + 2;
    721729                    }
    722730                }
     
    728736                 course of events. */
    729737               
    730                 if (*stack.currentFrame->ecode == OP_KET || stack.currentFrame->eptr == stack.currentFrame->saved_eptr) {
    731                     stack.currentFrame->ecode += 1 + LINK_SIZE;
     738                if (*stack.currentFrame->args.ecode == OP_KET || stack.currentFrame->args.eptr == stack.currentFrame->saved_eptr) {
     739                    stack.currentFrame->args.ecode += 1 + LINK_SIZE;
    732740                    NEXT_OPCODE;
    733741                }
     
    736744                 preceding bracket, in the appropriate order. */
    737745               
    738                 if (*stack.currentFrame->ecode == OP_KETRMIN) {
    739                     RMATCH(16, stack.currentFrame->ecode + 1+LINK_SIZE, stack.currentFrame->eptrb, 0);
     746                if (*stack.currentFrame->args.ecode == OP_KETRMIN) {
     747                    RMATCH(16, stack.currentFrame->args.ecode + 1+LINK_SIZE, stack.currentFrame->args.eptrb, 0);
    740748                    if (is_match)
    741749                        RRETURN;
    742                     RMATCH(17, stack.currentFrame->prev, stack.currentFrame->eptrb, match_isgroup);
     750                    RMATCH(17, stack.currentFrame->prev, stack.currentFrame->args.eptrb, match_isgroup);
    743751                    if (is_match)
    744752                        RRETURN;
    745753                } else { /* OP_KETRMAX */
    746                     RMATCH(18, stack.currentFrame->prev, stack.currentFrame->eptrb, match_isgroup);
     754                    RMATCH(18, stack.currentFrame->prev, stack.currentFrame->args.eptrb, match_isgroup);
    747755                    if (is_match)
    748756                        RRETURN;
    749                     RMATCH(19, stack.currentFrame->ecode + 1+LINK_SIZE, stack.currentFrame->eptrb, 0);
     757                    RMATCH(19, stack.currentFrame->args.ecode + 1+LINK_SIZE, stack.currentFrame->args.eptrb, 0);
    750758                    if (is_match)
    751759                        RRETURN;
     
    756764               
    757765                BEGIN_OPCODE(CIRC):
    758                 if (stack.currentFrame->eptr != md.start_subject && (!md.multiline || !isNewline(stack.currentFrame->eptr[-1])))
    759                     RRETURN_NO_MATCH;
    760                 stack.currentFrame->ecode++;
     766                if (stack.currentFrame->args.eptr != md.start_subject && (!md.multiline || !isNewline(stack.currentFrame->args.eptr[-1])))
     767                    RRETURN_NO_MATCH;
     768                stack.currentFrame->args.ecode++;
    761769                NEXT_OPCODE;
    762770               
     
    764772               
    765773                BEGIN_OPCODE(DOLL):
    766                 if (stack.currentFrame->eptr < md.end_subject && (!md.multiline || !isNewline(*stack.currentFrame->eptr)))
    767                     RRETURN_NO_MATCH;
    768                 stack.currentFrame->ecode++;
     774                if (stack.currentFrame->args.eptr < md.end_subject && (!md.multiline || !isNewline(*stack.currentFrame->args.eptr)))
     775                    RRETURN_NO_MATCH;
     776                stack.currentFrame->args.ecode++;
    769777                NEXT_OPCODE;
    770778               
     
    777785                 be "non-word" characters. */
    778786               
    779                 if (stack.currentFrame->eptr == md.start_subject)
     787                if (stack.currentFrame->args.eptr == md.start_subject)
    780788                    prev_is_word = false;
    781789                else {
    782                     const UChar* lastptr = stack.currentFrame->eptr - 1;
     790                    const UChar* lastptr = stack.currentFrame->args.eptr - 1;
    783791                    while(isTrailingSurrogate(*lastptr))
    784792                        lastptr--;
     
    786794                    prev_is_word = c < 128 && (md.ctypes[c] & ctype_word) != 0;
    787795                }
    788                 if (stack.currentFrame->eptr >= md.end_subject)
     796                if (stack.currentFrame->args.eptr >= md.end_subject)
    789797                    cur_is_word = false;
    790798                else {
    791                     getChar(c, stack.currentFrame->eptr);
     799                    getChar(c, stack.currentFrame->args.eptr);
    792800                    cur_is_word = c < 128 && (md.ctypes[c] & ctype_word) != 0;
    793801                }
     
    795803                /* Now see if the situation is what we want */
    796804               
    797                 if ((*stack.currentFrame->ecode++ == OP_WORD_BOUNDARY) ? cur_is_word == prev_is_word : cur_is_word != prev_is_word)
     805                if ((*stack.currentFrame->args.ecode++ == OP_WORD_BOUNDARY) ? cur_is_word == prev_is_word : cur_is_word != prev_is_word)
    798806                    RRETURN_NO_MATCH;
    799807                NEXT_OPCODE;
     
    802810               
    803811                BEGIN_OPCODE(ANY):
    804                 if (stack.currentFrame->eptr < md.end_subject && isNewline(*stack.currentFrame->eptr))
    805                     RRETURN_NO_MATCH;
    806                 if (stack.currentFrame->eptr++ >= md.end_subject)
    807                     RRETURN_NO_MATCH;
    808                 while (stack.currentFrame->eptr < md.end_subject && isTrailingSurrogate(*stack.currentFrame->eptr))
    809                     stack.currentFrame->eptr++;
    810                 stack.currentFrame->ecode++;
     812                if (stack.currentFrame->args.eptr < md.end_subject && isNewline(*stack.currentFrame->args.eptr))
     813                    RRETURN_NO_MATCH;
     814                if (stack.currentFrame->args.eptr++ >= md.end_subject)
     815                    RRETURN_NO_MATCH;
     816                while (stack.currentFrame->args.eptr < md.end_subject && isTrailingSurrogate(*stack.currentFrame->args.eptr))
     817                    stack.currentFrame->args.eptr++;
     818                stack.currentFrame->args.ecode++;
    811819                NEXT_OPCODE;
    812820               
    813821                BEGIN_OPCODE(NOT_DIGIT):
    814                 if (stack.currentFrame->eptr >= md.end_subject)
    815                     RRETURN_NO_MATCH;
    816                 GETCHARINCTEST(c, stack.currentFrame->eptr);
     822                if (stack.currentFrame->args.eptr >= md.end_subject)
     823                    RRETURN_NO_MATCH;
     824                GETCHARINCTEST(c, stack.currentFrame->args.eptr);
    817825                if (isASCIIDigit(c))
    818826                    RRETURN_NO_MATCH;
    819                 stack.currentFrame->ecode++;
     827                stack.currentFrame->args.ecode++;
    820828                NEXT_OPCODE;
    821829               
    822830                BEGIN_OPCODE(DIGIT):
    823                 if (stack.currentFrame->eptr >= md.end_subject)
    824                     RRETURN_NO_MATCH;
    825                 GETCHARINCTEST(c, stack.currentFrame->eptr);
     831                if (stack.currentFrame->args.eptr >= md.end_subject)
     832                    RRETURN_NO_MATCH;
     833                GETCHARINCTEST(c, stack.currentFrame->args.eptr);
    826834                if (!isASCIIDigit(c))
    827835                    RRETURN_NO_MATCH;
    828                 stack.currentFrame->ecode++;
     836                stack.currentFrame->args.ecode++;
    829837                NEXT_OPCODE;
    830838               
    831839                BEGIN_OPCODE(NOT_WHITESPACE):
    832                 if (stack.currentFrame->eptr >= md.end_subject)
    833                     RRETURN_NO_MATCH;
    834                 GETCHARINCTEST(c, stack.currentFrame->eptr);
     840                if (stack.currentFrame->args.eptr >= md.end_subject)
     841                    RRETURN_NO_MATCH;
     842                GETCHARINCTEST(c, stack.currentFrame->args.eptr);
    835843                if (c < 128 && (md.ctypes[c] & ctype_space))
    836844                    RRETURN_NO_MATCH;
    837                 stack.currentFrame->ecode++;
     845                stack.currentFrame->args.ecode++;
    838846                NEXT_OPCODE;
    839847               
    840848                BEGIN_OPCODE(WHITESPACE):
    841                 if (stack.currentFrame->eptr >= md.end_subject)
    842                     RRETURN_NO_MATCH;
    843                 GETCHARINCTEST(c, stack.currentFrame->eptr);
     849                if (stack.currentFrame->args.eptr >= md.end_subject)
     850                    RRETURN_NO_MATCH;
     851                GETCHARINCTEST(c, stack.currentFrame->args.eptr);
    844852                if (c >= 128 || !(md.ctypes[c] & ctype_space))
    845853                    RRETURN_NO_MATCH;
    846                 stack.currentFrame->ecode++;
     854                stack.currentFrame->args.ecode++;
    847855                NEXT_OPCODE;
    848856               
    849857                BEGIN_OPCODE(NOT_WORDCHAR):
    850                 if (stack.currentFrame->eptr >= md.end_subject)
    851                     RRETURN_NO_MATCH;
    852                 GETCHARINCTEST(c, stack.currentFrame->eptr);
     858                if (stack.currentFrame->args.eptr >= md.end_subject)
     859                    RRETURN_NO_MATCH;
     860                GETCHARINCTEST(c, stack.currentFrame->args.eptr);
    853861                if (c < 128 && (md.ctypes[c] & ctype_word))
    854862                    RRETURN_NO_MATCH;
    855                 stack.currentFrame->ecode++;
     863                stack.currentFrame->args.ecode++;
    856864                NEXT_OPCODE;
    857865               
    858866                BEGIN_OPCODE(WORDCHAR):
    859                 if (stack.currentFrame->eptr >= md.end_subject)
    860                     RRETURN_NO_MATCH;
    861                 GETCHARINCTEST(c, stack.currentFrame->eptr);
     867                if (stack.currentFrame->args.eptr >= md.end_subject)
     868                    RRETURN_NO_MATCH;
     869                GETCHARINCTEST(c, stack.currentFrame->args.eptr);
    862870                if (c >= 128 || !(md.ctypes[c] & ctype_word))
    863871                    RRETURN_NO_MATCH;
    864                 stack.currentFrame->ecode++;
     872                stack.currentFrame->args.ecode++;
    865873                NEXT_OPCODE;
    866874               
     
    874882               
    875883                BEGIN_OPCODE(REF):
    876                 stack.currentFrame->offset = GET2(stack.currentFrame->ecode, 1) << 1;               /* Doubled ref number */
    877                 stack.currentFrame->ecode += 3;                                 /* Advance past item */
     884                stack.currentFrame->offset = GET2(stack.currentFrame->args.ecode, 1) << 1;               /* Doubled ref number */
     885                stack.currentFrame->args.ecode += 3;                                 /* Advance past item */
    878886               
    879887                /* If the reference is unset, set the length to be longer than the amount
     
    882890                 minima. */
    883891               
    884                 if (stack.currentFrame->offset >= stack.currentFrame->offset_top || md.offset_vector[stack.currentFrame->offset] < 0)
     892                if (stack.currentFrame->offset >= stack.currentFrame->args.offset_top || md.offset_vector[stack.currentFrame->offset] < 0)
    885893                    stack.currentFrame->length = 0;
    886894                else
     
    889897                /* Set up for repetition, or handle the non-repeated case */
    890898               
    891                 switch (*stack.currentFrame->ecode) {
     899                switch (*stack.currentFrame->args.ecode) {
    892900                case OP_CRSTAR:
    893901                case OP_CRMINSTAR:
     
    896904                case OP_CRQUERY:
    897905                case OP_CRMINQUERY:
    898                     c = *stack.currentFrame->ecode++ - OP_CRSTAR;
     906                    c = *stack.currentFrame->args.ecode++ - OP_CRSTAR;
    899907                    minimize = (c & 1) != 0;
    900908                    min = rep_min[c];                 /* Pick up values from tables; */
     
    906914                case OP_CRRANGE:
    907915                case OP_CRMINRANGE:
    908                     minimize = (*stack.currentFrame->ecode == OP_CRMINRANGE);
    909                     min = GET2(stack.currentFrame->ecode, 1);
    910                     stack.currentFrame->max = GET2(stack.currentFrame->ecode, 3);
     916                    minimize = (*stack.currentFrame->args.ecode == OP_CRMINRANGE);
     917                    min = GET2(stack.currentFrame->args.ecode, 1);
     918                    stack.currentFrame->max = GET2(stack.currentFrame->args.ecode, 3);
    911919                    if (stack.currentFrame->max == 0)
    912920                        stack.currentFrame->max = INT_MAX;
    913                     stack.currentFrame->ecode += 5;
     921                    stack.currentFrame->args.ecode += 5;
    914922                    break;
    915923               
    916924                default:               /* No repeat follows */
    917                     if (!match_ref(stack.currentFrame->offset, stack.currentFrame->eptr, stack.currentFrame->length, md))
     925                    if (!match_ref(stack.currentFrame->offset, stack.currentFrame->args.eptr, stack.currentFrame->length, md))
    918926                        RRETURN_NO_MATCH;
    919                     stack.currentFrame->eptr += stack.currentFrame->length;
     927                    stack.currentFrame->args.eptr += stack.currentFrame->length;
    920928                    NEXT_OPCODE;
    921929                }
     
    930938               
    931939                for (i = 1; i <= min; i++) {
    932                     if (!match_ref(stack.currentFrame->offset, stack.currentFrame->eptr, stack.currentFrame->length, md))
     940                    if (!match_ref(stack.currentFrame->offset, stack.currentFrame->args.eptr, stack.currentFrame->length, md))
    933941                        RRETURN_NO_MATCH;
    934                     stack.currentFrame->eptr += stack.currentFrame->length;
     942                    stack.currentFrame->args.eptr += stack.currentFrame->length;
    935943                }
    936944               
     
    945953                if (minimize) {
    946954                    for (stack.currentFrame->fi = min;; stack.currentFrame->fi++) {
    947                         RMATCH(20, stack.currentFrame->ecode, stack.currentFrame->eptrb, 0);
     955                        RMATCH(20, stack.currentFrame->args.ecode, stack.currentFrame->args.eptrb, 0);
    948956                        if (is_match)
    949957                            RRETURN;
    950                         if (stack.currentFrame->fi >= stack.currentFrame->max || !match_ref(stack.currentFrame->offset, stack.currentFrame->eptr, stack.currentFrame->length, md))
     958                        if (stack.currentFrame->fi >= stack.currentFrame->max || !match_ref(stack.currentFrame->offset, stack.currentFrame->args.eptr, stack.currentFrame->length, md))
    951959                            RRETURN;
    952                         stack.currentFrame->eptr += stack.currentFrame->length;
     960                        stack.currentFrame->args.eptr += stack.currentFrame->length;
    953961                    }
    954962                    /* Control never reaches here */
     
    958966               
    959967                else {
    960                     stack.currentFrame->pp = stack.currentFrame->eptr;
     968                    stack.currentFrame->pp = stack.currentFrame->args.eptr;
    961969                    for (i = min; i < stack.currentFrame->max; i++) {
    962                         if (!match_ref(stack.currentFrame->offset, stack.currentFrame->eptr, stack.currentFrame->length, md))
    963                             break;
    964                         stack.currentFrame->eptr += stack.currentFrame->length;
    965                     }
    966                     while (stack.currentFrame->eptr >= stack.currentFrame->pp) {
    967                         RMATCH(21, stack.currentFrame->ecode, stack.currentFrame->eptrb, 0);
     970                        if (!match_ref(stack.currentFrame->offset, stack.currentFrame->args.eptr, stack.currentFrame->length, md))
     971                            break;
     972                        stack.currentFrame->args.eptr += stack.currentFrame->length;
     973                    }
     974                    while (stack.currentFrame->args.eptr >= stack.currentFrame->pp) {
     975                        RMATCH(21, stack.currentFrame->args.ecode, stack.currentFrame->args.eptrb, 0);
    968976                        if (is_match)
    969977                            RRETURN;
    970                         stack.currentFrame->eptr -= stack.currentFrame->length;
     978                        stack.currentFrame->args.eptr -= stack.currentFrame->length;
    971979                    }
    972980                    RRETURN_NO_MATCH;
     
    987995                BEGIN_OPCODE(NCLASS):
    988996                BEGIN_OPCODE(CLASS):
    989                 stack.currentFrame->data = stack.currentFrame->ecode + 1;                /* Save for matching */
    990                 stack.currentFrame->ecode += 33;                     /* Advance past the item */
    991                
    992                 switch (*stack.currentFrame->ecode) {
     997                stack.currentFrame->data = stack.currentFrame->args.ecode + 1;                /* Save for matching */
     998                stack.currentFrame->args.ecode += 33;                     /* Advance past the item */
     999               
     1000                switch (*stack.currentFrame->args.ecode) {
    9931001                case OP_CRSTAR:
    9941002                case OP_CRMINSTAR:
     
    9971005                case OP_CRQUERY:
    9981006                case OP_CRMINQUERY:
    999                     c = *stack.currentFrame->ecode++ - OP_CRSTAR;
     1007                    c = *stack.currentFrame->args.ecode++ - OP_CRSTAR;
    10001008                    minimize = (c & 1) != 0;
    10011009                    min = rep_min[c];                 /* Pick up values from tables; */
     
    10071015                case OP_CRRANGE:
    10081016                case OP_CRMINRANGE:
    1009                     minimize = (*stack.currentFrame->ecode == OP_CRMINRANGE);
    1010                     min = GET2(stack.currentFrame->ecode, 1);
    1011                     stack.currentFrame->max = GET2(stack.currentFrame->ecode, 3);
     1017                    minimize = (*stack.currentFrame->args.ecode == OP_CRMINRANGE);
     1018                    min = GET2(stack.currentFrame->args.ecode, 1);
     1019                    stack.currentFrame->max = GET2(stack.currentFrame->args.ecode, 3);
    10121020                    if (stack.currentFrame->max == 0)
    10131021                        stack.currentFrame->max = INT_MAX;
    1014                     stack.currentFrame->ecode += 5;
     1022                    stack.currentFrame->args.ecode += 5;
    10151023                    break;
    10161024                   
     
    10231031               
    10241032                for (i = 1; i <= min; i++) {
    1025                     if (stack.currentFrame->eptr >= md.end_subject)
     1033                    if (stack.currentFrame->args.eptr >= md.end_subject)
    10261034                        RRETURN_NO_MATCH;
    1027                     GETCHARINC(c, stack.currentFrame->eptr);
     1035                    GETCHARINC(c, stack.currentFrame->args.eptr);
    10281036                    if (c > 255) {
    10291037                        if (stack.currentFrame->data[-1] == OP_CLASS)
     
    10441052                 the pointer while it matches the class. */
    10451053                if (minimize) {
    1046                     {
    1047                         for (stack.currentFrame->fi = min;; stack.currentFrame->fi++) {
    1048                             RMATCH(22, stack.currentFrame->ecode, stack.currentFrame->eptrb, 0);
    1049                             if (is_match)
     1054                    for (stack.currentFrame->fi = min;; stack.currentFrame->fi++) {
     1055                        RMATCH(22, stack.currentFrame->args.ecode, stack.currentFrame->args.eptrb, 0);
     1056                        if (is_match)
     1057                            RRETURN;
     1058                        if (stack.currentFrame->fi >= stack.currentFrame->max || stack.currentFrame->args.eptr >= md.end_subject)
     1059                            RRETURN;
     1060                        GETCHARINC(c, stack.currentFrame->args.eptr);
     1061                        if (c > 255) {
     1062                            if (stack.currentFrame->data[-1] == OP_CLASS)
    10501063                                RRETURN;
    1051                             if (stack.currentFrame->fi >= stack.currentFrame->max || stack.currentFrame->eptr >= md.end_subject)
     1064                        } else {
     1065                            if ((stack.currentFrame->data[c/8] & (1 << (c&7))) == 0)
    10521066                                RRETURN;
    1053                             GETCHARINC(c, stack.currentFrame->eptr);
    1054                             if (c > 255) {
    1055                                 if (stack.currentFrame->data[-1] == OP_CLASS)
    1056                                     RRETURN;
    1057                             } else {
    1058                                 if ((stack.currentFrame->data[c/8] & (1 << (c&7))) == 0)
    1059                                     RRETURN;
    1060                             }
    10611067                        }
    10621068                    }
     
    10651071                /* If maximizing, find the longest possible run, then work backwards. */
    10661072                else {
    1067                     stack.currentFrame->pp = stack.currentFrame->eptr;
     1073                    stack.currentFrame->pp = stack.currentFrame->args.eptr;
    10681074                   
    10691075                    for (i = min; i < stack.currentFrame->max; i++) {
    10701076                        int len = 1;
    1071                         if (stack.currentFrame->eptr >= md.end_subject)
    1072                             break;
    1073                         GETCHARLEN(c, stack.currentFrame->eptr, len);
     1077                        if (stack.currentFrame->args.eptr >= md.end_subject)
     1078                            break;
     1079                        GETCHARLEN(c, stack.currentFrame->args.eptr, len);
    10741080                        if (c > 255) {
    10751081                            if (stack.currentFrame->data[-1] == OP_CLASS)
     
    10791085                                break;
    10801086                        }
    1081                         stack.currentFrame->eptr += len;
     1087                        stack.currentFrame->args.eptr += len;
    10821088                    }
    10831089                    for (;;) {
    1084                         RMATCH(24, stack.currentFrame->ecode, stack.currentFrame->eptrb, 0);
     1090                        RMATCH(24, stack.currentFrame->args.ecode, stack.currentFrame->args.eptrb, 0);
    10851091                        if (is_match)
    10861092                            RRETURN;
    1087                         if (stack.currentFrame->eptr-- == stack.currentFrame->pp)
     1093                        if (stack.currentFrame->args.eptr-- == stack.currentFrame->pp)
    10881094                            break;        /* Stop if tried at original pos */
    1089                         BACKCHAR(stack.currentFrame->eptr);
     1095                        BACKCHAR(stack.currentFrame->args.eptr);
    10901096                    }
    10911097                   
     
    10981104               
    10991105                BEGIN_OPCODE(XCLASS):
    1100                 stack.currentFrame->data = stack.currentFrame->ecode + 1 + LINK_SIZE;                /* Save for matching */
    1101                 stack.currentFrame->ecode += GET(stack.currentFrame->ecode, 1);                      /* Advance past the item */
    1102                
    1103                 switch (*stack.currentFrame->ecode) {
     1106                stack.currentFrame->data = stack.currentFrame->args.ecode + 1 + LINK_SIZE;                /* Save for matching */
     1107                stack.currentFrame->args.ecode += GET(stack.currentFrame->args.ecode, 1);                      /* Advance past the item */
     1108               
     1109                switch (*stack.currentFrame->args.ecode) {
    11041110                case OP_CRSTAR:
    11051111                case OP_CRMINSTAR:
     
    11081114                case OP_CRQUERY:
    11091115                case OP_CRMINQUERY:
    1110                     c = *stack.currentFrame->ecode++ - OP_CRSTAR;
     1116                    c = *stack.currentFrame->args.ecode++ - OP_CRSTAR;
    11111117                    minimize = (c & 1) != 0;
    11121118                    min = rep_min[c];                 /* Pick up values from tables; */
     
    11181124                case OP_CRRANGE:
    11191125                case OP_CRMINRANGE:
    1120                     minimize = (*stack.currentFrame->ecode == OP_CRMINRANGE);
    1121                     min = GET2(stack.currentFrame->ecode, 1);
    1122                     stack.currentFrame->max = GET2(stack.currentFrame->ecode, 3);
     1126                    minimize = (*stack.currentFrame->args.ecode == OP_CRMINRANGE);
     1127                    min = GET2(stack.currentFrame->args.ecode, 1);
     1128                    stack.currentFrame->max = GET2(stack.currentFrame->args.ecode, 3);
    11231129                    if (stack.currentFrame->max == 0)
    11241130                        stack.currentFrame->max = INT_MAX;
    1125                     stack.currentFrame->ecode += 5;
     1131                    stack.currentFrame->args.ecode += 5;
    11261132                    break;
    11271133                   
     
    11331139               
    11341140                for (i = 1; i <= min; i++) {
    1135                     if (stack.currentFrame->eptr >= md.end_subject)
     1141                    if (stack.currentFrame->args.eptr >= md.end_subject)
    11361142                        RRETURN_NO_MATCH;
    1137                     GETCHARINC(c, stack.currentFrame->eptr);
     1143                    GETCHARINC(c, stack.currentFrame->args.eptr);
    11381144                    if (!_pcre_xclass(c, stack.currentFrame->data))
    11391145                        RRETURN_NO_MATCH;
     
    11511157                if (minimize) {
    11521158                    for (stack.currentFrame->fi = min;; stack.currentFrame->fi++) {
    1153                         RMATCH(26, stack.currentFrame->ecode, stack.currentFrame->eptrb, 0);
     1159                        RMATCH(26, stack.currentFrame->args.ecode, stack.currentFrame->args.eptrb, 0);
    11541160                        if (is_match)
    11551161                            RRETURN;
    1156                         if (stack.currentFrame->fi >= stack.currentFrame->max || stack.currentFrame->eptr >= md.end_subject)
     1162                        if (stack.currentFrame->fi >= stack.currentFrame->max || stack.currentFrame->args.eptr >= md.end_subject)
    11571163                            RRETURN;
    1158                         GETCHARINC(c, stack.currentFrame->eptr);
     1164                        GETCHARINC(c, stack.currentFrame->args.eptr);
    11591165                        if (!_pcre_xclass(c, stack.currentFrame->data))
    11601166                            RRETURN;
     
    11661172               
    11671173                else {
    1168                     stack.currentFrame->pp = stack.currentFrame->eptr;
     1174                    stack.currentFrame->pp = stack.currentFrame->args.eptr;
    11691175                    for (i = min; i < stack.currentFrame->max; i++) {
    11701176                        int len = 1;
    1171                         if (stack.currentFrame->eptr >= md.end_subject)
    1172                             break;
    1173                         GETCHARLEN(c, stack.currentFrame->eptr, len);
     1177                        if (stack.currentFrame->args.eptr >= md.end_subject)
     1178                            break;
     1179                        GETCHARLEN(c, stack.currentFrame->args.eptr, len);
    11741180                        if (!_pcre_xclass(c, stack.currentFrame->data))
    11751181                            break;
    1176                         stack.currentFrame->eptr += len;
     1182                        stack.currentFrame->args.eptr += len;
    11771183                    }
    11781184                    for(;;) {
    1179                         RMATCH(27, stack.currentFrame->ecode, stack.currentFrame->eptrb, 0);
     1185                        RMATCH(27, stack.currentFrame->args.ecode, stack.currentFrame->args.eptrb, 0);
    11801186                        if (is_match)
    11811187                            RRETURN;
    1182                         if (stack.currentFrame->eptr-- == stack.currentFrame->pp)
     1188                        if (stack.currentFrame->args.eptr-- == stack.currentFrame->pp)
    11831189                            break;        /* Stop if tried at original pos */
    1184                         BACKCHAR(stack.currentFrame->eptr)
     1190                        BACKCHAR(stack.currentFrame->args.eptr)
    11851191                    }
    11861192                    RRETURN;
     
    11931199                BEGIN_OPCODE(CHAR):
    11941200                stack.currentFrame->length = 1;
    1195                 stack.currentFrame->ecode++;
    1196                 getUTF8CharAndIncrementLength(stack.currentFrame->fc, stack.currentFrame->ecode, stack.currentFrame->length);
     1201                stack.currentFrame->args.ecode++;
     1202                getUTF8CharAndIncrementLength(stack.currentFrame->fc, stack.currentFrame->args.ecode, stack.currentFrame->length);
    11971203            {
    11981204                int dc;
    1199                 stack.currentFrame->ecode += stack.currentFrame->length;
    1200                 switch (md.end_subject - stack.currentFrame->eptr) {
     1205                stack.currentFrame->args.ecode += stack.currentFrame->length;
     1206                switch (md.end_subject - stack.currentFrame->args.eptr) {
    12011207                case 0:
    12021208                    RRETURN_NO_MATCH;
    12031209                case 1:
    1204                     dc = *stack.currentFrame->eptr++;
     1210                    dc = *stack.currentFrame->args.eptr++;
    12051211                    if (isLeadingSurrogate(dc))
    12061212                        RRETURN_NO_MATCH;
    12071213                    break;
    12081214                    default:
    1209                     GETCHARINC(dc, stack.currentFrame->eptr);
     1215                    GETCHARINC(dc, stack.currentFrame->args.eptr);
    12101216                }
    12111217                if (stack.currentFrame->fc != dc)
     
    12181224                BEGIN_OPCODE(CHARNC):
    12191225                stack.currentFrame->length = 1;
    1220                 stack.currentFrame->ecode++;
    1221                 getUTF8CharAndIncrementLength(stack.currentFrame->fc, stack.currentFrame->ecode, stack.currentFrame->length);
    1222                
    1223                 if (md.end_subject - stack.currentFrame->eptr == 0)
     1226                stack.currentFrame->args.ecode++;
     1227                getUTF8CharAndIncrementLength(stack.currentFrame->fc, stack.currentFrame->args.ecode, stack.currentFrame->length);
     1228               
     1229                if (md.end_subject - stack.currentFrame->args.eptr == 0)
    12241230                    RRETURN_NO_MATCH;
    12251231               
    12261232            {
    12271233                int dc;
    1228                 if (md.end_subject - stack.currentFrame->eptr == 1) {
    1229                     dc = *stack.currentFrame->eptr++;
     1234                if (md.end_subject - stack.currentFrame->args.eptr == 1) {
     1235                    dc = *stack.currentFrame->args.eptr++;
    12301236                    if (isLeadingSurrogate(dc))
    12311237                        RRETURN_NO_MATCH;
    12321238                } else
    1233                     GETCHARINC(dc, stack.currentFrame->eptr);
    1234                 stack.currentFrame->ecode += stack.currentFrame->length;
     1239                    GETCHARINC(dc, stack.currentFrame->args.eptr);
     1240                stack.currentFrame->args.ecode += stack.currentFrame->length;
    12351241               
    12361242                /* If we have Unicode property support, we can use it to test the other
     
    12471253               
    12481254                BEGIN_OPCODE(ASCII_CHAR):
    1249                 if (md.end_subject == stack.currentFrame->eptr)
    1250                     RRETURN_NO_MATCH;
    1251                 if (*stack.currentFrame->eptr != stack.currentFrame->ecode[1])
    1252                     RRETURN_NO_MATCH;
    1253                 ++stack.currentFrame->eptr;
    1254                 stack.currentFrame->ecode += 2;
     1255                if (md.end_subject == stack.currentFrame->args.eptr)
     1256                    RRETURN_NO_MATCH;
     1257                if (*stack.currentFrame->args.eptr != stack.currentFrame->args.ecode[1])
     1258                    RRETURN_NO_MATCH;
     1259                ++stack.currentFrame->args.eptr;
     1260                stack.currentFrame->args.ecode += 2;
    12551261                NEXT_OPCODE;
    12561262               
     
    12581264               
    12591265                BEGIN_OPCODE(ASCII_LETTER_NC):
    1260                 if (md.end_subject == stack.currentFrame->eptr)
    1261                     RRETURN_NO_MATCH;
    1262                 if ((*stack.currentFrame->eptr | 0x20) != stack.currentFrame->ecode[1])
    1263                     RRETURN_NO_MATCH;
    1264                 ++stack.currentFrame->eptr;
    1265                 stack.currentFrame->ecode += 2;
     1266                if (md.end_subject == stack.currentFrame->args.eptr)
     1267                    RRETURN_NO_MATCH;
     1268                if ((*stack.currentFrame->args.eptr | 0x20) != stack.currentFrame->args.ecode[1])
     1269                    RRETURN_NO_MATCH;
     1270                ++stack.currentFrame->args.eptr;
     1271                stack.currentFrame->args.ecode += 2;
    12661272                NEXT_OPCODE;
    12671273               
     
    12691275               
    12701276                BEGIN_OPCODE(EXACT):
    1271                 min = stack.currentFrame->max = GET2(stack.currentFrame->ecode, 1);
     1277                min = stack.currentFrame->max = GET2(stack.currentFrame->args.ecode, 1);
    12721278                minimize = false;
    1273                 stack.currentFrame->ecode += 3;
     1279                stack.currentFrame->args.ecode += 3;
    12741280                goto REPEATCHAR;
    12751281               
     
    12771283                BEGIN_OPCODE(MINUPTO):
    12781284                min = 0;
    1279                 stack.currentFrame->max = GET2(stack.currentFrame->ecode, 1);
    1280                 minimize = *stack.currentFrame->ecode == OP_MINUPTO;
    1281                 stack.currentFrame->ecode += 3;
     1285                stack.currentFrame->max = GET2(stack.currentFrame->args.ecode, 1);
     1286                minimize = *stack.currentFrame->args.ecode == OP_MINUPTO;
     1287                stack.currentFrame->args.ecode += 3;
    12821288                goto REPEATCHAR;
    12831289               
     
    12881294                BEGIN_OPCODE(QUERY):
    12891295                BEGIN_OPCODE(MINQUERY):
    1290                 c = *stack.currentFrame->ecode++ - OP_STAR;
     1296                c = *stack.currentFrame->args.ecode++ - OP_STAR;
    12911297                minimize = (c & 1) != 0;
    12921298                min = rep_min[c];                 /* Pick up values from tables; */
     
    13021308               
    13031309                stack.currentFrame->length = 1;
    1304                 getUTF8CharAndIncrementLength(stack.currentFrame->fc, stack.currentFrame->ecode, stack.currentFrame->length);
    1305                 if (min * (stack.currentFrame->fc > 0xFFFF ? 2 : 1) > md.end_subject - stack.currentFrame->eptr)
    1306                     RRETURN_NO_MATCH;
    1307                 stack.currentFrame->ecode += stack.currentFrame->length;
     1310                getUTF8CharAndIncrementLength(stack.currentFrame->fc, stack.currentFrame->args.ecode, stack.currentFrame->length);
     1311                if (min * (stack.currentFrame->fc > 0xFFFF ? 2 : 1) > md.end_subject - stack.currentFrame->args.eptr)
     1312                    RRETURN_NO_MATCH;
     1313                stack.currentFrame->args.ecode += stack.currentFrame->length;
    13081314               
    13091315                if (stack.currentFrame->fc <= 0xFFFF) {
     
    13111317                   
    13121318                    for (i = 1; i <= min; i++) {
    1313                         if (*stack.currentFrame->eptr != stack.currentFrame->fc && *stack.currentFrame->eptr != othercase)
     1319                        if (*stack.currentFrame->args.eptr != stack.currentFrame->fc && *stack.currentFrame->args.eptr != othercase)
    13141320                            RRETURN_NO_MATCH;
    1315                         ++stack.currentFrame->eptr;
     1321                        ++stack.currentFrame->args.eptr;
    13161322                    }
    13171323                   
     
    13221328                        stack.currentFrame->repeat_othercase = othercase;
    13231329                        for (stack.currentFrame->fi = min;; stack.currentFrame->fi++) {
    1324                             RMATCH(28, stack.currentFrame->ecode, stack.currentFrame->eptrb, 0);
     1330                            RMATCH(28, stack.currentFrame->args.ecode, stack.currentFrame->args.eptrb, 0);
    13251331                            if (is_match)
    13261332                                RRETURN;
    1327                             if (stack.currentFrame->fi >= stack.currentFrame->max || stack.currentFrame->eptr >= md.end_subject)
     1333                            if (stack.currentFrame->fi >= stack.currentFrame->max || stack.currentFrame->args.eptr >= md.end_subject)
    13281334                                RRETURN;
    1329                             if (*stack.currentFrame->eptr != stack.currentFrame->fc && *stack.currentFrame->eptr != stack.currentFrame->repeat_othercase)
     1335                            if (*stack.currentFrame->args.eptr != stack.currentFrame->fc && *stack.currentFrame->args.eptr != stack.currentFrame->repeat_othercase)
    13301336                                RRETURN;
    1331                             ++stack.currentFrame->eptr;
     1337                            ++stack.currentFrame->args.eptr;
    13321338                        }
    13331339                        /* Control never reaches here */
    13341340                    } else {
    1335                         stack.currentFrame->pp = stack.currentFrame->eptr;
     1341                        stack.currentFrame->pp = stack.currentFrame->args.eptr;
    13361342                        for (i = min; i < stack.currentFrame->max; i++) {
    1337                             if (stack.currentFrame->eptr >= md.end_subject)
     1343                            if (stack.currentFrame->args.eptr >= md.end_subject)
    13381344                                break;
    1339                             if (*stack.currentFrame->eptr != stack.currentFrame->fc && *stack.currentFrame->eptr != othercase)
     1345                            if (*stack.currentFrame->args.eptr != stack.currentFrame->fc && *stack.currentFrame->args.eptr != othercase)
    13401346                                break;
    1341                             ++stack.currentFrame->eptr;
     1347                            ++stack.currentFrame->args.eptr;
    13421348                        }
    1343                         while (stack.currentFrame->eptr >= stack.currentFrame->pp) {
    1344                             RMATCH(29, stack.currentFrame->ecode, stack.currentFrame->eptrb, 0);
     1349                        while (stack.currentFrame->args.eptr >= stack.currentFrame->pp) {
     1350                            RMATCH(29, stack.currentFrame->args.ecode, stack.currentFrame->args.eptrb, 0);
    13451351                            if (is_match)
    13461352                                RRETURN;
    1347                             --stack.currentFrame->eptr;
     1353                            --stack.currentFrame->args.eptr;
    13481354                        }
    13491355                        RRETURN_NO_MATCH;
     
    13551361                    for (i = 1; i <= min; i++) {
    13561362                        int nc;
    1357                         getChar(nc, stack.currentFrame->eptr);
     1363                        getChar(nc, stack.currentFrame->args.eptr);
    13581364                        if (nc != stack.currentFrame->fc)
    13591365                            RRETURN_NO_MATCH;
    1360                         stack.currentFrame->eptr += 2;
     1366                        stack.currentFrame->args.eptr += 2;
    13611367                    }
    13621368                   
     
    13671373                        for (stack.currentFrame->fi = min;; stack.currentFrame->fi++) {
    13681374                            int nc;
    1369                             RMATCH(30, stack.currentFrame->ecode, stack.currentFrame->eptrb, 0);
     1375                            RMATCH(30, stack.currentFrame->args.ecode, stack.currentFrame->args.eptrb, 0);
    13701376                            if (is_match)
    13711377                                RRETURN;
    1372                             if (stack.currentFrame->fi >= stack.currentFrame->max || stack.currentFrame->eptr >= md.end_subject)
     1378                            if (stack.currentFrame->fi >= stack.currentFrame->max || stack.currentFrame->args.eptr >= md.end_subject)
    13731379                                RRETURN;
    1374                             getChar(nc, stack.currentFrame->eptr);
    1375                             if (*stack.currentFrame->eptr != stack.currentFrame->fc)
     1380                            getChar(nc, stack.currentFrame->args.eptr);
     1381                            if (*stack.currentFrame->args.eptr != stack.currentFrame->fc)
    13761382                                RRETURN;
    1377                             stack.currentFrame->eptr += 2;
     1383                            stack.currentFrame->args.eptr += 2;
    13781384                        }
    13791385                        /* Control never reaches here */
    13801386                    } else {
    1381                         stack.currentFrame->pp = stack.currentFrame->eptr;
     1387                        stack.currentFrame->pp = stack.currentFrame->args.eptr;
    13821388                        for (i = min; i < stack.currentFrame->max; i++) {
    13831389                            int nc;
    1384                             if (stack.currentFrame->eptr > md.end_subject - 2)
     1390                            if (stack.currentFrame->args.eptr > md.end_subject - 2)
    13851391                                break;
    1386                             getChar(nc, stack.currentFrame->eptr);
    1387                             if (*stack.currentFrame->eptr != stack.currentFrame->fc)
     1392                            getChar(nc, stack.currentFrame->args.eptr);
     1393                            if (*stack.currentFrame->args.eptr != stack.currentFrame->fc)
    13881394                                break;
    1389                             stack.currentFrame->eptr += 2;
     1395                            stack.currentFrame->args.eptr += 2;
    13901396                        }
    1391                         while (stack.currentFrame->eptr >= stack.currentFrame->pp) {
    1392                             RMATCH(31, stack.currentFrame->ecode, stack.currentFrame->eptrb, 0);
     1397                        while (stack.currentFrame->args.eptr >= stack.currentFrame->pp) {
     1398                            RMATCH(31, stack.currentFrame->args.ecode, stack.currentFrame->args.eptrb, 0);
    13931399                            if (is_match)
    13941400                                RRETURN;
    1395                             stack.currentFrame->eptr -= 2;
     1401                            stack.currentFrame->args.eptr -= 2;
    13961402                        }
    13971403                        RRETURN_NO_MATCH;
     
    14051411               
    14061412                BEGIN_OPCODE(NOT):
    1407                 if (stack.currentFrame->eptr >= md.end_subject)
    1408                     RRETURN_NO_MATCH;
    1409                 stack.currentFrame->ecode++;
    1410                 GETCHARINCTEST(c, stack.currentFrame->eptr);
     1413                if (stack.currentFrame->args.eptr >= md.end_subject)
     1414                    RRETURN_NO_MATCH;
     1415                stack.currentFrame->args.ecode++;
     1416                GETCHARINCTEST(c, stack.currentFrame->args.eptr);
    14111417                if (md.ignoreCase) {
    14121418                    if (c < 128)
    14131419                        c = md.lowerCaseChars[c];
    1414                     if (md.lowerCaseChars[*stack.currentFrame->ecode++] == c)
     1420                    if (md.lowerCaseChars[*stack.currentFrame->args.ecode++] == c)
    14151421                        RRETURN_NO_MATCH;
    14161422                } else {
    1417                     if (*stack.currentFrame->ecode++ == c)
     1423                    if (*stack.currentFrame->args.ecode++ == c)
    14181424                        RRETURN_NO_MATCH;
    14191425                }
     
    14281434               
    14291435                BEGIN_OPCODE(NOTEXACT):
    1430                 min = stack.currentFrame->max = GET2(stack.currentFrame->ecode, 1);
     1436                min = stack.currentFrame->max = GET2(stack.currentFrame->args.ecode, 1);
    14311437                minimize = false;
    1432                 stack.currentFrame->ecode += 3;
     1438                stack.currentFrame->args.ecode += 3;
    14331439                goto REPEATNOTCHAR;
    14341440               
     
    14361442                BEGIN_OPCODE(NOTMINUPTO):
    14371443                min = 0;
    1438                 stack.currentFrame->max = GET2(stack.currentFrame->ecode, 1);
    1439                 minimize = *stack.currentFrame->ecode == OP_NOTMINUPTO;
    1440                 stack.currentFrame->ecode += 3;
     1444                stack.currentFrame->max = GET2(stack.currentFrame->args.ecode, 1);
     1445                minimize = *stack.currentFrame->args.ecode == OP_NOTMINUPTO;
     1446                stack.currentFrame->args.ecode += 3;
    14411447                goto REPEATNOTCHAR;
    14421448               
     
    14471453                BEGIN_OPCODE(NOTQUERY):
    14481454                BEGIN_OPCODE(NOTMINQUERY):
    1449                 c = *stack.currentFrame->ecode++ - OP_NOTSTAR;
     1455                c = *stack.currentFrame->args.ecode++ - OP_NOTSTAR;
    14501456                minimize = (c & 1) != 0;
    14511457                min = rep_min[c];                 /* Pick up values from tables; */
     
    14581464               
    14591465            REPEATNOTCHAR:
    1460                 if (min > md.end_subject - stack.currentFrame->eptr)
    1461                     RRETURN_NO_MATCH;
    1462                 stack.currentFrame->fc = *stack.currentFrame->ecode++;
     1466                if (min > md.end_subject - stack.currentFrame->args.eptr)
     1467                    RRETURN_NO_MATCH;
     1468                stack.currentFrame->fc = *stack.currentFrame->args.ecode++;
    14631469               
    14641470                /* The code is duplicated for the caseless and caseful cases, for speed,
     
    14791485                        int d;
    14801486                        for (i = 1; i <= min; i++) {
    1481                             GETCHARINC(d, stack.currentFrame->eptr);
     1487                            GETCHARINC(d, stack.currentFrame->args.eptr);
    14821488                            if (d < 128)
    14831489                                d = md.lowerCaseChars[d];
     
    14931499                        int d;
    14941500                        for (stack.currentFrame->fi = min;; stack.currentFrame->fi++) {
    1495                             RMATCH(38, stack.currentFrame->ecode, stack.currentFrame->eptrb, 0);
     1501                            RMATCH(38, stack.currentFrame->args.ecode, stack.currentFrame->args.eptrb, 0);
    14961502                            if (is_match)
    14971503                                RRETURN;
    1498                             GETCHARINC(d, stack.currentFrame->eptr);
     1504                            GETCHARINC(d, stack.currentFrame->args.eptr);
    14991505                            if (d < 128)
    15001506                                d = md.lowerCaseChars[d];
    1501                             if (stack.currentFrame->fi >= stack.currentFrame->max || stack.currentFrame->eptr >= md.end_subject || stack.currentFrame->fc == d)
     1507                            if (stack.currentFrame->fi >= stack.currentFrame->max || stack.currentFrame->args.eptr >= md.end_subject || stack.currentFrame->fc == d)
    15021508                                RRETURN;
    15031509                        }
     
    15081514                   
    15091515                    else {
    1510                         stack.currentFrame->pp = stack.currentFrame->eptr;
     1516                        stack.currentFrame->pp = stack.currentFrame->args.eptr;
    15111517                       
    15121518                        {
     
    15141520                            for (i = min; i < stack.currentFrame->max; i++) {
    15151521                                int len = 1;
    1516                                 if (stack.currentFrame->eptr >= md.end_subject)
     1522                                if (stack.currentFrame->args.eptr >= md.end_subject)
    15171523                                    break;
    1518                                 GETCHARLEN(d, stack.currentFrame->eptr, len);
     1524                                GETCHARLEN(d, stack.currentFrame->args.eptr, len);
    15191525                                if (d < 128)
    15201526                                    d = md.lowerCaseChars[d];
    15211527                                if (stack.currentFrame->fc == d)
    15221528                                    break;
    1523                                 stack.currentFrame->eptr += len;
     1529                                stack.currentFrame->args.eptr += len;
    15241530                            }
    15251531                            for (;;) {
    1526                                 RMATCH(40, stack.currentFrame->ecode, stack.currentFrame->eptrb, 0);
     1532                                RMATCH(40, stack.currentFrame->args.ecode, stack.currentFrame->args.eptrb, 0);
    15271533                                if (is_match)
    15281534                                    RRETURN;
    1529                                 if (stack.currentFrame->eptr-- == stack.currentFrame->pp)
     1535                                if (stack.currentFrame->args.eptr-- == stack.currentFrame->pp)
    15301536                                    break;        /* Stop if tried at original pos */
    1531                                 BACKCHAR(stack.currentFrame->eptr);
     1537                                BACKCHAR(stack.currentFrame->args.eptr);
    15321538                            }
    15331539                        }
     
    15441550                        int d;
    15451551                        for (i = 1; i <= min; i++) {
    1546                             GETCHARINC(d, stack.currentFrame->eptr);
     1552                            GETCHARINC(d, stack.currentFrame->args.eptr);
    15471553                            if (stack.currentFrame->fc == d)
    15481554                                RRETURN_NO_MATCH;
     
    15561562                        int d;
    15571563                        for (stack.currentFrame->fi = min;; stack.currentFrame->fi++) {
    1558                             RMATCH(42, stack.currentFrame->ecode, stack.currentFrame->eptrb, 0);
     1564                            RMATCH(42, stack.currentFrame->args.ecode, stack.currentFrame->args.eptrb, 0);
    15591565                            if (is_match)
    15601566                                RRETURN;
    1561                             GETCHARINC(d, stack.currentFrame->eptr);
    1562                             if (stack.currentFrame->fi >= stack.currentFrame->max || stack.currentFrame->eptr >= md.end_subject || stack.currentFrame->fc == d)
     1567                            GETCHARINC(d, stack.currentFrame->args.eptr);
     1568                            if (stack.currentFrame->fi >= stack.currentFrame->max || stack.currentFrame->args.eptr >= md.end_subject || stack.currentFrame->fc == d)
    15631569                                RRETURN;
    15641570                        }
     
    15691575                   
    15701576                    else {
    1571                         stack.currentFrame->pp = stack.currentFrame->eptr;
     1577                        stack.currentFrame->pp = stack.currentFrame->args.eptr;
    15721578                       
    15731579                        {
     
    15751581                            for (i = min; i < stack.currentFrame->max; i++) {
    15761582                                int len = 1;
    1577                                 if (stack.currentFrame->eptr >= md.end_subject)
     1583                                if (stack.currentFrame->args.eptr >= md.end_subject)
    15781584                                    break;
    1579                                 GETCHARLEN(d, stack.currentFrame->eptr, len);
     1585                                GETCHARLEN(d, stack.currentFrame->args.eptr, len);
    15801586                                if (stack.currentFrame->fc == d)
    15811587                                    break;
    1582                                 stack.currentFrame->eptr += len;
     1588                                stack.currentFrame->args.eptr += len;
    15831589                            }
    15841590                            for (;;) {
    1585                                 RMATCH(44, stack.currentFrame->ecode, stack.currentFrame->eptrb, 0);
     1591                                RMATCH(44, stack.currentFrame->args.ecode, stack.currentFrame->args.eptrb, 0);
    15861592                                if (is_match)
    15871593                                    RRETURN;
    1588                                 if (stack.currentFrame->eptr-- == stack.currentFrame->pp)
     1594                                if (stack.currentFrame->args.eptr-- == stack.currentFrame->pp)
    15891595                                    break;        /* Stop if tried at original pos */
    1590                                 BACKCHAR(stack.currentFrame->eptr);
     1596                                BACKCHAR(stack.currentFrame->args.eptr);
    15911597                            }
    15921598                        }
     
    16021608               
    16031609                BEGIN_OPCODE(TYPEEXACT):
    1604                 min = stack.currentFrame->max = GET2(stack.currentFrame->ecode, 1);
     1610                min = stack.currentFrame->max = GET2(stack.currentFrame->args.ecode, 1);
    16051611                minimize = true;
    1606                 stack.currentFrame->ecode += 3;
     1612                stack.currentFrame->args.ecode += 3;
    16071613                goto REPEATTYPE;
    16081614               
     
    16101616                BEGIN_OPCODE(TYPEMINUPTO):
    16111617                min = 0;
    1612                 stack.currentFrame->max = GET2(stack.currentFrame->ecode, 1);
    1613                 minimize = *stack.currentFrame->ecode == OP_TYPEMINUPTO;
    1614                 stack.currentFrame->ecode += 3;
     1618                stack.currentFrame->max = GET2(stack.currentFrame->args.ecode, 1);
     1619                minimize = *stack.currentFrame->args.ecode == OP_TYPEMINUPTO;
     1620                stack.currentFrame->args.ecode += 3;
    16151621                goto REPEATTYPE;
    16161622               
     
    16211627                BEGIN_OPCODE(TYPEQUERY):
    16221628                BEGIN_OPCODE(TYPEMINQUERY):
    1623                 c = *stack.currentFrame->ecode++ - OP_TYPESTAR;
     1629                c = *stack.currentFrame->args.ecode++ - OP_TYPESTAR;
    16241630                minimize = (c & 1) != 0;
    16251631                min = rep_min[c];                 /* Pick up values from tables; */
     
    16331639               
    16341640            REPEATTYPE:
    1635                 stack.currentFrame->ctype = *stack.currentFrame->ecode++;      /* Code for the character type */
     1641                stack.currentFrame->ctype = *stack.currentFrame->args.ecode++;      /* Code for the character type */
    16361642               
    16371643                /* First, ensure the minimum number of matches are present. Use inline
     
    16431649                 and single-bytes. */
    16441650               
    1645                 if (min > md.end_subject - stack.currentFrame->eptr)
     1651                if (min > md.end_subject - stack.currentFrame->args.eptr)
    16461652                    RRETURN_NO_MATCH;
    16471653                if (min > 0) {
     
    16491655                        case OP_ANY:
    16501656                            for (i = 1; i <= min; i++) {
    1651                                 if (stack.currentFrame->eptr >= md.end_subject || isNewline(*stack.currentFrame->eptr))
     1657                                if (stack.currentFrame->args.eptr >= md.end_subject || isNewline(*stack.currentFrame->args.eptr))
    16521658                                    RRETURN_NO_MATCH;
    1653                                 ++stack.currentFrame->eptr;
    1654                                 while (stack.currentFrame->eptr < md.end_subject && isTrailingSurrogate(*stack.currentFrame->eptr))
    1655                                     stack.currentFrame->eptr++;
     1659                                ++stack.currentFrame->args.eptr;
     1660                                while (stack.currentFrame->args.eptr < md.end_subject && isTrailingSurrogate(*stack.currentFrame->args.eptr))
     1661                                    stack.currentFrame->args.eptr++;
    16561662                            }
    16571663                            break;
     
    16591665                            case OP_NOT_DIGIT:
    16601666                            for (i = 1; i <= min; i++) {
    1661                                 if (stack.currentFrame->eptr >= md.end_subject)
     1667                                if (stack.currentFrame->args.eptr >= md.end_subject)
    16621668                                    RRETURN_NO_MATCH;
    1663                                 GETCHARINC(c, stack.currentFrame->eptr);
     1669                                GETCHARINC(c, stack.currentFrame->args.eptr);
    16641670                                if (isASCIIDigit(c))
    16651671                                    RRETURN_NO_MATCH;
     
    16691675                            case OP_DIGIT:
    16701676                            for (i = 1; i <= min; i++) {
    1671                                 if (stack.currentFrame->eptr >= md.end_subject || !isASCIIDigit(*stack.currentFrame->eptr++))
     1677                                if (stack.currentFrame->args.eptr >= md.end_subject || !isASCIIDigit(*stack.currentFrame->args.eptr++))
    16721678                                    RRETURN_NO_MATCH;
    16731679                                /* No need to skip more bytes - we know it's a 1-byte character */
     
    16771683                            case OP_NOT_WHITESPACE:
    16781684                            for (i = 1; i <= min; i++) {
    1679                                 if (stack.currentFrame->eptr >= md.end_subject ||
    1680                                     (*stack.currentFrame->eptr < 128 && (md.ctypes[*stack.currentFrame->eptr] & ctype_space) != 0))
     1685                                if (stack.currentFrame->args.eptr >= md.end_subject ||
     1686                                    (*stack.currentFrame->args.eptr < 128 && (md.ctypes[*stack.currentFrame->args.eptr] & ctype_space) != 0))
    16811687                                    RRETURN_NO_MATCH;
    1682                                 while (++stack.currentFrame->eptr < md.end_subject && isTrailingSurrogate(*stack.currentFrame->eptr)) { }
     1688                                while (++stack.currentFrame->args.eptr < md.end_subject && isTrailingSurrogate(*stack.currentFrame->args.eptr)) { }
    16831689                            }
    16841690                            break;
     
    16861692                            case OP_WHITESPACE:
    16871693                            for (i = 1; i <= min; i++) {
    1688                                 if (stack.currentFrame->eptr >= md.end_subject ||
    1689                                     *stack.currentFrame->eptr >= 128 || (md.ctypes[*stack.currentFrame->eptr++] & ctype_space) == 0)
     1694                                if (stack.currentFrame->args.eptr >= md.end_subject ||
     1695                                    *stack.currentFrame->args.eptr >= 128 || (md.ctypes[*stack.currentFrame->args.eptr++] & ctype_space) == 0)
    16901696                                    RRETURN_NO_MATCH;
    16911697                                /* No need to skip more bytes - we know it's a 1-byte character */
     
    16951701                            case OP_NOT_WORDCHAR:
    16961702                            for (i = 1; i <= min; i++) {
    1697                                 if (stack.currentFrame->eptr >= md.end_subject ||
    1698                                     (*stack.currentFrame->eptr < 128 && (md.ctypes[*stack.currentFrame->eptr] & ctype_word) != 0))
     1703                                if (stack.currentFrame->args.eptr >= md.end_subject ||
     1704                                    (*stack.currentFrame->args.eptr < 128 && (md.ctypes[*stack.currentFrame->args.eptr] & ctype_word) != 0))
    16991705                                    RRETURN_NO_MATCH;
    1700                                 while (++stack.currentFrame->eptr < md.end_subject && isTrailingSurrogate(*stack.currentFrame->eptr)) { }
     1706                                while (++stack.currentFrame->args.eptr < md.end_subject && isTrailingSurrogate(*stack.currentFrame->args.eptr)) { }
    17011707                            }
    17021708                            break;
     
    17041710                            case OP_WORDCHAR:
    17051711                            for (i = 1; i <= min; i++) {
    1706                                 if (stack.currentFrame->eptr >= md.end_subject ||
    1707                                     *stack.currentFrame->eptr >= 128 || (md.ctypes[*stack.currentFrame->eptr++] & ctype_word) == 0)
     1712                                if (stack.currentFrame->args.eptr >= md.end_subject ||
     1713                                    *stack.currentFrame->args.eptr >= 128 || (md.ctypes[*stack.currentFrame->args.eptr++] & ctype_word) == 0)
    17081714                                    RRETURN_NO_MATCH;
    17091715                                /* No need to skip more bytes - we know it's a 1-byte character */
     
    17271733                if (minimize) {
    17281734                    for (stack.currentFrame->fi = min;; stack.currentFrame->fi++) {
    1729                         RMATCH(48, stack.currentFrame->ecode, stack.currentFrame->eptrb, 0);
     1735                        RMATCH(48, stack.currentFrame->args.ecode, stack.currentFrame->args.eptrb, 0);
    17301736                        if (is_match)
    17311737                            RRETURN;
    1732                         if (stack.currentFrame->fi >= stack.currentFrame->max || stack.currentFrame->eptr >= md.end_subject)
     1738                        if (stack.currentFrame->fi >= stack.currentFrame->max || stack.currentFrame->args.eptr >= md.end_subject)
    17331739                            RRETURN;
    17341740                       
    1735                         GETCHARINC(c, stack.currentFrame->eptr);
     1741                        GETCHARINC(c, stack.currentFrame->args.eptr);
    17361742                        switch(stack.currentFrame->ctype) {
    17371743                        case OP_ANY:
     
    17821788               
    17831789                else {
    1784                     stack.currentFrame->pp = stack.currentFrame->eptr;  /* Remember where we started */
     1790                    stack.currentFrame->pp = stack.currentFrame->args.eptr;  /* Remember where we started */
    17851791                   
    17861792                    switch(stack.currentFrame->ctype) {
     
    17931799                            if (stack.currentFrame->max < INT_MAX) {
    17941800                                for (i = min; i < stack.currentFrame->max; i++) {
    1795                                     if (stack.currentFrame->eptr >= md.end_subject || isNewline(*stack.currentFrame->eptr))
     1801                                    if (stack.currentFrame->args.eptr >= md.end_subject || isNewline(*stack.currentFrame->args.eptr))
    17961802                                        break;
    1797                                     stack.currentFrame->eptr++;
    1798                                     while (stack.currentFrame->eptr < md.end_subject && (*stack.currentFrame->eptr & 0xc0) == 0x80)
    1799                                         stack.currentFrame->eptr++;
     1803                                    stack.currentFrame->args.eptr++;
     1804                                    while (stack.currentFrame->args.eptr < md.end_subject && (*stack.currentFrame->args.eptr & 0xc0) == 0x80)
     1805                                        stack.currentFrame->args.eptr++;
    18001806                                }
    18011807                            }
     
    18051811                            else {
    18061812                                for (i = min; i < stack.currentFrame->max; i++) {
    1807                                     if (stack.currentFrame->eptr >= md.end_subject || isNewline(*stack.currentFrame->eptr))
     1813                                    if (stack.currentFrame->args.eptr >= md.end_subject || isNewline(*stack.currentFrame->args.eptr))
    18081814                                        break;
    1809                                     stack.currentFrame->eptr++;
     1815                                    stack.currentFrame->args.eptr++;
    18101816                                }
    18111817                                break;
     
    18161822                            for (i = min; i < stack.currentFrame->max; i++) {
    18171823                                int len = 1;
    1818                                 if (stack.currentFrame->eptr >= md.end_subject)
     1824                                if (stack.currentFrame->args.eptr >= md.end_subject)
    18191825                                    break;
    1820                                 GETCHARLEN(c, stack.currentFrame->eptr, len);
     1826                                GETCHARLEN(c, stack.currentFrame->args.eptr, len);
    18211827                                if (isASCIIDigit(c))
    18221828                                    break;
    1823                                 stack.currentFrame->eptr+= len;
     1829                                stack.currentFrame->args.eptr+= len;
    18241830                            }
    18251831                            break;
     
    18281834                            for (i = min; i < stack.currentFrame->max; i++) {
    18291835                                int len = 1;
    1830                                 if (stack.currentFrame->eptr >= md.end_subject)
     1836                                if (stack.currentFrame->args.eptr >= md.end_subject)
    18311837                                    break;
    1832                                 GETCHARLEN(c, stack.currentFrame->eptr, len);
     1838                                GETCHARLEN(c, stack.currentFrame->args.eptr, len);
    18331839                                if (!isASCIIDigit(c))
    18341840                                    break;
    1835                                 stack.currentFrame->eptr+= len;
     1841                                stack.currentFrame->args.eptr+= len;
    18361842                            }
    18371843                            break;
     
    18401846                            for (i = min; i < stack.currentFrame->max; i++) {
    18411847                                int len = 1;
    1842                                 if (stack.currentFrame->eptr >= md.end_subject)
     1848                                if (stack.currentFrame->args.eptr >= md.end_subject)
    18431849                                    break;
    1844                                 GETCHARLEN(c, stack.currentFrame->eptr, len);
     1850                                GETCHARLEN(c, stack.currentFrame->args.eptr, len);
    18451851                                if (c < 128 && (md.ctypes[c] & ctype_space))
    18461852                                    break;
    1847                                 stack.currentFrame->eptr+= len;
     1853                                stack.currentFrame->args.eptr+= len;
    18481854                            }
    18491855                            break;
     
    18521858                            for (i = min; i < stack.currentFrame->max; i++) {
    18531859                                int len = 1;
    1854                                 if (stack.currentFrame->eptr >= md.end_subject)
     1860                                if (stack.currentFrame->args.eptr >= md.end_subject)
    18551861                                    break;
    1856                                 GETCHARLEN(c, stack.currentFrame->eptr, len);
     1862                                GETCHARLEN(c, stack.currentFrame->args.eptr, len);
    18571863                                if (c >= 128 || !(md.ctypes[c] & ctype_space))
    18581864                                    break;
    1859                                 stack.currentFrame->eptr+= len;
     1865                                stack.currentFrame->args.eptr+= len;
    18601866                            }
    18611867                            break;
     
    18641870                            for (i = min; i < stack.currentFrame->max; i++) {
    18651871                                int len = 1;
    1866                                 if (stack.currentFrame->eptr >= md.end_subject)
     1872                                if (stack.currentFrame->args.eptr >= md.end_subject)
    18671873                                    break;
    1868                                 GETCHARLEN(c, stack.currentFrame->eptr, len);
     1874                                GETCHARLEN(c, stack.currentFrame->args.eptr, len);
    18691875                                if (c < 128 && (md.ctypes[c] & ctype_word))
    18701876                                    break;
    1871                                 stack.currentFrame->eptr+= len;
     1877                                stack.currentFrame->args.eptr+= len;
    18721878                            }
    18731879                            break;
     
    18761882                            for (i = min; i < stack.currentFrame->max; i++) {
    18771883                                int len = 1;
    1878                                 if (stack.currentFrame->eptr >= md.end_subject)
     1884                                if (stack.currentFrame->args.eptr >= md.end_subject)
    18791885                                    break;
    1880                                 GETCHARLEN(c, stack.currentFrame->eptr, len);
     1886                                GETCHARLEN(c, stack.currentFrame->args.eptr, len);
    18811887                                if (c >= 128 || !(md.ctypes[c] & ctype_word))
    18821888                                    break;
    1883                                 stack.currentFrame->eptr+= len;
     1889                                stack.currentFrame->args.eptr+= len;
    18841890                            }
    18851891                            break;
     
    18901896                    }
    18911897                   
    1892                     /* stack.currentFrame->eptr is now past the end of the maximum run */
     1898                    /* stack.currentFrame->args.eptr is now past the end of the maximum run */
    18931899                   
    18941900                    for (;;) {
    1895                         RMATCH(52, stack.currentFrame->ecode, stack.currentFrame->eptrb, 0);
     1901                        RMATCH(52, stack.currentFrame->args.ecode, stack.currentFrame->args.eptrb, 0);
    18961902                        if (is_match)
    18971903                            RRETURN;
    1898                         if (stack.currentFrame->eptr-- == stack.currentFrame->pp)
     1904                        if (stack.currentFrame->args.eptr-- == stack.currentFrame->pp)
    18991905                            break;        /* Stop if tried at original pos */
    1900                         BACKCHAR(stack.currentFrame->eptr);
     1906                        BACKCHAR(stack.currentFrame->args.eptr);
    19011907                    }
    19021908                   
     
    19371943                 here; that is handled in the code for KET. */
    19381944               
    1939                 ASSERT(*stack.currentFrame->ecode > OP_BRA);
    1940                
    1941                 stack.currentFrame->number = *stack.currentFrame->ecode - OP_BRA;
     1945                ASSERT(*stack.currentFrame->args.ecode > OP_BRA);
     1946               
     1947                stack.currentFrame->number = *stack.currentFrame->args.ecode - OP_BRA;
    19421948               
    19431949                /* For extended extraction brackets (large number), we have to fish out the
     
    19451951               
    19461952                if (stack.currentFrame->number > EXTRACT_BASIC_MAX)
    1947                     stack.currentFrame->number = GET2(stack.currentFrame->ecode, 2+LINK_SIZE);
     1953                    stack.currentFrame->number = GET2(stack.currentFrame->args.ecode, 2+LINK_SIZE);
    19481954                stack.currentFrame->offset = stack.currentFrame->number << 1;
    19491955               
    19501956#ifdef DEBUG
    19511957                printf("start bracket %d subject=", stack.currentFrame->number);
    1952                 pchars(stack.currentFrame->eptr, 16, true, md);
     1958                pchars(stack.currentFrame->args.eptr, 16, true, md);
    19531959                printf("\n");
    19541960#endif
     
    19601966                   
    19611967                    DPRINTF(("saving %d %d %d\n", stack.currentFrame->save_offset1, stack.currentFrame->save_offset2, stack.currentFrame->save_offset3));
    1962                     md.offset_vector[md.offset_end - stack.currentFrame->number] = stack.currentFrame->eptr - md.start_subject;
     1968                    md.offset_vector[md.offset_end - stack.currentFrame->number] = stack.currentFrame->args.eptr - md.start_subject;
    19631969                   
    19641970                    do {
    1965                         RMATCH(1, stack.currentFrame->ecode + 1 + LINK_SIZE, stack.currentFrame->eptrb, match_isgroup);
     1971                        RMATCH(1, stack.currentFrame->args.ecode + 1 + LINK_SIZE, stack.currentFrame->args.eptrb, match_isgroup);
    19661972                        if (is_match) RRETURN;
    1967                         stack.currentFrame->ecode += GET(stack.currentFrame->ecode, 1);
    1968                     } while (*stack.currentFrame->ecode == OP_ALT);
     1973                        stack.currentFrame->args.ecode += GET(stack.currentFrame->args.ecode, 1);
     1974                    } while (*stack.currentFrame->args.ecode == OP_ALT);
    19691975                   
    19701976                    DPRINTF(("bracket %d failed\n", stack.currentFrame->number));
Note: See TracChangeset for help on using the changeset viewer.