Nobuyoshi Nakada
9a90cd2284
Cast via `uintptr_t` function pointer between object pointer
...
- ISO C forbids conversion of function pointer to object pointer type
- ISO C forbids conversion of object pointer to function pointer type
2024-10-08 23:29:49 +09:00
Nobuyoshi Nakada
49fcd33e13
Introduce a specialize instruction for Array#pack
...
Instructions for this code:
```ruby
# frozen_string_literal: true
[a].pack("C")
```
Before this commit:
```
== disasm: #<ISeq:<main>@test.rb:1 (1,0)-(3,13)>
0000 putself ( 3)[Li]
0001 opt_send_without_block <calldata!mid:a, argc:0, FCALL|VCALL|ARGS_SIMPLE>
0003 newarray 1
0005 putobject "C"
0007 opt_send_without_block <calldata!mid:pack, argc:1, ARGS_SIMPLE>
0009 leave
```
After this commit:
```
== disasm: #<ISeq:<main>@test.rb:1 (1,0)-(3,13)>
0000 putself ( 3)[Li]
0001 opt_send_without_block <calldata!mid:a, argc:0, FCALL|VCALL|ARGS_SIMPLE>
0003 putobject "C"
0005 opt_newarray_send 2, :pack
0008 leave
```
Co-authored-by: Maxime Chevalier-Boisvert <maxime.chevalierboisvert@shopify.com>
Co-authored-by: Aaron Patterson <tenderlove@ruby-lang.org>
2024-05-23 12:11:50 -07:00
Takashi Kokubun
8671cd59f7
RJIT: Correct the type of rb_vm_insns_count
2023-12-19 00:02:38 -08:00
Takashi Kokubun
edd6581eec
RJIT: Declare rb_vm_insns_count
2023-12-19 00:00:18 -08:00
Nobuyoshi Nakada
8d242a33af
`rb_bug` prints a newline after the message
2023-05-20 21:43:30 +09:00
Aaron Patterson
bdffcd6df3
Update RJIT to support newarray_send
...
This also adds max / hash support
2023-04-18 17:16:22 -07:00
Nobuyoshi Nakada
80fa9b0404
Fix declaration of `rb_rjit_entry_stub_hit` in rjit_c.c
2023-04-13 14:09:22 +09:00
Aaron Patterson
a9bfb64153
Expose rb_sym_to_proc via RJIT
...
This is needed for getblockparamproxy
2023-04-07 09:49:15 -07:00
Takashi Kokubun
6002b12611
RJIT: Support entry with different PCs
2023-04-02 15:27:40 -07:00
Takashi Kokubun
66f8efc342
RJIT: Simplify cfunc implementation
2023-04-02 13:58:39 -07: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
dc270fc632
RJIT: Implement attr_writer
2023-03-26 18:02:25 -07:00
Takashi Kokubun
59b86da82c
RJIT: Implement ifunc invokeblock
2023-03-19 23:32:07 -07:00
Takashi Kokubun
83ad1cac81
RJIT: Optimize Kernel#respond_to?
2023-03-19 14:04:58 -07:00
Takashi Kokubun
2121282753
RJIT: Optimize String#<<
2023-03-19 13:25:41 -07:00
Takashi Kokubun
32e0c97dfa
RJIT: Optimize String#bytesize
2023-03-18 23:35:42 -07:00
Takashi Kokubun
71bcab4519
RJIT: Implement setclassvariable
2023-03-18 21:49:46 -07:00
Takashi Kokubun
9c2792c3d3
RJIT: Implement toregexp
2023-03-18 21:37:49 -07:00
Takashi Kokubun
45a17013aa
RJIT: Implement throw insn
2023-03-17 23:27:16 -07:00
Takashi Kokubun
644c998525
RJIT: Support --rjit-stats on release build as well
2023-03-17 22:31:41 -07:00
Takashi Kokubun
d8344559b2
RJIT: Simplify how Capstone is used in tests
2023-03-13 20:42:19 -07:00
Takashi Kokubun
07d3af22d0
RJIT: Fix -Wshorten-64-to-32
2023-03-12 20:41:07 -07:00
Takashi Kokubun
9cd5441d28
RJIT: Implement --rjit-trace-exits
2023-03-12 15:15:08 -07:00
Takashi Kokubun
58f7e8b7f8
RJIT: Automate function pointer imports
2023-03-11 21:26:40 -08:00
Takashi Kokubun
46a3634bcf
RJIT: Use SIZET macros instead of original PTR ones
2023-03-11 20:47:08 -08:00
Takashi Kokubun
c364e0745d
RJIT: Introduce --rjit-exec-mem-size
2023-03-10 13:04:45 -08:00
Takashi Kokubun
1a0d3ec4b9
RJIT: Make functions in rjit_c.c static
...
They don't need to be global.
2023-03-08 23:38:02 -08:00
Takashi Kokubun
f5909ac6d9
RJIT: Stop allowing leaked globals rjit_*
2023-03-08 23:24:38 -08:00
Takashi Kokubun
7d7b67a472
RJIT: Clean up the declaration mess
2023-03-08 23:07:30 -08:00
Takashi Kokubun
6d91df08b5
Allow enabling YJIT and RJIT independently ( #7474 )
...
We used to require MJIT is supported when YJIT is supported. However,
now that RJIT dropped some platforms that YJIT supports, it no longer
makes sense. We should be able to enable only YJIT, and vice versa.
2023-03-07 22:43:37 -08:00
Takashi Kokubun
23ec248e48
s/mjit/rjit/
2023-03-06 23:44:01 -08:00
Takashi Kokubun
2e875549a9
s/MJIT/RJIT/
2023-03-06 23:44:01 -08:00
Takashi Kokubun
eaccdc1941
Rename MJIT filenames to RJIT
2023-03-06 23:44:01 -08:00