renamed info to MethodSource

This commit is contained in:
Torsten Ruger
2015-07-03 20:13:03 +03:00
parent e959c5b0f5
commit b61c73acdd
24 changed files with 103 additions and 103 deletions

View File

@ -10,9 +10,9 @@ module Register
# As we write before we recurse (save a push) we write the number backwards
# arguments: string address , integer
def utoa context
utoa_function = Virtual::CompiledMethodInfo.create_method(:Integer ,:utoa , [ Virtual::Integer ] )
function.info.return_type = Virtual::Integer
function.info.receiver = Virtual::Integer
utoa_function = Virtual::MethodSource.create_method(:Integer ,:utoa , [ Virtual::Integer ] )
function.source.return_type = Virtual::Integer
function.source.receiver = Virtual::Integer
return utoa_function
str_addr = utoa_function.receiver
number = utoa_function.args.first
@ -30,9 +30,9 @@ module Register
end
def putint context
putint_function = Virtual::CompiledMethodInfo.create_method(:Integer,:putint , [] )
putint_function.info.return_type = Virtual::Integer
putint_function.info.receiver = Virtual::Integer
putint_function = Virtual::MethodSource.create_method(:Integer,:putint , [] )
putint_function.source.return_type = Virtual::Integer
putint_function.source.receiver = Virtual::Integer
return putint_function
buffer = Parfait::Word.new(" ") # create a buffer
context.object_space.add_object buffer # and save it (function local variable: a no no)
@ -59,9 +59,9 @@ module Register
# a hand coded version of the fibonachi numbers
# not my hand off course, found in the net http://www.peter-cockerell.net/aalp/html/ch-5.html
def fibo context
fibo_function = Virtual::CompiledMethodInfo.create_method(:Integer,:fibo , [] )
fibo_function.info.return_type = Virtual::Integer
fibo_function.info.receiver = Virtual::Integer
fibo_function = Virtual::MethodSource.create_method(:Integer,:fibo , [] )
fibo_function.source.return_type = Virtual::Integer
fibo_function.source.receiver = Virtual::Integer
return fibo_function
result = fibo_function.return_type
int = fibo_function.receiver