Make to_mom a 2 stage process

First baby baby step on the way to passes
Create all parfait objects in first pass, so methods exist to be resolved in second path
This commit is contained in:
2019-09-24 15:44:33 +03:00
parent 3510637d21
commit dd810cfc49
15 changed files with 159 additions and 85 deletions

View File

@ -21,7 +21,7 @@ module Vool
end
def setup
source = "class Integer;def +(other);X.int_operator(:+);end;end;" + class_main
source = "class Integer < Data4;def +(other);X.int_operator(:+);end;end;" + class_main
ret = RubyX::RubyXCompiler.new(RubyX.default_test_options).ruby_to_mom(source)
@ins = ret.compilers.find{|c|c.callable.name==:main}.mom_instructions.next
end