summaryrefslogtreecommitdiff
path: root/variable.h
diff options
context:
space:
mode:
authorJemma Issroff <jemmaissroff@gmail.com>2022-10-03 11:14:32 -0400
committerAaron Patterson <tenderlove@ruby-lang.org>2022-10-11 08:40:56 -0700
commitad63b668e22e21c352b852f3119ae98a7acf99f1 (patch)
treecdaea65a9cae753a25f521c06d9d6a205085335f /variable.h
parent5ffbb2be187681a37f2722ce1d7db4ec5c128464 (diff)
downloadruby-ad63b668e22e21c352b852f3119ae98a7acf99f1.tar.gz
Revert "Revert "This commit implements the Object Shapes technique in CRuby.""
This reverts commit 9a6803c90b817f70389cae10d60b50ad752da48f.
Diffstat (limited to 'variable.h')
-rw-r--r--variable.h10
1 files changed, 9 insertions, 1 deletions
diff --git a/variable.h b/variable.h
index 55596b00de..314ac82df0 100644
--- a/variable.h
+++ b/variable.h
@@ -11,11 +11,19 @@
/* per-object */
struct gen_ivtbl {
+#if !SHAPE_IN_BASIC_FLAGS
+ uint16_t shape_id;
+#endif
uint32_t numiv;
VALUE ivptr[FLEX_ARY_LEN];
};
int rb_ivar_generic_ivtbl_lookup(VALUE obj, struct gen_ivtbl **);
-VALUE rb_ivar_generic_lookup_with_index(VALUE obj, ID id, uint32_t index);
+
+#include "shape.h"
+#if !SHAPE_IN_BASIC_FLAGS
+shape_id_t rb_generic_shape_id(VALUE obj);
+#endif
+
#endif /* RUBY_TOPLEVEL_VARIABLE_H */