Commit graph

77079 commits

Author SHA1 Message Date
Takashi Kokubun
21696ad81e Partly implement BOP assumption 2023-03-05 22:11:20 -08:00
Takashi Kokubun
00c659d246 Move the insn dispatch table to InsnCompiler 2023-03-05 22:11:20 -08:00
Takashi Kokubun
4b6c738180 Rewrite the stub if it's the last code 2023-03-05 22:11:20 -08:00
Takashi Kokubun
c3d99d0f12 Implement defer_compilation 2023-03-05 22:11:20 -08:00
Takashi Kokubun
2b8d1c93ea Support extended registers
and move argument registers to a couple of them.
2023-03-05 22:11:20 -08:00
Takashi Kokubun
d7dba4c510 Colorize outlined code 2023-03-05 22:11:20 -08:00
Takashi Kokubun
36cec59f0a Implement ocb 2023-03-05 22:11:20 -08:00
Takashi Kokubun
7abff797b4 Use the term "compile" in different places 2023-03-05 22:11:20 -08:00
Takashi Kokubun
c51baf9404 Carve out CodeBlock 2023-03-05 22:11:20 -08:00
Takashi Kokubun
28290d5198 Try carving out ExitCompiler 2023-03-05 22:11:20 -08:00
Takashi Kokubun
7a19aad8c3 Implement putobject 2023-03-05 22:11:20 -08:00
Takashi Kokubun
9352f94a1b Implement getlocal_WC_0 2023-03-05 22:11:20 -08:00
Takashi Kokubun
4eb6f1dbb9 Put nil on an appropriate index 2023-03-05 22:11:20 -08:00
Takashi Kokubun
e9535a439b Split branches for mov src and dst 2023-03-05 22:11:20 -08:00
Takashi Kokubun
5760f7fd3c Skip compiling at_exit without --mjit-stats 2023-03-05 22:11:20 -08:00
Takashi Kokubun
e4a824f769 Fix broken rebase 2023-03-05 22:11:20 -08:00
Takashi Kokubun
9f8f1afba2 Implement --mjit-stats 2023-03-05 22:11:20 -08:00
Takashi Kokubun
5ab8cf3f0d Skip a failing shape test 2023-03-05 22:11:20 -08:00
Takashi Kokubun
4fe5efbf7f Implement asm comments 2023-03-05 22:11:20 -08:00
Takashi Kokubun
652d63789f Fix TracePoint tests 2023-03-05 22:11:20 -08:00
Takashi Kokubun
3b398513be Check interrupts on leave 2023-03-05 22:11:20 -08:00
Takashi Kokubun
114f8d3e33 Disable MJIT on a couple of conditions 2023-03-05 22:11:20 -08:00
Takashi Kokubun
43f579afb4 Fix a critical mistake around GC 2023-03-05 22:11:20 -08:00
Takashi Kokubun
25ae82b83e Skip supporting has_opt for now 2023-03-05 22:11:20 -08:00
Takashi Kokubun
d46cc2c104 Remove <main> specialization 2023-03-05 22:11:20 -08:00
Takashi Kokubun
5db2ef5e14 Define constants for magic registers 2023-03-05 22:11:20 -08:00
Takashi Kokubun
783f730773 Lock VM during compilation 2023-03-05 22:11:20 -08:00
Takashi Kokubun
23a58105ee Implement callee-saved registers 2023-03-05 22:11:20 -08:00
Takashi Kokubun
71595a37ba Consider stack_size on side exits 2023-03-05 22:11:20 -08:00
Takashi Kokubun
bee5af407d Rename InsnCompiler to Codegen
because I'm not gonna limit this to insns anymore.
2023-03-05 22:11:20 -08:00
Takashi Kokubun
b99d62bf92 Implement initial side exit 2023-03-05 22:11:20 -08:00
Takashi Kokubun
e750e1e3ee Fix build without libcapstone 2023-03-05 22:11:20 -08:00
Takashi Kokubun
dfa19a1658 Properly return a value from the stack as well 2023-03-05 22:11:20 -08:00
Takashi Kokubun
145c937f3f Compile putnil properly 2023-03-05 22:11:20 -08:00
Takashi Kokubun
8deb0438c4 Remove debugging code 2023-03-05 22:11:20 -08:00
Takashi Kokubun
e60fc8c2ff Encode add insn properly 2023-03-05 22:11:20 -08:00
Takashi Kokubun
396d575451 Implement mov encoding properly 2023-03-05 22:11:20 -08:00
Takashi Kokubun
2700d35b7b Split responsibilities differently 2023-03-05 22:11:20 -08:00
Takashi Kokubun
d9c2eb6f42 Move modules around 2023-03-05 22:11:20 -08:00
Takashi Kokubun
6fc336fedc Compile a real return value 2023-03-05 22:11:20 -08:00
Takashi Kokubun
3fa4d41460 Implement --mjit-dump-disasm 2023-03-05 22:11:20 -08:00
Takashi Kokubun
fd04e1b4db Implement a no-op JIT compiler 2023-03-05 22:11:20 -08:00
Takashi Kokubun
baa120ee80 Prepare a JIT buffer 2023-03-05 22:11:20 -08:00
Takashi Kokubun
9c2f612017 Prepare for compiling an ISEQ 2023-03-05 22:11:20 -08:00
Takashi Kokubun
40ffc1e0f4 Drop existing MJIT tests 2023-03-05 22:11:20 -08:00
Takashi Kokubun
3d19db4f8b Use call-threshold 1 for now 2023-03-05 22:11:20 -08:00
Takashi Kokubun
251f976235 Prepare rb_mjit_compile hook 2023-03-05 22:11:20 -08:00
Takashi Kokubun
3c093fe391 Move important functions 2023-03-05 22:11:20 -08:00
Takashi Kokubun
c263ce9c80 Remove more code 2023-03-05 22:11:20 -08:00
Takashi Kokubun
5d819b9a15 Clean up the current MJIT implementation 2023-03-05 22:11:20 -08:00