remove some more add_xx functions

also load labels by dsl now
This commit is contained in:
Torsten Ruger
2018-08-14 20:24:48 +03:00
parent 520dc7b41f
commit e953cc90d5
5 changed files with 14 additions and 10 deletions

View File

@ -139,9 +139,8 @@ module Risc
# for computationally building code (ie writing assembler) these short cuts
# help to instantiate risc instructions and add them immediately
[:label, :reg_to_slot , :slot_to_reg , :load_constant, :load_data,
:function_return , :function_call, :op ,
:transfer , :reg_to_slot , :byte_to_reg , :reg_to_byte].each do |method|
[ :slot_to_reg , :load_constant, :load_data,
:transfer ].each do |method|
define_method("add_#{method}".to_sym) do |*args|
if not @source_used
args[0] = @source