[#112457] [Ruby master Feature#19443] Cache `Process.pid` — "byroot (Jean Boussier) via ruby-core" <ruby-core@...>
Issue #19443 has been reported by byroot (Jean Boussier).
16 messages
2023/02/16
[#112584] [Ruby master Feature#19465] [PATCH] reuse open(2) from rb_file_load_ok on POSIX-like system — "normalperson (Eric Wong) via ruby-core" <ruby-core@...>
Issue #19465 has been reported by normalperson (Eric Wong).
9 messages
2023/02/25
[#112595] [Ruby master Feature#19465] [PATCH] reuse open(2) from rb_file_load_ok on POSIX-like system
— "nobu (Nobuyoshi Nakada) via ruby-core" <ruby-core@...>
2023/02/25
SXNzdWUgIzE5NDY1IGhhcyBiZWVuIHVwZGF0ZWQgYnkgbm9idSAoTm9idXlvc2hpIE5ha2FkYSku
[#112613] Re: [Ruby master Feature#19465] [PATCH] reuse open(2) from rb_file_load_ok on POSIX-like system
— Eric Wong via ruby-core <ruby-core@...>
2023/02/26
"nobu (Nobuyoshi Nakada) via ruby-core" <ruby-core@ml.ruby-lang.org> wrote:
[#112615] Re: [Ruby master Feature#19465] [PATCH] reuse open(2) from rb_file_load_ok on POSIX-like system
— SHIBATA Hiroshi via ruby-core <ruby-core@...>
2023/02/27
MzUxMzZlMWU5YzIzMmFkN2EwMzQwN2I5OTJiMmU4NmI2ZGY0M2Y2MyBpcyBicm9rZW4gd2l0aCBg
[#112626] Re: [Ruby master Feature#19465] [PATCH] reuse open(2) from rb_file_load_ok on POSIX-like system
— Eric Wong via ruby-core <ruby-core@...>
2023/02/28
```
[ruby-core:112532] [Ruby master Bug#19454] Instruction `send` has nil blockiseq and ARGS_SIMPLE flag
From:
"dmitry.pogrebnoy (Dmitry Pogrebnoy) via ruby-core" <ruby-core@...>
Date:
2023-02-22 09:02:01 UTC
List:
ruby-core #112532
Issue #19454 has been updated by dmitry.pogrebnoy (Dmitry Pogrebnoy). > It seems test-unit turns off specialized_instruction in RubyVM::InstructionSequence.compile_option. Indeed, thank you. Where can I find the description of each compile flags? > What is "the dependent program"? I support the proprietary gem debugger. And this is the case when it breaks. ---------------------------------------- Bug #19454: Instruction `send` has nil blockiseq and ARGS_SIMPLE flag https://bugs.ruby-lang.org/issues/19454#change-101982 * Author: dmitry.pogrebnoy (Dmitry Pogrebnoy) * Status: Feedback * Priority: Normal * ruby -v: ruby 3.1.3p185 (2022-11-24 revision 1a6b16756e) [x86_64-linux] * Backport: 2.7: UNKNOWN, 3.0: UNKNOWN, 3.1: UNKNOWN, 3.2: UNKNOWN ---------------------------------------- ### Setup * OS: MacOS Monterey 12.4 * VM: rbenv * Gems: test-unit 3.5.3 * Ruby: ruby 3.1.3p185 (2022-11-24 revision 1a6b16756e) [x86_64-linux] ### Problem Description In some cases the instruction `send` has `nil` block argument and `ARGS_SIMPLE` flag. But `send` is supposed to have a valid `blockiseq` parameter. For the case with a missing block there is an instruction `opt_send_without_block`. This breaks some of the logic of the dependent program . ### How to reproduce 1. Open attached project and run test in test_project\test\my_example_test.rb You should get this output: ``` == disasm: #<ISeq:<compiled>@<compiled>:1 (1,0)-(1,22)> (catch: FALSE) 0000 opt_getinlinecache 9, <is:0> ( 1)[Li] 0003 putobject true 0005 getconstant :MyModule 0007 opt_setinlinecache <is:0> 0009 send <calldata!mid:some_method, argc:0, ARGS_SIMPLE>, nil 0012 leave ``` Here you can see the `send` insn with nil blockiseq and ARGS_SIMPLE flag. 2. But if you run the same code as a script (lib\my_example_script.rb) you should get this output: ``` == disasm: #<ISeq:<compiled>@<compiled>:1 (1,0)-(1,22)> (catch: FALSE) 0000 opt_getinlinecache 9, <is:0> ( 1)[Li] 0003 putobject true 0005 getconstant :MyModule 0007 opt_setinlinecache <is:0> 0009 opt_send_without_block <calldata!mid:some_method, argc:0, ARGS_SIMPLE> 0011 leave ``` Here you can see the `opt_send_without_block` insn instead of `send`. It would be good to get rid of `send` insn with nil blockiseq and use `opt_send_without_block` instruction in such cases. ---Files-------------------------------- test_project.zip (38.3 KB) -- 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/