mirror of
https://github.com/ruby/ruby.git
synced 2025-09-15 16:44:01 +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
25
vm_core.h
25
vm_core.h
|
@ -339,18 +339,21 @@ typedef uintptr_t iseq_bits_t;
|
|||
|
||||
#define ISEQ_IS_SIZE(body) (body->ic_size + body->ivc_size + body->ise_size + body->icvarc_size)
|
||||
|
||||
/* instruction sequence type */
|
||||
enum iseq_type {
|
||||
ISEQ_TYPE_TOP,
|
||||
ISEQ_TYPE_METHOD,
|
||||
ISEQ_TYPE_BLOCK,
|
||||
ISEQ_TYPE_CLASS,
|
||||
ISEQ_TYPE_RESCUE,
|
||||
ISEQ_TYPE_ENSURE,
|
||||
ISEQ_TYPE_EVAL,
|
||||
ISEQ_TYPE_MAIN,
|
||||
ISEQ_TYPE_PLAIN
|
||||
};
|
||||
|
||||
struct rb_iseq_constant_body {
|
||||
enum iseq_type {
|
||||
ISEQ_TYPE_TOP,
|
||||
ISEQ_TYPE_METHOD,
|
||||
ISEQ_TYPE_BLOCK,
|
||||
ISEQ_TYPE_CLASS,
|
||||
ISEQ_TYPE_RESCUE,
|
||||
ISEQ_TYPE_ENSURE,
|
||||
ISEQ_TYPE_EVAL,
|
||||
ISEQ_TYPE_MAIN,
|
||||
ISEQ_TYPE_PLAIN
|
||||
} type; /* instruction sequence type */
|
||||
enum iseq_type type;
|
||||
|
||||
unsigned int iseq_size;
|
||||
VALUE *iseq_encoded; /* encoded iseq (insn addr and operands) */
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue