File tree Expand file tree Collapse file tree 1 file changed +4
-2
lines changed
graalpython/com.oracle.graal.python/src/com/oracle/graal/python/builtins/objects/str Expand file tree Collapse file tree 1 file changed +4
-2
lines changed Original file line number Diff line number Diff line change 86
86
import com .oracle .graal .python .nodes .function .builtins .PythonUnaryBuiltinNode ;
87
87
import com .oracle .graal .python .nodes .object .GetClassNode ;
88
88
import com .oracle .graal .python .nodes .truffle .PythonArithmeticTypes ;
89
+ import com .oracle .graal .python .nodes .util .CastToIndexNode ;
89
90
import com .oracle .graal .python .nodes .util .CastToIntegerFromIndexNode ;
90
91
import com .oracle .graal .python .runtime .exception .PException ;
91
92
import com .oracle .graal .python .runtime .formatting .StringFormatter ;
@@ -1553,8 +1554,9 @@ public String doString(String self, long width) {
1553
1554
}
1554
1555
1555
1556
@ Specialization
1556
- public String doString (String self , PInt width ) {
1557
- return zfill (self , width .intValue ());
1557
+ public String doString (String self , PInt width ,
1558
+ @ Cached ("create()" ) CastToIndexNode toIndexNode ) {
1559
+ return zfill (self , toIndexNode .execute (width ));
1558
1560
}
1559
1561
1560
1562
@ Specialization
You can’t perform that action at this time.
0 commit comments