summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlan Wu <[email protected]>2021-03-04 15:56:34 -0500
committerAlan Wu <[email protected]>2021-10-20 18:19:31 -0400
commitf8b4082be4e63876b6bf7d1aa66eaaa9bcb5d4ca (patch)
tree28f5f7469de955d1c2723407d904472e4d90ddb4
parent7de8ce4efcfd23515d4e4b6a6f80e142438df758 (diff)
YJIT: fix leak, remove unused field on block_t
This field was never used and is now covered by jit_mov_gc_ptr.
-rw-r--r--ujit_codegen.c2
-rw-r--r--ujit_core.c1
-rw-r--r--ujit_core.h1
-rw-r--r--ujit_iface.c2
4 files changed, 0 insertions, 6 deletions
diff --git a/ujit_codegen.c b/ujit_codegen.c
index 41662a8b2d..0b2c52a844 100644
--- a/ujit_codegen.c
+++ b/ujit_codegen.c
@@ -1414,8 +1414,6 @@ gen_oswb_iseq(jitstate_t* jit, ctx_t* ctx, struct rb_call_data * cd, const rb_ca
return false;
}
- rb_gc_register_mark_object((VALUE)iseq); // FIXME: intentional LEAK!
-
// Create a size-exit to fall back to the interpreter
uint8_t* side_exit = ujit_side_exit(jit, ctx);
diff --git a/ujit_core.c b/ujit_core.c
index 651046cc55..f2215cc9bf 100644
--- a/ujit_core.c
+++ b/ujit_core.c
@@ -201,7 +201,6 @@ add_block_version(blockid_t blockid, block_t* block)
{
// By writing the new block to the iseq, the iseq now
// contains new references to Ruby objects. Run write barriers.
- RB_OBJ_WRITTEN(iseq, Qundef, block->dependencies.iseq);
RB_OBJ_WRITTEN(iseq, Qundef, block->dependencies.cc);
RB_OBJ_WRITTEN(iseq, Qundef, block->dependencies.cme);
diff --git a/ujit_core.h b/ujit_core.h
index ac7d02ae12..92d2dd594f 100644
--- a/ujit_core.h
+++ b/ujit_core.h
@@ -125,7 +125,6 @@ typedef struct ujit_block_version
struct {
VALUE cc;
VALUE cme;
- VALUE iseq;
} dependencies;
// Index one past the last instruction in the iseq
diff --git a/ujit_iface.c b/ujit_iface.c
index 54e8897d3b..d97418a986 100644
--- a/ujit_iface.c
+++ b/ujit_iface.c
@@ -689,7 +689,6 @@ rb_ujit_iseq_mark(const struct rb_iseq_constant_body *body)
rb_gc_mark_movable((VALUE)block->blockid.iseq);
rb_gc_mark_movable(block->dependencies.cc);
rb_gc_mark_movable(block->dependencies.cme);
- rb_gc_mark_movable(block->dependencies.iseq);
// Walk over references to objects in generated code.
uint32_t *offset_element;
@@ -718,7 +717,6 @@ rb_ujit_iseq_update_references(const struct rb_iseq_constant_body *body)
block->dependencies.cc = rb_gc_location(block->dependencies.cc);
block->dependencies.cme = rb_gc_location(block->dependencies.cme);
- block->dependencies.iseq = rb_gc_location(block->dependencies.iseq);
// Walk over references to objects in generated code.
uint32_t *offset_element;