Author: jonathan
Date: Wed Jan 7 12:10:58 2009
New Revision: 35173
Modified:
branches/rvar2/languages/perl6/src/classes/Signature.pir
branches/rvar2/languages/perl6/src/parser/actions.pm
branches/rvar2/languages/perl6/src/pmc/perl6multisub.pmc
Log:
[rakudo] Leave type being the full set of type constraints we must obey, and
store the separated out ones under different lists for MMD.
Modified: branches/rvar2/languages/perl6/src/classes/Signature.pir
==============================================================================
--- branches/rvar2/languages/perl6/src/classes/Signature.pir (original)
+++ branches/rvar2/languages/perl6/src/classes/Signature.pir Wed Jan 7
12:10:58 2009
@@ -69,8 +69,9 @@
.local pmc cur_list, cur_list_iter, constraints, type, test_item
constraints = 'list'()
type = null
- cur_list = attr["constraints"]
+ cur_list = attr["type"]
if null cur_list goto cur_list_loop_end
+ cur_list = cur_list.'!eigenstates'()
cur_list_iter = iter cur_list
cur_list_loop:
unless cur_list_iter goto cur_list_loop_end
@@ -99,7 +100,7 @@
unless null type goto have_type
type = get_hll_global 'Any'
have_type:
- attr["type"] = type
+ attr["nom_type"] = type
$I0 = elements constraints
if $I0 == 0 goto no_constraints
constraints = 'all'(constraints)
@@ -107,7 +108,7 @@
no_constraints:
constraints = null
set_constraints:
- attr["constraints"] = constraints
+ attr["cons_type"] = constraints
# Add to parameters list.
.local pmc params
Modified: branches/rvar2/languages/perl6/src/parser/actions.pm
==============================================================================
--- branches/rvar2/languages/perl6/src/parser/actions.pm (original)
+++ branches/rvar2/languages/perl6/src/parser/actions.pm Wed Jan 7
12:10:58 2009
@@ -958,7 +958,7 @@
## add any typechecks
my $type := $var<type>;
if +@($type) > 0 {
- $type.named('constraints');
+ $type.named('type');
$sigparam.push($type);
}
@@ -1045,7 +1045,7 @@
}
## keep track of any type constraints
- my $typelist := PAST::Op.new( :name('list'), :pasttype('call') );
+ my $typelist := PAST::Op.new( :name('all'), :pasttype('call') );
$var<type> := $typelist;
if $<type_constraint> {
for @($<type_constraint>) {
Modified: branches/rvar2/languages/perl6/src/pmc/perl6multisub.pmc
==============================================================================
--- branches/rvar2/languages/perl6/src/pmc/perl6multisub.pmc (original)
+++ branches/rvar2/languages/perl6/src/pmc/perl6multisub.pmc Wed Jan 7
12:10:58 2009
@@ -329,9 +329,9 @@
for (j = 0; j < sig_elems; j++) {
PMC *param = VTABLE_get_pmc_keyed_int(interp, params, j);
PMC *type = VTABLE_get_pmc_keyed_str(interp, param,
- CONST_STRING(interp, "type"));
+ CONST_STRING(interp, "nom_type"));
PMC *constraints = VTABLE_get_pmc_keyed_str(interp, param,
- CONST_STRING(interp, "constraints"));
+ CONST_STRING(interp, "cons_type"));
PMC *multi_inv = VTABLE_get_pmc_keyed_str(interp, param,
CONST_STRING(interp, "multi_invocant"));
info->types[j] = type;