Created
June 21, 2010 10:19
-
-
Save gfx/446673 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #ifdef TX_DIRECT_THREADED_CODE | |
| #define LABEL(x) CAT2(TX_DTC_, x) | |
| #define LABEL_PTR(x) &&LABEL(x) | |
| static void const* const* | |
| tx_runops(pTHX_ tx_state_t* const st) { | |
| static const void* const ops_address_table[] = { | |
| LABEL_PTR(noop), | |
| LABEL_PTR(move_to_sb), | |
| LABEL_PTR(move_from_sb), | |
| LABEL_PTR(save_to_lvar), | |
| LABEL_PTR(load_lvar), | |
| LABEL_PTR(load_lvar_to_sb), | |
| LABEL_PTR(localize_s), | |
| LABEL_PTR(push), | |
| LABEL_PTR(pushmark), | |
| LABEL_PTR(nil), | |
| LABEL_PTR(literal), | |
| LABEL_PTR(literal_i), | |
| LABEL_PTR(fetch_s), | |
| LABEL_PTR(fetch_field), | |
| LABEL_PTR(fetch_field_s), | |
| LABEL_PTR(print), | |
| LABEL_PTR(print_raw), | |
| LABEL_PTR(print_raw_s), | |
| LABEL_PTR(include), | |
| LABEL_PTR(for_start), | |
| LABEL_PTR(for_iter), | |
| LABEL_PTR(add), | |
| LABEL_PTR(sub), | |
| LABEL_PTR(mul), | |
| LABEL_PTR(div), | |
| LABEL_PTR(mod), | |
| LABEL_PTR(concat), | |
| LABEL_PTR(and), | |
| LABEL_PTR(dand), | |
| LABEL_PTR(or), | |
| LABEL_PTR(dor), | |
| LABEL_PTR(not), | |
| LABEL_PTR(minus), | |
| LABEL_PTR(max_index), | |
| LABEL_PTR(builtin_mark_raw), | |
| LABEL_PTR(builtin_unmark_raw), | |
| LABEL_PTR(builtin_html_escape), | |
| LABEL_PTR(eq), | |
| LABEL_PTR(ne), | |
| LABEL_PTR(lt), | |
| LABEL_PTR(le), | |
| LABEL_PTR(gt), | |
| LABEL_PTR(ge), | |
| LABEL_PTR(ncmp), | |
| LABEL_PTR(scmp), | |
| LABEL_PTR(symbol), | |
| LABEL_PTR(macro_end), | |
| LABEL_PTR(funcall), | |
| LABEL_PTR(methodcall_s), | |
| LABEL_PTR(make_array), | |
| LABEL_PTR(make_hash), | |
| LABEL_PTR(enter), | |
| LABEL_PTR(leave), | |
| LABEL_PTR(goto), | |
| LABEL_PTR(depend), | |
| LABEL_PTR(macro_begin), | |
| LABEL_PTR(macro_nargs), | |
| LABEL_PTR(macro_outer), | |
| LABEL_PTR(end) | |
| }; /* end of ops_address_table */ | |
| if(UNLIKELY(st == NULL)) { | |
| return ops_address_table; | |
| } | |
| goto *(st->pc->exec_code); /* start */ | |
| /* dispatch */ | |
| LABEL(noop ): TXCODE_noop (aTHX_ st); goto *(st->pc->exec_code); | |
| LABEL(move_to_sb ): TXCODE_move_to_sb (aTHX_ st); goto *(st->pc->exec_code); | |
| LABEL(move_from_sb ): TXCODE_move_from_sb (aTHX_ st); goto *(st->pc->exec_code); | |
| LABEL(save_to_lvar ): TXCODE_save_to_lvar (aTHX_ st); goto *(st->pc->exec_code); | |
| LABEL(load_lvar ): TXCODE_load_lvar (aTHX_ st); goto *(st->pc->exec_code); | |
| LABEL(load_lvar_to_sb ): TXCODE_load_lvar_to_sb (aTHX_ st); goto *(st->pc->exec_code); | |
| LABEL(localize_s ): TXCODE_localize_s (aTHX_ st); goto *(st->pc->exec_code); | |
| LABEL(push ): TXCODE_push (aTHX_ st); goto *(st->pc->exec_code); | |
| LABEL(pushmark ): TXCODE_pushmark (aTHX_ st); goto *(st->pc->exec_code); | |
| LABEL(nil ): TXCODE_nil (aTHX_ st); goto *(st->pc->exec_code); | |
| LABEL(literal ): TXCODE_literal (aTHX_ st); goto *(st->pc->exec_code); | |
| LABEL(literal_i ): TXCODE_literal_i (aTHX_ st); goto *(st->pc->exec_code); | |
| LABEL(fetch_s ): TXCODE_fetch_s (aTHX_ st); goto *(st->pc->exec_code); | |
| LABEL(fetch_field ): TXCODE_fetch_field (aTHX_ st); goto *(st->pc->exec_code); | |
| LABEL(fetch_field_s ): TXCODE_fetch_field_s (aTHX_ st); goto *(st->pc->exec_code); | |
| LABEL(print ): TXCODE_print (aTHX_ st); goto *(st->pc->exec_code); | |
| LABEL(print_raw ): TXCODE_print_raw (aTHX_ st); goto *(st->pc->exec_code); | |
| LABEL(print_raw_s ): TXCODE_print_raw_s (aTHX_ st); goto *(st->pc->exec_code); | |
| LABEL(include ): TXCODE_include (aTHX_ st); goto *(st->pc->exec_code); | |
| LABEL(for_start ): TXCODE_for_start (aTHX_ st); goto *(st->pc->exec_code); | |
| LABEL(for_iter ): TXCODE_for_iter (aTHX_ st); goto *(st->pc->exec_code); | |
| LABEL(add ): TXCODE_add (aTHX_ st); goto *(st->pc->exec_code); | |
| LABEL(sub ): TXCODE_sub (aTHX_ st); goto *(st->pc->exec_code); | |
| LABEL(mul ): TXCODE_mul (aTHX_ st); goto *(st->pc->exec_code); | |
| LABEL(div ): TXCODE_div (aTHX_ st); goto *(st->pc->exec_code); | |
| LABEL(mod ): TXCODE_mod (aTHX_ st); goto *(st->pc->exec_code); | |
| LABEL(concat ): TXCODE_concat (aTHX_ st); goto *(st->pc->exec_code); | |
| LABEL(and ): TXCODE_and (aTHX_ st); goto *(st->pc->exec_code); | |
| LABEL(dand ): TXCODE_dand (aTHX_ st); goto *(st->pc->exec_code); | |
| LABEL(or ): TXCODE_or (aTHX_ st); goto *(st->pc->exec_code); | |
| LABEL(dor ): TXCODE_dor (aTHX_ st); goto *(st->pc->exec_code); | |
| LABEL(not ): TXCODE_not (aTHX_ st); goto *(st->pc->exec_code); | |
| LABEL(minus ): TXCODE_minus (aTHX_ st); goto *(st->pc->exec_code); | |
| LABEL(max_index ): TXCODE_max_index (aTHX_ st); goto *(st->pc->exec_code); | |
| LABEL(builtin_mark_raw ): TXCODE_builtin_mark_raw (aTHX_ st); goto *(st->pc->exec_code); | |
| LABEL(builtin_unmark_raw ): TXCODE_builtin_unmark_raw (aTHX_ st); goto *(st->pc->exec_code); | |
| LABEL(builtin_html_escape ): TXCODE_builtin_html_escape (aTHX_ st); goto *(st->pc->exec_code); | |
| LABEL(eq ): TXCODE_eq (aTHX_ st); goto *(st->pc->exec_code); | |
| LABEL(ne ): TXCODE_ne (aTHX_ st); goto *(st->pc->exec_code); | |
| LABEL(lt ): TXCODE_lt (aTHX_ st); goto *(st->pc->exec_code); | |
| LABEL(le ): TXCODE_le (aTHX_ st); goto *(st->pc->exec_code); | |
| LABEL(gt ): TXCODE_gt (aTHX_ st); goto *(st->pc->exec_code); | |
| LABEL(ge ): TXCODE_ge (aTHX_ st); goto *(st->pc->exec_code); | |
| LABEL(ncmp ): TXCODE_ncmp (aTHX_ st); goto *(st->pc->exec_code); | |
| LABEL(scmp ): TXCODE_scmp (aTHX_ st); goto *(st->pc->exec_code); | |
| LABEL(symbol ): TXCODE_symbol (aTHX_ st); goto *(st->pc->exec_code); | |
| LABEL(macro_end ): TXCODE_macro_end (aTHX_ st); goto *(st->pc->exec_code); | |
| LABEL(funcall ): TXCODE_funcall (aTHX_ st); goto *(st->pc->exec_code); | |
| LABEL(methodcall_s ): TXCODE_methodcall_s (aTHX_ st); goto *(st->pc->exec_code); | |
| LABEL(make_array ): TXCODE_make_array (aTHX_ st); goto *(st->pc->exec_code); | |
| LABEL(make_hash ): TXCODE_make_hash (aTHX_ st); goto *(st->pc->exec_code); | |
| LABEL(enter ): TXCODE_enter (aTHX_ st); goto *(st->pc->exec_code); | |
| LABEL(leave ): TXCODE_leave (aTHX_ st); goto *(st->pc->exec_code); | |
| LABEL(goto ): TXCODE_goto (aTHX_ st); goto *(st->pc->exec_code); | |
| LABEL(depend ): TXCODE_depend (aTHX_ st); goto *(st->pc->exec_code); | |
| LABEL(macro_begin ): TXCODE_macro_begin (aTHX_ st); goto *(st->pc->exec_code); | |
| LABEL(macro_nargs ): TXCODE_macro_nargs (aTHX_ st); goto *(st->pc->exec_code); | |
| LABEL(macro_outer ): TXCODE_macro_outer (aTHX_ st); goto *(st->pc->exec_code); | |
| LABEL(end): | |
| return NULL; | |
| } /* end of tx_runops() */ | |
| #undef LABEL | |
| #undef LABEL_PTR | |
| #endif /* TX_DIRECT_THREADED_CODE */ |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment