This is the mail archive of the libc-alpha@sources.redhat.com mailing list for the glibc project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[PATCH] Apply the regparm and stdcall attributes to internal regexfunctions


This achieves a small but consistent 1% improvement in the sed testsuite (gcc 3.4 has unit-at-a-time mode which does this at -O2).

Paolo

2002-12-17 Paolo Bonzini <bonzini@gnu.org>

       * posix/regex_internal.c (re_string_construct_common,
       re_string_skip_chars, create_newstate_common,
       register_state, create_ci_newstate, create_cd_newstate,
       calc_state_hash): Add INTERNAL_ATTR to declaration.

       * posix/regex_internal.h (re_string_allocate,
       re_string_construct, re_string_reconstruct,
       re_string_realloc_buffers, build_wcs_buffer,
       build_wcs_upper_buffer, build_upper_buffer,
       re_string_translate_buffer, re_string_destruct,
       re_string_elem_size_at, re_string_char_size_at,
       re_string_wchar_at, re_string_context_at,
       re_node_set_alloc, re_node_set_init_1
       re_node_set_init_2, re_node_set_init_copy,
       re_node_set_add_intersect, re_node_set_init_union,
       re_node_set_merge, re_node_set_insert
       re_node_set_compare, re_node_set_contains
       re_node_set_remove_at, re_dfa_add_node,
       re_acquire_state, re_acquire_state_context,
       free_state): Likewise.

       * posix/regexec.c (match_ctx_init, match_ctx_clean,
       match_ctx_free, match_ctx_free_subtops,
       match_ctx_add_entry, search_cur_bkref_entry,
       match_ctx_clear_flag, match_ctx_add_subtop,
       match_ctx_add_sublast, sift_ctx_init,
       re_search_internal, re_search_2_stub, re_search_stub,
       re_copy_regs, acquire_init_state_context,
       prune_impossible_nodes, check_matching,
       check_halt_node_context, check_halt_state_context
       update_regs, proceed_next_node, push_fail_stack,
       pop_fail_stack, set_regs, free_fail_stack_return,
       sift_states_iter_mb, sift_states_backward
       update_cur_sifted_state, add_epsilon_src_nodes,
       sub_epsilon_src_nodes, check_dst_limits,
       check_dst_limits_calc_pos, check_subexp_limits,
       sift_states_bkref, clean_state_log_if_need,
       merge_state_array, transit_state,
       check_subexp_matching_top, transit_state_sb,
       transit_state_mb, transit_state_bkref,
       get_subexp, get_subexp_sub, find_subexp_node,
       check_arrival, check_arrival_add_next_nodes,
       find_collation_sequence_value, check_arrival_expand_ecl,
       check_arrival_expand_ecl_sub, expand_bkref_cache,
       build_trtable, check_node_accept_bytes, extend_buffers,
       group_nodes_into_DFAstates, check_node_accept): Likewise.

