1
0
Fork 0
mirror of https://github.com/ruby/ruby.git synced 2022-11-09 12:17:21 -05:00

YJIT: fix leak, remove unused field on block_t

This field was never used and is now covered by jit_mov_gc_ptr.
This commit is contained in:
Alan Wu 2021-03-04 15:56:34 -05:00
parent 7de8ce4efc
commit f8b4082be4
4 changed files with 0 additions and 6 deletions

View file

@ -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);

View file

@ -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);

View file

@ -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

View file

@ -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;