/[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 850 by zherczeg, Wed Jan 4 17:29:11 2012 UTC revision 852 by zherczeg, Thu Jan 5 19:18:12 2012 UTC
# Line 164  typedef struct jit_arguments { Line 164  typedef struct jit_arguments {
164    
165  typedef struct executable_function {  typedef struct executable_function {
166    void *executable_func;    void *executable_func;
167    pcre_jit_callback callback;    PUBL(jit_callback) callback;
168    void *userdata;    void *userdata;
169    sljit_uw executable_size;    sljit_uw executable_size;
170  } executable_function;  } executable_function;
# Line 6354  sljit_emit_fast_return(compiler, SLJIT_M Line 6354  sljit_emit_fast_return(compiler, SLJIT_M
6354  #undef CURRENT_AS  #undef CURRENT_AS
6355    
6356  void  void
6357  PRIV(jit_compile)(const real_pcre *re, PUBL(extra) *extra)  PRIV(jit_compile)(const REAL_PCRE *re, PUBL(extra) *extra)
6358  {  {
6359  struct sljit_compiler *compiler;  struct sljit_compiler *compiler;
6360  fallback_common rootfallback;  fallback_common rootfallback;
# Line 6741  return convert_executable_func.call_exec Line 6741  return convert_executable_func.call_exec
6741  }  }
6742    
6743  int  int
6744  PRIV(jit_exec)(const real_pcre *re, void *executable_func,  PRIV(jit_exec)(const REAL_PCRE *re, void *executable_func,
6745    const pcre_uchar *subject, int length, int start_offset, int options,    const pcre_uchar *subject, int length, int start_offset, int options,
6746    int match_limit, int *offsets, int offsetcount)    int match_limit, int *offsets, int offsetcount)
6747  {  {
# Line 6814  return ((executable_function*)executable Line 6814  return ((executable_function*)executable
6814  PCRE_EXP_DECL pcre_jit_stack *  PCRE_EXP_DECL pcre_jit_stack *
6815  pcre_jit_stack_alloc(int startsize, int maxsize)  pcre_jit_stack_alloc(int startsize, int maxsize)
6816  #else  #else
6817  PCRE_EXP_DECL pcre_jit_stack *  PCRE_EXP_DECL pcre16_jit_stack *
6818  pcre16_jit_stack_alloc(int startsize, int maxsize)  pcre16_jit_stack_alloc(int startsize, int maxsize)
6819  #endif  #endif
6820  {  {
# Line 6824  if (startsize > maxsize) Line 6824  if (startsize > maxsize)
6824    startsize = maxsize;    startsize = maxsize;
6825  startsize = (startsize + STACK_GROWTH_RATE - 1) & ~(STACK_GROWTH_RATE - 1);  startsize = (startsize + STACK_GROWTH_RATE - 1) & ~(STACK_GROWTH_RATE - 1);
6826  maxsize = (maxsize + STACK_GROWTH_RATE - 1) & ~(STACK_GROWTH_RATE - 1);  maxsize = (maxsize + STACK_GROWTH_RATE - 1) & ~(STACK_GROWTH_RATE - 1);
6827  return (pcre_jit_stack*)sljit_allocate_stack(startsize, maxsize);  return (PUBL(jit_stack)*)sljit_allocate_stack(startsize, maxsize);
6828  }  }
6829    
6830  #ifdef COMPILE_PCRE8  #ifdef COMPILE_PCRE8
# Line 6832  PCRE_EXP_DECL void Line 6832  PCRE_EXP_DECL void
6832  pcre_jit_stack_free(pcre_jit_stack *stack)  pcre_jit_stack_free(pcre_jit_stack *stack)
6833  #else  #else
6834  PCRE_EXP_DECL void  PCRE_EXP_DECL void
6835  pcre16_jit_stack_free(pcre_jit_stack *stack)  pcre16_jit_stack_free(pcre16_jit_stack *stack)
6836  #endif  #endif
6837  {  {
6838  sljit_free_stack((struct sljit_stack*)stack);  sljit_free_stack((struct sljit_stack*)stack);
# Line 6843  PCRE_EXP_DECL void Line 6843  PCRE_EXP_DECL void
6843  pcre_assign_jit_stack(pcre_extra *extra, pcre_jit_callback callback, void *userdata)  pcre_assign_jit_stack(pcre_extra *extra, pcre_jit_callback callback, void *userdata)
6844  #else  #else
6845  PCRE_EXP_DECL void  PCRE_EXP_DECL void
6846  pcre16_assign_jit_stack(pcre16_extra *extra, pcre_jit_callback callback, void *userdata)  pcre16_assign_jit_stack(pcre16_extra *extra, pcre16_jit_callback callback, void *userdata)
6847  #endif  #endif
6848  {  {
6849  executable_function *function;  executable_function *function;
# Line 6866  being compiled. */ Line 6866  being compiled. */
6866  PCRE_EXP_DECL pcre_jit_stack *  PCRE_EXP_DECL pcre_jit_stack *
6867  pcre_jit_stack_alloc(int startsize, int maxsize)  pcre_jit_stack_alloc(int startsize, int maxsize)
6868  #else  #else
6869  PCRE_EXP_DECL pcre_jit_stack *  PCRE_EXP_DECL pcre16_jit_stack *
6870  pcre16_jit_stack_alloc(int startsize, int maxsize)  pcre16_jit_stack_alloc(int startsize, int maxsize)
6871  #endif  #endif
6872  {  {
# Line 6880  PCRE_EXP_DECL void Line 6880  PCRE_EXP_DECL void
6880  pcre_jit_stack_free(pcre_jit_stack *stack)  pcre_jit_stack_free(pcre_jit_stack *stack)
6881  #else  #else
6882  PCRE_EXP_DECL void  PCRE_EXP_DECL void
6883  pcre16_jit_stack_free(pcre_jit_stack *stack)  pcre16_jit_stack_free(pcre16_jit_stack *stack)
6884  #endif  #endif
6885  {  {
6886  (void)stack;  (void)stack;
# Line 6891  PCRE_EXP_DECL void Line 6891  PCRE_EXP_DECL void
6891  pcre_assign_jit_stack(pcre_extra *extra, pcre_jit_callback callback, void *userdata)  pcre_assign_jit_stack(pcre_extra *extra, pcre_jit_callback callback, void *userdata)
6892  #else  #else
6893  PCRE_EXP_DECL void  PCRE_EXP_DECL void
6894  pcre16_assign_jit_stack(pcre16_extra *extra, pcre_jit_callback callback, void *userdata)  pcre16_assign_jit_stack(pcre16_extra *extra, pcre16_jit_callback callback, void *userdata)
6895  #endif  #endif
6896  {  {
6897  (void)extra;  (void)extra;

Legend:
Removed from v.850  
changed lines
  Added in v.852

  ViewVC Help
Powered by ViewVC 1.1.5