Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 10 additions & 3 deletions compile.c
Original file line number Diff line number Diff line change
Expand Up @@ -13069,7 +13069,8 @@ inlineable_call(CALL_DATA cd, rb_vm_insns_translator_t * translator)

// A leaf method is a method with the builtin inline flag set
// or a method that doesn't contain a method call
bool is_leaf_method = callee_iseq->body->builtin_inline_p || !contain_method_call;
// or a method that was previously inlined
bool is_leaf_method = callee_iseq->body->builtin_inline_p || !contain_method_call || callee_iseq->body->param.flags.inlined_iseq;

// Only inline simple and leaf methods
if (flags & VM_CALL_ARGS_SIMPLE && is_leaf_method) {
Expand Down Expand Up @@ -13182,8 +13183,14 @@ inline_iseqs(VALUE *code, size_t pos, iseq_value_itr_t * func, void *_ctx, rb_vm
char type = opnd_types[i];
switch (type) {
case TS_CALLDATA:
iseq->body->ci_size++;
ops[i] = (VALUE)(((CALL_DATA)code[pos + i + 1])->ci);
if (insn_id == BIN(jump_if_cache_miss)) {
// Reuse existing cache
ops[i] = (VALUE)(((CALL_DATA)code[pos + i + 1]));
}
else {
iseq->body->ci_size++;
ops[i] = (VALUE)(((CALL_DATA)code[pos + i + 1])->ci);
}
break;
case TS_OFFSET:
{
Expand Down