2002-12-17  Paolo Bonzini  <bonzini@gnu.org>

	* posix/regex_internal.c (re_string_construct_common,
	re_string_skip_chars, create_newstate_common,
	register_state, create_ci_newstate, create_cd_newstate,
	calc_state_hash): Add INTERNAL_ATTR to declaration.

	* posix/regex_internal.h (re_string_allocate,
	re_string_construct, re_string_reconstruct,
	re_string_realloc_buffers, build_wcs_buffer,
	build_wcs_upper_buffer, build_upper_buffer,
	re_string_translate_buffer, re_string_destruct,
	re_string_elem_size_at, re_string_char_size_at,
	re_string_wchar_at, re_string_context_at,
	re_node_set_alloc, re_node_set_init_1
	re_node_set_init_2, re_node_set_init_copy,
	re_node_set_add_intersect, re_node_set_init_union,
	re_node_set_merge, re_node_set_insert
	re_node_set_compare, re_node_set_contains
	re_node_set_remove_at, re_dfa_add_node,
	re_acquire_state, re_acquire_state_context,
	free_state): Likewise.

	* posix/regexec.c (match_ctx_init, match_ctx_clean,
	match_ctx_free, match_ctx_free_subtops,
	match_ctx_add_entry, search_cur_bkref_entry,
	match_ctx_clear_flag, match_ctx_add_subtop,
	match_ctx_add_sublast, sift_ctx_init,
	re_search_internal, re_search_2_stub, re_search_stub,
	re_copy_regs, acquire_init_state_context,
	prune_impossible_nodes, check_matching,
	check_halt_node_context, check_halt_state_context
	update_regs, proceed_next_node, push_fail_stack,
	pop_fail_stack, set_regs, free_fail_stack_return,
	sift_states_iter_mb, sift_states_backward
	update_cur_sifted_state, add_epsilon_src_nodes,
	sub_epsilon_src_nodes, check_dst_limits,
	check_dst_limits_calc_pos, check_subexp_limits,
	sift_states_bkref, clean_state_log_if_need,
	merge_state_array, transit_state,
	check_subexp_matching_top, transit_state_sb,
	transit_state_mb, transit_state_bkref,
	get_subexp, get_subexp_sub, find_subexp_node,
	check_arrival, check_arrival_add_next_nodes,
	find_collation_sequence_value, check_arrival_expand_ecl,
	check_arrival_expand_ecl_sub, expand_bkref_cache,
	build_trtable, check_node_accept_bytes, extend_buffers,
	group_nodes_into_DFAstates, check_node_accept): Likewise.
 
diff -rU3 sed-4.0.9/lib/regex_internal.c sed-4.0b/lib/regex_internal.c
--- sed-4.0.9/lib/regex_internal.c	2003-12-15 12:15:56.000000000 +0100
+++ sed-4.0b/lib/regex_internal.c	2003-12-17 11:35:57.000000000 +0100
@@ -21,25 +21,25 @@
 static void re_string_construct_common (const char *str, int len,
 					re_string_t *pstr,
 					RE_TRANSLATE_TYPE trans, int icase,
-					const re_dfa_t *dfa);
+					const re_dfa_t *dfa) INTERNAL_ATTR;
 #ifdef RE_ENABLE_I18N
 static int re_string_skip_chars (re_string_t *pstr, int new_raw_idx,
-				 wint_t *last_wc);
+				 wint_t *last_wc) INTERNAL_ATTR;
 #endif /* RE_ENABLE_I18N */
 static re_dfastate_t *create_newstate_common (re_dfa_t *dfa,
 					      const re_node_set *nodes,
-					      unsigned int hash);
+					      unsigned int hash) INTERNAL_ATTR;
 static reg_errcode_t register_state (re_dfa_t *dfa, re_dfastate_t *newstate,
-				     unsigned int hash);
+				     unsigned int hash) INTERNAL_ATTR;
 static re_dfastate_t *create_ci_newstate (re_dfa_t *dfa,
 					  const re_node_set *nodes,
-					  unsigned int hash);
+					  unsigned int hash) INTERNAL_ATTR;
 static re_dfastate_t *create_cd_newstate (re_dfa_t *dfa,
 					  const re_node_set *nodes,
 					  unsigned int context,
-					  unsigned int hash);
+					  unsigned int hash) INTERNAL_ATTR;
 static unsigned int inline calc_state_hash (const re_node_set *nodes,
-					    unsigned int context);
+					    unsigned int context) INTERNAL_ATTR;
 
 /* Functions for string operation.  */
 
diff -rU3 sed-4.0.9/lib/regex_internal.h sed-4.0b/lib/regex_internal.h
--- sed-4.0.9/lib/regex_internal.h	2003-12-15 12:15:56.000000000 +0100
+++ sed-4.0b/lib/regex_internal.h	2003-12-17 13:52:48.000000000 +0100
@@ -349,32 +349,39 @@
 
 struct re_dfa_t;
 typedef struct re_dfa_t re_dfa_t;
