зеркало из https://github.com/github/ruby.git
Родитель
67c2cdc59a
Коммит
99341d4a18
13
yjit_core.c
13
yjit_core.c
|
@ -816,6 +816,19 @@ yjit_free_block(block_t *block)
|
|||
yjit_unlink_method_lookup_dependency(block);
|
||||
yjit_block_assumptions_free(block);
|
||||
|
||||
// Remove this block from the predecessor's targets
|
||||
rb_darray_for(block->incoming, incoming_idx) {
|
||||
// Branch from the predecessor to us
|
||||
branch_t* pred_branch = rb_darray_get(block->incoming, incoming_idx);
|
||||
|
||||
// If this is us, nullify the target block
|
||||
for (size_t succ_idx = 0; succ_idx < 2; succ_idx++) {
|
||||
if (pred_branch->blocks[succ_idx] == block) {
|
||||
pred_branch->blocks[succ_idx] = NULL;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// For each outgoing branch
|
||||
rb_darray_for(block->outgoing, branch_idx) {
|
||||
branch_t* out_branch = rb_darray_get(block->outgoing, branch_idx);
|
||||
|
|
Загрузка…
Ссылка в новой задаче