* vm_insnhelper.c: use T_IMEMO to create SVAR.

* internal.h, vm_insnhelper.h: move definition `struct SVAR'
  from vm_insnhelper.h to internal.h. And rename it to strcut vm_svar.
  new imemo_type imemo_svar is added.
* gc.c (gc_mark_children): mark imemo_svar.
* node.c (rb_gc_mark_node): remove useless marking.



git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@49935 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
ko1 2015-03-11 12:27:34 +00:00
parent 734146a459
commit ac28b985bd
6 changed files with 48 additions and 24 deletions

View file

@ -532,6 +532,7 @@ struct RIMemo {
enum imemo_type {
imemo_none,
imemo_cref,
imemo_svar,
imemo_mask = 0x07
};
@ -634,6 +635,16 @@ CREF_OMOD_SHARED_UNSET(rb_cref_t *cref)
cref->flags &= ~NODE_FL_CREF_OMOD_SHARED_;
}
/* SVAR */
struct vm_svar {
VALUE flags;
const rb_cref_t * const cref;
const VALUE lastline;
const VALUE backref;
const VALUE others;
};
/* MEMO */
struct MEMO {