+
+#if defined __i386__
+#define INTERNAL_ATTR   __attribute ((regparm (3), stdcall))
+#else
+#define INTERNAL_ATTR
+#endif
+
 #ifndef RE_NO_INTERNAL_PROTOTYPES
 static reg_errcode_t re_string_allocate (re_string_t *pstr, const char *str,
 					 int len, int init_len,
 					 RE_TRANSLATE_TYPE trans, int icase,
-					 const re_dfa_t *dfa);
+					 const re_dfa_t *dfa) INTERNAL_ATTR;
 static reg_errcode_t re_string_construct (re_string_t *pstr, const char *str,
 					  int len, RE_TRANSLATE_TYPE trans,
-					  int icase, const re_dfa_t *dfa);
+					  int icase, const re_dfa_t *dfa) INTERNAL_ATTR;
 static reg_errcode_t re_string_reconstruct (re_string_t *pstr, int idx,
-					    int eflags, int newline);
+					    int eflags, int newline) INTERNAL_ATTR;
 static reg_errcode_t re_string_realloc_buffers (re_string_t *pstr,
-						int new_buf_len);
+						int new_buf_len) INTERNAL_ATTR;
 # ifdef RE_ENABLE_I18N
-static void build_wcs_buffer (re_string_t *pstr);
-static int build_wcs_upper_buffer (re_string_t *pstr);
+static void build_wcs_buffer (re_string_t *pstr) INTERNAL_ATTR;
+static int build_wcs_upper_buffer (re_string_t *pstr) INTERNAL_ATTR;
 # endif /* RE_ENABLE_I18N */
-static void build_upper_buffer (re_string_t *pstr);
-static void re_string_translate_buffer (re_string_t *pstr);
-static void re_string_destruct (re_string_t *pstr);
+static void build_upper_buffer (re_string_t *pstr) INTERNAL_ATTR;
+static void re_string_translate_buffer (re_string_t *pstr) INTERNAL_ATTR;
+static void re_string_destruct (re_string_t *pstr) INTERNAL_ATTR;
 # ifdef RE_ENABLE_I18N
-static int re_string_elem_size_at (const re_string_t *pstr, int idx);
-static inline int re_string_char_size_at (const re_string_t *pstr, int idx);
-static inline wint_t re_string_wchar_at (const re_string_t *pstr, int idx);
+static int re_string_elem_size_at (const re_string_t *pstr, int idx) INTERNAL_ATTR;
+static inline int re_string_char_size_at (const re_string_t *pstr, int idx) INTERNAL_ATTR;
+static inline wint_t re_string_wchar_at (const re_string_t *pstr, int idx) INTERNAL_ATTR;
 # endif /* RE_ENABLE_I18N */
 static unsigned int re_string_context_at (const re_string_t *input, int idx,
-					  int eflags, int newline_anchor);
+					  int eflags, int newline_anchor) INTERNAL_ATTR;
 static unsigned char re_string_peek_byte_case (const re_string_t *pstr,
 					       int idx);
 static unsigned char re_string_fetch_byte_case (re_string_t *pstr);
@@ -629,38 +636,38 @@
 };
 
 #ifndef RE_NO_INTERNAL_PROTOTYPES
