@@ -1655,6 +1655,7 @@ protected final BinaryComparisonNode createComparison() {
16551655 }
16561656
16571657 @ Specialization (guards = "args.length == 0" )
1658+ @ SuppressWarnings ("truffle-static-method" )
16581659 Object minmaxSequenceWithKey (VirtualFrame frame , Object arg1 , @ SuppressWarnings ("unused" ) Object [] args , Object keywordArgIn , Object defaultVal ,
16591660 @ Bind ("this" ) Node inliningTarget ,
16601661 @ Exclusive @ Cached PyObjectGetIter getIter ,
@@ -2218,89 +2219,81 @@ public abstract static class SumFunctionNode extends PythonBuiltinNode {
22182219 @ Specialization (rewriteOn = UnexpectedResultException .class )
22192220 int sumIntNone (VirtualFrame frame , Object arg1 , @ SuppressWarnings ("unused" ) PNone start ,
22202221 @ Bind ("this" ) Node inliningTarget ,
2221- @ Shared @ Cached IsBuiltinObjectProfile errorProfile1 ,
2222- @ Shared @ Cached IsBuiltinObjectProfile errorProfile2 ,
2223- @ Shared @ Cached IsBuiltinObjectProfile errorProfile3 ,
2222+ @ Shared @ Cached IsBuiltinObjectProfile errorProfile ,
22242223 @ Shared ("getIter" ) @ Cached PyObjectGetIter getIter ) throws UnexpectedResultException {
2225- return sumIntInternal (frame , arg1 , 0 , getIter , inliningTarget , errorProfile1 , errorProfile2 , errorProfile3 );
2224+ return sumIntInternal (frame , inliningTarget , arg1 , 0 , getIter , errorProfile );
22262225 }
22272226
22282227 @ Specialization (rewriteOn = UnexpectedResultException .class )
22292228 int sumIntInt (VirtualFrame frame , Object arg1 , int start ,
22302229 @ Bind ("this" ) Node inliningTarget ,
2231- @ Shared @ Cached IsBuiltinObjectProfile errorProfile1 ,
2232- @ Shared @ Cached IsBuiltinObjectProfile errorProfile2 ,
2233- @ Shared @ Cached IsBuiltinObjectProfile errorProfile3 ,
2230+ @ Shared @ Cached IsBuiltinObjectProfile errorProfile ,
22342231 @ Shared ("getIter" ) @ Cached PyObjectGetIter getIter ) throws UnexpectedResultException {
2235- return sumIntInternal (frame , arg1 , start , getIter , inliningTarget , errorProfile1 , errorProfile2 , errorProfile3 );
2232+ return sumIntInternal (frame , inliningTarget , arg1 , start , getIter , errorProfile );
22362233 }
22372234
2238- private int sumIntInternal (VirtualFrame frame , Object arg1 , int start , PyObjectGetIter getIter ,
2239- Node inliningTarget , IsBuiltinObjectProfile errorProfile1 ,
2240- IsBuiltinObjectProfile errorProfile2 , IsBuiltinObjectProfile errorProfile3 ) throws UnexpectedResultException {
2235+ private int sumIntInternal (VirtualFrame frame , Node inliningTarget , Object arg1 , int start , PyObjectGetIter getIter ,
2236+ IsBuiltinObjectProfile errorProfile ) throws UnexpectedResultException {
22412237 Object iterator = getIter .execute (frame , inliningTarget , arg1 );
22422238 int value = start ;
22432239 while (true ) {
22442240 int nextValue ;
22452241 try {
22462242 nextValue = PGuards .expectInteger (next .executeObject (frame , iterator ));
22472243 } catch (PException e ) {
2248- e .expectStopIteration (inliningTarget , errorProfile1 );
2244+ e .expectStopIteration (inliningTarget , errorProfile );
22492245 return value ;
22502246 } catch (UnexpectedResultException e ) {
22512247 Object newValue = add .executeObject (frame , value , e .getResult ());
2252- throw new UnexpectedResultException (iterateGeneric (frame , iterator , newValue , inliningTarget , errorProfile2 ));
2248+ throw new UnexpectedResultException (iterateGeneric (frame , inliningTarget , iterator , newValue , errorProfile ));
22532249 }
22542250 try {
22552251 value = add .executeInt (frame , value , nextValue );
22562252 } catch (UnexpectedResultException e ) {
2257- throw new UnexpectedResultException (iterateGeneric (frame , iterator , e .getResult (), inliningTarget , errorProfile3 ));
2253+ throw new UnexpectedResultException (iterateGeneric (frame , inliningTarget , iterator , e .getResult (), errorProfile ));
22582254 }
22592255 }
22602256 }
22612257
22622258 @ Specialization (rewriteOn = UnexpectedResultException .class )
22632259 double sumDoubleDouble (VirtualFrame frame , Object arg1 , double start ,
22642260 @ Bind ("this" ) Node inliningTarget ,
2265- @ Shared @ Cached IsBuiltinObjectProfile errorProfile1 ,
2266- @ Shared @ Cached IsBuiltinObjectProfile errorProfile2 ,
2267- @ Shared @ Cached IsBuiltinObjectProfile errorProfile3 ,
2261+ @ Shared @ Cached IsBuiltinObjectProfile errorProfile ,
22682262 // dummy inline profile, so it can be @Shared, to optimize generated code:
22692263 @ SuppressWarnings ("unused" ) @ Shared @ Cached InlinedConditionProfile hasStart ,
22702264 @ Shared ("getIter" ) @ Cached PyObjectGetIter getIter ,
22712265 // dummy raiseNode, so it can be @Shared, to optimize generated code:
22722266 @ SuppressWarnings ("unused" ) @ Shared @ Cached PRaiseNode .Lazy raiseNode ) throws UnexpectedResultException {
2273- return sumDoubleInternal (frame , arg1 , start , getIter , inliningTarget , errorProfile1 , errorProfile2 , errorProfile3 );
2267+ return sumDoubleInternal (frame , inliningTarget , arg1 , start , getIter , errorProfile );
22742268 }
22752269
2276- private double sumDoubleInternal (VirtualFrame frame , Object arg1 , double start , PyObjectGetIter getIter ,
2277- Node inliningTarget , IsBuiltinObjectProfile errorProfile1 ,
2278- IsBuiltinObjectProfile errorProfile2 , IsBuiltinObjectProfile errorProfile3 ) throws UnexpectedResultException {
2270+ private double sumDoubleInternal (VirtualFrame frame , Node inliningTarget , Object arg1 , double start , PyObjectGetIter getIter ,
2271+ IsBuiltinObjectProfile errorProfile ) throws UnexpectedResultException {
22792272 Object iterator = getIter .execute (frame , inliningTarget , arg1 );
22802273 double value = start ;
22812274 while (true ) {
22822275 double nextValue ;
22832276 try {
22842277 nextValue = PGuards .expectDouble (next .executeObject (frame , iterator ));
22852278 } catch (PException e ) {
2286- e .expectStopIteration (inliningTarget , errorProfile1 );
2279+ e .expectStopIteration (inliningTarget , errorProfile );
22872280 return value ;
22882281 } catch (UnexpectedResultException e ) {
22892282 Object newValue = add .executeObject (frame , value , e .getResult ());
2290- throw new UnexpectedResultException (iterateGeneric (frame , iterator , newValue , inliningTarget , errorProfile2 ));
2283+ throw new UnexpectedResultException (iterateGeneric (frame , inliningTarget , iterator , newValue , errorProfile ));
22912284 }
22922285 try {
22932286 value = add .executeDouble (frame , value , nextValue );
22942287 } catch (UnexpectedResultException e ) {
2295- throw new UnexpectedResultException (iterateGeneric (frame , iterator , e .getResult (), inliningTarget , errorProfile3 ));
2288+ throw new UnexpectedResultException (iterateGeneric (frame , inliningTarget , iterator , e .getResult (), errorProfile ));
22962289 }
22972290 }
22982291 }
22992292
23002293 @ Specialization (replaces = {"sumIntNone" , "sumIntInt" , "sumDoubleDouble" })
23012294 Object sum (VirtualFrame frame , Object arg1 , Object start ,
23022295 @ Bind ("this" ) Node inliningTarget ,
2303- @ Shared @ Cached IsBuiltinObjectProfile errorProfile1 ,
2296+ @ Shared @ Cached IsBuiltinObjectProfile errorProfile ,
23042297 @ Shared ("getIter" ) @ Cached PyObjectGetIter getIter ,
23052298 @ Shared @ Cached InlinedConditionProfile hasStart ,
23062299 @ Shared @ Cached PRaiseNode .Lazy raiseNode ) {
@@ -2312,10 +2305,10 @@ Object sum(VirtualFrame frame, Object arg1, Object start,
23122305 throw raiseNode .get (inliningTarget ).raise (TypeError , ErrorMessages .CANT_SUM_BYTEARRAY );
23132306 }
23142307 Object iterator = getIter .execute (frame , inliningTarget , arg1 );
2315- return iterateGeneric (frame , iterator , hasStart .profile (inliningTarget , start != NO_VALUE ) ? start : 0 , inliningTarget , errorProfile1 );
2308+ return iterateGeneric (frame , inliningTarget , iterator , hasStart .profile (inliningTarget , start != NO_VALUE ) ? start : 0 , errorProfile );
23162309 }
23172310
2318- private Object iterateGeneric (VirtualFrame frame , Object iterator , Object start , Node inliningTarget , IsBuiltinObjectProfile errorProfile ) {
2311+ private Object iterateGeneric (VirtualFrame frame , Node inliningTarget , Object iterator , Object start , IsBuiltinObjectProfile errorProfile ) {
23192312 Object value = start ;
23202313 while (true ) {
23212314 Object nextValue ;
0 commit comments