Send optimization


#1

e$B!!$5$5$@$G$9!#e(B

e$B!!@hF|$N%3%%C%H$Ge(B send/send/__send/funcall/__send!
e$B$N8F$S=P$7$r9bB.e(B
e$B2=$9$kJQ99$r%3%
%C%H$7$^$7$?!#e(B

e$B!!6qBNE*$K$O!"8=>ue(B send
e$B$ODL>o$N%a%=%C%I%G%#%9%Q%C%A=hM}8e!“e(Bsend e$B%a%=%Ce(B
e$B%I$N=hM}$H$7$F$5$i$K%a%=%C%I%G%#%9%Q%C%A$r9T$$$^$9$,!”$3$N!VDL>o$N%a%=%Ce(B
e$B%I%G%#%9%Q%C%A!WItJ,$r%9%-%C%W$7$F8F$S=P$7BP>]$N%a%=%C%I$r8F$S=P$7$^$9!#e(B

e$BMxE@!'e(B
e$B!!$3$l$KH<$$!“e(Bsend
e$B%a%=%C%I$N$?$a$N%U%l!<%`$r:n$i$J$/$F$$$$$J$I$NMxE@$,e(B
e$B$”$j$^$9!#e(B

e$B7gE@!'e(B
e$B!!$?$@!"%P%C%/%H%l!<%9$K!Ve(Bsend
e$B%a%=%C%I$r8F$S=P$7$?!W$H$$$&>pJs$,=P$J$/e(B
e$B$J$j$^$9!#e(B

e$B!!$5$F!"$3$N7gE@$O5vMF$G$-$k$G$7$g$&$+!#e(B

class C
def m
puts caller(0)
end
end

C.new.send :m

#=>
ruby 1.9.0 (2007-01-03 patchlevel 0) [i686-linux] - matz
…/trunk/test.rb:4:in C#m' ../trunk/test.rb:8:inBasicObject#send
…/trunk/test.rb:8

ruby 1.9.0 (2007-01-06 patchlevel 0) [i686-linux]
…/trunk/test.rb:4:in m' ../trunk/test.rb:8:in


// SASADA Koichi at atdot dot net

e$B$"$l!)!!e(Bmatzruby e$B$N%P%C%/%H%l!<%9I=<($,JQ$o$C$F$k!)e(B

ruby 1.8.2 (2005-04-11) [i386-linux]
…/trunk/test.rb:4:in m' ../trunk/test.rb:8:insend
…/trunk/test.rb:8


#2

e$B$^$D$b$He(B e$B$f$-$R$m$G$9e(B

In message “Re: [ruby-dev:30104] send optimization”
on Sun, 7 Jan 2007 18:07:29 +0900, SASADA Koichi removed_email_address@domain.invalid
writes:

|e$B!!@hF|$N%3%%C%H$Ge(B send/send/__send/funcall/__send! e$B$N8F$S=P$7$r9bB.e(B
|e$B2=$9$kJQ99$r%3%
%C%H$7$^$7$?!#e(B

|e$BMxE@!'e(B
|e$B!!$3$l$KH<$$!“e(Bsend e$B%a%=%C%I$N$?$a$N%U%l!<%`$r:n$i$J$/$F$$$$$J$I$NMxE@$,e(B
|e$B$”$j$^$9!#e(B
|
|e$B7gE@!'e(B
|e$B!!$?$@!"%P%C%/%H%l!<%9$K!Ve(Bsend e$B%a%=%C%I$r8F$S=P$7$?!W$H$$$&>pJs$,=P$J$/e(B
|e$B$J$j$^$9!#e(B
|
|e$B!!$5$F!"$3$N7gE@$O5vMF$G$-$k$G$7$g$&$+!#e(B

e$B5vMF$G$-$k$s$8$c$J$$$G$7$g$&$+!#e(B

|ruby 1.9.0 (2007-01-03 patchlevel 0) [i686-linux] - matz
|…/trunk/test.rb:4:in C#m' |../trunk/test.rb:8:inBasicObject#send
|…/trunk/test.rb:8

|e$B$"$l!)!!e(Bmatzruby e$B$N%P%C%/%H%l!<%9I=<($,JQ$o$C$F$k!)e(B

e$B$3$l$r%3%_%C%H$7$?$N$O$:$$$V$sA0$N$h$&$J5$$,$7$^$9!#e(B

Mon Feb 6 14:36:29 2006 Yukihiro M. removed_email_address@domain.invalid

  • eval.c (error_line): include the class name of a surrounding
    method in error position description.

e$B$+$J!)e(B


#3

e$B!!$5$5$@$G$9!#e(B

Yukihiro M. wrote:

|
|e$B!!$5$F!"$3$N7gE@$O5vMF$G$-$k$G$7$g$&$+!#e(B

e$B5vMF$G$-$k$s$8$c$J$$$G$7$g$&$+!#e(B

e$B!!N;2r$7$^$7$?!#$3$NJQ99$O$3$N$^$^$K$7$F$*$-$^$9!#C/$+$.$c$C$H8@$C$?$i9Me(B
e$B$($h$&!#e(B

Mon Feb 6 14:36:29 2006 Yukihiro M. removed_email_address@domain.invalid

  • eval.c (error_line): include the class name of a surrounding
    method in error position description.

e$B$+$J!)e(B

e$B!!$&$&!#BP1~$G$-$l$P$d$C$F$*$-$^$9!#e(B