From 087bc990b9a08c2521ad2dc648744c162559dbec Mon Sep 17 00:00:00 2001 From: ko1 Date: Sun, 24 Jun 2007 07:29:21 +0000 Subject: * vm.c (callee_setup_arg): added. support correct post arg. * vm_macro.def (macro_eval_invoke_func): fix to use callee_setup_arg. * compile.c (set_arguments): adjust for above changes. * compile.c (iseq_compile_each): ditto. * iseq.c (ruby_iseq_disasm): ditto. * yarvcore.h: add rb_iseq_t#post_arg_start and arg_size. * bootstraptest/test_method.rb: add post arg tests. git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@12594 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- iseq.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) (limited to 'iseq.c') diff --git a/iseq.c b/iseq.c index 8fe442316..9e66f9b8c 100644 --- a/iseq.c +++ b/iseq.c @@ -782,11 +782,13 @@ ruby_iseq_disasm(VALUE self) } } - snprintf(argi, sizeof(argi), "%s%s%s%s", /* arg, opts, rest, block */ + snprintf(argi, sizeof(argi), "%s%s%s%s%s", /* arg, opts, rest, post block */ iseqdat->argc > i ? "Arg" : "", opti, - iseqdat->arg_rest - d == i ? "Rest" : "", - iseqdat->arg_block - d == i ? "Block" : ""); + iseqdat->arg_rest == i ? "Rest" : "", + (iseqdat->arg_post_start <= i && + i < iseqdat->arg_post_start + iseqdat->arg_post_len) ? "Post" : "", + iseqdat->arg_block == i ? "Block" : ""); snprintf(info, sizeof(info), "%s%s%s%s", name ? name : "?", *argi ? "<" : "", argi, *argi ? ">" : ""); -- cgit