Skip to content

perl_matcher: replace vtable dispatch with switch-case in match_all_s… - #1

Closed
e4d08 wants to merge 1 commit into
developfrom
performance/no_vtables
Closed

perl_matcher: replace vtable dispatch with switch-case in match_all_s…#1
e4d08 wants to merge 1 commit into
developfrom
performance/no_vtables

Conversation

@e4d08

@e4d08 e4d08 commented Jul 27, 2026

Copy link
Copy Markdown
Owner

…tates and unwind

Remove static arrays of member function pointers (s_match_vtable, s_unwind_table) and replace them with switch-case dispatch in match_all_states() and unwind(). This eliminates static data that could cause runtime initialization issues on some compilers, and improves clarity.

Also replace magic number arguments to saved_state constructor with named enum values from saved_state_type.

…tates and unwind

Remove static arrays of member function pointers (s_match_vtable, s_unwind_table)
and replace them with switch-case dispatch in match_all_states() and unwind().
This eliminates static data that could cause runtime initialization issues on
some compilers, and improves clarity.

Also replace magic number arguments to saved_state constructor with named
enum values from saved_state_type.
@e4d08 e4d08 closed this Jul 27, 2026
@e4d08 e4d08 reopened this Jul 27, 2026
@e4d08 e4d08 closed this Jul 27, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant