/[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 752 by zherczeg, Sat Nov 19 15:28:29 2011 UTC revision 792 by ph10, Wed Dec 7 16:44:48 2011 UTC
# Line 166  typedef struct executable_function { Line 166  typedef struct executable_function {
166    void *executable_func;    void *executable_func;
167    pcre_jit_callback callback;    pcre_jit_callback callback;
168    void *userdata;    void *userdata;
169      sljit_uw executable_size;
170  } executable_function;  } executable_function;
171    
172  typedef struct jump_list {  typedef struct jump_list {
# Line 5697  if (has_alternatives) Line 5698  if (has_alternatives)
5698      {      {
5699      SLJIT_ASSERT(opcode == OP_COND || opcode == OP_SCOND);      SLJIT_ASSERT(opcode == OP_COND || opcode == OP_SCOND);
5700      assert = CURRENT_AS(bracket_fallback)->u.assert;      assert = CURRENT_AS(bracket_fallback)->u.assert;
5701      if (assert->framesize >= 0 && (ccbegin[1 + LINK_SIZE] == OP_ASSERT_NOT || ccbegin[1 + LINK_SIZE] == OP_ASSERTBACK_NOT))      if ((ccbegin[1 + LINK_SIZE] == OP_ASSERT_NOT || ccbegin[1 + LINK_SIZE] == OP_ASSERTBACK_NOT) && assert->framesize >= 0)
5702    
5703        {        {
5704        OP1(SLJIT_MOV, STACK_TOP, 0, SLJIT_MEM1(SLJIT_LOCALS_REG), assert->localptr);        OP1(SLJIT_MOV, STACK_TOP, 0, SLJIT_MEM1(SLJIT_LOCALS_REG), assert->localptr);
5705        add_jump(compiler, &common->revertframes, JUMP(SLJIT_FAST_CALL));        add_jump(compiler, &common->revertframes, JUMP(SLJIT_FAST_CALL));
# Line 6099  pcre_study_data *study; Line 6101  pcre_study_data *study;
6101  uschar *ccend;  uschar *ccend;
6102  executable_function *function;  executable_function *function;
6103  void *executable_func;  void *executable_func;
6104    sljit_uw executable_size;
6105  struct sljit_label *leave;  struct sljit_label *leave;
6106  struct sljit_label *mainloop = NULL;  struct sljit_label *mainloop = NULL;
6107  struct sljit_label *empty_match_found;  struct sljit_label *empty_match_found;
# Line 6428  if (common->getucd != NULL) Line 6431  if (common->getucd != NULL)
6431    
6432  SLJIT_FREE(common->localptrs);  SLJIT_FREE(common->localptrs);
6433  executable_func = sljit_generate_code(compiler);  executable_func = sljit_generate_code(compiler);
6434    executable_size = sljit_get_generated_code_size(compiler);
6435  sljit_free_compiler(compiler);  sljit_free_compiler(compiler);
6436  if (executable_func == NULL)  if (executable_func == NULL)
6437    return;    return;
# Line 6442  if (function == NULL) Line 6446  if (function == NULL)
6446    }    }
6447    
6448  function->executable_func = executable_func;  function->executable_func = executable_func;
6449    function->executable_size = executable_size;
6450  function->callback = NULL;  function->callback = NULL;
6451  function->userdata = NULL;  function->userdata = NULL;
6452  extra->executable_jit = function;  extra->executable_jit = function;
# Line 6530  sljit_free_code(function->executable_fun Line 6535  sljit_free_code(function->executable_fun
6535  SLJIT_FREE(function);  SLJIT_FREE(function);
6536  }  }
6537    
6538    int
6539    _pcre_jit_get_size(void *executable_func)
6540    {
6541    return ((executable_function*)executable_func)->executable_size;
6542    }
6543    
6544  PCRE_EXP_DECL pcre_jit_stack *  PCRE_EXP_DECL pcre_jit_stack *
6545  pcre_jit_stack_alloc(int startsize, int maxsize)  pcre_jit_stack_alloc(int startsize, int maxsize)
6546  {  {

Legend:
Removed from v.752  
changed lines
  Added in v.792

  ViewVC Help
Powered by ViewVC 1.1.5