Torsten Rüger
7ee57f2b08
to get at those know methods that really __must__ exists, hence the bang, raise if don't about to add method missing and raise to the list
30 lines
532 B
Ruby
30 lines
532 B
Ruby
class FakeCallable
|
|
end
|
|
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
|
|
def resolve_type(name)
|
|
Parfait.object_space.types.values.first
|
|
end
|
|
def use_reg(type , extra = {})
|
|
RegisterValue.new(:r1 , type)
|
|
end
|
|
def reset_regs
|
|
end
|
|
def add_constant(c)
|
|
end
|
|
end
|
|
end
|