Only add Builtin methods that are not in the current compilation
Current bug looks like the original main is used in parts (not the compiled one, but the builtin on)
This commit is contained in:
@ -3,7 +3,12 @@ module Mom
|
||||
attr_reader :method_compilers
|
||||
|
||||
def initialize(compilers = [])
|
||||
@method_compilers = Risc::Builtin.boot_functions + compilers
|
||||
@method_compilers = compilers
|
||||
Risc::Builtin.boot_functions.each do |boot_comp|
|
||||
next if @method_compilers.find{|comp| comp.method == boot_comp.method }
|
||||
@method_compilers << boot_comp
|
||||
end
|
||||
|
||||
end
|
||||
|
||||
# collects constants from all compilers into one array
|
||||
|
@ -32,6 +32,12 @@ module Parfait
|
||||
init(arguments_type, frame_type)
|
||||
end
|
||||
|
||||
def ==(other)
|
||||
return false unless other.is_a?(TypedMethod)
|
||||
return false if @name != other.name
|
||||
@for_type == other.for_type
|
||||
end
|
||||
|
||||
# (re) init with given args and frame types
|
||||
def init(arguments_type, frame_type)
|
||||
raise "Wrong argument type, expect Type not #{arguments_type.class}" unless arguments_type.is_a? Type
|
||||
|
Reference in New Issue
Block a user