removing exceptions
This commit is contained in:
@ -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
|
||||
|
@ -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
|
||||
|
Reference in New Issue
Block a user