assembler will need redoing somewhat
with own data objects, we can assemble into them first then write may also store cpu instructions
This commit is contained in:
@ -38,7 +38,6 @@ module Parfait
|
||||
def init(arguments, frame)
|
||||
raise "Wrong argument type, expect Type not #{arguments.class}" unless arguments.is_a? Type
|
||||
raise "Wrong frame type, expect Type not #{frame.class}" unless frame.is_a? Type
|
||||
@binary = BinaryCode.new 0
|
||||
@arguments = arguments
|
||||
@frame = frame
|
||||
end
|
||||
@ -47,6 +46,11 @@ module Parfait
|
||||
@instructions = inst
|
||||
end
|
||||
|
||||
def create_binary
|
||||
total = @instructions.total_byte_length / 4 + 1
|
||||
@binary = BinaryCode.new( total )
|
||||
end
|
||||
|
||||
# determine whether this method has an argument by the name
|
||||
def has_argument( name )
|
||||
raise "has_argument #{name}.#{name.class}" unless name.is_a? Symbol
|
||||
|
Reference in New Issue
Block a user