-static reg_errcode_t re_node_set_alloc (re_node_set *set, int size);
-static reg_errcode_t re_node_set_init_1 (re_node_set *set, int elem);
+static reg_errcode_t re_node_set_alloc (re_node_set *set, int size) INTERNAL_ATTR;
+static reg_errcode_t re_node_set_init_1 (re_node_set *set, int elem) INTERNAL_ATTR;
 static reg_errcode_t re_node_set_init_2 (re_node_set *set, int elem1,
-					 int elem2);
+					 int elem2) INTERNAL_ATTR;
 #define re_node_set_init_empty(set) memset (set, '\0', sizeof (re_node_set))
 static reg_errcode_t re_node_set_init_copy (re_node_set *dest,
-					    const re_node_set *src);
+					    const re_node_set *src) INTERNAL_ATTR;
 static reg_errcode_t re_node_set_add_intersect (re_node_set *dest,
 						const re_node_set *src1,
-						const re_node_set *src2);
+						const re_node_set *src2) INTERNAL_ATTR;
 static reg_errcode_t re_node_set_init_union (re_node_set *dest,
 					     const re_node_set *src1,
-					     const re_node_set *src2);
+					     const re_node_set *src2) INTERNAL_ATTR;
 static reg_errcode_t re_node_set_merge (re_node_set *dest,
-					const re_node_set *src);
-static int re_node_set_insert (re_node_set *set, int elem);
+					const re_node_set *src) INTERNAL_ATTR;
+static int re_node_set_insert (re_node_set *set, int elem) INTERNAL_ATTR;
 static int re_node_set_compare (const re_node_set *set1,
-				const re_node_set *set2);
-static int re_node_set_contains (const re_node_set *set, int elem);
-static void re_node_set_remove_at (re_node_set *set, int idx);
+				const re_node_set *set2) INTERNAL_ATTR;
+static int re_node_set_contains (const re_node_set *set, int elem) INTERNAL_ATTR;
+static void re_node_set_remove_at (re_node_set *set, int idx) INTERNAL_ATTR;
 #define re_node_set_remove(set,id) \
   (re_node_set_remove_at (set, re_node_set_contains (set, id) - 1))
 #define re_node_set_empty(p) ((p)->nelem = 0)
 #define re_node_set_free(set) re_free ((set)->elems)
-static int re_dfa_add_node (re_dfa_t *dfa, re_token_t token, int mode);
+static int re_dfa_add_node (re_dfa_t *dfa, re_token_t token, int mode) INTERNAL_ATTR;
 static re_dfastate_t *re_acquire_state (reg_errcode_t *err, re_dfa_t *dfa,
-					const re_node_set *nodes);
+					const re_node_set *nodes) INTERNAL_ATTR;
 static re_dfastate_t *re_acquire_state_context (reg_errcode_t *err,
 						re_dfa_t *dfa,
 						const re_node_set *nodes,
-						unsigned int context);
-static void free_state (re_dfastate_t *state);
+						unsigned int context) INTERNAL_ATTR;
+static void free_state (re_dfastate_t *state) INTERNAL_ATTR;
 #endif
 
 
