Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Make Signature not be dependent on List and Failure, to break a depen…
…dency chain that got in the way of the bootstrap.
  • Loading branch information
jnthn committed Apr 3, 2009
1 parent 76cda83 commit f6886e3
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
6 changes: 3 additions & 3 deletions src/classes/Signature.pir
Expand Up @@ -67,12 +67,12 @@ the Signature.
# constraints; otherwise, we find the unique type. Finally, we turn the
# list of constraints into a junction.
.local pmc cur_list, cur_list_iter, constraints, type, test_item
constraints = 'list'()
constraints = new 'ResizablePMCArray'
type = null
cur_list = attr["type"]
unless null cur_list goto have_type_attr
$P0 = get_hll_global 'Any'
cur_list = 'all'($P0)
cur_list = 'infix:&'($P0) # Unlike C<all>, doesn't call !flatten (too early in bootstrap)
attr["type"] = cur_list
have_type_attr:
cur_list = cur_list.'eigenstates'()
Expand Down Expand Up @@ -110,7 +110,7 @@ the Signature.
constraints = 'all'(constraints)
goto set_constraints
no_constraints:
constraints = new 'Failure'
constraints = new 'Undef'
set_constraints:
attr["cons_type"] = constraints

Expand Down
2 changes: 1 addition & 1 deletion src/pmc/perl6multisub.pmc
Expand Up @@ -341,7 +341,7 @@ static candidate_info** sort_candidates(PARROT_INTERP, PMC *candidates, PMC **pr
CONST_STRING(interp, "multi_invocant"));
info->types[j] = type;
info->constraints[j] = PMC_IS_NULL(constraints) || VTABLE_isa(interp,
constraints, CONST_STRING(interp, "Failure")) ?
constraints, CONST_STRING(interp, "Undef")) ?
PMCNULL : constraints;
if (!PMC_IS_NULL(multi_inv) && VTABLE_get_bool(interp, multi_inv))
info->num_types++;
Expand Down

0 comments on commit f6886e3

Please sign in to comment.