RJIT: Propagate self's type information
This commit is contained in:
parent
ca8102355a
commit
46e93ef53d
@ -4799,6 +4799,16 @@ module RubyVM::RJIT
|
|||||||
return CantCompile
|
return CantCompile
|
||||||
end
|
end
|
||||||
|
|
||||||
|
# Create a context for the callee
|
||||||
|
callee_ctx = Context.new
|
||||||
|
|
||||||
|
recv_type = if calling.block_handler == :captured
|
||||||
|
Type::Unknown # we don't track the type information of captured->self for now
|
||||||
|
else
|
||||||
|
ctx.get_opnd_type(StackOpnd[argc])
|
||||||
|
end
|
||||||
|
callee_ctx.upgrade_opnd_type(SelfOpnd, recv_type)
|
||||||
|
|
||||||
# Setup the new frame
|
# Setup the new frame
|
||||||
frame_type ||= C::VM_FRAME_MAGIC_METHOD | C::VM_ENV_FLAG_LOCAL
|
frame_type ||= C::VM_FRAME_MAGIC_METHOD | C::VM_ENV_FLAG_LOCAL
|
||||||
jit_push_frame(
|
jit_push_frame(
|
||||||
@ -4810,9 +4820,6 @@ module RubyVM::RJIT
|
|||||||
doing_kw_call:,
|
doing_kw_call:,
|
||||||
)
|
)
|
||||||
|
|
||||||
# Create a context for the callee
|
|
||||||
callee_ctx = Context.new
|
|
||||||
|
|
||||||
# Directly jump to the entry point of the callee
|
# Directly jump to the entry point of the callee
|
||||||
pc = (iseq.body.iseq_encoded + start_pc_offset).to_i
|
pc = (iseq.body.iseq_encoded + start_pc_offset).to_i
|
||||||
jit_direct_jump(iseq, pc, callee_ctx, asm)
|
jit_direct_jump(iseq, pc, callee_ctx, asm)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user