diff options
author | Takashi Kokubun <[email protected]> | 2022-09-18 22:32:21 +0900 |
---|---|---|
committer | Takashi Kokubun <[email protected]> | 2022-09-23 06:44:28 +0900 |
commit | e81a612413500caa6763a765d12255ea7f150f68 (patch) | |
tree | becb6571d34d21db16c43b3bfbaa284df2f5d8f9 | |
parent | f2bea691cd12150a526ddc4be95c5396f07920ba (diff) |
Auto-generate mjit_c.rb.erb
Notes
Notes:
Merged: https://github.com/ruby/ruby/pull/6418
-rw-r--r-- | .github/workflows/mjit-bindgen.yml | 5 | ||||
-rwxr-xr-x | tool/mjit/bindgen.rb | 10 |
2 files changed, 9 insertions, 6 deletions
diff --git a/.github/workflows/mjit-bindgen.yml b/.github/workflows/mjit-bindgen.yml index 33a1650f92..04c9ac4a9f 100644 --- a/.github/workflows/mjit-bindgen.yml +++ b/.github/workflows/mjit-bindgen.yml @@ -23,9 +23,6 @@ jobs: matrix: include: - task: mjit-bindgen - configure: '--enable-yjit=dev_nodebug' - - task: mjit-bindgen - arch: i686 fail-fast: false env: SETARCH: ${{ matrix.arch && format('setarch {0}', matrix.arch) }} @@ -74,7 +71,7 @@ jobs: env: arch: ${{ matrix.arch }} run: >- - $SETARCH ../src/configure -C --disable-install-doc --prefix=$(pwd)/install ${{ matrix.configure }} + $SETARCH ../src/configure -C --disable-install-doc --prefix=$(pwd)/install --enable-yjit=dev_nodebug ${arch:+--target=$arch-$OSTYPE --host=$arch-$OSTYPE} - run: $SETARCH make incs - run: $SETARCH make diff --git a/tool/mjit/bindgen.rb b/tool/mjit/bindgen.rb index 8bc537f0d1..c35a6dfcde 100755 --- a/tool/mjit/bindgen.rb +++ b/tool/mjit/bindgen.rb @@ -336,7 +336,13 @@ class BindingGenerator @references = Set.new end - def generate(nodes) + def generate(_nodes) + println "module RubyVM::MJIT" + println " C = Object.new" + println "end if RubyVM::MJIT.enabled?" + end + + def legacy_generate(nodes) # TODO: Support nested declarations nodes_index = nodes.group_by(&:spelling).transform_values(&:last) @@ -589,4 +595,4 @@ generator = BindingGenerator.new( ) generator.generate(nodes) -File.write(File.join(src_dir, "lib/mjit/c_#{arch_bits}.rb"), generator.src) +File.write(File.join(src_dir, 'tool/ruby_vm/views/mjit_c.rb.erb'), generator.src) |