fix method seperation
Since Compiled method split into Method and CompiledMethodInfo (parfait/vm) lots of call syntax changes
This commit is contained in:
parent
1d9ef6d5c8
commit
1a499a1de9
@ -48,17 +48,17 @@ module Parfait
|
|||||||
end
|
end
|
||||||
|
|
||||||
def get_instance_method fname
|
def get_instance_method fname
|
||||||
fname = fname.to_sym
|
raise "uups #{fname}.#{fname.class}" unless fname.is_a? Word
|
||||||
@instance_methods.detect{ |fun| fun.name == fname }
|
@instance_methods.detect{ |fun| fun.name == fname }
|
||||||
end
|
end
|
||||||
|
|
||||||
# get the method and if not found, try superclasses. raise error if not found
|
# get the method and if not found, try superclasses. raise error if not found
|
||||||
def resolve_method m_name
|
def resolve_method m_name
|
||||||
|
raise "uups #{m_name}.#{m_name.class}" unless m_name.is_a? Word
|
||||||
method = get_instance_method(m_name)
|
method = get_instance_method(m_name)
|
||||||
unless method
|
unless method
|
||||||
unless( @name == "Object" )
|
unless( @name == "Object" )
|
||||||
supr = Space.space.get_class_by_name(@super_class_name)
|
method = @super_class.resolve_method(m_name)
|
||||||
method = supr.resolve_method(m_name)
|
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
raise "Method not found #{m_name}, for #{@name}" unless method
|
raise "Method not found #{m_name}, for #{@name}" unless method
|
||||||
|
@ -31,13 +31,9 @@ module Parfait
|
|||||||
# all is good after this init
|
# all is good after this init
|
||||||
#global objects (data)
|
#global objects (data)
|
||||||
@objects = Parfait::List.new_object
|
@objects = Parfait::List.new_object
|
||||||
#@symbols = Parfait::List.new_object
|
|
||||||
end
|
end
|
||||||
attr_reader :classes , :objects , :symbols, :messages, :next_message , :next_frame
|
attr_reader :classes , :objects , :symbols, :messages, :next_message , :next_frame
|
||||||
|
|
||||||
@@SPACE = { :names => [:classes,:objects,:symbols,:messages, :next_message , :next_frame] ,
|
|
||||||
:types => [Virtual::Reference,Virtual::Reference,Virtual::Reference,Virtual::Reference,Virtual::Reference]}
|
|
||||||
|
|
||||||
# need a two phase init for the object space (and generally parfait) because the space
|
# need a two phase init for the object space (and generally parfait) because the space
|
||||||
# is an interconnected graph, so not everthing is ready
|
# is an interconnected graph, so not everthing is ready
|
||||||
def late_init
|
def late_init
|
||||||
@ -46,9 +42,6 @@ module Parfait
|
|||||||
@next_message = @messages.first
|
@next_message = @messages.first
|
||||||
@next_frame = @frames.first
|
@next_frame = @frames.first
|
||||||
end
|
end
|
||||||
def old_layout
|
|
||||||
@@SPACE
|
|
||||||
end
|
|
||||||
|
|
||||||
@@object_space = nil
|
@@object_space = nil
|
||||||
# Make the object space globally available
|
# Make the object space globally available
|
||||||
@ -64,9 +57,6 @@ module Parfait
|
|||||||
def add_object o
|
def add_object o
|
||||||
return if @objects.include?(o)
|
return if @objects.include?(o)
|
||||||
@objects.push o
|
@objects.push o
|
||||||
if o.is_a? Symbol
|
|
||||||
@symbols << o
|
|
||||||
end
|
|
||||||
end
|
end
|
||||||
|
|
||||||
# this is the way to instantiate classes (not Parfait::Class.new)
|
# this is the way to instantiate classes (not Parfait::Class.new)
|
||||||
|
@ -2,15 +2,15 @@ module Builtin
|
|||||||
class Array
|
class Array
|
||||||
module ClassMethods
|
module ClassMethods
|
||||||
def get context , index = Virtual::Integer
|
def get context , index = Virtual::Integer
|
||||||
get_function = Virtual::CompiledMethod.new(:get , [ Virtual::Integer] , Virtual::Integer , Virtual::Integer )
|
get_function = Virtual::CompiledMethodInfo.create_method(:get , [ Virtual::Integer] , Virtual::Integer , Virtual::Integer )
|
||||||
return get_function
|
return get_function
|
||||||
end
|
end
|
||||||
def set context , index = Virtual::Integer , object = Virtual::Reference
|
def set context , index = Virtual::Integer , object = Virtual::Reference
|
||||||
set_function = Virtual::CompiledMethod.new(:set , [Virtual::Integer, Virtual::Reference] )
|
set_function = Virtual::CompiledMethodInfo.create_method(:set , [Virtual::Integer, Virtual::Reference] )
|
||||||
return set_function
|
return set_function
|
||||||
end
|
end
|
||||||
def push context , object = Virtual::Reference
|
def push context , object = Virtual::Reference
|
||||||
push_function = Virtual::CompiledMethod.new(:push , [Virtual::Reference] )
|
push_function = Virtual::CompiledMethodInfo.create_method(:push , [Virtual::Reference] )
|
||||||
return push_function
|
return push_function
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
@ -8,7 +8,9 @@ module Builtin
|
|||||||
# As we write before we recurse (save a push) we write the number backwards
|
# As we write before we recurse (save a push) we write the number backwards
|
||||||
# arguments: string address , integer
|
# arguments: string address , integer
|
||||||
def utoa context
|
def utoa context
|
||||||
utoa_function = Virtual::CompiledMethod.new(:utoa , [ Virtual::Integer ] , Virtual::Integer ,Virtual::Integer )
|
utoa_function = Virtual::CompiledMethodInfo.create_method("Integer" ,"utoa" , [ Virtual::Integer ] )
|
||||||
|
function.info.return_type = Virtual::Integer
|
||||||
|
function.info.receiver = Virtual::Integer
|
||||||
return utoa_function
|
return utoa_function
|
||||||
str_addr = utoa_function.receiver
|
str_addr = utoa_function.receiver
|
||||||
number = utoa_function.args.first
|
number = utoa_function.args.first
|
||||||
@ -26,7 +28,9 @@ module Builtin
|
|||||||
end
|
end
|
||||||
|
|
||||||
def putint context
|
def putint context
|
||||||
putint_function = Virtual::CompiledMethod.new(:putint , [] , Virtual::Integer ,Virtual::Integer )
|
putint_function = Virtual::CompiledMethodInfo.create_method("Integer","putint" , [] )
|
||||||
|
putint_function.info.return_type = Virtual::Integer
|
||||||
|
putint_function.info.receiver = Virtual::Integer
|
||||||
return putint_function
|
return putint_function
|
||||||
buffer = Parfait::Word.new(" ") # create a buffer
|
buffer = Parfait::Word.new(" ") # create a buffer
|
||||||
context.object_space.add_object buffer # and save it (function local variable: a no no)
|
context.object_space.add_object buffer # and save it (function local variable: a no no)
|
||||||
@ -53,7 +57,9 @@ module Builtin
|
|||||||
# a hand coded version of the fibonachi numbers
|
# 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
|
# not my hand off course, found in the net http://www.peter-cockerell.net/aalp/html/ch-5.html
|
||||||
def fibo context
|
def fibo context
|
||||||
fibo_function = Virtual::CompiledMethod.new(:fibo , [] , Virtual::Integer ,Virtual::Integer )
|
fibo_function = Virtual::CompiledMethodInfo.create_method("Integer","fibo" , [] )
|
||||||
|
fibo_function.info.return_type = Virtual::Integer
|
||||||
|
fibo_function.info.receiver = Virtual::Integer
|
||||||
return fibo_function
|
return fibo_function
|
||||||
result = fibo_function.return_type
|
result = fibo_function.return_type
|
||||||
int = fibo_function.receiver
|
int = fibo_function.receiver
|
||||||
|
@ -4,38 +4,42 @@ module Builtin
|
|||||||
# main entry point, ie __init__ calls this
|
# main entry point, ie __init__ calls this
|
||||||
# defined here as empty, to be redefined
|
# defined here as empty, to be redefined
|
||||||
def main context
|
def main context
|
||||||
function = Virtual::CompiledMethod.new(:main , [] , Virtual::Integer)
|
function = Virtual::CompiledMethodInfo.create_method("Kernel","main" , [])
|
||||||
|
function.info.return_type = Virtual::Integer
|
||||||
return function
|
return function
|
||||||
end
|
end
|
||||||
# this is the really really first place the machine starts.
|
# this is the really really first place the machine starts.
|
||||||
# it isn't really a function, ie it is jumped to (not called), exits and may not return
|
# it isn't really a function, ie it is jumped to (not called), exits and may not return
|
||||||
# so it is responsible for initial setup (and relocation)
|
# so it is responsible for initial setup (and relocation)
|
||||||
def __init__ context
|
def __init__ context
|
||||||
function = Virtual::CompiledMethod.new(:__init__ , [] , Virtual::Integer)
|
function = Virtual::CompiledMethodInfo.create_method("Kernel","__init__" , [])
|
||||||
clazz = Virtual::Machine.instance.space.get_class_by_name "Kernel"
|
function.info.return_type = Virtual::Integer
|
||||||
method = clazz.resolve_method :main
|
clazz = Virtual::Machine.instance.class_mappings["Kernel"]
|
||||||
|
method = clazz.resolve_method Virtual::new_word "main"
|
||||||
me = Virtual::Self.new(Virtual::Reference)
|
me = Virtual::Self.new(Virtual::Reference)
|
||||||
code = Virtual::Set.new(Virtual::Self.new(me.type), me)
|
code = Virtual::Set.new(Virtual::Self.new(me.type), me)
|
||||||
function.add_code(code)
|
function.info.add_code(code)
|
||||||
function.add_code Virtual::MethodCall.new(method)
|
function.info.add_code Virtual::MethodCall.new(method)
|
||||||
return function
|
return function
|
||||||
end
|
end
|
||||||
def putstring context
|
def putstring context
|
||||||
function = Virtual::CompiledMethod.new(:putstring , [] )
|
function = Virtual::CompiledMethodInfo.create_method("Kernel" , "putstring" , [] )
|
||||||
return function
|
return function
|
||||||
ret = Virtual::RegisterMachine.instance.write_stdout(function)
|
ret = Virtual::RegisterMachine.instance.write_stdout(function)
|
||||||
function.set_return ret
|
function.set_return ret
|
||||||
function
|
function
|
||||||
end
|
end
|
||||||
def exit context
|
def exit context
|
||||||
function = Virtual::CompiledMethod.new(:exit , [] , Virtual::Integer)
|
function = Virtual::CompiledMethodInfo.create_method("Kernel","exit" , [])
|
||||||
|
function.info.return_type = Virtual::Integer
|
||||||
return function
|
return function
|
||||||
ret = Virtual::RegisterMachine.instance.exit(function)
|
ret = Virtual::RegisterMachine.instance.exit(function)
|
||||||
function.set_return ret
|
function.set_return ret
|
||||||
function
|
function
|
||||||
end
|
end
|
||||||
def __send context
|
def __send context
|
||||||
function = Virtual::CompiledMethod.new(:__send , [] , Virtual::Integer)
|
function = Virtual::CompiledMethodInfo.create_method("Kernel" ,"__send" , [] )
|
||||||
|
function.info.return_type = Virtual::Integer
|
||||||
return function
|
return function
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
@ -6,7 +6,8 @@ module Builtin
|
|||||||
# set/get instance variable use it.
|
# set/get instance variable use it.
|
||||||
# This is just a placeholder, as we code this in ruby, but the instance methods need the definition before.
|
# This is just a placeholder, as we code this in ruby, but the instance methods need the definition before.
|
||||||
def index_of context , name = Virtual::Integer
|
def index_of context , name = Virtual::Integer
|
||||||
index_function = Virtual::CompiledMethod.new(:index_of , Virtual::Reference , [Virtual::Reference] , Virtual::Integer )
|
index_function = Virtual::CompiledMethodInfo.create_method("Object" , "index_of" , [Virtual::Reference] )
|
||||||
|
index_function.info.return_type = Virtual::Integer
|
||||||
return index_function
|
return index_function
|
||||||
end
|
end
|
||||||
|
|
||||||
@ -23,7 +24,7 @@ module Builtin
|
|||||||
# end
|
# end
|
||||||
# The at_index is just "below" the api, something we need but don't want to expose, so we can't code the above in ruby
|
# The at_index is just "below" the api, something we need but don't want to expose, so we can't code the above in ruby
|
||||||
def _get_instance_variable context , name = Virtual::Integer
|
def _get_instance_variable context , name = Virtual::Integer
|
||||||
get_function = Virtual::CompiledMethod.new(:_get_instance_variable , [ Virtual::Reference ] , Virtual::Reference ,Virtual::Mystery )
|
get_function = Virtual::CompiledMethodInfo.create_method("Object","_get_instance_variable" , [ Virtual::Reference ] )
|
||||||
return get_function
|
return get_function
|
||||||
me = get_function.receiver
|
me = get_function.receiver
|
||||||
var_name = get_function.args.first
|
var_name = get_function.args.first
|
||||||
@ -44,7 +45,7 @@ module Builtin
|
|||||||
end
|
end
|
||||||
|
|
||||||
def _set_instance_variable(context , name = Virtual::Integer , value = Virtual::Integer )
|
def _set_instance_variable(context , name = Virtual::Integer , value = Virtual::Integer )
|
||||||
set_function = Virtual::CompiledMethod.new(:_set_instance_variable ,[Virtual::Reference ,Virtual::Reference], Virtual::Reference ,Virtual::Mystery )
|
set_function = Virtual::CompiledMethodInfo.create_method("Object","_set_instance_variable" ,[Virtual::Reference ,Virtual::Reference] )
|
||||||
return set_function
|
return set_function
|
||||||
receiver set_function
|
receiver set_function
|
||||||
me = set_function.receiver
|
me = set_function.receiver
|
||||||
|
@ -1,18 +1,6 @@
|
|||||||
module Builtin
|
module Builtin
|
||||||
class Word
|
class Word
|
||||||
module ClassMethods
|
module ClassMethods
|
||||||
def get context , index = Virtual::Integer
|
|
||||||
get_function = Virtual::CompiledMethod.new(:get , [ Virtual::Integer] , Virtual::Integer , Virtual::Integer )
|
|
||||||
return get_function
|
|
||||||
end
|
|
||||||
def set context , index = Virtual::Integer , char = Virtual::Integer
|
|
||||||
set_function = Virtual::CompiledMethod.new(:set , [Virtual::Integer, Virtual::Integer] , Virtual::Integer ,Virtual::Integer )
|
|
||||||
return set_function
|
|
||||||
end
|
|
||||||
def puts context
|
|
||||||
puts_function = Virtual::CompiledMethod.new(:puts , [] )
|
|
||||||
return puts_function
|
|
||||||
end
|
|
||||||
end
|
end
|
||||||
extend ClassMethods
|
extend ClassMethods
|
||||||
end
|
end
|
||||||
|
@ -1,5 +1,7 @@
|
|||||||
module Virtual
|
module Virtual
|
||||||
|
|
||||||
|
# Booting is a complicated, so it is extracted into this file, even it has only one entry point
|
||||||
|
|
||||||
class Machine
|
class Machine
|
||||||
|
|
||||||
# The general idea is that compiling is creating an object graph. Functionally
|
# The general idea is that compiling is creating an object graph. Functionally
|
||||||
@ -16,24 +18,25 @@ module Virtual
|
|||||||
# (not use the normal initialize way)
|
# (not use the normal initialize way)
|
||||||
def boot_parfait!
|
def boot_parfait!
|
||||||
@space = Parfait::Space.new_object
|
@space = Parfait::Space.new_object
|
||||||
|
# map from the vm - class_name to the Parfait class (which carries parfait name)
|
||||||
|
class_mappings = {} #will later become instance variable
|
||||||
|
|
||||||
values = [ "Value" , "Integer" , "Kernel" , "Object"].collect {|cl| Virtual.new_word(cl) }
|
values = [ "Value" , "Integer" , "Kernel" , "Object"].collect {|cl| Virtual.new_word(cl) }
|
||||||
value_classes = values.collect { |cl| @space.create_class(cl) }
|
value_classes = values.collect { |cl| @space.create_class(cl) }
|
||||||
layouts = { "Word" => [] ,
|
layouts = { "Word" => [] ,
|
||||||
|
"List" => [] ,
|
||||||
"Space" => ["classes","objects"],
|
"Space" => ["classes","objects"],
|
||||||
"Layout" => ["object_class"] ,
|
"Layout" => ["object_class"] ,
|
||||||
"Method" => ["name" , "arg_names" , "locals" , "tmps"] ,
|
|
||||||
"Module" => ["name","instance_methods", "super_class", "meta_class"],
|
|
||||||
"Class" => ["object_layout"],
|
"Class" => ["object_layout"],
|
||||||
"Dictionary" => ["keys" , "values"] ,
|
"Dictionary" => ["keys" , "values"] ,
|
||||||
"List" => [] }
|
"Method" => ["name" , "arg_names" , "locals" , "tmps"] ,
|
||||||
# map from the vm - class_name to the Parfait class (which carries parfait name)
|
"Module" => ["name" , "instance_methods", "super_class", "meta_class"]
|
||||||
class_mappings = {}
|
}
|
||||||
layouts.each do |name , layout|
|
layouts.each do |name , layout|
|
||||||
class_mappings[name] = @space.create_class(Virtual.new_word(name))
|
class_mappings[name] = @space.create_class(Virtual.new_word(name))
|
||||||
end
|
end
|
||||||
value_classes[1].set_super_class( value_classes[0] ) # #set superclass (value) for object
|
value_classes[1].set_super_class( value_classes[0] ) # #set superclass (value) for integer
|
||||||
value_classes[3].set_super_class( value_classes[0] ) # and integer
|
value_classes[3].set_super_class( value_classes[0] ) # and object
|
||||||
class_mappings.each do |name , clazz| # and the rest
|
class_mappings.each do |name , clazz| # and the rest
|
||||||
clazz.set_super_class(value_classes[3]) # superclasses are object
|
clazz.set_super_class(value_classes[3]) # superclasses are object
|
||||||
end
|
end
|
||||||
@ -49,6 +52,9 @@ module Virtual
|
|||||||
# lookup half created class info
|
# lookup half created class info
|
||||||
# but it must be done before going through the objects (next step)
|
# but it must be done before going through the objects (next step)
|
||||||
@class_mappings = class_mappings
|
@class_mappings = class_mappings
|
||||||
|
class_mappings["Integer"] = value_classes[1] #need for further booting
|
||||||
|
class_mappings["Kernel"] = value_classes[2] #need for further booting
|
||||||
|
class_mappings["Object"] = value_classes[3] #need for further booting
|
||||||
|
|
||||||
# now update the layout on all objects created so far,
|
# now update the layout on all objects created so far,
|
||||||
# go through objects in space
|
# go through objects in space
|
||||||
@ -56,23 +62,25 @@ module Virtual
|
|||||||
o.init_layout
|
o.init_layout
|
||||||
end
|
end
|
||||||
# and go through the space instance variables which get created before the object list
|
# and go through the space instance variables which get created before the object list
|
||||||
|
|
||||||
|
boot_functions!
|
||||||
end
|
end
|
||||||
|
|
||||||
# boot the classes, ie create a minimal set of classes with a minimal set of functions
|
# classes have booted, now create a minimal set of functions
|
||||||
# minimal means only that which can not be coded in ruby
|
# minimal means only that which can not be coded in ruby
|
||||||
# CompiledMethods are grabbed from respective modules by sending the method name. This should return the
|
# Methods are grabbed from respective modules by sending the method name. This should return the
|
||||||
# implementation of the method (ie a method object), not actually try to implement it (as that's impossible in ruby)
|
# implementation of the method (ie a method object), not actually try to implement it
|
||||||
|
# (as that's impossible in ruby)
|
||||||
def boot_functions!
|
def boot_functions!
|
||||||
@space = Parfait::Space.new
|
|
||||||
boot_classes!
|
|
||||||
# very fiddly chicken 'n egg problem. Functions need to be in the right order, and in fact we
|
# very fiddly chicken 'n egg problem. Functions need to be in the right order, and in fact we
|
||||||
# have to define some dummies, just for the other to compile
|
# have to define some dummies, just for the other to compile
|
||||||
# TODO: go through the virtual parfait layer and adjust function names to what they really are
|
# TODO: go through the virtual parfait layer and adjust function names to what they really are
|
||||||
obj = @space.get_class_by_name "Object"
|
obj = @class_mappings["Object"]
|
||||||
[:index_of , :_get_instance_variable , :_set_instance_variable].each do |f|
|
[:index_of , :_get_instance_variable , :_set_instance_variable].each do |f|
|
||||||
obj.add_instance_method Builtin::Object.send(f , nil)
|
obj.add_instance_method Builtin::Object.send(f , nil)
|
||||||
|
puts "Object add #{f}"
|
||||||
end
|
end
|
||||||
obj = @space.get_class_by_name "Kernel"
|
obj = @class_mappings["Kernel"]
|
||||||
# create main first, __init__ calls it
|
# create main first, __init__ calls it
|
||||||
@main = Builtin::Kernel.send(:main , @context)
|
@main = Builtin::Kernel.send(:main , @context)
|
||||||
obj.add_instance_method @main
|
obj.add_instance_method @main
|
||||||
@ -85,18 +93,10 @@ module Virtual
|
|||||||
# the point of which is that by the time main executes, all is "normal"
|
# the point of which is that by the time main executes, all is "normal"
|
||||||
@init = Block.new(:_init_ , nil )
|
@init = Block.new(:_init_ , nil )
|
||||||
@init.add_code(Register::RegisterMain.new(underscore_init))
|
@init.add_code(Register::RegisterMain.new(underscore_init))
|
||||||
obj = @space.get_class_by_name "Integer"
|
obj = @class_mappings["Integer"]
|
||||||
[:putint,:fibo].each do |f|
|
[:putint,:fibo].each do |f|
|
||||||
obj.add_instance_method Builtin::Integer.send(f , nil)
|
obj.add_instance_method Builtin::Integer.send(f , nil)
|
||||||
end
|
end
|
||||||
obj = @space.get_class_by_name Virtual.new_word "Word"
|
|
||||||
[:get , :set , :puts].each do |f|
|
|
||||||
obj.add_instance_method Builtin::Word.send(f , nil)
|
|
||||||
end
|
|
||||||
obj = space.get_class_by_name "List"
|
|
||||||
[:get , :set , :push].each do |f|
|
|
||||||
obj.add_instance_method Builtin::Array.send(f , nil)
|
|
||||||
end
|
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
@ -24,9 +24,6 @@ module FakeMem
|
|||||||
end
|
end
|
||||||
|
|
||||||
module Parfait
|
module Parfait
|
||||||
Space.class_eval do
|
|
||||||
attr_accessor :vm_objects
|
|
||||||
end
|
|
||||||
# Objects memory functions. Object memory is 1 based
|
# Objects memory functions. Object memory is 1 based
|
||||||
# but we implement it with ruby array (0 based) and use 0 as type-word
|
# but we implement it with ruby array (0 based) and use 0 as type-word
|
||||||
# These are the same functions that Builtin implements at run-time
|
# These are the same functions that Builtin implements at run-time
|
||||||
|
@ -13,7 +13,7 @@ module Virtual
|
|||||||
next unless code.is_a? MessageSend
|
next unless code.is_a? MessageSend
|
||||||
new_codes = [ ]
|
new_codes = [ ]
|
||||||
ref = code.me
|
ref = code.me
|
||||||
raise "only refs implemented #{me.inspect}" unless ( ref.type == Reference)
|
raise "only refs implemented #{ref.inspect}" unless ( ref.type == Reference)
|
||||||
# value known at compile time, got do something with it
|
# value known at compile time, got do something with it
|
||||||
if(ref.value)
|
if(ref.value)
|
||||||
me = ref.value
|
me = ref.value
|
||||||
@ -22,7 +22,7 @@ module Virtual
|
|||||||
elsif( me.is_a? Parfait::Object )
|
elsif( me.is_a? Parfait::Object )
|
||||||
# get the function from my class. easy peasy
|
# get the function from my class. easy peasy
|
||||||
puts "Me is #{me.class}"
|
puts "Me is #{me.class}"
|
||||||
method = me.get_class.get_instance_method(code.name)
|
method = me.get_class.get_instance_method(Virtual.new_word code.name)
|
||||||
raise "Method not implemented #{me.class}.#{code.name}" unless method
|
raise "Method not implemented #{me.class}.#{code.name}" unless method
|
||||||
new_codes << MethodCall.new( method )
|
new_codes << MethodCall.new( method )
|
||||||
else
|
else
|
||||||
|
@ -22,7 +22,7 @@ HERE
|
|||||||
check
|
check
|
||||||
end
|
end
|
||||||
|
|
||||||
def ttest_puts_string
|
def test_puts_string
|
||||||
@string_input = <<HERE
|
@string_input = <<HERE
|
||||||
def foo()
|
def foo()
|
||||||
puts("Hello")
|
puts("Hello")
|
||||||
@ -32,7 +32,7 @@ HERE
|
|||||||
check
|
check
|
||||||
end
|
end
|
||||||
|
|
||||||
def test_string_put
|
def ttest_string_put
|
||||||
@string_input = <<HERE
|
@string_input = <<HERE
|
||||||
def foo()
|
def foo()
|
||||||
"Hello".puts()
|
"Hello".puts()
|
||||||
|
Loading…
Reference in New Issue
Block a user