From: "k0kubun (Takashi Kokubun) via ruby-core" Date: 2023-07-22T01:02:21+00:00 Subject: [ruby-core:114252] [Ruby master Feature#19780] Remove tailcall_optimization support Issue #19780 has been reported by k0kubun (Takashi Kokubun). ---------------------------------------- Feature #19780: Remove tailcall_optimization support https://bugs.ruby-lang.org/issues/19780 * Author: k0kubun (Takashi Kokubun) * Status: Open * Priority: Normal ---------------------------------------- ## Proposal Remove `tailcall_optimization` flag from `RubyVM::InstructionSequence` ## Motivation The consensus at [Feature #6602] seems to be that we're not going to enable tailcall optimization by default until we introduce syntax for it. Until this syntax is introduced, this feature is useless. Can we remove this flag until we do support that future syntax? ## Background This script doesn't work with `--yjit-call-threshold=1` on any YJIT-enabled build. ```rb src = <<-EOS def apply_one_and_two(&block) [1, p(1)] end ��� def add_one_and_two apply_one_and_two(&:+) end EOS ��� RubyVM::InstructionSequence.new( "proc {|_|_.class_eval {#{src}}}", __FILE__, __FILE__, 1, tailcall_optimization: true, trace_instruction: false, ).eval[self.singleton_class] ��� def entry add_one_and_two end ��� entry ``` I already wasted a lot of time just for noticing it's already broken. I don't want to waste time for users that do not exist yet. -- https://bugs.ruby-lang.org/ ______________________________________________ ruby-core mailing list -- ruby-core@ml.ruby-lang.org To unsubscribe send an email to ruby-core-leave@ml.ruby-lang.org ruby-core info -- https://ml.ruby-lang.org/mailman3/postorius/lists/ruby-core.ml.ruby-lang.org/