diff options
author | zherczeg <zherczeg@2f5784b3-3f2a-0410-8824-cb99058d5e15> | 2014-11-09 07:27:16 +0000 |
---|---|---|
committer | zherczeg <zherczeg@2f5784b3-3f2a-0410-8824-cb99058d5e15> | 2014-11-09 07:27:16 +0000 |
commit | 54d040f3c6c1dd5b3f2256ac6c9391903803a5a6 (patch) | |
tree | 0e685e17fcf2c209e870154923a3f82d05cef251 /sljit | |
parent | 6727fe4ea50e4f0b9a645b32b7f2991c5dae6eee (diff) | |
download | pcre-54d040f3c6c1dd5b3f2256ac6c9391903803a5a6.tar.gz |
JIT compiler update.
git-svn-id: svn://vcs.exim.org/pcre/code/trunk@1512 2f5784b3-3f2a-0410-8824-cb99058d5e15
Diffstat (limited to 'sljit')
-rw-r--r-- | sljit/sljitConfigInternal.h | 9 | ||||
-rw-r--r-- | sljit/sljitLir.c | 2 | ||||
-rw-r--r-- | sljit/sljitUtils.c | 8 |
3 files changed, 16 insertions, 3 deletions
diff --git a/sljit/sljitConfigInternal.h b/sljit/sljitConfigInternal.h index 01a5329..3284012 100644 --- a/sljit/sljitConfigInternal.h +++ b/sljit/sljitConfigInternal.h @@ -243,6 +243,15 @@ #endif #endif /* !SLJIT_INLINE */ +#ifndef SLJIT_NOINLINE +/* Not inline functions. */ +#if defined(__GNUC__) +#define SLJIT_NOINLINE __attribute__ ((noinline)) +#else +#define SLJIT_NOINLINE +#endif +#endif /* !SLJIT_INLINE */ + #ifndef SLJIT_CONST /* Const variables. */ #define SLJIT_CONST const diff --git a/sljit/sljitLir.c b/sljit/sljitLir.c index f0b3947..8112e8d 100644 --- a/sljit/sljitLir.c +++ b/sljit/sljitLir.c @@ -1325,6 +1325,7 @@ static SLJIT_INLINE CHECK_RETURN_TYPE check_sljit_emit_jump(struct sljit_compile CHECK_ARGUMENT(!(type & ~(0xff | SLJIT_REWRITABLE_JUMP | SLJIT_INT_OP))); CHECK_ARGUMENT((type & 0xff) >= SLJIT_EQUAL && (type & 0xff) <= SLJIT_CALL3); CHECK_ARGUMENT((type & 0xff) < SLJIT_JUMP || !(type & SLJIT_INT_OP)); + CHECK_ARGUMENT((type & 0xff) <= SLJIT_CALL0 || ((type & 0xff) - SLJIT_CALL0) <= compiler->scratches); #endif #if (defined SLJIT_VERBOSE && SLJIT_VERBOSE) if (SLJIT_UNLIKELY(!!compiler->verbose)) @@ -1390,6 +1391,7 @@ static SLJIT_INLINE CHECK_RETURN_TYPE check_sljit_emit_ijump(struct sljit_compil #if (defined SLJIT_ARGUMENT_CHECKS && SLJIT_ARGUMENT_CHECKS) CHECK_ARGUMENT(type >= SLJIT_JUMP && type <= SLJIT_CALL3); + CHECK_ARGUMENT(type <= SLJIT_CALL0 || (type - SLJIT_CALL0) <= compiler->scratches); FUNCTION_CHECK_SRC(src, srcw); #endif #if (defined SLJIT_VERBOSE && SLJIT_VERBOSE) diff --git a/sljit/sljitUtils.c b/sljit/sljitUtils.c index 3f12bb7..5294b5f 100644 --- a/sljit/sljitUtils.c +++ b/sljit/sljitUtils.c @@ -211,6 +211,7 @@ SLJIT_API_FUNC_ATTRIBUTE struct sljit_stack* SLJIT_CALL sljit_allocate_stack(slj SYSTEM_INFO si; #endif + SLJIT_UNUSED_ARG(allocator_data); if (limit > max_limit || limit < 1) return NULL; @@ -239,14 +240,14 @@ SLJIT_API_FUNC_ATTRIBUTE struct sljit_stack* SLJIT_CALL sljit_allocate_stack(slj #ifdef _WIN32 base.ptr = VirtualAlloc(NULL, max_limit, MEM_RESERVE, PAGE_READWRITE); if (!base.ptr) { - SLJIT_FREE(stack); + SLJIT_FREE(stack, allocator_data); return NULL; } stack->base = base.uw; stack->limit = stack->base; stack->max_limit = stack->base + max_limit; if (sljit_stack_resize(stack, stack->base + limit)) { - sljit_free_stack(stack); + sljit_free_stack(stack, allocator_data); return NULL; } #else @@ -255,7 +256,7 @@ SLJIT_API_FUNC_ATTRIBUTE struct sljit_stack* SLJIT_CALL sljit_allocate_stack(slj #else if (dev_zero < 0) { if (open_dev_zero()) { - SLJIT_FREE(stack); + SLJIT_FREE(stack, allocator_data); return NULL; } } @@ -277,6 +278,7 @@ SLJIT_API_FUNC_ATTRIBUTE struct sljit_stack* SLJIT_CALL sljit_allocate_stack(slj SLJIT_API_FUNC_ATTRIBUTE void SLJIT_CALL sljit_free_stack(struct sljit_stack* stack, void *allocator_data) { + SLJIT_UNUSED_ARG(allocator_data); #ifdef _WIN32 VirtualFree((void*)stack->base, 0, MEM_RELEASE); #else |