fix the init also, was using first message twice

not advancing after first load
This commit is contained in:
Torsten Ruger
2018-04-07 00:14:02 +03:00
parent 3c90eb31c6
commit dd0d162ebf
5 changed files with 27 additions and 19 deletions

View File

@ -28,12 +28,19 @@ module Mom
# Get the message from Space and link it.
def to_risc(compiler)
builder = Risc::Builder.new(compiler)
build_with(builder)
end
# directly called by to_risc
# but also used directly in __init
def build_with(builder)
from = method_source
risc = builder.build { typed_method << from }
build_message_data(builder)
compiler.reset_regs
builder.compiler.reset_regs
return risc
end
private
def source
"method setup "