2018-05-15 18:29:27 +02:00
|
|
|
require_relative '../helper'
|
|
|
|
|
|
|
|
module Mom
|
|
|
|
class CompilerMock
|
2018-07-09 17:16:51 +02:00
|
|
|
# resolve a symbol to a type. Allowed symbols are :frame , :receiver and arguments
|
|
|
|
# which return the respective types, otherwise nil
|
|
|
|
def resolve_type( name )
|
|
|
|
return nil
|
|
|
|
end
|
2018-05-15 18:29:27 +02:00
|
|
|
def use_reg( type )
|
2018-07-16 10:23:09 +02:00
|
|
|
Risc.tmp_reg(type )
|
2018-05-16 11:35:44 +02:00
|
|
|
end
|
|
|
|
def reset_regs
|
|
|
|
|
2018-05-15 18:29:27 +02:00
|
|
|
end
|
|
|
|
def add_constant(c)
|
|
|
|
end
|
|
|
|
end
|
|
|
|
class InstructionMock < Instruction
|
|
|
|
end
|
|
|
|
end
|