make the tests run (and pass) again

This commit is contained in:
Torsten Ruger 2015-05-04 11:10:40 +03:00
parent 4aca2caa05
commit 3659cb4b81
3 changed files with 16 additions and 25 deletions

View File

@ -4,12 +4,12 @@ module Parfait
eval(File.open("./lib/parfait/hash.rb").read) eval(File.open("./lib/parfait/hash.rb").read)
end end
require "ast/all"
require "stream_reader"
require "elf/object_writer" require "elf/object_writer"
require 'salama-reader' require 'salama-reader'
require 'parser/transform' require 'parser/transform'
require "sof/all" require "salama-object-file"
require "virtual/machine" require "virtual/machine"
require "register/register_machine" require "register/register_machine"
require "arm/arm_machine" require "arm/arm_machine"
require "ast/all"
require_relative "stream_reader"

View File

@ -59,19 +59,9 @@ module Virtual
syntax = @parser.parse_with_debug(bytes) syntax = @parser.parse_with_debug(bytes)
parts = Parser::Transform.new.apply(syntax) parts = Parser::Transform.new.apply(syntax)
main = Virtual::CompiledMethod.main main = Virtual::CompiledMethod.main
expressions = parts.compile( main , self.message ) parts.compile( main , self.message )
end end
# run the instruction stream given. Instructions are a graph and executing means traversing it.
# If there is no next instruction the machine stops
def run instruction
while instruction do
next_instruction = instruction.next
instruction.execute
instruction = next_instruction
end
end
end end
end end

View File

@ -1,5 +1,6 @@
require_relative "type" require_relative "type"
require "parfait/message" require "parfait/message"
require "parfait/frame"
module Positioned module Positioned
def position def position