summaryrefslogtreecommitdiff
path: root/yarvcore.h
diff options
context:
space:
mode:
authorko1 <ko1@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2007-01-06 00:24:59 +0000
committerko1 <ko1@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2007-01-06 00:24:59 +0000
commitce55b4c0e0062cd59eb3d5e05ffc5d75bdcde85a (patch)
treef4252badb58ec3ab74af8c2f2a99db6ccbf4d4ab /yarvcore.h
parenta782fa12681c106fe6516955f72ec048bb27bbc9 (diff)
* insns.def : support direct method dispatch with "send" or "funcall".
This means that "obj.send :m" skips "BasicObject#send" invocation (method frame creation, etc) and "obj.m" invokes directly. If you make backtrace, there are no enties of "send" method. * compile.c (iseq_specialized_instruction) : fix to support above * eval.c : ditto (remove "static" from rb_f_send and rb_f_funcall * yarvcore.c : ditto (add a external IDs for compiler) * yarvcore.h : ditto (add a VM_CALL_SEND_BIT macro) * yarvtest/test_method.rb : add tests for above changes * eval.c : remove unused "Kernel#send" declaration git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@11488 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'yarvcore.h')
-rw-r--r--yarvcore.h21
1 files changed, 14 insertions, 7 deletions
diff --git a/yarvcore.h b/yarvcore.h
index 5da48a95c1..dcb008db75 100644
--- a/yarvcore.h
+++ b/yarvcore.h
@@ -143,6 +143,12 @@ extern ID idEnd;
extern ID idBitblt;
extern ID idAnswer;
extern ID idSvarPlaceholder;
+extern ID idSend;
+extern ID id__send__;
+extern ID id__send;
+extern ID idFuncall;
+extern ID id__send_bang;
+
extern unsigned long yarvGlobalStateVersion;
@@ -534,13 +540,14 @@ typedef struct {
/* used by compile time and send insn */
-#define VM_CALL_ARGS_SPLAT_BIT 0x01
-#define VM_CALL_ARGS_BLOCKARG_BIT 0x02
-#define VM_CALL_FCALL_BIT 0x04
-#define VM_CALL_VCALL_BIT 0x08
-#define VM_CALL_TAILCALL_BIT 0x10
-#define VM_CALL_TAILRECURSION_BIT 0x20
-#define VM_CALL_SUPER_BIT 0x40
+#define VM_CALL_ARGS_SPLAT_BIT (0x01 << 1)
+#define VM_CALL_ARGS_BLOCKARG_BIT (0x01 << 2)
+#define VM_CALL_FCALL_BIT (0x01 << 3)
+#define VM_CALL_VCALL_BIT (0x01 << 4)
+#define VM_CALL_TAILCALL_BIT (0x01 << 5)
+#define VM_CALL_TAILRECURSION_BIT (0x01 << 6)
+#define VM_CALL_SUPER_BIT (0x01 << 7)
+#define VM_CALL_SEND_BIT (0x01 << 8)
/* inline method cache */
#define NEW_INLINE_CACHE_ENTRY() NEW_WHILE(Qundef, 0, 0)