summaryrefslogtreecommitdiff
path: root/vm_core.h
diff options
context:
space:
mode:
authorYusuke Endoh <mame@ruby-lang.org>2022-07-22 16:49:08 +0900
committerYusuke Endoh <mame@ruby-lang.org>2022-07-22 23:10:24 +0900
commite763b1118ba1fada81d37da558f9d8e4da99f144 (patch)
tree2e1c85e7879eccbe211169a8510bc916ecba83f1 /vm_core.h
parentc7fd015d83740b3e758796f8c7d85cc64602f371 (diff)
Move enum definitions out of struct definition
Notes
Notes: Merged: https://github.com/ruby/ruby/pull/6169
Diffstat (limited to 'vm_core.h')
-rw-r--r--vm_core.h25
1 files changed, 14 insertions, 11 deletions
diff --git a/vm_core.h b/vm_core.h
index 025dc76798..82a4af0e5c 100644
--- a/vm_core.h
+++ b/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) */