move type resolution to compiler
from risc_value. also unite mock compilers
This commit is contained in:
17
test/support/fake_compiler.rb
Normal file
17
test/support/fake_compiler.rb
Normal file
@ -0,0 +1,17 @@
|
||||
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
|
Reference in New Issue
Block a user