small clean

This commit is contained in:
Torsten Ruger 2015-09-27 14:07:02 +03:00
parent dba94827ec
commit 94c08f7129
6 changed files with 5 additions and 19 deletions

View File

@ -17,8 +17,7 @@ module Bosl
# #
# Everything in ruby is an expression, ie returns a value. So the effect of every compile # Everything in ruby is an expression, ie returns a value. So the effect of every compile
# is that a value is put into the ReturnSlot of the current Message. # is that a value is put into the ReturnSlot of the current Message.
# The compile method (so every compile method) returns the value that it deposits which # The compile method (so every compile method) returns the value that it deposits.
# may be unknown Unknown value.
# #
# The process uses a visitor pattern (from AST::Processor) to dispatch according to the # The process uses a visitor pattern (from AST::Processor) to dispatch according to the
# type the expression. So a s(:if xx) will become an on_if(node) call. # type the expression. So a s(:if xx) will become an on_if(node) call.

View File

@ -72,9 +72,5 @@ module Bosl
r r
end end
def on_variable expression
method.source.add_code InstanceGet.new(expression.name)
Virtual::Return.new( Unknown )
end
end end
end end

View File

@ -11,10 +11,9 @@ module Parfait
# name # name
# arg_names # arg_names
# known local variable names # known local variable names
# temp variables (numbered)
# executable code # executable code
# ps, the compiler injects its own info, see virtual::compiled_method_info # ps, the compiler injects its own info, see Virtual::MethodSource
class Method < Object class Method < Object

View File

@ -5,8 +5,6 @@ module Virtual
# runtime, ie found in Parfait::Method # runtime, ie found in Parfait::Method
# the source we create here is injected into the method and used only at compile-time # the source we create here is injected into the method and used only at compile-time
# receiver
# return arg (usually mystery, but for coded ones can be more specific)
# #
# Methods are one step up from to VM::Blocks. Where Blocks can be jumped to, Methods can be called. # Methods are one step up from to VM::Blocks. Where Blocks can be jumped to, Methods can be called.

View File

@ -1,7 +1,7 @@
module Virtual module Virtual
# Integer and (Object) References are the main derived classes, but float will come and ... # Integer and (Object) References are the main derived classes, but float will come.
# The Unknown Type has unknown type and has only casting methods. So it must be cast to be useful.
class Type class Type
def == other def == other
return false unless other.class == self.class return false unless other.class == self.class

View File

@ -46,12 +46,6 @@ class TestBasic < MiniTest::Test
check check
end end
def ttest_field
@string_input = 'self.foo_bar '
@output = "- Virtual::Return(:type => Virtual::Unknown)"
check
end
def pest_module_name def pest_module_name
@string_input = 'FooBar ' @string_input = 'FooBar '
@output = "" @output = ""