change build names a little and document
This commit is contained in:
@ -79,7 +79,7 @@ module Risc
|
||||
instruction = instruction.next
|
||||
end
|
||||
end
|
||||
|
||||
|
||||
# add a risc instruction after the current (insertion point)
|
||||
# the added instruction will become the new insertion point
|
||||
def add_code( instruction )
|
||||
@ -170,5 +170,15 @@ module Risc
|
||||
def reduce_int( source , register )
|
||||
add_slot_to_reg( source + "int -> fix" , register , Parfait::Integer.integer_index , register)
|
||||
end
|
||||
|
||||
# Build with builder (see there), adding the created instructions
|
||||
def build(&block)
|
||||
builder.build_and_return(&block)
|
||||
end
|
||||
|
||||
# return a new builder that uses this compiler
|
||||
def builder
|
||||
Builder.new(self)
|
||||
end
|
||||
end
|
||||
end
|
||||
|
Reference in New Issue
Block a user