fxes for add test

This commit is contained in:
Torsten Ruger
2015-08-04 21:46:33 +03:00
parent 4a51bdd643
commit 9680ff2a71
9 changed files with 42 additions and 13 deletions

View File

@ -3,6 +3,14 @@ module Register
module Builtin
module Integer
module ClassMethods
def plus c
plus_function = Virtual::MethodSource.create_method(:Integer,:plus , [Virtual::Integer] )
plus_function.source.return_type = Virtual::Integer
plus_function.source.receiver = Virtual::Integer
plus_function.source.add_code Register::Math.new( plus_function, :add , 0 )
return plus_function
end
# The conversion to base10 is quite a bit more complicated than i thought.
# The bulk of it is in div10
# We set up variables, do the devision and write the result to the string