removing exceptions

This commit is contained in:
Torsten Ruger
2014-07-14 16:19:47 +03:00
parent c7c4387e16
commit 93bdd8a243
8 changed files with 38 additions and 26 deletions

View File

@ -15,6 +15,9 @@ module Virtual
def attributes
[:next]
end
def initialize nex = nil
@next = nex
end
end
# the first instruction we need is to stop. Off course in a real machine this would be a syscall, but that is just

View File

@ -15,15 +15,15 @@ module Virtual
Method.new(:main , [] , Virtual::SelfReference )
end
def attributes
[:name , :args , :receiver , :start , :return_type]
[:name , :args , :receiver , :return_type , :start]
end
def initialize name , args , receiver = Virtual::SelfReference.new , return_type = Virtual::Reference
def initialize name , args , receiver = Virtual::SelfReference.new , return_type = Virtual::Reference , start = MethodEnter.new
@name = name.to_sym
@args = args
@locals = []
@receiver = receiver
@return_type = return_type
@start = MethodEnter.new
@start = start
@current = @start
end
attr_reader :name , :args , :receiver , :start