From: Rocky Bernstein Date: 2009-07-07T10:43:33+09:00 Subject: [ruby-core:24170] Re: [ANN] meeting log of RubyDeveloperKaigi20090622 --0016368e1fc5f95c3d046e13bfb9 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit It's possible adding an instruction-sequence method (iseq) into Proc would suffice? Off of the instruction sequence, one could use the methods like disasm or to_a. The actual additional code (put in the right place) for this seems pretty small: VALUE proc_iseq(VALUE self) { rb_proc_t *proc; rb_iseq_t *iseq; VALUE rb_iseq; GetProcPtr(self, proc); iseq = proc->block.iseq; if (!iseq) return Qnil; rb_iseq = iseq_alloc_shared(rb_cISeq); RDATA(rb_iseq)->data = iseq; return rb_iseq; } rb_define_method(rb_cProc, "iseq", proc_iseq, 0); Warning: the above may have flaws in it. I'll attach the above as a comment to redmine. On Mon, Jul 6, 2009 at 3:03 PM, Roger Pack wrote: > > > > === TODO > > Some features need more discussions. We must decide detail of the > > features by 25 Sep. > > Any chance of us gettting > http://redmine.ruby-lang.org/issues/show/578 > "add method to disassemble Proc objects" > > as well? > That would be nice. > Thanks. > =r > > --0016368e1fc5f95c3d046e13bfb9 Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable It's possible adding an instruction-sequence method (iseq) into Proc wo= uld suffice? Off of the instruction sequence, one could use the methods lik= e disasm or to_a.

The actual additional code (put in the right place= ) for this seems pretty small:

VALUE
proc_iseq(VALUE self)
{
=A0=A0=A0 rb_proc_t *proc;
= =A0=A0=A0 rb_iseq_t *iseq;
=A0=A0=A0 VALUE rb_iseq;
=A0=A0=A0 GetProc= Ptr(self, proc);
=A0=A0=A0 iseq =3D proc->block.iseq;
=A0=A0=A0 if= (!iseq) return Qnil;
=A0=A0=A0 rb_iseq =3D iseq_alloc_shared(rb_cISeq);=
=A0=A0=A0 RDATA(rb_iseq)->data =3D iseq;
=A0=A0=A0 return rb_iseq;}

=A0rb_define_method(rb_cProc, "iseq", proc_iseq, 0);
Warning: the above may have flaws in it.

I'll attach the ab= ove as a comment to redmine.


On Mon, Jul 6, 2009 at 3:03 PM, Roger Pa= ck <rogerdpack= @gmail.com> wrote:
>
> =3D=3D=3D TODO
> Some features need more discussions. We must decide detail of the
> features by 25 Sep.

Any chance of us gettting
= http://redmine.ruby-lang.org/issues/show/578
"add method to disassemble Proc objects"

as well?
That would be nice.
Thanks.
=3Dr


--0016368e1fc5f95c3d046e13bfb9--