From: K.Kosako Date: Fri, 15 Feb 2019 04:53:23 +0000 (+0900) Subject: rename USE_THREADED_CODE to USE_GOTO_LABELS_AS_VALUES X-Git-Tag: v6.9.2_rc1~65^2~52 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=d2bca9f6fc72f415bcf58200da19bffe67607ce6;p=onig rename USE_THREADED_CODE to USE_GOTO_LABELS_AS_VALUES --- diff --git a/src/regcomp.c b/src/regcomp.c index b24df65..254c9bf 100644 --- a/src/regcomp.c +++ b/src/regcomp.c @@ -6277,11 +6277,9 @@ onig_compile(regex_t* reg, const UChar* pattern, const UChar* pattern_end, onig_print_compiled_byte_code_list(stderr, reg); #endif -#ifdef USE_THREADED_CODE #ifdef USE_DIRECT_THREADED_CODE /* opcode -> opaddr */ onig_init_for_match_at(reg); -#endif #endif end: diff --git a/src/regexec.c b/src/regexec.c index 2a60f64..d842785 100644 --- a/src/regexec.c +++ b/src/regexec.c @@ -2367,7 +2367,7 @@ typedef struct { -#ifdef USE_THREADED_CODE +#ifdef USE_GOTO_LABELS_AS_VALUES #define BYTECODE_INTERPRETER_START GOTO_OP; #define BYTECODE_INTERPRETER_END @@ -2397,7 +2397,7 @@ typedef struct { #define GOTO_OP continue; break #define BREAK_OP break -#endif /* USE_THREADED_CODE */ +#endif /* USE_GOTO_LABELS_AS_VALUES */ #define INC_OP p++ #define NEXT_OUT SOP_OUT; NEXT_OP @@ -2452,20 +2452,20 @@ match_at(regex_t* reg, const UChar* str, const UChar* end, { #ifdef ONIG_DEBUG -#if defined(USE_THREADED_CODE) && defined(USE_DIRECT_THREADED_CODE) +#if defined(USE_DIRECT_THREADED_CODE) static Operation FinishCode[] = { {.opcode=OP_FINISH, .opaddr=&&L_FINISH } }; #else static Operation FinishCode[] = { {OP_FINISH } }; #endif #else -#if defined(USE_THREADED_CODE) && defined(USE_DIRECT_THREADED_CODE) +#if defined(USE_DIRECT_THREADED_CODE) static Operation FinishCode[] = { { {.opaddr=&&L_FINISH} } }; #else static Operation FinishCode[] = { { {OP_FINISH} } }; #endif #endif -#ifdef USE_THREADED_CODE +#ifdef USE_GOTO_LABELS_AS_VALUES static const void *opcode_to_label[] = { &&L_FINISH, &&L_END, @@ -2599,7 +2599,6 @@ match_at(regex_t* reg, const UChar* str, const UChar* end, static unsigned int counter = 1; #endif -#ifdef USE_THREADED_CODE #ifdef USE_DIRECT_THREADED_CODE if (IS_NULL(msa)) { for (i = 0; i < reg->ops_used; i++) { @@ -2611,7 +2610,6 @@ match_at(regex_t* reg, const UChar* str, const UChar* end, return ONIG_NORMAL; } #endif -#endif #ifdef USE_CALLOUT msa->mp->match_at_call_counter++; @@ -5410,7 +5408,6 @@ onig_get_used_stack_size_in_callout(OnigCalloutArgs* a, int* used_num, int* used return ONIG_NORMAL; } -#ifdef USE_THREADED_CODE #ifdef USE_DIRECT_THREADED_CODE extern int onig_init_for_match_at(regex_t* reg) @@ -5420,7 +5417,6 @@ onig_init_for_match_at(regex_t* reg) (MatchArg* )NULL); } #endif -#endif /* builtin callout functions */ diff --git a/src/regint.h b/src/regint.h index b8246e1..9875e95 100644 --- a/src/regint.h +++ b/src/regint.h @@ -55,7 +55,7 @@ #endif #ifdef __GNUC__ -#define USE_THREADED_CODE +#define USE_GOTO_LABELS_AS_VALUES #endif /* config */ @@ -67,7 +67,7 @@ #define USE_NEWLINE_AT_END_OF_STRING_HAS_EMPTY_LINE /* /\n$/ =~ "\n" */ #define USE_WARNING_REDUNDANT_NESTED_REPEAT_OPERATOR #define USE_RETRY_LIMIT_IN_MATCH -#ifdef USE_THREADED_CODE +#ifdef USE_GOTO_LABELS_AS_VALUES #define USE_DIRECT_THREADED_CODE #endif