implement simple_calls to_risc

This commit is contained in:
Torsten Ruger
2018-03-21 18:54:42 +05:30
parent 71c59e5bc0
commit a9196e9cd6
4 changed files with 25 additions and 20 deletions

View File

@ -102,7 +102,7 @@ module Mom
type = known_object.respond_to?(:ct_type) ? known_object.ct_type : :int
right = compiler.use_reg( type )
case known_object
when Constant , Parfait::Object
when Constant , Parfait::Object , Risc::Label
const = Risc.load_constant(instruction, self , right)
when Symbol
const = Risc::SlotToReg.new( instruction , Risc.resolve_to_register(known_object) ,