2004-07-21 Bernie Solomon <bernard@ugsolutions.com>
authorBernie Solomon <bernard@mono-cvs.ximian.com>
Wed, 21 Jul 2004 20:35:14 +0000 (20:35 -0000)
committerBernie Solomon <bernard@mono-cvs.ximian.com>
Wed, 21 Jul 2004 20:35:14 +0000 (20:35 -0000)
* mintops.def: rename the ICALL op codes to give a better
clue about their signature.

* transform.c (generate): use new ICALL types and add
a case for two args + a result

* interp.c (ves_exec_method_with_context): new ICALL
op codes.

svn path=/trunk/mono/; revision=31349

mono/interpreter/ChangeLog
mono/interpreter/interp.c
mono/interpreter/mintops.def
mono/interpreter/transform.c

index 4347659c968b51bcc45b769901a77bcde90d71de..653c1fc4f0b421632c245508ca23d7bd8ba9aaf7 100644 (file)
@@ -1,3 +1,14 @@
+2004-07-21  Bernie Solomon  <bernard@ugsolutions.com>
+
+       * mintops.def: rename the ICALL op codes to give a better
+       clue about their signature.
+
+       * transform.c (generate): use new ICALL types and add
+       a case for two args + a result
+
+       * interp.c (ves_exec_method_with_context): new ICALL
+       op codes.
+
 2004-07-21  Bernie Solomon  <bernard@ugsolutions.com>
 
        * mintops.def: add MINT_DUP_VT
index f00dc44559092e378cdbecb41080417cf027950f..840c2c7672b7625b10a4a9e4e89b86859a23c064 100644 (file)
@@ -3390,31 +3390,39 @@ array_constructed:
                        }
                        goto handle_finally;
                        MINT_IN_BREAK;
-               MINT_IN_CASE(MINT_MONO_PROC1) {
-                   void (*func)(gpointer) = rtm->data_items [*(guint16 *)(ip + 1)];
+               MINT_IN_CASE(MINT_ICALL_P_V) {
+                       void (*func)(gpointer) = rtm->data_items [*(guint16 *)(ip + 1)];
                        ip += 2;
 
                        func (sp [-1].data.p);
                        sp --;
                        MINT_IN_BREAK;
                }
-               MINT_IN_CASE(MINT_MONO_CONV1) {
-                   gpointer (*func)(gpointer) = rtm->data_items [*(guint16 *)(ip + 1)];
+               MINT_IN_CASE(MINT_ICALL_P_P) {
+                       gpointer (*func)(gpointer) = rtm->data_items [*(guint16 *)(ip + 1)];
                        ip += 2;
 
                        sp [-1].data.p = func (sp [-1].data.p);
                        MINT_IN_BREAK;
                }
-               MINT_IN_CASE(MINT_MONO_CONV2) {
-                   void (*func)(gpointer,gpointer) = rtm->data_items [*(guint16 *)(ip + 1)];
+               MINT_IN_CASE(MINT_ICALL_PP_V) {
+                       void (*func)(gpointer,gpointer) = rtm->data_items [*(guint16 *)(ip + 1)];
                        ip += 2;
                        sp -= 2;
 
                        func (sp [0].data.p, sp [1].data.p);
                        MINT_IN_BREAK;
                }
-               MINT_IN_CASE(MINT_MONO_CONV3) {
-                   void (*func)(gpointer,gpointer,gpointer) = rtm->data_items [*(guint16 *)(ip + 1)];
+               MINT_IN_CASE(MINT_ICALL_PP_P) {
+                       gpointer (*func)(gpointer,gpointer) = rtm->data_items [*(guint16 *)(ip + 1)];
+                       ip += 2;
+                       --sp;
+
+                       sp [-1].data.p = func (sp [-1].data.p, sp [0].data.p);
+                       MINT_IN_BREAK;
+               }
+               MINT_IN_CASE(MINT_ICALL_PPP_V) {
+                       void (*func)(gpointer,gpointer,gpointer) = rtm->data_items [*(guint16 *)(ip + 1)];
                        ip += 2;
                        sp -= 3;
 
index 6b630cc4cda8aae5fe1464ba51feec6b96900539..e76b34c6620c5350e4978620435a6735b67ed120 100644 (file)
@@ -493,10 +493,11 @@ OPDEF(MINT_GETCHR, "getchr", 1, MintOpNoArgs)
 OPDEF(MINT_STRLEN, "strlen", 1, MintOpNoArgs)
 OPDEF(MINT_ARRAY_RANK, "array_rank", 1, MintOpNoArgs)
 
-OPDEF(MINT_MONO_PROC1, "mono_proc1", 2, MintOpClassToken) /* not really */
-OPDEF(MINT_MONO_CONV1, "mono_conv1", 2, MintOpClassToken)
-OPDEF(MINT_MONO_CONV2, "mono_conv2", 2, MintOpClassToken)
-OPDEF(MINT_MONO_CONV3, "mono_conv3", 2, MintOpClassToken)
+OPDEF(MINT_ICALL_P_V, "mono_icall_p_v", 2, MintOpClassToken) /* not really */
+OPDEF(MINT_ICALL_P_P, "mono_icall_p_p", 2, MintOpClassToken)
+OPDEF(MINT_ICALL_PP_V, "mono_icall_pp_v", 2, MintOpClassToken)
+OPDEF(MINT_ICALL_PP_P, "mono_icall_pp_p", 2, MintOpClassToken)
+OPDEF(MINT_ICALL_PPP_V, "mono_icall_ppp_v", 2, MintOpClassToken)
 OPDEF(MINT_MONO_LDPTR, "mono_ldptr", 2, MintOpClassToken) 
 OPDEF(MINT_MONO_NEWOBJ, "mono_newobj", 2, MintOpClassToken)
 OPDEF(MINT_MONO_RETOBJ, "mono_retobj", 1, MintOpNoArgs)
index 824575f8c25262d3ba8e5fd176ab61f6a4b0f4af..3fd3dd7a93f0432a1228829d833f177fcb7d99ea 100644 (file)
@@ -2400,15 +2400,19 @@ generate(MonoMethod *method, RuntimeMethod *rtm, unsigned char *is_bb_start)
                                        switch (info->sig->param_count) {
                                        case 1:
                                                if (MONO_TYPE_IS_VOID (info->sig->ret))
-                                                       ADD_CODE (&td,MINT_MONO_PROC1);
+                                                       ADD_CODE (&td,MINT_ICALL_P_V);
                                                else
-                                                       ADD_CODE (&td,MINT_MONO_CONV1);
+                                                       ADD_CODE (&td,MINT_ICALL_P_P);
                                                break;
                                        case 2:
-                                               ADD_CODE (&td,MINT_MONO_CONV2);
+                                               if (MONO_TYPE_IS_VOID (info->sig->ret))
+                                                       ADD_CODE (&td,MINT_ICALL_PP_V);
+                                               else
+                                                       ADD_CODE (&td,MINT_ICALL_PP_P);
                                                break;
                                        case 3:
-                                               ADD_CODE (&td,MINT_MONO_CONV3);
+                                               g_assert (MONO_TYPE_IS_VOID (info->sig->ret));
+                                               ADD_CODE (&td,MINT_ICALL_PPP_V);
                                                break;
                                        default:
                                                g_assert_not_reached ();