Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

Checkpoint.

git-svn-id: https://svn.parrot.org/parrot/branches/fix_hll_mmd@44836 d31e2699-5ff4-0310-a27c-f18f2fbe73fe
  • Loading branch information...
commit 818df7bf7b5c95f72f33e95a11ec30258c76a6cb 1 parent 3563e83
chromatic authored March 10, 2010
14  lib/Parrot/Pmc2c/PMC/Object.pm
@@ -71,6 +71,16 @@ sub pre_method_gen {
71 71
         }
72 72
 
73 73
         /* method name is $vt_method_name */
  74
+EOC
  75
+
  76
+        if ($self->vtable_method_does_multi($vt_method_name)) {
  77
+            $method_body_text .= <<"EOC";
  78
+        if (cur_class->vtable->base_type == enum_class_PMCProxy)
  79
+            break;
  80
+EOC
  81
+        }
  82
+        else {
  83
+            $method_body_text .= <<"EOC";
74 84
         if (cur_class->vtable->base_type == enum_class_PMCProxy) {
75 85
             /* Get the PMC instance and call the vtable method on that. */
76 86
             STRING * const proxy      = CONST_STRING_GEN(interp, "proxy");
@@ -81,6 +91,10 @@ sub pre_method_gen {
81 91
                 $void_return
82 92
             }
83 93
         }
  94
+EOC
  95
+        }
  96
+
  97
+        $method_body_text .= <<"EOC";
84 98
     }
85 99
 
86 100
     ${return}SUPER($superargs);
6  src/call/args.c
@@ -882,13 +882,13 @@ Parrot_pcc_build_sig_object_from_varargs(PARROT_INTERP, ARGIN_NULLOK(PMC *obj),
882 882
 {
883 883
     ASSERT_ARGS(Parrot_pcc_build_sig_object_from_varargs)
884 884
     PMC         *type_tuple         = PMCNULL;
885  
-    PMC         *arg_flags     = PMCNULL;
886  
-    PMC         *return_flags  = PMCNULL;
  885
+    PMC         *arg_flags          = PMCNULL;
  886
+    PMC         *return_flags       = PMCNULL;
887 887
     PMC         * const call_object = pmc_new(interp, enum_class_CallContext);
888 888
     const INTVAL sig_len            = strlen(sig);
889 889
     INTVAL       in_return_sig      = 0;
890  
-    INTVAL       i;
891 890
     int          append_pi          = 1;
  891
+    INTVAL       i;
892 892
 
893 893
     if (!sig_len)
894 894
         return call_object;
25  src/multidispatch.c
@@ -308,8 +308,8 @@ Parrot_mmd_multi_dispatch_from_c_args(PARROT_INTERP,
308 308
 
309 309
     if (PMC_IS_NULL(sub))
310 310
         Parrot_ex_throw_from_c_args(interp, NULL, EXCEPTION_METHOD_NOT_FOUND,
311  
-                "Multiple Dispatch: No suitable candidate found for '%s',"
312  
-                " with signature '%s'", name, sig);
  311
+        "Multiple Dispatch: No suitable candidate found for '%s',"
  312
+            " with signature '%s'", name, sig);
313 313
 
314 314
 #if MMD_DEBUG
315 315
     Parrot_io_eprintf(interp, "candidate found for '%s', with signature '%s'\n",
@@ -513,17 +513,17 @@ PMC*
513 513
 Parrot_mmd_build_type_tuple_from_sig_obj(PARROT_INTERP, ARGIN(PMC *sig_obj))
514 514
 {
515 515
     ASSERT_ARGS(Parrot_mmd_build_type_tuple_from_sig_obj)
516  
-    PMC * const  type_tuple = pmc_new(interp, enum_class_ResizableIntegerArray);
517  
-    STRING      *string_sig = VTABLE_get_string(interp, sig_obj);
518  
-    INTVAL       tuple_size = 0;
519  
-    INTVAL       args_ended = 0;
520  
-    INTVAL       i, seen_invocant = 0;
  516
+    PMC * const  type_tuple    = pmc_new(interp, enum_class_ResizableIntegerArray);
  517
+    STRING      *string_sig    = VTABLE_get_string(interp, sig_obj);
  518
+    INTVAL       tuple_size    = 0;
  519
+    INTVAL       args_ended    = 0;
  520
+    INTVAL       seen_invocant = 0;
521 521
     INTVAL       sig_len;
  522
+    INTVAL       i;
522 523
 
523  
-    if (STRING_IS_NULL(string_sig)) {
524  
-            Parrot_ex_throw_from_c_args(interp, NULL, 1,
525  
-                    "Call has no signature, unable to dispatch.\n");
526  
-    }
  524
+    if (STRING_IS_NULL(string_sig))
  525
+        Parrot_ex_throw_from_c_args(interp, NULL, 1,
  526
+            "Call has no signature, unable to dispatch.\n");
527 527
 
528 528
     sig_len = Parrot_str_byte_length(interp, string_sig);
529 529
 
@@ -638,9 +638,8 @@ mmd_cvt_to_types(PARROT_INTERP, ARGIN(PMC *multi_sig))
638 638
             if (type == enum_type_undef)
639 639
                 return PMCNULL;
640 640
         }
641  
-        else if (sig_elem->vtable->base_type == enum_class_Integer) {
  641
+        else if (sig_elem->vtable->base_type == enum_class_Integer)
642 642
             type = VTABLE_get_integer(interp, sig_elem);
643  
-        }
644 643
         else
645 644
             type = pmc_type_p(interp, sig_elem);
646 645
 

0 notes on commit 818df7b

Please sign in to comment.
Something went wrong with that request. Please try again.