Skip to content

Commit

Permalink
* insns.def (setclassvariable): remove unnecessary operand.
Browse files Browse the repository at this point in the history
* 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
  • Loading branch information
matz committed Feb 4, 2007
1 parent cbee6e0 commit 71364da
Show file tree
Hide file tree
Showing 4 changed files with 16 additions and 11 deletions.
8 changes: 8 additions & 0 deletions ChangeLog
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,14 @@ Sun Feb 4 02:22:59 2007 Akinori MUSHA <[email protected]>
* lib/cgi.rb (CGI::QueryExtension::read_multipart): Remove a debug
print.

Sat Feb 3 23:21:13 2007 Yukihiro Matsumoto <[email protected]>

* 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 <[email protected]>

* ext/win32ole/win32ole.c (ole_val2olevariantdata, ole_val2variant):
Expand Down
5 changes: 4 additions & 1 deletion common.mk
Original file line number Diff line number Diff line change
Expand Up @@ -558,9 +558,12 @@ optinsn.inc:
optunifs.inc:
$(BASERUBY) $(srcdir)/tool/insns2vm.rb $(INSNS2VMOPT) optunifs.inc

insns.inc:
insns.inc: $(srcdir)/insns.def
$(BASERUBY) $(srcdir)/tool/insns2vm.rb $(INSNS2VMOPT)

insns_info.inc: $(srcdir)/insns.def
$(BASERUBY) $(srcdir)/tool/insns2vm.rb $(INSNS2VMOPT) insns_info.inc

vmtc.inc:
$(BASERUBY) $(srcdir)/tool/insns2vm.rb $(INSNS2VMOPT) vmtc.inc

Expand Down
5 changes: 2 additions & 3 deletions compile.c
Original file line number Diff line number Diff line change
Expand Up @@ -3351,9 +3351,8 @@ iseq_compile_each(yarv_iseq_t *iseq, LINK_ANCHOR *ret, NODE * node, int poped)
if (!poped) {
ADD_INSN(ret, nd_line(node), dup);
}
ADD_INSN2(ret, nd_line(node), setclassvariable,
ID2SYM(node->nd_vid),
Qfalse);
ADD_INSN1(ret, nd_line(node), setclassvariable,
ID2SYM(node->nd_vid));
break;
}
case NODE_OP_ASGN1:{
Expand Down
9 changes: 2 additions & 7 deletions insns.def
Original file line number Diff line number Diff line change
Expand Up @@ -222,16 +222,11 @@ getclassvariable
*/
DEFINE_INSN
setclassvariable
(ID id, VALUE declp)
(ID id)
(VALUE val)
()
{
VALUE klass = eval_get_cvar_base(th, GET_ISEQ());

if (declp == Qtrue && RTEST(ruby_verbose) && FL_TEST(klass, FL_SINGLETON)) {
rb_warn("declaring singleton class variable");
}
rb_cvar_set(klass, id, val);
rb_cvar_set(eval_get_cvar_base(th, GET_ISEQ()), id, val);
}

/**
Expand Down

0 comments on commit 71364da

Please sign in to comment.