diff options
author | Yusuke Endoh <[email protected]> | 2022-07-22 16:49:08 +0900 |
---|---|---|
committer | Yusuke Endoh <[email protected]> | 2022-07-22 23:10:24 +0900 |
commit | e763b1118ba1fada81d37da558f9d8e4da99f144 (patch) | |
tree | 2e1c85e7879eccbe211169a8510bc916ecba83f1 /iseq.h | |
parent | c7fd015d83740b3e758796f8c7d85cc64602f371 (diff) |
Move enum definitions out of struct definition
Notes
Notes:
Merged: https://github.com/ruby/ruby/pull/6169
Diffstat (limited to 'iseq.h')
-rw-r--r-- | iseq.h | 43 |
1 files changed, 22 insertions, 21 deletions
@@ -241,28 +241,29 @@ struct iseq_insn_info_entry { rb_event_flag_t events; }; +/* + * iseq type: + * CATCH_TYPE_RESCUE, CATCH_TYPE_ENSURE: + * use iseq as continuation. + * + * CATCH_TYPE_BREAK (iter): + * use iseq as key. + * + * CATCH_TYPE_BREAK (while), CATCH_TYPE_RETRY, + * CATCH_TYPE_REDO, CATCH_TYPE_NEXT: + * NULL. + */ +enum catch_type { + CATCH_TYPE_RESCUE = INT2FIX(1), + CATCH_TYPE_ENSURE = INT2FIX(2), + CATCH_TYPE_RETRY = INT2FIX(3), + CATCH_TYPE_BREAK = INT2FIX(4), + CATCH_TYPE_REDO = INT2FIX(5), + CATCH_TYPE_NEXT = INT2FIX(6) +}; + struct iseq_catch_table_entry { - enum catch_type { - CATCH_TYPE_RESCUE = INT2FIX(1), - CATCH_TYPE_ENSURE = INT2FIX(2), - CATCH_TYPE_RETRY = INT2FIX(3), - CATCH_TYPE_BREAK = INT2FIX(4), - CATCH_TYPE_REDO = INT2FIX(5), - CATCH_TYPE_NEXT = INT2FIX(6) - } type; - - /* - * iseq type: - * CATCH_TYPE_RESCUE, CATCH_TYPE_ENSURE: - * use iseq as continuation. - * - * CATCH_TYPE_BREAK (iter): - * use iseq as key. - * - * CATCH_TYPE_BREAK (while), CATCH_TYPE_RETRY, - * CATCH_TYPE_REDO, CATCH_TYPE_NEXT: - * NULL. - */ + enum catch_type type; rb_iseq_t *iseq; unsigned int start; |