RJIT: Drop unused USE_* macros support
This commit is contained in:
parent
2d0dc376c4
commit
c6bea54c70
@ -502,10 +502,6 @@ module RubyVM::RJIT # :nodoc: all
|
|||||||
|
|
||||||
### RJIT bindgen begin ###
|
### RJIT bindgen begin ###
|
||||||
|
|
||||||
def C.USE_LAZY_LOAD
|
|
||||||
Primitive.cexpr! %q{ RBOOL(USE_LAZY_LOAD != 0) }
|
|
||||||
end
|
|
||||||
|
|
||||||
def C.VM_ENV_DATA_INDEX_ME_CREF
|
def C.VM_ENV_DATA_INDEX_ME_CREF
|
||||||
Primitive.cexpr! %q{ INT2NUM(VM_ENV_DATA_INDEX_ME_CREF) }
|
Primitive.cexpr! %q{ INT2NUM(VM_ENV_DATA_INDEX_ME_CREF) }
|
||||||
end
|
end
|
||||||
|
@ -106,16 +106,14 @@ class BindingGenerator
|
|||||||
attr_reader :src
|
attr_reader :src
|
||||||
|
|
||||||
# @param src_path [String]
|
# @param src_path [String]
|
||||||
# @param uses [Array<String>]
|
|
||||||
# @param values [Hash{ Symbol => Array<String> }]
|
# @param values [Hash{ Symbol => Array<String> }]
|
||||||
# @param types [Array<String>]
|
# @param types [Array<String>]
|
||||||
# @param dynamic_types [Array<String>] #ifdef-dependent immediate types, which need Primitive.cexpr! for type detection
|
# @param dynamic_types [Array<String>] #ifdef-dependent immediate types, which need Primitive.cexpr! for type detection
|
||||||
# @param skip_fields [Hash{ Symbol => Array<String> }] Struct fields that are skipped from bindgen
|
# @param skip_fields [Hash{ Symbol => Array<String> }] Struct fields that are skipped from bindgen
|
||||||
# @param ruby_fields [Hash{ Symbol => Array<String> }] Struct VALUE fields that are considered Ruby objects
|
# @param ruby_fields [Hash{ Symbol => Array<String> }] Struct VALUE fields that are considered Ruby objects
|
||||||
def initialize(src_path:, uses:, values:, types:, dynamic_types:, skip_fields:, ruby_fields:)
|
def initialize(src_path:, values:, types:, dynamic_types:, skip_fields:, ruby_fields:)
|
||||||
@preamble, @postamble = split_ambles(src_path)
|
@preamble, @postamble = split_ambles(src_path)
|
||||||
@src = String.new
|
@src = String.new
|
||||||
@uses = uses.sort
|
|
||||||
@values = values.transform_values(&:sort)
|
@values = values.transform_values(&:sort)
|
||||||
@types = types.sort
|
@types = types.sort
|
||||||
@dynamic_types = dynamic_types.sort
|
@dynamic_types = dynamic_types.sort
|
||||||
@ -127,14 +125,6 @@ class BindingGenerator
|
|||||||
def generate(nodes)
|
def generate(nodes)
|
||||||
println @preamble
|
println @preamble
|
||||||
|
|
||||||
# Define USE_* macros
|
|
||||||
@uses.each do |use|
|
|
||||||
println " def C.#{use}"
|
|
||||||
println " Primitive.cexpr! %q{ RBOOL(#{use} != 0) }"
|
|
||||||
println " end"
|
|
||||||
println
|
|
||||||
end
|
|
||||||
|
|
||||||
# Define macros/enums
|
# Define macros/enums
|
||||||
@values.each do |type, values|
|
@values.each do |type, values|
|
||||||
values.each do |value|
|
values.each do |value|
|
||||||
@ -352,9 +342,6 @@ end
|
|||||||
nodes = HeaderParser.new(File.join(src_dir, 'rjit_c.h'), cflags: cflags).parse
|
nodes = HeaderParser.new(File.join(src_dir, 'rjit_c.h'), cflags: cflags).parse
|
||||||
generator = BindingGenerator.new(
|
generator = BindingGenerator.new(
|
||||||
src_path: src_path,
|
src_path: src_path,
|
||||||
uses: %w[
|
|
||||||
USE_LAZY_LOAD
|
|
||||||
],
|
|
||||||
values: {
|
values: {
|
||||||
INT: %w[
|
INT: %w[
|
||||||
VM_ENV_DATA_INDEX_SPECVAL
|
VM_ENV_DATA_INDEX_SPECVAL
|
||||||
|
Loading…
x
Reference in New Issue
Block a user