diff options
author | David Mitchell <davem@iabyn.com> | 2019-09-20 14:43:01 +0100 |
---|---|---|
committer | David Mitchell <davem@iabyn.com> | 2019-09-23 14:52:04 +0100 |
commit | 4df857782a14d0973f58f6a629019d29259b2aad (patch) | |
tree | b2d36c690e1ea63e4e319316ed37b5418407736b /perly.tab | |
parent | 64265ceb0b05ed7f7348ea0fa46d968aadb286a2 (diff) | |
download | perl-4df857782a14d0973f58f6a629019d29259b2aad.tar.gz |
put signature ops in their own subtree.
The following code:
sub f ($x,$y) {
study;
}
used to compile as:
a <1> leavesub[1 ref] K/REFC,1 ->(end)
- <@> lineseq KP ->a
1 <;> nextstate(main 5 p:5) v:%,fea=7 ->2
2 <+> argcheck(2,0) v ->3
3 <;> nextstate(main 3 p:5) v:%,fea=7 ->4
4 <+> argelem(0)[$x:3,5] v/SV ->5
5 <;> nextstate(main 4 p:5) v:%,fea=7 ->6
6 <+> argelem(1)[$y:4,5] v/SV ->7
- <;> ex-nextstate(main 5 p:5) v:%,fea=7 ->7
7 <;> nextstate(main 5 p:6) v:%,fea=7 ->8
9 <1> study sK/1 ->a
- <1> ex-rv2sv sK/1 ->9
8 <$> gvsv(*_) s ->9
Following this commit, it compiles as:
a <1> leavesub[1 ref] K/REFC,1 ->(end)
- <@> lineseq KP ->a
- <1> ex-argcheck vK/1 ->7
- <@> lineseq vK ->-
1 <;> nextstate(main 5 p:5) v:%,fea=7 ->2
2 <+> argcheck(2,0) v ->3
3 <;> nextstate(main 3 p:5) v:%,fea=7 ->4
4 <+> argelem(0)[$x:3,5] v/SV ->5
5 <;> nextstate(main 4 p:5) v:%,fea=7 ->6
6 <+> argelem(1)[$y:4,5] v/SV ->7
- <;> ex-nextstate(main 5 p:5) v:%,fea=7 ->-
7 <;> nextstate(main 5 p:6) v:%,fea=7 ->8
9 <1> study sK/1 ->a
- <1> ex-rv2sv sK/1 ->9
8 <#> gvsv[*_] s ->9
All the ops associated with the signature have been put in their own
subtree, with an extra NULL ex-argcheck op "on top". The op on top
serves two purposes: first, it makes it easier for Deparse.pm etc to
spot siganure code; secondly, it may at some point in the future be
upgraded to OP_SIGNATURE when signatures get optimised. It's of type
ex-argcheck only because when being created it needs to be an op type
that's in class UNOP_AUX so that the created op will be suitable for
later optimising, and making it an ex-type associated with signatures
helps flag it as such.
There should be no functional changes apart from the shape of the
optree.
Diffstat (limited to 'perly.tab')
-rw-r--r-- | perly.tab | 38 |
1 files changed, 19 insertions, 19 deletions
@@ -81,24 +81,24 @@ static const yytype_uint16 yyrline[] = 567, 571, 576, 580, 584, 585, 589, 595, 600, 605, 606, 611, 612, 617, 618, 620, 625, 627, 639, 640, 645, 647, 651, 671, 672, 674, 680, 745, 747, 753, - 755, 759, 765, 766, 771, 772, 776, 780, 780, 839, - 840, 845, 856, 857, 860, 871, 873, 875, 877, 881, - 883, 888, 892, 896, 900, 906, 911, 917, 923, 925, - 927, 930, 929, 940, 941, 945, 949, 952, 957, 962, - 965, 969, 973, 979, 987, 994, 1000, 1002, 1004, 1009, - 1011, 1013, 1018, 1020, 1022, 1024, 1026, 1028, 1030, 1032, - 1034, 1036, 1038, 1043, 1045, 1048, 1050, 1052, 1055, 1058, - 1069, 1072, 1079, 1081, 1083, 1085, 1087, 1090, 1096, 1098, - 1102, 1103, 1104, 1105, 1106, 1108, 1110, 1112, 1114, 1116, - 1118, 1120, 1122, 1124, 1126, 1128, 1130, 1132, 1134, 1144, - 1154, 1164, 1174, 1176, 1178, 1181, 1186, 1190, 1192, 1194, - 1196, 1199, 1201, 1204, 1206, 1208, 1210, 1212, 1214, 1216, - 1218, 1220, 1223, 1225, 1227, 1229, 1231, 1233, 1237, 1240, - 1239, 1252, 1253, 1254, 1258, 1260, 1262, 1267, 1269, 1272, - 1274, 1276, 1281, 1283, 1288, 1289, 1294, 1295, 1301, 1305, - 1306, 1307, 1310, 1311, 1314, 1315, 1318, 1322, 1326, 1332, - 1338, 1340, 1344, 1348, 1349, 1353, 1354, 1358, 1359, 1364, - 1366, 1368, 1371 + 755, 759, 765, 766, 771, 772, 776, 780, 780, 848, + 849, 854, 865, 866, 869, 880, 882, 884, 886, 890, + 892, 897, 901, 905, 909, 915, 920, 926, 932, 934, + 936, 939, 938, 949, 950, 954, 958, 961, 966, 971, + 974, 978, 982, 988, 996, 1003, 1009, 1011, 1013, 1018, + 1020, 1022, 1027, 1029, 1031, 1033, 1035, 1037, 1039, 1041, + 1043, 1045, 1047, 1052, 1054, 1057, 1059, 1061, 1064, 1067, + 1078, 1081, 1088, 1090, 1092, 1094, 1096, 1099, 1105, 1107, + 1111, 1112, 1113, 1114, 1115, 1117, 1119, 1121, 1123, 1125, + 1127, 1129, 1131, 1133, 1135, 1137, 1139, 1141, 1143, 1153, + 1163, 1173, 1183, 1185, 1187, 1190, 1195, 1199, 1201, 1203, + 1205, 1208, 1210, 1213, 1215, 1217, 1219, 1221, 1223, 1225, + 1227, 1229, 1232, 1234, 1236, 1238, 1240, 1242, 1246, 1249, + 1248, 1261, 1262, 1263, 1267, 1269, 1271, 1276, 1278, 1281, + 1283, 1285, 1290, 1292, 1297, 1298, 1303, 1304, 1310, 1314, + 1315, 1316, 1319, 1320, 1323, 1324, 1327, 1331, 1335, 1341, + 1347, 1349, 1353, 1357, 1358, 1362, 1363, 1367, 1368, 1373, + 1375, 1377, 1380 }; #endif @@ -1137,6 +1137,6 @@ static const toketypes yy_type_tab[] = }; /* Generated from: - * 2c3a1b30e52b1e872156c881cc6e702a9c0d1be569bfa579632b5eec73ffa9ef perly.y + * c522864236e07231c0a218cecf8cdcd82b74ce082b72f10199de4deeff580100 perly.y * 0947213b55d0ed11693554bea04987e886cf285f5c14cf9075fa1e7acc3f4061 regen_perly.pl * ex: set ro: */ |