slight rename tremours

This commit is contained in:
Torsten Ruger 2014-07-16 20:16:10 +03:00
parent 1ff7ae2b0a
commit 4185758532
2 changed files with 6 additions and 6 deletions

View File

@ -17,7 +17,7 @@ module Virtual
def attributes def attributes
[:name , :args , :receiver , :return_type , :start] [:name , :args , :receiver , :return_type , :start]
end end
def initialize name , args , receiver = Virtual::SelfReference.new , return_type = Virtual::Mystery , start = MethodDefinitionEnter.new def initialize name , args , receiver = Virtual::SelfReference.new , return_type = Virtual::Mystery , start = MethodEnter.new
@name = name.to_sym @name = name.to_sym
@args = args @args = args
@locals = [] @locals = []
@ -28,7 +28,7 @@ module Virtual
@current = @start @current = @start
end end
attr_reader :name , :args , :receiver , :start attr_reader :name , :args , :receiver , :start
attr_accessor :return_type attr_accessor :return_type , :current
def add instruction def add instruction
raise instruction.inspect unless instruction.is_a? Instruction raise instruction.inspect unless instruction.is_a? Instruction

View File

@ -9,7 +9,7 @@ def foo(x)
5 5
end end
HERE HERE
@output = [Virtual::MethodDefinition.new(:foo,[Virtual::Argument.new(:x,Virtual::Mystery.new())],Virtual::SelfReference.new(nil),Virtual::IntegerConstant.new(5),Virtual::MethodDefinitionEnter.new(nil))] @output = [Virtual::MethodDefinition.new(:foo,[Virtual::Argument.new(:x,Virtual::Mystery.new())],Virtual::SelfReference.new(nil),Virtual::IntegerConstant.new(5),Virtual::MethodEnter.new(nil))]
check check
end end
@ -19,7 +19,7 @@ def String.length(x)
@length @length
end end
HERE HERE
@output = [Virtual::MethodDefinition.new(:length,[Virtual::Argument.new(:x,Virtual::Mystery.new())],Boot::BootClass.new(:String,:Object),Virtual::Return.new(Virtual::Mystery.new()),Virtual::MethodDefinitionEnter.new(Virtual::ObjectGet.new(:length,nil)))] @output = [Virtual::MethodDefinition.new(:length,[Virtual::Argument.new(:x,Virtual::Mystery.new())],Boot::BootClass.new(:String,:Object),Virtual::Return.new(Virtual::Mystery.new()),Virtual::MethodEnter.new(Virtual::ObjectGet.new(:length,nil)))]
check check
end end
@ -30,7 +30,7 @@ def foo(x)
2 + 5 2 + 5
end end
HERE HERE
@output = [Virtual::MethodDefinition.new(:foo,[Virtual::Argument.new(:x,Virtual::Mystery.new())],Virtual::SelfReference.new(nil),Virtual::Return.new(Virtual::Mystery),Virtual::MethodDefinitionEnter.new(Virtual::FrameSet.new(:abba,Virtual::IntegerConstant.new(5),Virtual::LoadSelf.new(Virtual::IntegerConstant.new(2),Virtual::FrameSend.new(:+,[Virtual::IntegerConstant.new(5)],nil)))))] @output = [Virtual::MethodDefinition.new(:foo,[Virtual::Argument.new(:x,Virtual::Mystery.new())],Virtual::SelfReference.new(nil),Virtual::Return.new(Virtual::Mystery),Virtual::MethodEnter.new(Virtual::FrameSet.new(:abba,Virtual::IntegerConstant.new(5),Virtual::LoadSelf.new(Virtual::IntegerConstant.new(2),Virtual::FrameSend.new(:+,[Virtual::IntegerConstant.new(5)],nil)))))]
check check
end end
@ -40,7 +40,7 @@ def foo()
2 + 5 2 + 5
end end
HERE HERE
@output = [Virtual::MethodDefinition.new(:foo,[],Virtual::SelfReference.new(nil),Virtual::Return.new(Virtual::Mystery),Virtual::MethodDefinitionEnter.new(Virtual::LoadSelf.new(Virtual::IntegerConstant.new(2),Virtual::FrameSend.new(:+,[Virtual::IntegerConstant.new(5)],nil))))] @output = [Virtual::MethodDefinition.new(:foo,[],Virtual::SelfReference.new(nil),Virtual::Return.new(Virtual::Mystery),Virtual::MethodEnter.new(Virtual::LoadSelf.new(Virtual::IntegerConstant.new(2),Virtual::FrameSend.new(:+,[Virtual::IntegerConstant.new(5)],nil))))]
check check
end end