summaryrefslogtreecommitdiff
path: root/insns.def
diff options
context:
space:
mode:
authorko1 <ko1@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2007-06-24 08:40:45 +0000
committerko1 <ko1@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2007-06-24 08:40:45 +0000
commitadc677eb5cd3aed1986c3316d5b98ed942f544d5 (patch)
tree8c50f9cef922a9fce4f7cc68adce20599b1df35d /insns.def
parentd1bd418715091794dc207198a0fe4152b5f40cb1 (diff)
* insnhelper.h: change CHECK_STACK_OVERFLOW() to throw exception.
* vm.c (caller_setup_arg), vm_macro.def: remove macro_eval_setup_send_arguments and add caller_setup_arg(). * insns.def: ditto. * bootstraptest/test_method.rb: add splat arg tests. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@12596 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'insns.def')
-rw-r--r--insns.def27
1 files changed, 4 insertions, 23 deletions
diff --git a/insns.def b/insns.def
index 91607ef952..792c8d40f1 100644
--- a/insns.def
+++ b/insns.def
@@ -1156,11 +1156,11 @@ send
VALUE recv;
VALUE klass;
rb_block_t *blockptr = 0;
- rb_num_t num = op_argc;
+ rb_num_t num;
rb_num_t flag = op_flag;
ID id = op_id;
- macro_eval_setup_send_arguments(num, blockptr, flag, blockiseq);
+ num = caller_setup_args(th, GET_CFP(), flag, op_argc, blockiseq, &blockptr);
if (flag & VM_CALL_FCALL_BIT) {
/* method(...) */
@@ -1298,9 +1298,8 @@ invokesuper
/* TODO: */
rb_bug("...");
#else
- tmp_num = op_argc;
tmp_blockptr = 0;
- macro_eval_setup_send_arguments(tmp_num, tmp_blockptr, flag, blockiseq);
+ tmp_num = caller_setup_args(th, GET_CFP(), flag, op_argc, blockiseq, &tmp_blockptr);
if (!tmp_blockptr && !(flag & VM_CALL_ARGS_BLOCKARG_BIT)) {
tmp_blockptr = GET_BLOCK_PTR();
}
@@ -1329,25 +1328,7 @@ invokeblock
iseq = block->iseq;
if (BUILTIN_TYPE(iseq) != T_NODE) {
- if (flag & VM_CALL_ARGS_SPLAT_BIT) {
- VALUE ary = TOPN(0);
- ary = rb_check_convert_type(ary, T_ARRAY, "Array", "to_splat");
-
- if (NIL_P(ary)) {
- /* not a [BUG] */
- }
- else {
- VALUE *ptr = RARRAY_PTR(ary);
- VALUE *dst = GET_SP() - 1;
- int i, len = RARRAY_LEN(ary);
-
- for (i = 0; i < len; i++) {
- dst[i] = ptr[i];
- }
- argc += i - 1;
- INC_SP(i - 1);
- }
- }
+ argc = caller_setup_args(th, GET_CFP(), flag, argc, 0, 0);
DEC_SP(argc);
argc = th_yield_setup_args(th, iseq, argc, GET_SP(),