continue with #11

slots are the most tricky, especially testing
This commit is contained in:
Torsten Ruger
2018-08-19 13:06:00 +03:00
parent 047a36178f
commit b294208025
4 changed files with 43 additions and 32 deletions

View File

@ -1,5 +1,15 @@
module Risc
class FakeCompiler
attr_reader :instructions
def initialize
@instructions = []
end
def add_code(c)
@instructions << c
end
def current
@instructions.last
end
def slot_type(slot,type)
type.type_for(slot)
end