split compiled_method into method and compiled_method_info
This commit is contained in:
@ -15,15 +15,21 @@ module Parfait
|
||||
class Module < Object
|
||||
def initialize name , superclass
|
||||
@instance_methods = []
|
||||
@name = name.to_sym
|
||||
@name = name
|
||||
@super_class = superclass
|
||||
@meta_class = Virtual::MetaClass.new(self)
|
||||
end
|
||||
|
||||
def add_instance_method method
|
||||
raise "not a method #{method.class} #{method.inspect}" unless method.is_a? Virtual::CompiledMethod
|
||||
raise "not a method #{method.class} #{method.inspect}" unless method.is_a? Method
|
||||
raise "syserr " unless method.name.is_a? Symbol
|
||||
method.for_class = self
|
||||
@instance_methods << method
|
||||
method
|
||||
end
|
||||
|
||||
def create_instance_method name , arg_names
|
||||
add_instance_method Method.new( name , arg_names )
|
||||
end
|
||||
|
||||
# this needs to be done during booting as we can't have all the classes and superclassses
|
||||
|
Reference in New Issue
Block a user