110
110
import com .oracle .graal .python .nodes .function .builtins .PythonTernaryClinicBuiltinNode ;
111
111
import com .oracle .graal .python .nodes .function .builtins .PythonUnaryBuiltinNode ;
112
112
import com .oracle .graal .python .nodes .function .builtins .clinic .ArgumentClinicProvider ;
113
+ import com .oracle .graal .python .nodes .object .GetClassNode ;
113
114
import com .oracle .graal .python .nodes .object .IsBuiltinClassProfile ;
114
115
import com .oracle .graal .python .nodes .util .CannotCastException ;
115
116
import com .oracle .graal .python .nodes .util .CastToJavaIntExactNode ;
@@ -620,13 +621,12 @@ static PNone doLeft(PDeque self, int n) {
620
621
return PNone .NONE ;
621
622
}
622
623
623
- static PNone rotate (PDeque self , int n ) {
624
+ static void rotate (PDeque self , int n ) {
624
625
if (n < 0 ) {
625
626
doLeft (self , n );
626
627
} else {
627
628
doRight (self , n );
628
629
}
629
- return PNone .NONE ;
630
630
}
631
631
}
632
632
@@ -947,8 +947,7 @@ static Object repr(PDeque self) {
947
947
Object [] items = self .data .toArray ();
948
948
PList asList = PythonObjectFactory .getUncached ().createList (items );
949
949
int maxLength = self .getMaxLength ();
950
- PythonObjectLibrary selfLib = PythonObjectLibrary .getFactory ().getUncached (self );
951
- StringBuilder sb = new StringBuilder (GetNameNode .getUncached ().execute (selfLib .getLazyPythonClass (self )));
950
+ StringBuilder sb = new StringBuilder (GetNameNode .getUncached ().execute (GetClassNode .getUncached ().execute (self )));
952
951
sb .append ('(' ).append (CastToJavaStringNode .getUncached ().execute (PythonObjectLibrary .getUncached ().asPString (asList )));
953
952
if (maxLength != -1 ) {
954
953
sb .append (", maxlen=" ).append (maxLength );
@@ -968,8 +967,9 @@ abstract static class DequeReduceNode extends PythonUnaryBuiltinNode {
968
967
@ Specialization (limit = "1" )
969
968
Object doGeneric (PDeque self ,
970
969
@ CachedLibrary ("self" ) PythonObjectLibrary lib ,
970
+ @ Cached GetClassNode getClassNode ,
971
971
@ Cached ConditionProfile profile ) {
972
- Object clazz = getPythonClass (lib . getLazyPythonClass (self ), profile );
972
+ Object clazz = getPythonClass (getClassNode . execute (self ), profile );
973
973
Object dict = lib .hasDict (self ) ? lib .getDict (self ) : PNone .NONE ;
974
974
Object it = lib .getIterator (self );
975
975
PTuple emptyTuple = factory ().createEmptyTuple ();
0 commit comments