ruby-changes:68799
From: Maxime <ko1@a...>
Date: Thu, 21 Oct 2021 08:13:36 +0900 (JST)
Subject: [ruby-changes:68799] 9d62ab303c (master): Update ujit.md
https://git.ruby-lang.org/ruby.git/commit/?id=9d62ab303c From 9d62ab303c118eb4f21f8147fac33e187902e339 Mon Sep 17 00:00:00 2001 From: Maxime Chevalier-Boisvert <maximechevalierb@g...> Date: Thu, 18 Feb 2021 21:11:28 -0500 Subject: Update ujit.md --- doc/ujit.md | 24 +++++++++++++++++++++++- 1 file changed, 23 insertions(+), 1 deletion(-) diff --git a/doc/ujit.md b/doc/ujit.md index 39aedabe98..edac9a14a3 100644 --- a/doc/ujit.md +++ b/doc/ujit.md @@ -22,6 +22,16 @@ autoconf https://github.com/ruby/ruby/blob/trunk/doc/ujit.md#L22 make -j16 install ``` +You can test that uJIT works correctly by running: + +``` +# Quick tests found in /bootstraptest +make btest + +# Complete set of tests +make -j16 test-all +``` + Once uJIT is built, you can either use `./miniruby` from within your build directory, or switch to the uJIT version of `ruby` by using the `chruby` tool: @@ -31,6 +41,18 @@ chruby ruby-microjit https://github.com/ruby/ruby/blob/trunk/doc/ujit.md#L41 ## Source Code Organization +The uJIT source code is divided between: +- `ujit_asm.c`: x86 in-memory assembler we use to generate machine code +- `ujit_codegen.c`: logic for translating Ruby bytecode to machine code +- `ujit_core.c`: basic block versioning logic, core structure of uJIT +- `ujit_iface.c`: code uJIT uses to interface with the rest of CRuby +- `ujit.rb`: `UJIT` module that is exposed to Ruby code + +The core of CRuby's interpreter logic is found in: +- `insns.def`: defines Ruby's bytecode instructions +- `vm_insnshelper.c`: logic used by Ruby's bytecode instructions +- `vm_exec.c`: Ruby interpreter loop + ## Contributing -If you are interested in contributing to this project, please contact Maxime Chevalier [(@Love2Code) via twitter](https://twitter.com/Love2Code). +We welcome open source contributors. If you are interested in contributing to this project, please contact Maxime Chevalier [(@Love2Code) via twitter](https://twitter.com/Love2Code). -- cgit v1.2.1 -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/