@@ -431,14 +431,25 @@ public Object mul(VirtualFrame frame, PBytes self, Object times,
431
431
@ Cached ("createBinaryProfile()" ) ConditionProfile hasFrame ,
432
432
@ Cached ("create()" ) SequenceStorageNodes .RepeatNode repeatNode ,
433
433
@ CachedLibrary ("times" ) PythonObjectLibrary lib ) {
434
- int timesInt ;
434
+ SequenceStorage res = repeatNode .execute (frame , self .getSequenceStorage (), getTimesInt (frame , times , hasFrame , lib ));
435
+ return factory ().createBytes (res );
436
+ }
437
+
438
+ @ Specialization (limit = "getCallSiteInlineCacheMaxDepth()" )
439
+ public Object mul (VirtualFrame frame , PByteArray self , Object times ,
440
+ @ Cached ("createBinaryProfile()" ) ConditionProfile hasFrame ,
441
+ @ Cached ("create()" ) SequenceStorageNodes .RepeatNode repeatNode ,
442
+ @ CachedLibrary ("times" ) PythonObjectLibrary lib ) {
443
+ SequenceStorage res = repeatNode .execute (frame , self .getSequenceStorage (), getTimesInt (frame , times , hasFrame , lib ));
444
+ return factory ().createByteArray (res );
445
+ }
446
+
447
+ private int getTimesInt (VirtualFrame frame , Object times , ConditionProfile hasFrame , PythonObjectLibrary lib ) {
435
448
if (hasFrame .profile (frame != null )) {
436
- timesInt = lib .asSizeWithState (times , PArguments .getThreadState (frame ));
449
+ return lib .asSizeWithState (times , PArguments .getThreadState (frame ));
437
450
} else {
438
- timesInt = lib .asSize (times );
451
+ return lib .asSize (times );
439
452
}
440
- SequenceStorage res = repeatNode .execute (frame , self .getSequenceStorage (), timesInt );
441
- return factory ().createBytes (res );
442
453
}
443
454
444
455
@ SuppressWarnings ("unused" )
0 commit comments