diff --git a/compilers/imcc/pbc.c b/compilers/imcc/pbc.c
index 1500ceb..09f535a 100644
a
|
b
|
|
1410 | 1410 | else |
1411 | 1411 | sub->ns_entry_name = sub->name; |
1412 | 1412 | } |
| 1413 | else if (unit->is_method || unit->is_vtable_method) |
| 1414 | sub->ns_entry_name = Parrot_str_new_constant(interp, ""); |
1413 | 1415 | else |
1414 | 1416 | sub->ns_entry_name = sub->name; |
1415 | 1417 | |
diff --git a/compilers/pge/PGE/Exp.pir b/compilers/pge/PGE/Exp.pir
index 3342260..b324f17 100644
a
|
b
|
|
163 | 163 | .local string returnop |
164 | 164 | returnop = '.yield' |
165 | 165 | code.'emit'(<<" CODE", name, pirflags, namecorou, .INTERPINFO_CURRENT_SUB) |
166 | | .sub %0 :method %1 |
| 166 | .sub %0 :nsentry(%0) :method %1 |
167 | 167 | .param pmc adverbs :slurpy :named |
168 | 168 | .local pmc mob |
169 | 169 | .const 'Sub' corou = %2 |
… |
… |
|
192 | 192 | ## Initial code for a rule that cannot be backtracked into. |
193 | 193 | returnop = '.return' |
194 | 194 | code.'emit'(<<" CODE", name, pirflags) |
195 | | .sub %0 :method %1 |
| 195 | .sub %0 :nsentry(%0) :method %1 |
196 | 196 | .param pmc adverbs :unique_reg :slurpy :named |
197 | 197 | .local pmc mob |
198 | 198 | .local string target :unique_reg |
diff --git a/compilers/pge/PGE/Regex.pir b/compilers/pge/PGE/Regex.pir
index 81a375b..0a94a60 100644
a
|
b
|
|
37 | 37 | |
38 | 38 | =cut |
39 | 39 | |
40 | | .sub 'ident' :method |
| 40 | .sub 'ident' :method :nsentry |
41 | 41 | .param pmc adverbs :slurpy :named |
42 | 42 | .local string target |
43 | 43 | .local pmc mob, mfrom, mpos |
diff --git a/runtime/parrot/library/Stream/Base.pir b/runtime/parrot/library/Stream/Base.pir
index 622312a..8d9452e 100644
a
|
b
|
|
65 | 65 | |
66 | 66 | =cut |
67 | 67 | |
68 | | .sub close :method |
| 68 | .sub close :method :nsentry |
69 | 69 | .local pmc temp |
70 | 70 | |
71 | 71 | # reset source |
diff --git a/runtime/parrot/library/pcore.pir b/runtime/parrot/library/pcore.pir
index a64cb02..ac78cec 100644
a
|
b
|
|
7 | 7 | .namespace [ 'Sub' ] |
8 | 8 | |
9 | 9 | # implementation Sub.get_lexenv :method |
10 | | .sub get_lexenv :method |
| 10 | .sub get_lexenv :method :nsentry |
11 | 11 | .local pmc env, pad, interp |
12 | 12 | env = new 'ResizablePMCArray' |
13 | 13 | .local int level |
diff --git a/src/global.c b/src/global.c
index 1c181c5..1e726fe 100644
a
|
b
|
|
757 | 757 | PMC *multisub; |
758 | 758 | |
759 | 759 | PMC_get_sub(interp, sub_pmc, sub); |
760 | | ns_entry_name = sub->ns_entry_name; |
| 760 | ns_entry_name = Parrot_str_equal(interp, sub->method_name, CONST_STRING(interp, "")) |
| 761 | ? sub->ns_entry_name |
| 762 | : sub->method_name; |
| 763 | |
761 | 764 | multisub = VTABLE_get_pmc_keyed_str(interp, ns, ns_entry_name); |
762 | 765 | |
763 | 766 | /* is there an existing MultiSub PMC? or do we need to create one? */ |
diff --git a/t/compilers/imcc/syn/subflags.t b/t/compilers/imcc/syn/subflags.t
index db7bb85..82473b8 100644
a
|
b
|
|
67 | 67 | isa_ok($P30, 'Sub', ":method sub found w/.const") |
68 | 68 | $P0 = get_global 'method1' |
69 | 69 | $I0 = isnull $P0 |
70 | | todo($I0, ":method sub not found in namespace") |
| 70 | ok($I0, ":method sub not found in namespace") |
71 | 71 | |
72 | 72 | ## :subid subs |
73 | 73 | .const 'Sub' $P40 = 'subid1' |
diff --git a/t/library/p6object.t b/t/library/p6object.t
index 20a3e13..aed4d44 100644
a
|
b
|
|
404 | 404 | |
405 | 405 | |
406 | 406 | .namespace ['ABC'] |
407 | | .sub 'foo' :method |
| 407 | .sub 'foo' :method :nsentry |
408 | 408 | .return ('ABC::foo') |
409 | 409 | .end |
410 | 410 | |
diff --git a/t/oo/composition.t b/t/oo/composition.t
index 0f9fbcb..3561123 100644
a
|
b
|
|
34 | 34 | multi_composition() |
35 | 35 | .end |
36 | 36 | |
37 | | .sub badger :method |
| 37 | .sub badger :method :nsentry |
38 | 38 | .return('Badger!') |
39 | 39 | .end |
40 | | .sub badger2 :method |
| 40 | .sub badger2 :method :nsentry |
41 | 41 | .return('Second Badger!') |
42 | 42 | .end |
43 | | .sub mushroom :method |
| 43 | .sub mushroom :method :nsentry |
44 | 44 | .return('Mushroom!') |
45 | 45 | .end |
46 | | .sub snake :method |
| 46 | .sub snake :method :nsentry |
47 | 47 | .return('Snake!') |
48 | 48 | .end |
49 | 49 | .sub fire |
diff --git a/t/oo/mro-c3.t b/t/oo/mro-c3.t
index f42c632..d972753 100644
a
|
b
|
|
27 | 27 | diamond_inheritance() |
28 | 28 | .end |
29 | 29 | |
30 | | .sub method_A :method |
| 30 | .sub method_A :method :nsentry |
31 | 31 | .return('Method from A') |
32 | 32 | .end |
33 | 33 | |
34 | | .sub method_B :method |
| 34 | .sub method_B :method :nsentry |
35 | 35 | .return('Method from B') |
36 | 36 | .end |
37 | 37 | |
38 | | .sub method_C :method |
| 38 | .sub method_C :method :nsentry |
39 | 39 | .return('Method from C') |
40 | 40 | .end |
41 | 41 | |
42 | | .sub method_D :method |
| 42 | .sub method_D :method :nsentry |
43 | 43 | .return('Method from D') |
44 | 44 | .end |
45 | 45 | |
diff --git a/t/oo/proxy.t b/t/oo/proxy.t
index 315d092..ba93906 100644
a
|
b
|
|
93 | 93 | .end |
94 | 94 | |
95 | 95 | .namespace ['Complex'] |
96 | | .sub 'Complex' :method |
| 96 | .sub 'Complex' :method :nsentry |
97 | 97 | .return (self) |
98 | 98 | .end |
99 | 99 | |
diff --git a/t/op/calling.t b/t/op/calling.t
index 9d3531c..ba4343b 100644
a
|
b
|
|
991 | 991 | f(o, "ok 4\n") |
992 | 992 | .end |
993 | 993 | .namespace ["Foo"] |
994 | | .sub bar :method |
| 994 | .sub bar :method :nsentry |
995 | 995 | .param string s |
996 | 996 | print self |
997 | 997 | print " " |
998 | 998 | print s |
999 | 999 | .end |
1000 | | .sub baz :method |
| 1000 | .sub baz :method :nsentry |
1001 | 1001 | .param string s |
1002 | 1002 | print self |
1003 | 1003 | print " " |
diff --git a/t/op/gc.t b/t/op/gc.t
index 972297b..56bdaad 100755
a
|
b
|
|
182 | 182 | ok(1, "leaving do_inc") |
183 | 183 | .end |
184 | 184 | |
185 | | .sub __increment :method |
| 185 | .sub 'increment' :vtable :method |
186 | 186 | ok(1, "in __increment") |
187 | 187 | sweep 1 |
188 | 188 | .end |
diff --git a/t/pmc/class.t b/t/pmc/class.t
index 7731c36..8915640 100644
a
|
b
|
|
458 | 458 | is(result, 42, 'new() added method returns expected value') |
459 | 459 | .end |
460 | 460 | |
461 | | .sub add :method |
| 461 | .sub add :method :nsentry |
462 | 462 | $P0 = getattribute self, "x" |
463 | 463 | $P1 = getattribute self, "y" |
464 | 464 | $P2 = new ['Integer'] |
diff --git a/t/pmc/freeze.t b/t/pmc/freeze.t
index b8156ac..838ae1a 100644
a
|
b
|
|
765 | 765 | .end |
766 | 766 | |
767 | 767 | .namespace ['Conure'] |
768 | | .sub __init :method |
| 768 | .sub 'init' :method :vtable |
769 | 769 | $P0 = new ['Integer'] |
770 | 770 | $P0 = 37 |
771 | 771 | setattribute self, 'temperature', $P0 |
diff --git a/t/pmc/objects.t b/t/pmc/objects.t
index 8d96d9c..e605e5a 100644
a
|
b
|
|
1390 | 1390 | |
1391 | 1391 | .namespace [ 'Foo41' ] |
1392 | 1392 | |
1393 | | .sub '__get_string' :method |
| 1393 | .sub 'get_string' :method :vtable |
1394 | 1394 | .return('Hello world') |
1395 | 1395 | .end |
1396 | 1396 | |
diff --git a/t/pmc/pmcproxy.t b/t/pmc/pmcproxy.t
index cb07de7..a23adad 100644
a
|
b
|
|
190 | 190 | is($P3, 42, "the magic overriding sub was called") |
191 | 191 | ok(1, 'Called non-overridden method, which called overridden vtable method') |
192 | 192 | .end |
193 | | .sub always42 :method |
| 193 | .sub always42 :method :nsentry |
194 | 194 | .param string what |
195 | 195 | $P0 = new ['Integer'] |
196 | 196 | $P0 = 42 |