This repository was archived by the owner on Jun 1, 2023. It is now read-only.
Commit a501328
committed
usenamedanoncv: named __ANON__ => name@
See [cperl #370]: We should no throw away information for no good reason.
Mark anonymised functions with a @ suffix, keeping their old name.
Esp. with upcoming more and more cvref's without GV.
Only if a sub has no name, like my $anon = sub {}; use __ANON__.
Add GV_ANON flag to create named anonymous XS functions via newXS_len_flags().
$ cperl -Dt -d:NYTProf -e0
...
(-e:0) nextstate
(-e:0) pushmark
(-e:0) const(PV("Devel::NYTProf"))
(-e:0) method_named(->import)
(-e:0) entersub(import@) # was entersub(__ANON_)
(-e:0) enterxssub(import@) # was enterxssub(__ANON_)
(-e:0) leavesub
The import XS method has no name (but an attached CV), so a dummy anon
CvGV is created.
Devel::NYTProf even creates numbered variants, like BEGIN@4.
This might be too expensive here.
We could then use the @ CvNAME suffix for marking multi methods
(new@int, new@int,str) (i.e. same name, but different methods),
as well as marking multiple variants of special blocks (BEGIN@1)
for easier identification.1 parent d2f0a66 commit a501328
File tree
25 files changed
+1488
-1330
lines changed- Cross
- NetWare
- Porting
- ext/Config
- plan9
- pod
- symbian
- t
- op
- uni
- win32
25 files changed
+1488
-1330
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1409 | 1409 | | |
1410 | 1410 | | |
1411 | 1411 | | |
| 1412 | + | |
1412 | 1413 | | |
1413 | 1414 | | |
1414 | 1415 | | |
| |||
23790 | 23791 | | |
23791 | 23792 | | |
23792 | 23793 | | |
| 23794 | + | |
| 23795 | + | |
| 23796 | + | |
| 23797 | + | |
| 23798 | + | |
| 23799 | + | |
| 23800 | + | |
| 23801 | + | |
| 23802 | + | |
| 23803 | + | |
| 23804 | + | |
| 23805 | + | |
| 23806 | + | |
| 23807 | + | |
| 23808 | + | |
| 23809 | + | |
| 23810 | + | |
| 23811 | + | |
| 23812 | + | |
| 23813 | + | |
| 23814 | + | |
| 23815 | + | |
| 23816 | + | |
| 23817 | + | |
| 23818 | + | |
| 23819 | + | |
23793 | 23820 | | |
23794 | 23821 | | |
23795 | 23822 | | |
| |||
25478 | 25505 | | |
25479 | 25506 | | |
25480 | 25507 | | |
| 25508 | + | |
25481 | 25509 | | |
25482 | 25510 | | |
25483 | 25511 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1146 | 1146 | | |
1147 | 1147 | | |
1148 | 1148 | | |
| 1149 | + | |
1149 | 1150 | | |
1150 | 1151 | | |
1151 | 1152 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1109 | 1109 | | |
1110 | 1110 | | |
1111 | 1111 | | |
| 1112 | + | |
1112 | 1113 | | |
1113 | 1114 | | |
1114 | 1115 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1193 | 1193 | | |
1194 | 1194 | | |
1195 | 1195 | | |
| 1196 | + | |
1196 | 1197 | | |
1197 | 1198 | | |
1198 | 1199 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
5432 | 5432 | | |
5433 | 5433 | | |
5434 | 5434 | | |
| 5435 | + | |
| 5436 | + | |
| 5437 | + | |
| 5438 | + | |
| 5439 | + | |
| 5440 | + | |
| 5441 | + | |
| 5442 | + | |
| 5443 | + | |
5435 | 5444 | | |
5436 | 5445 | | |
5437 | 5446 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2744 | 2744 | | |
2745 | 2745 | | |
2746 | 2746 | | |
| 2747 | + | |
| 2748 | + | |
| 2749 | + | |
| 2750 | + | |
| 2751 | + | |
| 2752 | + | |
| 2753 | + | |
| 2754 | + | |
| 2755 | + | |
| 2756 | + | |
| 2757 | + | |
| 2758 | + | |
| 2759 | + | |
| 2760 | + | |
| 2761 | + | |
| 2762 | + | |
| 2763 | + | |
| 2764 | + | |
| 2765 | + | |
| 2766 | + | |
| 2767 | + | |
| 2768 | + | |
2747 | 2769 | | |
2748 | 2770 | | |
2749 | 2771 | | |
| |||
6822 | 6844 | | |
6823 | 6845 | | |
6824 | 6846 | | |
| 6847 | + | |
6825 | 6848 | | |
6826 | 6849 | | |
6827 | 6850 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1495 | 1495 | | |
1496 | 1496 | | |
1497 | 1497 | | |
| 1498 | + | |
1498 | 1499 | | |
1499 | 1500 | | |
1500 | 1501 | | |
| |||
0 commit comments