mirror of
https://github.com/ruby/ruby.git
synced 2025-09-15 16:44:01 +02:00
* include/ruby/node.h, vm_core.h: move definition of
RUBY_VM_METHOD_NODE to node.h. * class.c, common.mk: remove useless inclusion. * compile.h, iseq.h, vm_core.h: rename compile.h to iseq.h. move some definitions from vm_core.h to iseq.h. * compile.c, iseq.c, vm.c: ditto. * eval.c, compile.c: move some functions for parser from eval.c to compile.c. * eval_intern.h, vm_core.h: move va_init_list() macro to vm_core.h. * iseq.c (rb_iseq_new_top, rb_iseq_first_lineno): added. * load.c, ruby.c: use rb_iseq_new_top() instead of rb_iseq_new() with ISEQ_TYPE_TOP constant directly. * proc.c: use rb_iseq_first_lineno() instead of accessing iseq structure. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@19472 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
0867b94cb9
commit
7f7834abf7
15 changed files with 437 additions and 405 deletions
4
proc.c
4
proc.c
|
@ -629,7 +629,7 @@ rb_proc_location(VALUE self)
|
|||
if (!iseq) return Qnil;
|
||||
loc[0] = iseq->filename;
|
||||
if (iseq->insn_info_table) {
|
||||
loc[1] = INT2FIX(iseq->insn_info_table[0].line_no);
|
||||
loc[1] = INT2FIX(rb_iseq_first_lineno(iseq));
|
||||
}
|
||||
else {
|
||||
loc[1] = Qnil;
|
||||
|
@ -710,7 +710,7 @@ proc_to_s(VALUE self)
|
|||
int line_no = 0;
|
||||
|
||||
if (iseq->insn_info_table) {
|
||||
line_no = iseq->insn_info_table[0].line_no;
|
||||
line_no = rb_iseq_first_lineno(iseq);
|
||||
}
|
||||
str = rb_sprintf("#<%s:%p@%s:%d%s>", cname, (void *)self,
|
||||
RSTRING_PTR(iseq->filename),
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue