finally get rid of the fixme in div10

create (load/reduce) the int once and transfer.
Save a cruicial 2 instructions

Also expanded the variable name possibilities with _self, __const , _1 and _2
This commit is contained in:
Torsten Ruger
2018-08-15 18:18:21 +03:00
parent 15337e10be
commit 252ae6de72
4 changed files with 46 additions and 35 deletions

View File

@ -56,7 +56,7 @@ module Risc
def infer_type( name )
as_string = name.to_s
parts = as_string.split("_")
if(parts.last == "reg" or parts.last == "obj" or parts.last == "tmp")
if( ["reg" , "obj" , "tmp" , "self" , "const", "1" , "2"].include?( parts.last ) )
parts.pop
as_string = parts.join("_")
end