summaryrefslogtreecommitdiff
path: root/vm_core.h
diff options
context:
space:
mode:
authorTakashi Kokubun <takashikkbn@gmail.com>2023-03-11 13:32:58 -0800
committerTakashi Kokubun <takashikkbn@gmail.com>2023-03-11 14:19:46 -0800
commit0c0c88d383a09fef18d8cf8a1457d1649a2cbd46 (patch)
tree4c625c35cb6835b7c3e55de39d5087e393fd4cda /vm_core.h
parent3a02c7818cb6cbcc70957dfc449ebf32f9dd9e0b (diff)
downloadruby-0c0c88d383a09fef18d8cf8a1457d1649a2cbd46.tar.gz
Support multiple attributes with Primitive.attr!
Diffstat (limited to 'vm_core.h')
-rw-r--r--vm_core.h13
1 files changed, 7 insertions, 6 deletions
diff --git a/vm_core.h b/vm_core.h
index 2bdd278b46..53019b08a3 100644
--- a/vm_core.h
+++ b/vm_core.h
@@ -365,6 +365,12 @@ enum rb_iseq_type {
ISEQ_TYPE_PLAIN
};
+// Attributes specified by Primitive.attr!
+enum rb_builtin_attr {
+ // If true, this ISeq does not call methods.
+ BUILTIN_ATTR_INLINE = 0x01,
+};
+
struct rb_iseq_constant_body {
enum rb_iseq_type type;
@@ -484,12 +490,7 @@ struct rb_iseq_constant_body {
unsigned int stack_max; /* for stack overflow check */
bool catch_except_p; // If a frame of this ISeq may catch exception, set true.
- // If true, this ISeq is leaf *and* backtraces are not used, for example,
- // by rb_profile_frames. We verify only leafness on VM_CHECK_MODE though.
- // Note that GC allocations might use backtraces due to
- // ObjectSpace#trace_object_allocations.
- // For more details, see: https://bugs.ruby-lang.org/issues/16956
- bool builtin_inline_p;
+ unsigned int builtin_attrs; // Union of rb_builtin_attr
union {
iseq_bits_t * list; /* Find references for GC */