rubyx/test/support/fake_compiler.rb
Torsten Ruger 3343017dba move type resolution to compiler
from risc_value.
also unite mock compilers
2018-07-16 11:46:18 +03:00

18 lines
312 B
Ruby

module Risc
class FakeCompiler
def slot_type(slot,type)
type.type_for(slot)
end
def resolve_type(name)
Parfait.object_space.types.values.first
end
def use_reg(type)
RegisterValue.new(:r1 , type)
end
def reset_regs
end
def add_constant(c)
end
end
end