moved sod write method to module
This commit is contained in:
parent
1baece99c7
commit
87143091ca
@ -43,7 +43,7 @@ module Parfait
|
||||
found = get_instance_method( method.name )
|
||||
if found
|
||||
@instance_methods.delete(found)
|
||||
raise "existed in #{self.name} #{Sof::Writer.write found.info.blocks}"
|
||||
raise "existed in #{self.name} #{Sof.write found.info.blocks}"
|
||||
end
|
||||
@instance_methods.push method
|
||||
#puts "#{self.name} add #{method.name}"
|
||||
|
@ -100,8 +100,8 @@ module Register
|
||||
begin
|
||||
code.assemble( stream )
|
||||
rescue => e
|
||||
puts "Method error #{method.name}\n#{Sof::Writer.write(method.info.blocks).to_s[0...2000]}"
|
||||
puts Sof::Writer.write(code)
|
||||
puts "Method error #{method.name}\n#{Sof.write(method.info.blocks).to_s[0...2000]}"
|
||||
puts Sof.write(code)
|
||||
raise e
|
||||
end
|
||||
end
|
||||
|
@ -72,7 +72,7 @@ module Virtual
|
||||
end
|
||||
|
||||
def to_s
|
||||
Sof::Writer.write(self)
|
||||
Sof.write(self)
|
||||
end
|
||||
|
||||
private
|
||||
|
@ -10,7 +10,7 @@ module Virtual
|
||||
|
||||
class Instruction
|
||||
def to_s
|
||||
Sof::Writer.write(self)
|
||||
Sof.write(self)
|
||||
end
|
||||
end
|
||||
|
||||
|
@ -126,7 +126,7 @@ module Parfait
|
||||
end
|
||||
|
||||
def to_s
|
||||
Sof::Writer.write(self)
|
||||
Sof.write(self)
|
||||
end
|
||||
def inspect
|
||||
to_s
|
||||
|
@ -7,7 +7,7 @@ class HelloTest < MiniTest::Test
|
||||
machine = Virtual::Machine.boot
|
||||
expressions = machine.compile_main @string_input
|
||||
machine.run_before "Register::CallImplementation"
|
||||
puts Sof::Writer.write(machine.space)
|
||||
puts Sof.write(machine.space)
|
||||
machine.run_after "Register::CallImplementation"
|
||||
|
||||
|
||||
|
@ -21,7 +21,7 @@ module VirtualHelper
|
||||
# with the class comes superclass and all methods
|
||||
expressions.first.type.instance_variable_set :@of_class , nil
|
||||
end
|
||||
is = Sof::Writer.write(expressions)
|
||||
is = Sof.write(expressions)
|
||||
#puts is
|
||||
is.gsub!("\n" , "*^*")
|
||||
assert_equal is , @output
|
||||
|
Loading…
Reference in New Issue
Block a user