Auto-generate mjit_c.rb.erb
This commit is contained in:
parent
f2bea691cd
commit
e81a612413
Notes:
git
2022-09-23 06:45:10 +09:00
5
.github/workflows/mjit-bindgen.yml
vendored
5
.github/workflows/mjit-bindgen.yml
vendored
@ -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
|
||||
|
@ -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)
|
||||
|
Loading…
x
Reference in New Issue
Block a user