Граф коммитов

77427 Коммитов

Автор SHA1 Сообщение Дата
Takashi Kokubun 6f2535deda RJIT: Prefix a constant with C namespace 2023-04-02 10:40:37 -07:00
Takashi Kokubun 62188c8584 RJIT: Update exit reasons 2023-04-02 10:27:17 -07:00
Takashi Kokubun 7778c292c4 RJIT: Support keyword arguments 2023-04-02 10:26:22 -07:00
Stan Lo cd94bcdc46 [ruby/irb] Don't check RUBY_ENGINE when deciding whether to accept kargs
Ruby implementations like JRuby and TruffleRuby already indicate their
compatibility target with RUBY_VERSION. We don't need to exclude
them from accepting keyword arguments as long as they target 2.7+.

https://github.com/ruby/irb/commit/bf20faa4e6

Co-authored-by: Kevin Menard <kevin@nirvdrum.com>
2023-04-02 15:34:28 +00:00
Stan Lo f25791884c [ruby/irb] Remove dead code (https://github.com/ruby/irb/pull/554)
* Remove unused ATTR_TTY and ATTR_PLAIN constants

They were added in d7d26b51bf

But the references were removed in 1c76845cca

Co-authored-by: Alexandre Terrasa <alexandre.terrasa@shopify.com>

* Remove unused MethodExtender module

It was added in 6cc5d718d7
but it's not used anywhere.

Co-authored-by: Alexandre Terrasa <alexandre.terrasa@shopify.com>

* Remove unused IRB.irb_at_exit

It's not used after aaf4eb4e98

Co-authored-by: Alexandre Terrasa <alexandre.terrasa@shopify.com>

* Remove unused InputCompletor.ignored_modules

It was added in 88311ce3c8
but the reference was removed in 78c74d2425

* Remove unused TracerLoadError constant

This constant was added in cb50fa3738
but never referenced.

---------

https://github.com/ruby/irb/commit/7de0234325

Co-authored-by: Alexandre Terrasa <alexandre.terrasa@shopify.com>
2023-04-02 14:11:12 +00:00
Nobuyoshi Nakada 9e1ff2462b
leaked-globals: check for nm before files under missing [ci skip]
Abort if `nm` is not available, since it is needed by configure.ac to
check for prefix of external symbols.
2023-04-02 18:11:59 +09:00
Nobuyoshi Nakada 3a683964a0
leaked-globals: colorize skipping file names [ci skip] 2023-04-02 17:56:12 +09:00
Takashi Kokubun 1b475fcd10 Remove an unneeded function copy 2023-04-01 23:09:05 -07:00
Takashi Kokubun 6c55c3eb7f RJIT: Fix a leaked-globals failure 2023-04-01 23:07:22 -07:00
Takashi Kokubun a077b7e36b RJIT: Support rest args 2023-04-01 23:00:36 -07:00
Takashi Kokubun 87dc06ed24 RJIT: Comment a location for each block 2023-04-01 22:39:16 -07:00
Takashi Kokubun bf2617b8a6 RJIT: Fix has_rest exit conditions 2023-04-01 21:47:28 -07:00
Takashi Kokubun ee52255f93 RJIT: Return CantCompile early for arg0 splat 2023-04-01 21:42:34 -07:00
Takashi Kokubun 2ce5cfa2be RJIT: Save PC on String#concat 2023-04-01 21:34:19 -07:00
Takashi Kokubun e45ed2da50 RJIT: Rewind stack_size on CantCompile and side exits
so that we can take an exit whenever we want.

As a starter, this commit also pops blockarg earlier than some
CantCompile exits.
2023-04-01 21:30:42 -07:00
Takashi Kokubun 90cdc5b8ba RJIT: Let the caller of jit_push_frame handle stack_pop
because we want to do this way earlier for other types of calls.
2023-04-01 21:13:15 -07:00
Takashi Kokubun 28db75af66 RJIT: Check stackoverflow earlier for ISEQ 2023-04-01 21:03:10 -07:00
Takashi Kokubun 249fe18e8f RJIT: Remove unused counters 2023-04-01 17:24:45 -07:00
Takashi Kokubun f42cf3fd1e RJIT: Migrate invokeblock to jit_call_iseq 2023-04-01 17:17:41 -07:00
Takashi Kokubun cfea319772 RJIT: Migrate bmethod to jit_call_iseq 2023-04-01 17:03:45 -07:00
Takashi Kokubun 0973b93e49 RJIT: Start moving away from VM-like ISEQ handling 2023-04-01 16:56:05 -07:00
Takashi Kokubun d71db90c68 Fix a test in typeprof
Revert "Skip typeprof for now"

This reverts commit bdbf663cef.
2023-04-01 15:13:08 -07:00
Takashi Kokubun bdbf663cef Skip typeprof for now
It started failing probably because ISEQ removed an unused field.
I'll have a look at fixing it on the typeprof side, but let me skip it
until it's fixed.
2023-04-01 11:04:53 -07:00
Takashi Kokubun df1b007fbd Remove unused VM_CALL_BLOCKISEQ flag 2023-04-01 10:22:47 -07:00
Takashi Kokubun 175538e433 Improve explanation of FCALL and VCALL 2023-04-01 10:17:59 -07:00
Kazuki Tsujimoto 4ac8d11724
`*` in an array pattern should not be parsed as nil in ripper
After 6c0925ba70, it was impossible
to distinguish between the presence or absence of `*`.

    # Before the commit
    Ripper.sexp('0 in []')[1][0][2][1]  #=> [:aryptn, nil, nil, nil, nil]
    Ripper.sexp('0 in [*]')[1][0][2][1] #=> [:aryptn, nil, nil, [:var_field, nil], nil]

    # After the commit
    Ripper.sexp('0 in []')[1][0][2][1]  #=> [:aryptn, nil, nil, nil, nil]
    Ripper.sexp('0 in [*]')[1][0][2][1] #=> [:aryptn, nil, nil, nil, nil]

This commit reverts it.
2023-04-01 16:35:24 +09:00
Takashi Kokubun 3a238eff88 gdb: Fix a command example
It was actually harder to type `cfp + 1`. `cfp 1` also works and is more
useful.
2023-04-01 00:23:35 -07:00
Takashi Kokubun a3074c1256 gdb: Fix specval
Somehow my gdb stopped recognizing VM_BLOCK_HANDLER_NONE (macro) today.
Just changing it to a safer code.
2023-04-01 00:19:43 -07:00
Takashi Kokubun 1da77539da gdb: Don't dump params and locals for C frames 2023-04-01 00:19:27 -07:00
Koichi Sasada 9720f5ac89 use `sleep_forever()` on `thread_join_sleep()`
because it does same thing.
2023-04-01 09:48:37 +09:00
Stan Lo 23892d95f5 [ruby/irb] Drop unnecessary pends for truffleruby
https://github.com/ruby/irb/commit/2517039812
2023-03-31 22:02:58 +00:00
Alan Wu 8938f146ab YJIT: Remove unused variable [ci skip] 2023-03-31 15:19:02 -04:00
Takashi Kokubun a9b6b25de5 gdb: Visualize register positions on the left 2023-03-31 09:13:37 -07:00
Nobuyoshi Nakada 9e678cdbd0
YJIT: Suppress unnecessary `unsafe` block (#7634) 2023-03-31 10:15:39 -04:00
Koichi Sasada 1d19776c7f cosmetic change
reorder `sleep_forever()` and so on.
2023-03-31 19:26:47 +09:00
Takashi Kokubun 185f39df79 gdb: Always show actual values in cfp 2023-03-31 03:20:40 -07:00
Takashi Kokubun 0f368bfb7b gdb: Show params and locals in cfp 2023-03-31 03:05:30 -07:00
Takashi Kokubun 98347c251a gdb: Dump env data in cfp command 2023-03-31 02:54:56 -07:00
Koichi Sasada f803bcfc87 pass `th` to `thread_sched_to_waiting()`
for future extension
2023-03-31 18:50:10 +09:00
Koichi Sasada 4c0f82eb5b remove "\n" for `RUBY_DEBUG_LOG()`
because `RUBY_DEBUG_LOG()` add "\n" at the end of message.
2023-03-31 18:15:04 +09:00
Koichi Sasada ad7362db07 rename `rb_thread_t::locking_native_thread`
to `rb_thread_t::has_dedicated_nt`
2023-03-31 18:10:00 +09:00
Koichi Sasada 95dafb53cd relax assertion
`ec` can be NULL in future.
2023-03-31 18:08:34 +09:00
Koichi Sasada 369bdff9ca add debug log to `rb_ractor_thread_switch` 2023-03-31 18:08:34 +09:00
Koichi Sasada fdfd50d006 reorder `thread_pthread.c` functions 2023-03-31 18:08:21 +09:00
Koichi Sasada 66755164aa add `RUBY_DEBUG_LOG` fo `each_machine_stack_value` 2023-03-31 17:27:56 +09:00
Takashi Kokubun a57270a848 Expand tabs in .gdbinit 2023-03-31 00:52:47 -07:00
Takashi Kokubun 9f426491ca Put misc/gdb.py [experimental]
This works like:

```
(gdb) cfp
CFP (count=3, addr=0x7ffff73fef50):
$1 = {pc = 0x555556bf7818, sp = 0x7ffff72ff078, iseq = 0x7ffff2603270, self = 140737344619296, ep = 0x7ffff72ff058, block_code = 0x0,
  __bp__ = 0x7ffff72ff060, jit_return = 0x555558c2b000}

Stack (size=3):
[0] FIXNUM: 1
[1] T_STRING: "" bytesize:0 (embed) encoding:1 coderange:7bit $2 = (struct RString *) 0x7ffff249ea80
[2] [PROMOTED] T_OBJECT: $3 = {flags = 21474844769, klass = 140737344040416}
$4 = {0x24, 0x24, 0x24}

(gdb) cfp + 1
CFP (count=3, addr=0x7ffff73fef90):
$5 = {pc = 0x5555567a78f8, sp = 0x7ffff72ff040, iseq = 0x7ffff26032d0, self = 140737344619296, ep = 0x7ffff72ff038, block_code = 0x0,
  __bp__ = 0x7ffff72ff040, jit_return = 0x555558c2b000}

Stack (size=0):
```
2023-03-31 00:20:40 -07:00
Takashi Kokubun f500df097f Fix ivar dump for RVARGC in .gdbinit
It was crashing with:
No symbol "ROBJECT_EMBED_LEN_MAX" in current context.
2023-03-30 23:58:09 -07:00
Koichi Sasada fbc6661a72 Revert "dump `RUBY_DEBUG_LOG` logs into `/dev/null`"
This reverts commit 83667008b9.

because not stable yet.
2023-03-31 14:23:37 +09:00
Hiroshi SHIBATA bc0a7a641b [ruby/net-http] typofix
https://github.com/ruby/net-http/commit/4d31bde125
2023-03-31 03:47:56 +00:00