File tree Expand file tree Collapse file tree 1 file changed +16
-16
lines changed
graalpython/com.oracle.graal.python/src/com/oracle/graal/python/builtins/objects/ints Expand file tree Collapse file tree 1 file changed +16
-16
lines changed Original file line number Diff line number Diff line change @@ -115,19 +115,19 @@ public abstract static class PyLongAsByteArray extends Node {
115
115
116
116
protected static int asWellSizedData (int len ) {
117
117
switch (len ) {
118
- case 1 :
119
- case 2 :
120
- case 4 :
121
- case 8 :
122
- return len ;
123
- default :
124
- return -1 ;
118
+ case 1 :
119
+ case 2 :
120
+ case 4 :
121
+ case 8 :
122
+ return len ;
123
+ default :
124
+ return -1 ;
125
125
}
126
126
}
127
127
128
128
@ Specialization (guards = "size == cachedDataLen" , limit = "4" )
129
129
static byte [] doPrimitive (long value , int size , boolean bigEndian ,
130
- @ Cached ("asWellSizedData(size)" ) int cachedDataLen ) {
130
+ @ Cached ("asWellSizedData(size)" ) int cachedDataLen ) {
131
131
final byte [] bytes = new byte [size ];
132
132
NumericSupport support = bigEndian ? NumericSupport .bigEndian () : NumericSupport .littleEndian ();
133
133
support .putLong (bytes , 0 , value , cachedDataLen );
@@ -174,19 +174,19 @@ protected static boolean fitsInLong(byte[] data) {
174
174
175
175
protected static int asWellSizedData (int len ) {
176
176
switch (len ) {
177
- case 1 :
178
- case 2 :
179
- case 4 :
180
- case 8 :
181
- return len ;
182
- default :
183
- return -1 ;
177
+ case 1 :
178
+ case 2 :
179
+ case 4 :
180
+ case 8 :
181
+ return len ;
182
+ default :
183
+ return -1 ;
184
184
}
185
185
}
186
186
187
187
@ Specialization (guards = "data.length == cachedDataLen" , limit = "4" )
188
188
static Object doLong (byte [] data , boolean bigEndian ,
189
- @ Cached ("asWellSizedData(data.length)" ) int cachedDataLen ) {
189
+ @ Cached ("asWellSizedData(data.length)" ) int cachedDataLen ) {
190
190
NumericSupport support = bigEndian ? NumericSupport .bigEndian () : NumericSupport .littleEndian ();
191
191
return support .getLong (data , 0 , cachedDataLen );
192
192
}
You can’t perform that action at this time.
0 commit comments