1
0
Fork 0
mirror of https://github.com/ruby/ruby.git synced 2022-11-09 12:17:21 -05:00

* insns.def (setclassvariable): remove unnecessary operand.

* compile.c (iseq_compile_each): ditto.

* common.mk (insns_info.inc): add dependency for insns_info.inc.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@11629 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
matz 2007-02-04 19:15:38 +00:00
parent cbee6e017d
commit 71364da03f
4 changed files with 16 additions and 11 deletions

View file

@ -14,6 +14,14 @@ Sun Feb 4 02:22:59 2007 Akinori MUSHA <knu@iDaemons.org>
* lib/cgi.rb (CGI::QueryExtension::read_multipart): Remove a debug * lib/cgi.rb (CGI::QueryExtension::read_multipart): Remove a debug
print. print.
Sat Feb 3 23:21:13 2007 Yukihiro Matsumoto <matz@ruby-lang.org>
* insns.def (setclassvariable): remove unnecessary operand.
* compile.c (iseq_compile_each): ditto.
* common.mk (insns_info.inc): add dependency for insns_info.inc.
Sat Feb 3 14:32:58 2007 Masaki Suketa <masaki.suketa@nifty.ne.jp> Sat Feb 3 14:32:58 2007 Masaki Suketa <masaki.suketa@nifty.ne.jp>
* ext/win32ole/win32ole.c (ole_val2olevariantdata, ole_val2variant): * ext/win32ole/win32ole.c (ole_val2olevariantdata, ole_val2variant):

View file

@ -558,9 +558,12 @@ optinsn.inc:
optunifs.inc: optunifs.inc:
$(BASERUBY) $(srcdir)/tool/insns2vm.rb $(INSNS2VMOPT) optunifs.inc $(BASERUBY) $(srcdir)/tool/insns2vm.rb $(INSNS2VMOPT) optunifs.inc
insns.inc: insns.inc: $(srcdir)/insns.def
$(BASERUBY) $(srcdir)/tool/insns2vm.rb $(INSNS2VMOPT) $(BASERUBY) $(srcdir)/tool/insns2vm.rb $(INSNS2VMOPT)
insns_info.inc: $(srcdir)/insns.def
$(BASERUBY) $(srcdir)/tool/insns2vm.rb $(INSNS2VMOPT) insns_info.inc
vmtc.inc: vmtc.inc:
$(BASERUBY) $(srcdir)/tool/insns2vm.rb $(INSNS2VMOPT) vmtc.inc $(BASERUBY) $(srcdir)/tool/insns2vm.rb $(INSNS2VMOPT) vmtc.inc

View file

@ -3351,9 +3351,8 @@ iseq_compile_each(yarv_iseq_t *iseq, LINK_ANCHOR *ret, NODE * node, int poped)
if (!poped) { if (!poped) {
ADD_INSN(ret, nd_line(node), dup); ADD_INSN(ret, nd_line(node), dup);
} }
ADD_INSN2(ret, nd_line(node), setclassvariable, ADD_INSN1(ret, nd_line(node), setclassvariable,
ID2SYM(node->nd_vid), ID2SYM(node->nd_vid));
Qfalse);
break; break;
} }
case NODE_OP_ASGN1:{ case NODE_OP_ASGN1:{

View file

@ -222,16 +222,11 @@ getclassvariable
*/ */
DEFINE_INSN DEFINE_INSN
setclassvariable setclassvariable
(ID id, VALUE declp) (ID id)
(VALUE val) (VALUE val)
() ()
{ {
VALUE klass = eval_get_cvar_base(th, GET_ISEQ()); rb_cvar_set(eval_get_cvar_base(th, GET_ISEQ()), id, val);
if (declp == Qtrue && RTEST(ruby_verbose) && FL_TEST(klass, FL_SINGLETON)) {
rb_warn("declaring singleton class variable");
}
rb_cvar_set(klass, id, val);
} }
/** /**