move that test to core (cant be done in compiled code) and focus on string addition instead
This commit is contained in:
@ -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
|
||||
|
@ -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
|
||||
|
Reference in New Issue
Block a user