mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
Refactor ujit_examples.h generator. Remove dwarfdump dependency
This commit is contained in:
parent
2eaf55fcf1
commit
3d87eadf16
9 changed files with 223 additions and 180 deletions
|
@ -13,71 +13,12 @@
|
|||
require_relative 'bare_instructions'
|
||||
require_relative 'operands_unifications'
|
||||
require_relative 'instructions_unifications'
|
||||
|
||||
class RubyVM::UJITExampleInstructions
|
||||
include RubyVM::CEscape
|
||||
|
||||
attr_reader :name
|
||||
|
||||
def initialize name
|
||||
@name = name
|
||||
end
|
||||
|
||||
def pretty_name
|
||||
return sprintf "%s(...)(...)(...)", @name
|
||||
end
|
||||
|
||||
def jump_destination
|
||||
return @orig.name
|
||||
end
|
||||
|
||||
def bin
|
||||
return sprintf "BIN(%s)", @name
|
||||
end
|
||||
|
||||
def width
|
||||
1
|
||||
end
|
||||
|
||||
def operands_info
|
||||
""
|
||||
end
|
||||
|
||||
def rets
|
||||
return ['...']
|
||||
end
|
||||
|
||||
def pops
|
||||
return ['...']
|
||||
end
|
||||
|
||||
def attributes
|
||||
return []
|
||||
end
|
||||
|
||||
def has_attribute? *;
|
||||
return false
|
||||
end
|
||||
|
||||
def handles_sp?
|
||||
false
|
||||
end
|
||||
|
||||
def always_leaf?
|
||||
false
|
||||
end
|
||||
|
||||
@all_examples = [new('ujit_call_example')]
|
||||
|
||||
def self.to_a
|
||||
@all_examples
|
||||
end
|
||||
end
|
||||
require_relative 'micro_jit'
|
||||
|
||||
RubyVM::Instructions = RubyVM::BareInstructions.to_a + \
|
||||
RubyVM::OperandsUnifications.to_a + \
|
||||
RubyVM::InstructionsUnifications.to_a + \
|
||||
RubyVM::UJITExampleInstructions.to_a
|
||||
RubyVM::MicroJIT::ExampleInstructions.to_a
|
||||
|
||||
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue