Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

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 chromatic authored
View
14 lib/Parrot/Pmc2c/PMC/Object.pm
@@ -71,6 +71,16 @@ sub pre_method_gen {
}
/* method name is $vt_method_name */
+EOC
+
+ if ($self->vtable_method_does_multi($vt_method_name)) {
+ $method_body_text .= <<"EOC";
+ if (cur_class->vtable->base_type == enum_class_PMCProxy)
+ break;
+EOC
+ }
+ else {
+ $method_body_text .= <<"EOC";
if (cur_class->vtable->base_type == enum_class_PMCProxy) {
/* Get the PMC instance and call the vtable method on that. */
STRING * const proxy = CONST_STRING_GEN(interp, "proxy");
@@ -81,6 +91,10 @@ sub pre_method_gen {
$void_return
}
}
+EOC
+ }
+
+ $method_body_text .= <<"EOC";
}
${return}SUPER($superargs);
View
6 src/call/args.c
@@ -882,13 +882,13 @@ Parrot_pcc_build_sig_object_from_varargs(PARROT_INTERP, ARGIN_NULLOK(PMC *obj),
{
ASSERT_ARGS(Parrot_pcc_build_sig_object_from_varargs)
PMC *type_tuple = PMCNULL;
- PMC *arg_flags = PMCNULL;
- PMC *return_flags = PMCNULL;
+ PMC *arg_flags = PMCNULL;
+ PMC *return_flags = PMCNULL;
PMC * const call_object = pmc_new(interp, enum_class_CallContext);
const INTVAL sig_len = strlen(sig);
INTVAL in_return_sig = 0;
- INTVAL i;
int append_pi = 1;
+ INTVAL i;
if (!sig_len)
return call_object;
View
25 src/multidispatch.c
@@ -308,8 +308,8 @@ Parrot_mmd_multi_dispatch_from_c_args(PARROT_INTERP,
if (PMC_IS_NULL(sub))
Parrot_ex_throw_from_c_args(interp, NULL, EXCEPTION_METHOD_NOT_FOUND,
- "Multiple Dispatch: No suitable candidate found for '%s',"
- " with signature '%s'", name, sig);
+ "Multiple Dispatch: No suitable candidate found for '%s',"
+ " with signature '%s'", name, sig);
#if MMD_DEBUG
Parrot_io_eprintf(interp, "candidate found for '%s', with signature '%s'\n",
@@ -513,17 +513,17 @@ PMC*
Parrot_mmd_build_type_tuple_from_sig_obj(PARROT_INTERP, ARGIN(PMC *sig_obj))
{
ASSERT_ARGS(Parrot_mmd_build_type_tuple_from_sig_obj)
- PMC * const type_tuple = pmc_new(interp, enum_class_ResizableIntegerArray);
- STRING *string_sig = VTABLE_get_string(interp, sig_obj);
- INTVAL tuple_size = 0;
- INTVAL args_ended = 0;
- INTVAL i, seen_invocant = 0;
+ PMC * const type_tuple = pmc_new(interp, enum_class_ResizableIntegerArray);
+ STRING *string_sig = VTABLE_get_string(interp, sig_obj);
+ INTVAL tuple_size = 0;
+ INTVAL args_ended = 0;
+ INTVAL seen_invocant = 0;
INTVAL sig_len;
+ INTVAL i;
- if (STRING_IS_NULL(string_sig)) {
- Parrot_ex_throw_from_c_args(interp, NULL, 1,
- "Call has no signature, unable to dispatch.\n");
- }
+ if (STRING_IS_NULL(string_sig))
+ Parrot_ex_throw_from_c_args(interp, NULL, 1,
+ "Call has no signature, unable to dispatch.\n");
sig_len = Parrot_str_byte_length(interp, string_sig);
@@ -638,9 +638,8 @@ mmd_cvt_to_types(PARROT_INTERP, ARGIN(PMC *multi_sig))
if (type == enum_type_undef)
return PMCNULL;
}
- else if (sig_elem->vtable->base_type == enum_class_Integer) {
+ else if (sig_elem->vtable->base_type == enum_class_Integer)
type = VTABLE_get_integer(interp, sig_elem);
- }
else
type = pmc_type_p(interp, sig_elem);
Please sign in to comment.
Something went wrong with that request. Please try again.