]> granicus.if.org Git - onig/commitdiff
rename USE_THREADED_CODE to USE_GOTO_LABELS_AS_VALUES
authorK.Kosako <kosako@sofnec.co.jp>
Fri, 15 Feb 2019 04:53:23 +0000 (13:53 +0900)
committerK.Kosako <kosako@sofnec.co.jp>
Thu, 28 Feb 2019 05:28:18 +0000 (14:28 +0900)
src/regcomp.c
src/regexec.c
src/regint.h

index b24df65bca40cc1db6b6ccec827159b3b14864b9..254c9bff7b90c53c4393070762603ac697fbeb72 100644 (file)
@@ -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:
index 2a60f64acf28ed98c73f56a44a21cec50f5fd642..d8427852aabf48b20b2fd29ff8005d8e5ec8a96e 100644 (file)
@@ -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 */
index b8246e164240e5069d35103d9fe7f918f262808d..9875e954f25e185717813861869f0d8dac2c0dac 100644 (file)
@@ -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