mirror of
https://github.com/ruby/ruby.git
synced 2025-08-15 13:39:04 +02:00
Move enum definitions out of struct definition
This commit is contained in:
parent
c7fd015d83
commit
e763b1118b
Notes:
git
2022-07-22 23:10:46 +09:00
4 changed files with 107 additions and 101 deletions
43
iseq.h
43
iseq.h
|
@ -241,28 +241,29 @@ struct iseq_insn_info_entry {
|
|||
rb_event_flag_t events;
|
||||
};
|
||||
|
||||
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 {
|
||||
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)
|
||||
};
|
||||
|
||||
/*
|
||||
* 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.
|
||||
*/
|
||||
struct iseq_catch_table_entry {
|
||||
enum catch_type type;
|
||||
rb_iseq_t *iseq;
|
||||
|
||||
unsigned int start;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue