aboutsummaryrefslogtreecommitdiffstats
path: root/insns.def
diff options
context:
space:
mode:
authormame <mame@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2018-08-10 07:45:16 +0000
committermame <mame@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2018-08-10 07:45:16 +0000
commit5aa415d9bb6de854d372526ed1a6622494d84195 (patch)
tree0e9e89522cb6fcbb6162d80310871ad71da1ad17 /insns.def
parentc4e8ecb4dc881c443ff0402ecbf303413d65bade (diff)
downloadruby-5aa415d9bb6de854d372526ed1a6622494d84195.tar.gz
insns.def (invokesuper): remove a dummy receiever flag hack for ZSUPER
This is just a refactoring. The receiver of "invokesuper" was a boolean to represent if it is ZSUPER or not. This was used in vm_search_super_method to prohibit ZSUPER call in define_method. (It is currently prohibited because of the limitation of the implementation.) This change removes the hack by introducing an explicit flag, VM_CALL_SUPER, to signal the information. Now, the implementation of "invokesuper" is consistent with "send" instruction. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@64268 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'insns.def')
-rw-r--r--insns.def6
1 files changed, 3 insertions, 3 deletions
diff --git a/insns.def b/insns.def
index 75f522cd9b..1903da2068 100644
--- a/insns.def
+++ b/insns.def
@@ -716,7 +716,8 @@ send
struct rb_calling_info calling;
vm_caller_setup_arg_block(ec, reg_cfp, &calling, ci, blockiseq, FALSE);
- vm_search_method(ci, cc, calling.recv = TOPN(calling.argc = ci->orig_argc));
+ calling.recv = TOPN(calling.argc = ci->orig_argc);
+ vm_search_method(ci, cc, calling.recv);
CALL_METHOD(&calling, ci, cc);
}
@@ -783,10 +784,9 @@ invokesuper
// attr rb_snum_t sp_inc = - (int)(ci->orig_argc + ((ci->flag & VM_CALL_ARGS_BLOCKARG) ? 1 : 0));
{
struct rb_calling_info calling;
- calling.argc = ci->orig_argc;
vm_caller_setup_arg_block(ec, reg_cfp, &calling, ci, blockiseq, TRUE);
- calling.recv = GET_SELF();
+ calling.recv = TOPN(calling.argc = ci->orig_argc);
vm_search_super_method(ec, GET_CFP(), &calling, ci, cc);
CALL_METHOD(&calling, ci, cc);
}