rename self to receiver

just because it is a keyword and can’t be used
This commit is contained in:
Torsten Ruger
2018-03-14 20:26:13 +05:30
parent 2533842204
commit 03a4e04f7e
10 changed files with 20 additions and 14 deletions

View File

@ -4,7 +4,7 @@ module Risc
module CompileHelper
def self_and_int_arg(compiler , source)
me = compiler.add_known( :self )
me = compiler.add_known( :receiver )
int_arg = load_int_arg_at(compiler , source , 1 )
return me , int_arg
end

View File

@ -18,9 +18,9 @@ module Risc
def div10 context
s = "div_10"
compiler = Risc::MethodCompiler.create_method(:Integer,:div10 ).init_method
me = compiler.add_known( :self )
tmp = compiler.add_known( :self )
q = compiler.add_known( :self )
me = compiler.add_known( :receiver )
tmp = compiler.add_known( :receiver )
q = compiler.add_known( :receiver )
const = compiler.use_reg :Integer , 1
compiler.add_load_constant( s, 1 , const )
# int tmp = self >> 1