diff options
author | ko1 <ko1@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2007-06-24 13:05:51 +0000 |
---|---|---|
committer | ko1 <ko1@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2007-06-24 13:05:51 +0000 |
commit | 76d0b45e8bb8988d5c92eca66f07820c61923c28 (patch) | |
tree | 4680058ffc0d96cf05e0209aba88ef6cbf767fd4 /insnhelper.h | |
parent | b5682c8cb9427805791e9ce255e3d4c0a41ff749 (diff) | |
download | ruby-76d0b45e8bb8988d5c92eca66f07820c61923c28.tar.gz ruby-76d0b45e8bb8988d5c92eca66f07820c61923c28.tar.xz ruby-76d0b45e8bb8988d5c92eca66f07820c61923c28.zip |
* insn_send.ci: removed.
* common.mk: ditto.
* vm.c (vm_call_bmethod), isnsn.def: added. fix to use this
function instead of using goto.
* vm.c (vm_call_bmethod): renamed from th_invoke_bmethod().
* vm.c (vm_method_missing): renamed from eval_methdo_missing().
* vm_evalbody.ci: remove tmp_* variables.
* insnhelper.h: add some macros.
* insns.def: forbid zsuper from method defined by define_method().
* test/ruby/test_super.rb: ditto.
git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@12601 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'insnhelper.h')
-rw-r--r-- | insnhelper.h | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/insnhelper.h b/insnhelper.h index 3801e5a41..1fe19128b 100644 --- a/insnhelper.h +++ b/insnhelper.h @@ -146,4 +146,20 @@ while (0) #define BASIC_OP_UNREDEFINED_P(op) ((yarv_redefined_flag & (op)) == 0) #define HEAP_CLASS_OF(obj) RBASIC(obj)->klass +#define CALL_METHOD(num, blockptr, flag, id, mn, recv, klass) do { \ + VALUE v = vm_call_method(th, GET_CFP(), num, blockptr, flag, id, mn, recv, klass); \ + if (v == Qundef) { \ + RESTORE_REGS(); \ + NEXT_INSN(); \ + } \ + else { \ + val = v; \ + } \ +} while (0) + +#define CALL_SIMPLE_METHOD(num, id, recv) do { \ + VALUE klass = CLASS_OF(recv); \ + CALL_METHOD(num, 0, 0, id, rb_method_node(klass, id), recv, CLASS_OF(recv)); \ +} while (0) + #endif /* _INSNHELPER_H_INCLUDED_ */ |