summaryrefslogtreecommitdiff
path: root/iseq.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 /iseq.h
parentc7fd015d83740b3e758796f8c7d85cc64602f371 (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.h43
1 files changed, 22 insertions, 21 deletions
diff --git a/iseq.h b/iseq.h
index 63991d95ff..062ed33d86 100644
--- a/iseq.h
+++ b/iseq.h
@@ -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;