mirror of
https://github.com/ruby/ruby.git
synced 2025-08-26 06:25:31 +02:00
Use the term "compile" in different places
This commit is contained in:
parent
c51baf9404
commit
7abff797b4
4 changed files with 16 additions and 8 deletions
|
@ -10,8 +10,6 @@ module RubyVM::MJIT
|
|||
# REX = 0100WR0B
|
||||
REX_W = 0b01001000
|
||||
|
||||
attr_reader :comments
|
||||
|
||||
def initialize
|
||||
@bytes = []
|
||||
@labels = {}
|
||||
|
@ -19,7 +17,7 @@ module RubyVM::MJIT
|
|||
@comments = Hash.new { |h, k| h[k] = [] }
|
||||
end
|
||||
|
||||
def compile(addr)
|
||||
def assemble(addr)
|
||||
link_labels
|
||||
writer = ByteWriter.new(addr)
|
||||
# If you pack bytes containing \x00, Ruby fails to recognize bytes after \x00.
|
||||
|
@ -36,6 +34,10 @@ module RubyVM::MJIT
|
|||
@bytes.size
|
||||
end
|
||||
|
||||
#
|
||||
# Instructions
|
||||
#
|
||||
|
||||
def add(dst, src)
|
||||
case [dst, src]
|
||||
# ADD r/m64, imm8 (Mod 11)
|
||||
|
@ -228,6 +230,12 @@ module RubyVM::MJIT
|
|||
end
|
||||
end
|
||||
|
||||
#
|
||||
# Utilities
|
||||
#
|
||||
|
||||
attr_reader :comments
|
||||
|
||||
def comment(message)
|
||||
@comments[@bytes.size] << message
|
||||
end
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue