summaryrefslogtreecommitdiff
path: root/ujit_codegen.c
diff options
context:
space:
mode:
authorMaxime Chevalier-Boisvert <maxime.chevalierboisvert@shopify.com>2021-03-04 12:05:18 -0500
committerAlan Wu <XrXr@users.noreply.github.com>2021-10-20 18:19:30 -0400
commitabc016ad2c85a15ad6a512be57f47d893bc81e27 (patch)
tree81e5d7c6d0417204a71cb78cba1da8fdfd528682 /ujit_codegen.c
parent5c497dfd7f86c88c9730dda397fecb3aa943e84d (diff)
WIP refactor block lists to use darray
Diffstat (limited to 'ujit_codegen.c')
-rw-r--r--ujit_codegen.c19
1 files changed, 18 insertions, 1 deletions
diff --git a/ujit_codegen.c b/ujit_codegen.c
index db8b48a2e8..41662a8b2d 100644
--- a/ujit_codegen.c
+++ b/ujit_codegen.c
@@ -576,13 +576,27 @@ gen_getinstancevariable(jitstate_t* jit, ctx_t* ctx)
+ /*
+ num_versions = count_block_versions(this_instruction);
+ if (num_versions > N)
+ return JIT_CANT_COMPILE;
- /*
+
if (defer_compilation(this_instruction, ctx))
return JIT_END_BLOCK;
+
VALUE top_val = jit_peek_at_stack();
+
+
+
+
+ class = get_ruby_class(top_val);
+
+
+
+ guard_object_class(class, current_instr);
*/
@@ -593,6 +607,9 @@ gen_getinstancevariable(jitstate_t* jit, ctx_t* ctx)
+
+
+
// If the class uses the default allocator, instances should all be T_OBJECT
// NOTE: This assumes nobody changes the allocator of the class after allocation.
// Eventually, we can encode whether an object is T_OBJECT or not