move that test to core (cant be done in compiled code) and focus on string addition instead

This commit is contained in:
Torsten Ruger
2014-05-31 16:43:03 +03:00
parent cdfc1ac891
commit 5756e0b325
5 changed files with 47 additions and 23 deletions

View File

@ -26,7 +26,8 @@ module Ast
locals[arg] = arg_value
args << arg_value
end
function = Vm::Function.new(name , args )
class_name = context.current_class.name
function = Vm::Function.new("#{class_name}::#{name}" , args )
context.current_class.add_function function
parent_locals = context.locals

View File

@ -20,7 +20,7 @@ module Ast
return_reg = Vm::Integer.new(7)
if expression_value.is_a?(Vm::IntegerConstant) or expression_value.is_a?(Vm::StringConstant)
return_reg.load into , expression_value if expression_value.register != return_reg.register
return_reg.load into , expression_value
else
return_reg.move( into, expression_value ) if expression_value.register != return_reg.register
end