@@ -541,7 +541,10 @@ Object encode(Object str, @SuppressWarnings("unused") Object encoding, @Suppress
541
541
@ ArgumentClinic (name = "final" , conversion = ArgumentClinic .ClinicConversion .Boolean , defaultValue = "false" , useDefaultForNone = true )
542
542
@ GenerateNodeFactory
543
543
public abstract static class CodecsDecodeNode extends PythonQuaternaryClinicBuiltinNode {
544
- public abstract Object execute (Object input , Object encoding , Object errors , Object finalData );
544
+
545
+ public final Object call (VirtualFrame frame , Object input , Object encoding , Object errors , Object finalData ) {
546
+ return execute (frame , input , encoding , errors , finalData );
547
+ }
545
548
546
549
@ Override
547
550
protected ArgumentClinicProvider getArgumentClinic () {
@@ -827,7 +830,7 @@ PTuple lookup(VirtualFrame frame, PBytesLike encoding,
827
830
@ Cached ConditionProfile hasSearchPathProfile ,
828
831
@ Cached ConditionProfile hasTruffleEncodingProfile ,
829
832
@ Cached ConditionProfile isTupleProfile ) {
830
- String decoded = (String ) ((PTuple ) asciiDecodeNode .call (frame , encoding , PNone .NO_VALUE )).getSequenceStorage ().getInternalArray ()[0 ];
833
+ String decoded = (String ) ((PTuple ) asciiDecodeNode .execute (frame , encoding , PNone .NO_VALUE )).getSequenceStorage ().getInternalArray ()[0 ];
831
834
return lookup (frame , decoded , callNode , lenNode , hasSearchPathProfile , hasTruffleEncodingProfile , isTupleProfile );
832
835
}
833
836
@@ -884,7 +887,7 @@ private static Object[] getSearchPaths(PythonContext ctx) {
884
887
}
885
888
886
889
private static boolean isTupleInstanceCheck (VirtualFrame frame , Object result , int len , TupleBuiltins .LenNode lenNode ) throws PException {
887
- return (result instanceof PTuple ) && ((int ) lenNode .call (frame , result ) == len );
890
+ return (result instanceof PTuple ) && ((int ) lenNode .execute (frame , result ) == len );
888
891
}
889
892
890
893
@ TruffleBoundary
@@ -936,7 +939,7 @@ abstract static class ForgetCodecNode extends PythonBuiltinNode {
936
939
@ Specialization
937
940
Object forget (VirtualFrame frame , PBytesLike encoding ,
938
941
@ Cached AsciiDecodeNode asciiDecodeNode ) {
939
- forget ((String ) ((PTuple ) asciiDecodeNode .call (frame , encoding , PNone .NO_VALUE )).getSequenceStorage ().getInternalArray ()[0 ]);
942
+ forget ((String ) ((PTuple ) asciiDecodeNode .execute (frame , encoding , PNone .NO_VALUE )).getSequenceStorage ().getInternalArray ()[0 ]);
940
943
return PNone .NONE ;
941
944
}
942
945
@@ -1061,7 +1064,7 @@ Object decode(VirtualFrame frame, Object obj, String encoding, String errors,
1061
1064
}
1062
1065
1063
1066
private static Object codec_getItem (VirtualFrame frame , String encoding , int index , LookupNode lookupNode , SequenceStorageNodes .GetItemNode getItemNode ) {
1064
- PTuple t = (PTuple ) lookupNode .call (frame , encoding );
1067
+ PTuple t = (PTuple ) lookupNode .execute (frame , encoding );
1065
1068
return getItemNode .execute (frame , t .getSequenceStorage (), index );
1066
1069
}
1067
1070
@@ -1079,7 +1082,7 @@ abstract static class UTF8EncodeNode extends PythonBinaryBuiltinNode {
1079
1082
@ Specialization
1080
1083
Object encode (VirtualFrame frame , Object obj , Object errors ,
1081
1084
@ Cached CodecsEncodeNode encode ) {
1082
- return encode .call (frame , obj , "utf-8" , errors );
1085
+ return encode .execute (frame , obj , "utf-8" , errors );
1083
1086
}
1084
1087
}
1085
1088
@@ -1089,7 +1092,7 @@ abstract static class UTF8DecodeNode extends PythonTernaryBuiltinNode {
1089
1092
@ Specialization
1090
1093
Object encode (VirtualFrame frame , Object obj , Object errors , Object ffinal ,
1091
1094
@ Cached CodecsDecodeNode decode ) {
1092
- return decode .call (frame , obj , "utf-8" , errors , ffinal );
1095
+ return decode .execute (frame , obj , "utf-8" , errors , ffinal );
1093
1096
}
1094
1097
}
1095
1098
@@ -1099,7 +1102,7 @@ abstract static class UTF7EncodeNode extends PythonBinaryBuiltinNode {
1099
1102
@ Specialization
1100
1103
Object encode (VirtualFrame frame , Object obj , Object errors ,
1101
1104
@ Cached CodecsEncodeNode encode ) {
1102
- return encode .call (frame , obj , "utf-7" , errors );
1105
+ return encode .execute (frame , obj , "utf-7" , errors );
1103
1106
}
1104
1107
}
1105
1108
@@ -1109,7 +1112,7 @@ abstract static class UTF7DecodeNode extends PythonTernaryBuiltinNode {
1109
1112
@ Specialization
1110
1113
Object encode (VirtualFrame frame , Object obj , Object errors , Object ffinal ,
1111
1114
@ Cached CodecsDecodeNode decode ) {
1112
- return decode .call (frame , obj , "utf-7" , errors , ffinal );
1115
+ return decode .execute (frame , obj , "utf-7" , errors , ffinal );
1113
1116
}
1114
1117
}
1115
1118
@@ -1119,7 +1122,7 @@ abstract static class UTF16EncodeNode extends PythonTernaryBuiltinNode {
1119
1122
@ Specialization
1120
1123
Object encode (VirtualFrame frame , Object obj , Object errors , @ SuppressWarnings ("unused" ) Object byteorder ,
1121
1124
@ Cached CodecsEncodeNode encode ) {
1122
- return encode .call (frame , obj , "utf-16" , errors );
1125
+ return encode .execute (frame , obj , "utf-16" , errors );
1123
1126
}
1124
1127
}
1125
1128
@@ -1129,7 +1132,7 @@ abstract static class UTF16DecodeNode extends PythonTernaryBuiltinNode {
1129
1132
@ Specialization
1130
1133
Object encode (VirtualFrame frame , Object obj , Object errors , Object ffinal ,
1131
1134
@ Cached CodecsDecodeNode decode ) {
1132
- return decode .call (frame , obj , "utf-16" , errors , ffinal );
1135
+ return decode .execute (frame , obj , "utf-16" , errors , ffinal );
1133
1136
}
1134
1137
}
1135
1138
@@ -1139,7 +1142,7 @@ abstract static class UTF16LEEncodeNode extends PythonBinaryBuiltinNode {
1139
1142
@ Specialization
1140
1143
Object encode (VirtualFrame frame , Object obj , Object errors ,
1141
1144
@ Cached CodecsEncodeNode encode ) {
1142
- return encode .call (frame , obj , "utf-16-le" , errors );
1145
+ return encode .execute (frame , obj , "utf-16-le" , errors );
1143
1146
}
1144
1147
}
1145
1148
@@ -1149,7 +1152,7 @@ abstract static class UTF16LEDecodeNode extends PythonTernaryBuiltinNode {
1149
1152
@ Specialization
1150
1153
Object encode (VirtualFrame frame , Object obj , Object errors , Object ffinal ,
1151
1154
@ Cached CodecsDecodeNode decode ) {
1152
- return decode .call (frame , obj , "utf-16-le" , errors , ffinal );
1155
+ return decode .execute (frame , obj , "utf-16-le" , errors , ffinal );
1153
1156
}
1154
1157
}
1155
1158
@@ -1159,7 +1162,7 @@ abstract static class UTF16BEEncodeNode extends PythonBinaryBuiltinNode {
1159
1162
@ Specialization
1160
1163
Object encode (VirtualFrame frame , Object obj , Object errors ,
1161
1164
@ Cached CodecsEncodeNode encode ) {
1162
- return encode .call (frame , obj , "utf-16-be" , errors );
1165
+ return encode .execute (frame , obj , "utf-16-be" , errors );
1163
1166
}
1164
1167
}
1165
1168
@@ -1169,7 +1172,7 @@ abstract static class UTF16BEDecodeNode extends PythonTernaryBuiltinNode {
1169
1172
@ Specialization
1170
1173
Object encode (VirtualFrame frame , Object obj , Object errors , Object ffinal ,
1171
1174
@ Cached CodecsDecodeNode decode ) {
1172
- return decode .call (frame , obj , "utf-16-be" , errors , ffinal );
1175
+ return decode .execute (frame , obj , "utf-16-be" , errors , ffinal );
1173
1176
}
1174
1177
}
1175
1178
@@ -1189,7 +1192,7 @@ abstract static class UTF32EncodeNode extends PythonTernaryBuiltinNode {
1189
1192
@ Specialization
1190
1193
Object encode (VirtualFrame frame , Object obj , Object errors , @ SuppressWarnings ("unused" ) Object byteorder ,
1191
1194
@ Cached CodecsEncodeNode encode ) {
1192
- return encode .call (frame , obj , "utf-32" , errors );
1195
+ return encode .execute (frame , obj , "utf-32" , errors );
1193
1196
}
1194
1197
}
1195
1198
@@ -1199,7 +1202,7 @@ abstract static class UTF32DecodeNode extends PythonTernaryBuiltinNode {
1199
1202
@ Specialization
1200
1203
Object encode (VirtualFrame frame , Object obj , Object errors , Object ffinal ,
1201
1204
@ Cached CodecsDecodeNode decode ) {
1202
- return decode .call (frame , obj , "utf-32" , errors , ffinal );
1205
+ return decode .execute (frame , obj , "utf-32" , errors , ffinal );
1203
1206
}
1204
1207
}
1205
1208
@@ -1209,7 +1212,7 @@ abstract static class UTF32LEEncodeNode extends PythonBinaryBuiltinNode {
1209
1212
@ Specialization
1210
1213
Object encode (VirtualFrame frame , Object obj , Object errors ,
1211
1214
@ Cached CodecsEncodeNode encode ) {
1212
- return encode .call (frame , obj , "utf-32-le" , errors );
1215
+ return encode .execute (frame , obj , "utf-32-le" , errors );
1213
1216
}
1214
1217
}
1215
1218
@@ -1219,7 +1222,7 @@ abstract static class UTF32LEDecodeNode extends PythonTernaryBuiltinNode {
1219
1222
@ Specialization
1220
1223
Object encode (VirtualFrame frame , Object obj , Object errors , Object ffinal ,
1221
1224
@ Cached CodecsDecodeNode decode ) {
1222
- return decode .call (frame , obj , "utf-32-le" , errors , ffinal );
1225
+ return decode .execute (frame , obj , "utf-32-le" , errors , ffinal );
1223
1226
}
1224
1227
}
1225
1228
@@ -1229,7 +1232,7 @@ abstract static class UTF32BEEncodeNode extends PythonBinaryBuiltinNode {
1229
1232
@ Specialization
1230
1233
Object encode (VirtualFrame frame , Object obj , Object errors ,
1231
1234
@ Cached CodecsEncodeNode encode ) {
1232
- return encode .call (frame , obj , "utf-32-be" , errors );
1235
+ return encode .execute (frame , obj , "utf-32-be" , errors );
1233
1236
}
1234
1237
}
1235
1238
@@ -1239,7 +1242,7 @@ abstract static class UTF32BEDecodeNode extends PythonTernaryBuiltinNode {
1239
1242
@ Specialization
1240
1243
Object encode (VirtualFrame frame , Object obj , Object errors , Object ffinal ,
1241
1244
@ Cached CodecsDecodeNode decode ) {
1242
- return decode .call (frame , obj , "utf-32-be" , errors , ffinal );
1245
+ return decode .execute (frame , obj , "utf-32-be" , errors , ffinal );
1243
1246
}
1244
1247
}
1245
1248
@@ -1279,7 +1282,7 @@ abstract static class RawUnicodeEscapeEncodeNode extends PythonBinaryBuiltinNode
1279
1282
@ Specialization
1280
1283
Object encode (VirtualFrame frame , Object obj , Object errors ,
1281
1284
@ Cached CodecsEncodeNode encode ) {
1282
- return encode .call (frame , obj , "raw_unicode_escape" , errors );
1285
+ return encode .execute (frame , obj , "raw_unicode_escape" , errors );
1283
1286
}
1284
1287
}
1285
1288
@@ -1289,7 +1292,7 @@ abstract static class RawUnicodeEscapeDecodeNode extends PythonBinaryBuiltinNode
1289
1292
@ Specialization
1290
1293
Object encode (VirtualFrame frame , Object obj , Object errors ,
1291
1294
@ Cached CodecsDecodeNode decode ) {
1292
- return decode .call (frame , obj , "raw_unicode_escape" , errors , true );
1295
+ return decode .execute (frame , obj , "raw_unicode_escape" , errors , true );
1293
1296
}
1294
1297
}
1295
1298
@@ -1299,7 +1302,7 @@ abstract static class UnicodeEscapeEncodeNode extends PythonBinaryBuiltinNode {
1299
1302
@ Specialization
1300
1303
Object encode (VirtualFrame frame , Object obj , Object errors ,
1301
1304
@ Cached CodecsEncodeNode encode ) {
1302
- return encode .call (frame , obj , "unicode_escape" , errors );
1305
+ return encode .execute (frame , obj , "unicode_escape" , errors );
1303
1306
}
1304
1307
}
1305
1308
@@ -1309,7 +1312,7 @@ abstract static class UnicodeEscapeDecodeNode extends PythonBinaryBuiltinNode {
1309
1312
@ Specialization
1310
1313
Object encode (VirtualFrame frame , Object obj , Object errors ,
1311
1314
@ Cached CodecsDecodeNode decode ) {
1312
- return decode .call (frame , obj , "unicode_escape" , errors , true );
1315
+ return decode .execute (frame , obj , "unicode_escape" , errors , true );
1313
1316
}
1314
1317
}
1315
1318
@@ -1319,7 +1322,7 @@ abstract static class Latin1EscapeEncodeNode extends PythonBinaryBuiltinNode {
1319
1322
@ Specialization
1320
1323
Object encode (VirtualFrame frame , Object obj , Object errors ,
1321
1324
@ Cached CodecsEncodeNode encode ) {
1322
- return encode .call (frame , obj , "latin_1" , errors );
1325
+ return encode .execute (frame , obj , "latin_1" , errors );
1323
1326
}
1324
1327
}
1325
1328
@@ -1329,7 +1332,7 @@ abstract static class Latin1EscapeDecodeNode extends PythonBinaryBuiltinNode {
1329
1332
@ Specialization
1330
1333
Object encode (VirtualFrame frame , Object obj , Object errors ,
1331
1334
@ Cached CodecsDecodeNode decode ) {
1332
- return decode .call (frame , obj , "latin_1" , errors , true );
1335
+ return decode .execute (frame , obj , "latin_1" , errors , true );
1333
1336
}
1334
1337
}
1335
1338
@@ -1339,7 +1342,7 @@ abstract static class AsciiEscapeEncodeNode extends PythonBinaryBuiltinNode {
1339
1342
@ Specialization
1340
1343
Object encode (VirtualFrame frame , Object obj , Object errors ,
1341
1344
@ Cached CodecsEncodeNode encode ) {
1342
- return encode .call (frame , obj , "ascii" , errors );
1345
+ return encode .execute (frame , obj , "ascii" , errors );
1343
1346
}
1344
1347
}
1345
1348
@@ -1349,7 +1352,7 @@ abstract static class AsciiDecodeNode extends PythonBinaryBuiltinNode {
1349
1352
@ Specialization
1350
1353
Object decode (VirtualFrame frame , Object obj , Object errors ,
1351
1354
@ Cached CodecsDecodeNode decode ) {
1352
- return decode .call (frame , obj , "ascii" , errors , true );
1355
+ return decode .execute (frame , obj , "ascii" , errors , true );
1353
1356
}
1354
1357
}
1355
1358
0 commit comments