some more safety tests

This commit is contained in:
Torsten Ruger
2018-04-05 12:22:40 +03:00
parent ee0a1ca823
commit 5bb3ad03cc
5 changed files with 7 additions and 1 deletions

View File

@ -10,6 +10,7 @@ module Risc
@register = register
@constant = constant
raise "Not Constant #{constant}" if constant.is_a?(Mom::SlotDefinition)
raise "Not register #{register}" unless RiscValue.look_like_reg(register)
end
attr_accessor :register , :constant