diff -rU3 sed-4.0.9/lib/regexec.c sed-4.0b/lib/regexec.c
--- sed-4.0.9/lib/regexec.c	2003-12-17 09:22:45.000000000 +0100
+++ sed-4.0b/lib/regexec.c	2003-12-17 12:24:10.000000000 +0100
@@ -19,176 +19,176 @@
    02111-1307 USA.  */
 
 static reg_errcode_t match_ctx_init (re_match_context_t *cache, int eflags,
-				     re_string_t *input, int n);
-static void match_ctx_clean (re_match_context_t *mctx);
-static void match_ctx_free (re_match_context_t *cache);
-static void match_ctx_free_subtops (re_match_context_t *mctx);
+				     re_string_t *input, int n) INTERNAL_ATTR;
+static void match_ctx_clean (re_match_context_t *mctx) INTERNAL_ATTR;
+static void match_ctx_free (re_match_context_t *cache) INTERNAL_ATTR;
+static void match_ctx_free_subtops (re_match_context_t *mctx) INTERNAL_ATTR;
 static reg_errcode_t match_ctx_add_entry (re_match_context_t *cache, int node,
-					  int str_idx, int from, int to);
-static int search_cur_bkref_entry (re_match_context_t *mctx, int str_idx);
-static void match_ctx_clear_flag (re_match_context_t *mctx);
+					  int str_idx, int from, int to) INTERNAL_ATTR;
+static int search_cur_bkref_entry (re_match_context_t *mctx, int str_idx) INTERNAL_ATTR;
+static void match_ctx_clear_flag (re_match_context_t *mctx) INTERNAL_ATTR;
 static reg_errcode_t match_ctx_add_subtop (re_match_context_t *mctx, int node,
-					   int str_idx);
+					   int str_idx) INTERNAL_ATTR;
 static re_sub_match_last_t * match_ctx_add_sublast (re_sub_match_top_t *subtop,
-						   int node, int str_idx);
+						   int node, int str_idx) INTERNAL_ATTR;
 static void sift_ctx_init (re_sift_context_t *sctx, re_dfastate_t **sifted_sts,
 			   re_dfastate_t **limited_sts, int last_node,
-			   int last_str_idx, int check_subexp);
+			   int last_str_idx, int check_subexp) INTERNAL_ATTR;
 static reg_errcode_t re_search_internal (const regex_t *preg,
 					 const char *string, int length,
 					 int start, int range, int stop,
 					 size_t nmatch, regmatch_t pmatch[],
-					 int eflags);
+					 int eflags) INTERNAL_ATTR;
 static int re_search_2_stub (struct re_pattern_buffer *bufp,
 			     const char *string1, int length1,
 			     const char *string2, int length2,
 			     int start, int range, struct re_registers *regs,
-			     int stop, int ret_len);
+			     int stop, int ret_len) INTERNAL_ATTR;
 static int re_search_stub (struct re_pattern_buffer *bufp,
 			   const char *string, int length, int start,
 			   int range, int stop, struct re_registers *regs,
-			   int ret_len);
+			   int ret_len) INTERNAL_ATTR;
 static unsigned re_copy_regs (struct re_registers *regs, regmatch_t *pmatch,
-			      int nregs, int regs_allocated);
+			      int nregs, int regs_allocated) INTERNAL_ATTR;
 static inline re_dfastate_t *acquire_init_state_context
   (reg_errcode_t *err, const regex_t *preg, const re_match_context_t *mctx,
-   int idx) __attribute ((always_inline));
+   int idx) __attribute ((always_inline)) INTERNAL_ATTR;
 static reg_errcode_t prune_impossible_nodes (const regex_t *preg,
-					     re_match_context_t *mctx);
+					     re_match_context_t *mctx) INTERNAL_ATTR;
 static int check_matching (const regex_t *preg, re_match_context_t *mctx,
-			   int fl_longest_match);
+			   int fl_longest_match) INTERNAL_ATTR;
 static int check_halt_node_context (const re_dfa_t *dfa, int node,
-				    unsigned int context);
+				    unsigned int context) INTERNAL_ATTR;
 static int check_halt_state_context (const regex_t *preg,
 				     const re_dfastate_t *state,
-				     const re_match_context_t *mctx, int idx);
+				     const re_match_context_t *mctx, int idx) INTERNAL_ATTR;
 static void update_regs (re_dfa_t *dfa, regmatch_t *pmatch, int cur_node,
-			 int cur_idx, int nmatch);
+			 int cur_idx, int nmatch) INTERNAL_ATTR;
 static int proceed_next_node (const regex_t *preg, int nregs, regmatch_t *regs,
 			      const re_match_context_t *mctx,
 			      int *pidx, int node, re_node_set *eps_via_nodes,
-			      struct re_fail_stack_t *fs);
+			      struct re_fail_stack_t *fs) INTERNAL_ATTR;
 static reg_errcode_t push_fail_stack (struct re_fail_stack_t *fs,
 				      int str_idx, int *dests, int nregs,
 				      regmatch_t *regs,
-				      re_node_set *eps_via_nodes);
+				      re_node_set *eps_via_nodes) INTERNAL_ATTR;
 static int pop_fail_stack (struct re_fail_stack_t *fs, int *pidx, int nregs,
-			   regmatch_t *regs, re_node_set *eps_via_nodes);
+			   regmatch_t *regs, re_node_set *eps_via_nodes) INTERNAL_ATTR;
 static reg_errcode_t set_regs (const regex_t *preg,
 			       const re_match_context_t *mctx,
 			       size_t nmatch, regmatch_t *pmatch,
-			       int fl_backtrack);
-static reg_errcode_t free_fail_stack_return (struct re_fail_stack_t *fs);
+			       int fl_backtrack) INTERNAL_ATTR;
+static reg_errcode_t free_fail_stack_return (struct re_fail_stack_t *fs) INTERNAL_ATTR;
 
 #ifdef RE_ENABLE_I18N
 static int sift_states_iter_mb (const regex_t *preg,
 				const re_match_context_t *mctx,
 				re_sift_context_t *sctx,
-				int node_idx, int str_idx, int max_str_idx);
+				int node_idx, int str_idx, int max_str_idx) INTERNAL_ATTR;
 #endif /* RE_ENABLE_I18N */
 static reg_errcode_t sift_states_backward (const regex_t *preg,
 					   re_match_context_t *mctx,
-					   re_sift_context_t *sctx);
+					   re_sift_context_t *sctx) INTERNAL_ATTR;
 static reg_errcode_t update_cur_sifted_state (const regex_t *preg,
 					      re_match_context_t *mctx,
 					      re_sift_context_t *sctx,
 					      int str_idx,
-					      re_node_set *dest_nodes);
+					      re_node_set *dest_nodes) INTERNAL_ATTR;
 static reg_errcode_t add_epsilon_src_nodes (re_dfa_t *dfa,
 					    re_node_set *dest_nodes,
-					    const re_node_set *candidates);
+					    const re_node_set *candidates) INTERNAL_ATTR;
 static reg_errcode_t sub_epsilon_src_nodes (re_dfa_t *dfa, int node,
 					    re_node_set *dest_nodes,
-					    const re_node_set *and_nodes);
+					    const re_node_set *and_nodes) INTERNAL_ATTR;
 static int check_dst_limits (re_dfa_t *dfa, re_node_set *limits,
 			     re_match_context_t *mctx, int dst_node,
-			     int dst_idx, int src_node, int src_idx);
+			     int dst_idx, int src_node, int src_idx) INTERNAL_ATTR;
 static int check_dst_limits_calc_pos (re_dfa_t *dfa, re_match_context_t *mctx,
 				      int limit, re_node_set *eclosures,
-				      int subexp_idx, int node, int str_idx);
+				      int subexp_idx, int node, int str_idx) INTERNAL_ATTR;
 static reg_errcode_t check_subexp_limits (re_dfa_t *dfa,
 					  re_node_set *dest_nodes,
 					  const re_node_set *candidates,
 					  re_node_set *limits,
 					  struct re_backref_cache_entry *bkref_ents,
-					  int str_idx);
+					  int str_idx) INTERNAL_ATTR;
 static reg_errcode_t sift_states_bkref (const regex_t *preg,
 					re_match_context_t *mctx,
 					re_sift_context_t *sctx,
-					int str_idx, re_node_set *dest_nodes);
+					int str_idx, re_node_set *dest_nodes) INTERNAL_ATTR;
 static reg_errcode_t clean_state_log_if_need (re_match_context_t *mctx,
-					      int next_state_log_idx);
+					      int next_state_log_idx) INTERNAL_ATTR;
 static reg_errcode_t merge_state_array (re_dfa_t *dfa, re_dfastate_t **dst,
-					re_dfastate_t **src, int num);
+					re_dfastate_t **src, int num) INTERNAL_ATTR;
 static re_dfastate_t *transit_state (reg_errcode_t *err, const regex_t *preg,
 				     re_match_context_t *mctx,
-				     re_dfastate_t *state);
+				     re_dfastate_t *state) INTERNAL_ATTR;
 static reg_errcode_t check_subexp_matching_top (re_dfa_t *dfa,
 						re_match_context_t *mctx,
 						re_node_set *cur_nodes,
-						int str_idx);
+						int str_idx) INTERNAL_ATTR;
 #if 0
 static re_dfastate_t *transit_state_sb (reg_errcode_t *err, const regex_t *preg,
 					re_dfastate_t *pstate,
-					re_match_context_t *mctx);
+					re_match_context_t *mctx) INTERNAL_ATTR;
 #endif
 #ifdef RE_ENABLE_I18N
 static reg_errcode_t transit_state_mb (const regex_t *preg,
 				       re_dfastate_t *pstate,
-				       re_match_context_t *mctx);
+				       re_match_context_t *mctx) INTERNAL_ATTR;
 #endif /* RE_ENABLE_I18N */
 static reg_errcode_t transit_state_bkref (const regex_t *preg,
 					  const re_node_set *nodes,
-					  re_match_context_t *mctx);
+					  re_match_context_t *mctx) INTERNAL_ATTR;
 static reg_errcode_t get_subexp (const regex_t *preg, re_match_context_t *mctx,
-				 int bkref_node, int bkref_str_idx);
+				 int bkref_node, int bkref_str_idx) INTERNAL_ATTR;
 static reg_errcode_t get_subexp_sub (const regex_t *preg,
 				     re_match_context_t *mctx,
 				     const re_sub_match_top_t *sub_top,
 				     re_sub_match_last_t *sub_last,
-				     int bkref_node, int bkref_str);
+				     int bkref_node, int bkref_str) INTERNAL_ATTR;
 static int find_subexp_node (const re_dfa_t *dfa, const re_node_set *nodes,
-			     int subexp_idx, int type);
+			     int subexp_idx, int type) INTERNAL_ATTR;
 static reg_errcode_t check_arrival (const regex_t *preg,
 				    re_match_context_t *mctx,
 				    state_array_t *path, int top_node,
 				    int top_str, int last_node, int last_str,
-				    int type);
+				    int type) INTERNAL_ATTR;
 static reg_errcode_t check_arrival_add_next_nodes (const regex_t *preg,
 						   re_dfa_t *dfa,
 						   re_match_context_t *mctx,
 						   int str_idx,
 						   re_node_set *cur_nodes,
-						   re_node_set *next_nodes);
+						   re_node_set *next_nodes) INTERNAL_ATTR;
 static reg_errcode_t check_arrival_expand_ecl (re_dfa_t *dfa,
 					       re_node_set *cur_nodes,
-					       int ex_subexp, int type);
+					       int ex_subexp, int type) INTERNAL_ATTR;
 static reg_errcode_t check_arrival_expand_ecl_sub (re_dfa_t *dfa,
 						   re_node_set *dst_nodes,
 						   int target, int ex_subexp,
-						   int type);
+						   int type) INTERNAL_ATTR;
 static reg_errcode_t expand_bkref_cache (const regex_t *preg,
 					 re_match_context_t *mctx,
 					 re_node_set *cur_nodes, int cur_str,
 					 int last_str, int subexp_num,
-					 int type);
+					 int type) INTERNAL_ATTR;
 static re_dfastate_t **build_trtable (const regex_t *dfa,
-				      re_dfastate_t *state);
+				      re_dfastate_t *state) INTERNAL_ATTR;
 #ifdef RE_ENABLE_I18N
 static int check_node_accept_bytes (const regex_t *preg, int node_idx,
-				    const re_string_t *input, int idx);
+				    const re_string_t *input, int idx) INTERNAL_ATTR;
 # ifdef _LIBC
 static unsigned int find_collation_sequence_value (const unsigned char *mbs,
-						   size_t name_len);
+						   size_t name_len) INTERNAL_ATTR;
 # endif /* _LIBC */
 #endif /* RE_ENABLE_I18N */
 static int group_nodes_into_DFAstates (const regex_t *dfa,
 				       const re_dfastate_t *state,
 				       re_node_set *states_node,
-				       bitset *states_ch);
+				       bitset *states_ch) INTERNAL_ATTR;
 static int check_node_accept (const regex_t *preg, const re_token_t *node,
-			      const re_match_context_t *mctx, int idx);
-static reg_errcode_t extend_buffers (re_match_context_t *mctx);
+			      const re_match_context_t *mctx, int idx) INTERNAL_ATTR;
+static reg_errcode_t extend_buffers (re_match_context_t *mctx) INTERNAL_ATTR;
 
 /* Entry point for POSIX code.  */
 

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]