/[pcre]/code/trunk/pcre_jit_compile.c
ViewVC logotype

Diff of /code/trunk/pcre_jit_compile.c

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 920 by zherczeg, Sat Feb 18 08:35:01 2012 UTC revision 924 by zherczeg, Wed Feb 22 10:23:56 2012 UTC
# Line 3602  switch(type) Line 3602  switch(type)
3602        add_jump(compiler, fallbacks, CMP(SLJIT_C_EQUAL, TMP1, 0, SLJIT_IMM, oc));        add_jump(compiler, fallbacks, CMP(SLJIT_C_EQUAL, TMP1, 0, SLJIT_IMM, oc));
3603        }        }
3604      }      }
3605    return cc + 1;    return cc + length;
3606    
3607    case OP_CLASS:    case OP_CLASS:
3608    case OP_NCLASS:    case OP_NCLASS:
# Line 6652  if (!tables) Line 6652  if (!tables)
6652    tables = PRIV(default_tables);    tables = PRIV(default_tables);
6653    
6654  memset(&rootfallback, 0, sizeof(fallback_common));  memset(&rootfallback, 0, sizeof(fallback_common));
6655    memset(common, 0, sizeof(compiler_common));
6656  rootfallback.cc = (pcre_uchar *)re + re->name_table_offset + re->name_count * re->name_entry_size;  rootfallback.cc = (pcre_uchar *)re + re->name_table_offset + re->name_count * re->name_entry_size;
6657    
 common->compiler = NULL;  
6658  common->start = rootfallback.cc;  common->start = rootfallback.cc;
6659  common->fcc = tables + fcc_offset;  common->fcc = tables + fcc_offset;
6660  common->lcc = (sljit_w)(tables + lcc_offset);  common->lcc = (sljit_w)(tables + lcc_offset);
# Line 6696  common->ctypes = (sljit_w)(tables + ctyp Line 6696  common->ctypes = (sljit_w)(tables + ctyp
6696  common->name_table = (sljit_w)((pcre_uchar *)re + re->name_table_offset);  common->name_table = (sljit_w)((pcre_uchar *)re + re->name_table_offset);
6697  common->name_count = re->name_count;  common->name_count = re->name_count;
6698  common->name_entry_size = re->name_entry_size;  common->name_entry_size = re->name_entry_size;
 common->partialmatchlabel = NULL;  
 common->acceptlabel = NULL;  
 common->stubs = NULL;  
 common->entries = NULL;  
 common->currententry = NULL;  
 common->partialmatch = NULL;  
 common->accept = NULL;  
 common->calllimit = NULL;  
 common->stackalloc = NULL;  
 common->revertframes = NULL;  
 common->wordboundary = NULL;  
 common->anynewline = NULL;  
 common->hspace = NULL;  
 common->vspace = NULL;  
 common->casefulcmp = NULL;  
 common->caselesscmp = NULL;  
6699  common->jscript_compat = (re->options & PCRE_JAVASCRIPT_COMPAT) != 0;  common->jscript_compat = (re->options & PCRE_JAVASCRIPT_COMPAT) != 0;
6700  #ifdef SUPPORT_UTF  #ifdef SUPPORT_UTF
6701  /* PCRE_UTF16 has the same value as PCRE_UTF8. */  /* PCRE_UTF16 has the same value as PCRE_UTF8. */
# Line 6719  common->utf = (re->options & PCRE_UTF8) Line 6703  common->utf = (re->options & PCRE_UTF8)
6703  #ifdef SUPPORT_UCP  #ifdef SUPPORT_UCP
6704  common->use_ucp = (re->options & PCRE_UCP) != 0;  common->use_ucp = (re->options & PCRE_UCP) != 0;
6705  #endif  #endif
 common->utfreadchar = NULL;  
 #ifdef COMPILE_PCRE8  
 common->utfreadtype8 = NULL;  
 #endif  
6706  #endif /* SUPPORT_UTF */  #endif /* SUPPORT_UTF */
 #ifdef SUPPORT_UCP  
 common->getucd = NULL;  
 #endif  
6707  ccend = bracketend(rootfallback.cc);  ccend = bracketend(rootfallback.cc);
6708    
6709  /* Calculate the local space size on the stack. */  /* Calculate the local space size on the stack. */
6710  common->ovector_start = CALL_LIMIT + sizeof(sljit_w);  common->ovector_start = CALL_LIMIT + sizeof(sljit_w);
 common->req_char_ptr = 0;  
 common->recursive_head = 0;  
 common->start_used_ptr = 0;  
 common->hit_start = 0;  
 common->first_line_end = 0;  
6711    
6712  SLJIT_ASSERT(*rootfallback.cc == OP_BRA && ccend[-(1 + LINK_SIZE)] == OP_KET);  SLJIT_ASSERT(*rootfallback.cc == OP_BRA && ccend[-(1 + LINK_SIZE)] == OP_KET);
6713  common->localsize = get_localspace(common, rootfallback.cc, ccend);  common->localsize = get_localspace(common, rootfallback.cc, ccend);
# Line 6768  if ((re->options & PCRE_FIRSTLINE) != 0) Line 6740  if ((re->options & PCRE_FIRSTLINE) != 0)
6740  if ((common->ovector_start & sizeof(sljit_w)) != 0)  if ((common->ovector_start & sizeof(sljit_w)) != 0)
6741    common->ovector_start += sizeof(sljit_w);    common->ovector_start += sizeof(sljit_w);
6742    
6743    SLJIT_ASSERT(!(common->req_char_ptr != 0 && common->start_used_ptr != 0));
6744  common->cbraptr = OVECTOR_START + (re->top_bracket + 1) * 2 * sizeof(sljit_w);  common->cbraptr = OVECTOR_START + (re->top_bracket + 1) * 2 * sizeof(sljit_w);
6745  common->localsize += common->cbraptr + (re->top_bracket + 1) * sizeof(sljit_w);  common->localsize += common->cbraptr + (re->top_bracket + 1) * sizeof(sljit_w);
6746  if (common->localsize > SLJIT_MAX_LOCAL_SIZE)  if (common->localsize > SLJIT_MAX_LOCAL_SIZE)
# Line 7170  SLJIT_FREE(functions); Line 7143  SLJIT_FREE(functions);
7143  int  int
7144  PRIV(jit_get_size)(void *executable_funcs)  PRIV(jit_get_size)(void *executable_funcs)
7145  {  {
7146  return ((executable_functions *)executable_funcs)->executable_sizes[PCRE_STUDY_JIT_COMPILE];  int i;
7147    sljit_uw size = 0;
7148    sljit_uw *executable_sizes = ((executable_functions *)executable_funcs)->executable_sizes;
7149    for (i = 0; i < JIT_NUMBER_OF_COMPILE_MODES; i++)
7150      size += executable_sizes[i];
7151    return (int)size;
7152  }  }
7153    
7154  const char*  const char*

Legend:
Removed from v.920  
changed lines
  Added in v.924

webmaster@exim.org
ViewVC Help
Powered by ViewVC 1.1.12