remove method_compiler init method
as init is really just adding a label it is done in the method (thus mixing the levels, “polluting” parfait with risc, but there must be change coming that way anyway)
This commit is contained in:
@ -16,7 +16,7 @@ module Risc
|
||||
@method = method
|
||||
@type = method.for_type
|
||||
end
|
||||
@current = @method.instructions
|
||||
@current = @method.risc_instructions
|
||||
end
|
||||
attr_reader :type , :method
|
||||
|
||||
@ -41,17 +41,6 @@ module Risc
|
||||
self.new(method)
|
||||
end
|
||||
|
||||
# add method entry and exit code. Mainly save_return for the enter and
|
||||
# message shuffle and FunctionReturn for the return
|
||||
# return self for chaining
|
||||
def init_method
|
||||
source = "_init_method"
|
||||
name = "#{method.for_type.name}.#{method.name}"
|
||||
@current = @method.set_instructions( Risc.label(source, name))
|
||||
@current << Risc.label( source, "unreachable")
|
||||
self
|
||||
end
|
||||
|
||||
def add_known(name)
|
||||
case name
|
||||
when :receiver
|
||||
|
Reference in New Issue
Block a user