Skip to content

Commit 1ba71ed

Browse files
committed
narrow access modifiers
1 parent 7217549 commit 1ba71ed

39 files changed

+391
-391
lines changed

graalpython/com.oracle.graal.python/src/com/oracle/graal/python/builtins/modules/cext/PythonCextAbstractBuiltins.java

Lines changed: 16 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -462,10 +462,10 @@ private LookupAndCallTernaryNode ensureCallNode() {
462462
/////// PySequence ///////
463463

464464
@CApiBuiltin(ret = PyObjectTransfer, args = {PyObject}, call = Direct)
465-
public abstract static class PySequence_Tuple extends CApiUnaryBuiltinNode {
465+
abstract static class PySequence_Tuple extends CApiUnaryBuiltinNode {
466466

467467
@Specialization
468-
public Object values(Object obj,
468+
Object values(Object obj,
469469
@Bind("this") Node inliningTarget,
470470
@Cached TupleNode tupleNode,
471471
@Cached InlinedGetClassNode getClassNode) {
@@ -478,18 +478,18 @@ public Object values(Object obj,
478478
}
479479

480480
@CApiBuiltin(ret = PyObjectTransfer, args = {PyObject}, call = Direct)
481-
public abstract static class PySequence_List extends CApiUnaryBuiltinNode {
481+
abstract static class PySequence_List extends CApiUnaryBuiltinNode {
482482
@Specialization
483-
public Object values(Object obj,
483+
Object values(Object obj,
484484
@Cached ConstructListNode listNode) {
485485
return listNode.execute(null, obj);
486486
}
487487
}
488488

489489
@CApiBuiltin(ret = Int, args = {PyObject, Py_ssize_t, PyObject}, call = Direct)
490-
public abstract static class PySequence_SetItem extends CApiTernaryBuiltinNode {
490+
abstract static class PySequence_SetItem extends CApiTernaryBuiltinNode {
491491
@Specialization(guards = "checkNode.execute(obj)", limit = "1")
492-
public Object setItem(Object obj, Object key, Object value,
492+
Object setItem(Object obj, Object key, Object value,
493493
@Shared("check") @SuppressWarnings("unused") @Cached PySequenceCheckNode checkNode,
494494
@Cached PyObjectLookupAttr lookupAttrNode,
495495
@Cached ConditionProfile hasSetItem,
@@ -636,7 +636,7 @@ protected BinaryArithmetic.AddNode createAdd() {
636636
}
637637

638638
@CApiBuiltin(ret = Int, args = {PyObject, Py_ssize_t}, call = Direct)
639-
public abstract static class PySequence_DelItem extends CApiBinaryBuiltinNode {
639+
abstract static class PySequence_DelItem extends CApiBinaryBuiltinNode {
640640
@Specialization
641641
static Object run(Object o, Object i,
642642
@Cached PyObjectDelItem delItemNode) {
@@ -756,16 +756,16 @@ static long doGenericUnboxed(Object obj, long defaultValue,
756756
/////// PyMapping ///////
757757

758758
@CApiBuiltin(ret = PyObjectTransfer, args = {PyObject}, call = Direct)
759-
public abstract static class PyMapping_Keys extends CApiUnaryBuiltinNode {
759+
abstract static class PyMapping_Keys extends CApiUnaryBuiltinNode {
760760
@Specialization
761-
public Object keys(PDict obj,
761+
Object keys(PDict obj,
762762
@Cached KeysNode keysNode,
763763
@Cached ConstructListNode listNode) {
764764
return listNode.execute(null, keysNode.execute(null, obj));
765765
}
766766

767767
@Specialization(guards = "!isDict(obj)")
768-
public Object keys(Object obj,
768+
Object keys(Object obj,
769769
@Cached PyObjectGetAttr getAttrNode,
770770
@Cached CallNode callNode,
771771
@Cached ConstructListNode listNode) {
@@ -780,16 +780,16 @@ private static PList getKeys(VirtualFrame frame, Object obj, PyObjectGetAttr get
780780
}
781781

782782
@CApiBuiltin(ret = PyObjectTransfer, args = {PyObject}, call = Direct)
783-
public abstract static class PyMapping_Items extends CApiUnaryBuiltinNode {
783+
abstract static class PyMapping_Items extends CApiUnaryBuiltinNode {
784784
@Specialization
785-
public Object items(PDict obj,
785+
Object items(PDict obj,
786786
@Cached ItemsNode itemsNode,
787787
@Cached ConstructListNode listNode) {
788788
return listNode.execute(null, itemsNode.execute(null, obj));
789789
}
790790

791791
@Specialization(guards = "!isDict(obj)")
792-
public Object items(Object obj,
792+
Object items(Object obj,
793793
@Cached PyObjectGetAttr getAttrNode,
794794
@Cached CallNode callNode,
795795
@Cached ConstructListNode listNode) {
@@ -799,16 +799,16 @@ public Object items(Object obj,
799799
}
800800

801801
@CApiBuiltin(ret = PyObjectTransfer, args = {PyObject}, call = Direct)
802-
public abstract static class PyMapping_Values extends CApiUnaryBuiltinNode {
802+
abstract static class PyMapping_Values extends CApiUnaryBuiltinNode {
803803
@Specialization
804-
public Object values(PDict obj,
804+
Object values(PDict obj,
805805
@Cached ConstructListNode listNode,
806806
@Cached ValuesNode valuesNode) {
807807
return listNode.execute(null, valuesNode.execute(null, obj));
808808
}
809809

810810
@Specialization(guards = "!isDict(obj)")
811-
public Object values(Object obj,
811+
Object values(Object obj,
812812
@Cached PyObjectGetAttr getAttrNode,
813813
@Cached CallNode callNode,
814814
@Cached ConstructListNode listNode) {

graalpython/com.oracle.graal.python/src/com/oracle/graal/python/builtins/modules/cext/PythonCextBoolBuiltins.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -50,15 +50,15 @@
5050
public final class PythonCextBoolBuiltins {
5151

5252
@CApiBuiltin(ret = PyObjectTransfer, call = Ignored)
53-
public abstract static class PyTruffle_True extends CApiNullaryBuiltinNode {
53+
abstract static class PyTruffle_True extends CApiNullaryBuiltinNode {
5454
@Specialization
5555
static boolean run() {
5656
return true;
5757
}
5858
}
5959

6060
@CApiBuiltin(ret = PyObjectTransfer, call = Ignored)
61-
public abstract static class PyTruffle_False extends CApiNullaryBuiltinNode {
61+
abstract static class PyTruffle_False extends CApiNullaryBuiltinNode {
6262
@Specialization
6363
static boolean run() {
6464
return false;

graalpython/com.oracle.graal.python/src/com/oracle/graal/python/builtins/modules/cext/PythonCextBuiltins.java

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -903,7 +903,7 @@ Object run(Object o) {
903903
}
904904

905905
@CApiBuiltin(ret = PyObjectTransfer, call = Ignored)
906-
public abstract static class PyTruffle_FileSystemDefaultEncoding extends CApiNullaryBuiltinNode {
906+
abstract static class PyTruffle_FileSystemDefaultEncoding extends CApiNullaryBuiltinNode {
907907
@Specialization
908908
static TruffleString encoding() {
909909
return GetFileSystemEncodingNode.getFileSystemEncoding();
@@ -1289,7 +1289,7 @@ static int doConvert(Object argv, Object nativeKwds, TruffleString formatString,
12891289
}
12901290

12911291
@CApiBuiltin(ret = SIZE_T, args = {}, call = Ignored)
1292-
public abstract static class PyTruffle_MaxNativeMemory extends CApiNullaryBuiltinNode {
1292+
abstract static class PyTruffle_MaxNativeMemory extends CApiNullaryBuiltinNode {
12931293
@Specialization
12941294
@TruffleBoundary
12951295
long get() {
@@ -1298,7 +1298,7 @@ long get() {
12981298
}
12991299

13001300
@CApiBuiltin(ret = SIZE_T, args = {}, call = Ignored)
1301-
public abstract static class PyTruffle_InitialNativeMemory extends CApiNullaryBuiltinNode {
1301+
abstract static class PyTruffle_InitialNativeMemory extends CApiNullaryBuiltinNode {
13021302
@Specialization
13031303
@TruffleBoundary
13041304
long get() {
@@ -1307,7 +1307,7 @@ long get() {
13071307
}
13081308

13091309
@CApiBuiltin(ret = Void, args = {SIZE_T}, call = Ignored)
1310-
public abstract static class PyTruffle_TriggerGC extends CApiUnaryBuiltinNode {
1310+
abstract static class PyTruffle_TriggerGC extends CApiUnaryBuiltinNode {
13111311

13121312
@Specialization
13131313
@TruffleBoundary
@@ -1328,7 +1328,7 @@ Object trigger(long delay) {
13281328

13291329
@CApiBuiltin(ret = Int, args = {Pointer}, call = Ignored)
13301330
@ImportStatic(CApiGuards.class)
1331-
public abstract static class PyTruffle_Object_Free extends CApiUnaryBuiltinNode {
1331+
abstract static class PyTruffle_Object_Free extends CApiUnaryBuiltinNode {
13321332
private static final TruffleLogger LOGGER = CApiContext.getLogger(PyTruffle_Object_Free.class);
13331333

13341334
@Specialization(guards = "!isCArrayWrapper(nativeWrapper)")
@@ -1627,7 +1627,7 @@ public Void visitFrame(FrameInstance frame) {
16271627
}
16281628

16291629
@CApiBuiltin(ret = Int, args = {Pointer}, call = Direct)
1630-
public abstract static class PyTruffle_Debug extends CApiUnaryBuiltinNode {
1630+
abstract static class PyTruffle_Debug extends CApiUnaryBuiltinNode {
16311631
@Specialization
16321632
@TruffleBoundary
16331633
static Object doIt(Object[] args,
@@ -1638,7 +1638,7 @@ static Object doIt(Object[] args,
16381638
}
16391639

16401640
@CApiBuiltin(ret = Int, args = {Pointer}, call = Direct)
1641-
public abstract static class PyTruffle_ToNative extends CApiUnaryBuiltinNode {
1641+
abstract static class PyTruffle_ToNative extends CApiUnaryBuiltinNode {
16421642
@Specialization
16431643
@TruffleBoundary
16441644
int doIt(Object object) {

graalpython/com.oracle.graal.python/src/com/oracle/graal/python/builtins/modules/cext/PythonCextBytesBuiltins.java

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -119,7 +119,7 @@
119119
public final class PythonCextBytesBuiltins {
120120

121121
@CApiBuiltin(ret = Py_ssize_t, args = {PyObject}, call = Direct)
122-
public abstract static class PyBytes_Size extends CApiUnaryBuiltinNode {
122+
abstract static class PyBytes_Size extends CApiUnaryBuiltinNode {
123123
@Specialization
124124
static int doPBytes(PBytes obj,
125125
@Cached PyObjectSizeNode sizeNode) {
@@ -147,9 +147,9 @@ int fallback(Object obj) {
147147
}
148148

149149
@CApiBuiltin(ret = PyObjectTransfer, args = {PyObject, PyObject}, call = Ignored)
150-
public abstract static class PyTruffleBytes_Concat extends CApiBinaryBuiltinNode {
150+
abstract static class PyTruffleBytes_Concat extends CApiBinaryBuiltinNode {
151151
@Specialization
152-
public Object concat(PBytes original, Object newPart,
152+
Object concat(PBytes original, Object newPart,
153153
@Cached BytesBuiltins.AddNode addNode) {
154154
return addNode.execute(null, original, newPart);
155155
}
@@ -161,9 +161,9 @@ Object fallback(Object original, @SuppressWarnings("unused") Object newPart) {
161161
}
162162

163163
@CApiBuiltin(ret = PyObjectTransfer, args = {PyObject, PyObject}, call = Direct)
164-
public abstract static class _PyBytes_Join extends CApiBinaryBuiltinNode {
164+
abstract static class _PyBytes_Join extends CApiBinaryBuiltinNode {
165165
@Specialization
166-
public Object join(PBytes original, Object newPart,
166+
Object join(PBytes original, Object newPart,
167167
@Cached BytesBuiltins.JoinNode joinNode) {
168168
return joinNode.execute(null, original, newPart);
169169
}
@@ -175,9 +175,9 @@ Object fallback(Object original, @SuppressWarnings("unused") Object newPart) {
175175
}
176176

177177
@CApiBuiltin(ret = PyObjectTransfer, args = {ConstCharPtrAsTruffleString, PyObject}, call = Ignored)
178-
public abstract static class PyTruffleBytes_FromFormat extends CApiBinaryBuiltinNode {
178+
abstract static class PyTruffleBytes_FromFormat extends CApiBinaryBuiltinNode {
179179
@Specialization
180-
public Object fromFormat(TruffleString fmt, Object args,
180+
Object fromFormat(TruffleString fmt, Object args,
181181
@Cached ModNode modeNode,
182182
@Cached EncodeNode encodeNode) {
183183
Object formated = modeNode.execute(null, fmt, args);
@@ -186,9 +186,9 @@ public Object fromFormat(TruffleString fmt, Object args,
186186
}
187187

188188
@CApiBuiltin(ret = PyObjectTransfer, args = {PyObject}, call = Direct)
189-
public abstract static class PyBytes_FromObject extends CApiUnaryBuiltinNode {
189+
abstract static class PyBytes_FromObject extends CApiUnaryBuiltinNode {
190190
@Specialization
191-
public Object fromObject(Object obj,
191+
Object fromObject(Object obj,
192192
@Bind("this") Node inliningTarget,
193193
@Cached InlinedGetClassNode getClassNode,
194194
@Cached IsSubtypeNode isSubtypeNode,
@@ -283,7 +283,7 @@ Object doNativePointer(Object nativePointer, long size,
283283

284284
@CApiBuiltin(name = "PyByteArray_Resize", ret = Int, args = {PyObject, Py_ssize_t}, call = Direct)
285285
@CApiBuiltin(ret = Int, args = {PyObject, Py_ssize_t}, call = Ignored)
286-
public abstract static class _PyTruffleBytes_Resize extends CApiBinaryBuiltinNode {
286+
abstract static class _PyTruffleBytes_Resize extends CApiBinaryBuiltinNode {
287287

288288
@Specialization
289289
static int resize(PBytesLike self, long newSizeL,

graalpython/com.oracle.graal.python/src/com/oracle/graal/python/builtins/modules/cext/PythonCextCEvalBuiltins.java

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -89,7 +89,7 @@
8989
public final class PythonCextCEvalBuiltins {
9090

9191
@CApiBuiltin(ret = PyThreadState, args = {}, acquiresGIL = false, call = Direct)
92-
public abstract static class PyEval_SaveThread extends CApiNullaryBuiltinNode {
92+
abstract static class PyEval_SaveThread extends CApiNullaryBuiltinNode {
9393
private static final TruffleLogger LOGGER = CApiContext.getLogger(PyEval_SaveThread.class);
9494

9595
@Specialization
@@ -103,7 +103,7 @@ Object save(@Cached GilNode gil) {
103103
}
104104

105105
@CApiBuiltin(ret = Void, args = {PyThreadState}, acquiresGIL = false, call = Direct)
106-
public abstract static class PyEval_RestoreThread extends CApiUnaryBuiltinNode {
106+
abstract static class PyEval_RestoreThread extends CApiUnaryBuiltinNode {
107107
private static final TruffleLogger LOGGER = CApiContext.getLogger(PyEval_RestoreThread.class);
108108

109109
@Specialization
@@ -118,9 +118,9 @@ Object restore(@SuppressWarnings("unused") Object ptr,
118118
}
119119

120120
@CApiBuiltin(ret = PyObjectBorrowed, args = {}, call = Direct)
121-
public abstract static class PyEval_GetBuiltins extends CApiNullaryBuiltinNode {
121+
abstract static class PyEval_GetBuiltins extends CApiNullaryBuiltinNode {
122122
@Specialization
123-
public Object release(
123+
Object release(
124124
@Cached GetDictIfExistsNode getDictNode) {
125125
PythonModule cext = getCore().getBuiltins();
126126
return getDictNode.execute(cext);

graalpython/com.oracle.graal.python/src/com/oracle/graal/python/builtins/modules/cext/PythonCextCapsuleBuiltins.java

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -123,7 +123,7 @@ static boolean fallback(Object name1, Object name2,
123123
}
124124

125125
@CApiBuiltin(ret = PyObjectTransfer, args = {Pointer, ConstCharPtrAsTruffleString, PY_CAPSULE_DESTRUCTOR}, call = Direct)
126-
public abstract static class PyCapsule_New extends CApiTernaryBuiltinNode {
126+
abstract static class PyCapsule_New extends CApiTernaryBuiltinNode {
127127
@Specialization
128128
Object doGeneric(Object pointer, Object name, Object destructor,
129129
@CachedLibrary(limit = "2") InteropLibrary interopLibrary) {
@@ -156,7 +156,7 @@ static Object doError(@SuppressWarnings("unused") Object o, @SuppressWarnings("u
156156
}
157157

158158
@CApiBuiltin(ret = Pointer, args = {PyObject, ConstCharPtrAsTruffleString}, call = Direct)
159-
public abstract static class PyCapsule_GetPointer extends CApiBinaryBuiltinNode {
159+
abstract static class PyCapsule_GetPointer extends CApiBinaryBuiltinNode {
160160
@Specialization
161161
Object doCapsule(PyCapsule o, Object name,
162162
@Cached NameMatchesNode nameMatchesNode) {
@@ -176,7 +176,7 @@ Object doError(@SuppressWarnings("unused") Object o, @SuppressWarnings("unused")
176176
}
177177

178178
@CApiBuiltin(ret = ConstCharPtr, args = {PyObject}, call = Direct)
179-
public abstract static class PyCapsule_GetName extends CApiUnaryBuiltinNode {
179+
abstract static class PyCapsule_GetName extends CApiUnaryBuiltinNode {
180180
private void checkLegalCapsule(PyCapsule capsule) {
181181
if (capsule.getPointer() == null) {
182182
throw raise(ValueError, CALLED_WITH_INVALID_PY_CAPSULE_OBJECT, "PyCapsule_GetName");
@@ -229,7 +229,7 @@ Object doit(@SuppressWarnings("unused") Object o) {
229229
}
230230

231231
@CApiBuiltin(ret = PY_CAPSULE_DESTRUCTOR, args = {PyObject}, call = Direct)
232-
public abstract static class PyCapsule_GetDestructor extends CApiUnaryBuiltinNode {
232+
abstract static class PyCapsule_GetDestructor extends CApiUnaryBuiltinNode {
233233
@Specialization
234234
Object doCapsule(PyCapsule o) {
235235
if (o.getPointer() == null) {
@@ -248,7 +248,7 @@ Object doError(@SuppressWarnings("unused") Object o) {
248248
}
249249

250250
@CApiBuiltin(ret = Pointer, args = {PyObject}, call = Direct)
251-
public abstract static class PyCapsule_GetContext extends CApiUnaryBuiltinNode {
251+
abstract static class PyCapsule_GetContext extends CApiUnaryBuiltinNode {
252252
@Specialization
253253
Object doCapsule(PyCapsule o) {
254254
if (o.getPointer() == null) {
@@ -267,7 +267,7 @@ Object doError(@SuppressWarnings("unused") Object o) {
267267
}
268268

269269
@CApiBuiltin(ret = Int, args = {PyObject, Pointer}, call = Direct)
270-
public abstract static class PyCapsule_SetPointer extends CApiBinaryBuiltinNode {
270+
abstract static class PyCapsule_SetPointer extends CApiBinaryBuiltinNode {
271271
@Specialization
272272
int doCapsule(PyCapsule o, Object pointer,
273273
@CachedLibrary(limit = "2") InteropLibrary interopLibrary) {
@@ -290,7 +290,7 @@ Object doError(@SuppressWarnings("unused") Object o, @SuppressWarnings("unused")
290290
}
291291

292292
@CApiBuiltin(ret = Int, args = {PyObject, ConstCharPtrAsTruffleString}, call = Direct)
293-
public abstract static class PyCapsule_SetName extends CApiBinaryBuiltinNode {
293+
abstract static class PyCapsule_SetName extends CApiBinaryBuiltinNode {
294294
@Specialization
295295
int doCapsuleTruffleString(PyCapsule o, TruffleString name) {
296296
if (o.getPointer() == null) {
@@ -317,7 +317,7 @@ Object doError(@SuppressWarnings("unused") Object o, @SuppressWarnings("unused")
317317
}
318318

319319
@CApiBuiltin(ret = Int, args = {PyObject, PY_CAPSULE_DESTRUCTOR}, call = Direct)
320-
public abstract static class PyCapsule_SetDestructor extends CApiBinaryBuiltinNode {
320+
abstract static class PyCapsule_SetDestructor extends CApiBinaryBuiltinNode {
321321
@Specialization
322322
int doCapsule(PyCapsule o, Object destructor) {
323323
if (o.getPointer() == null) {
@@ -334,7 +334,7 @@ Object doError(@SuppressWarnings("unused") Object o, @SuppressWarnings("unused")
334334
}
335335

336336
@CApiBuiltin(ret = Int, args = {PyObject, Pointer}, call = Direct)
337-
public abstract static class PyCapsule_SetContext extends CApiBinaryBuiltinNode {
337+
abstract static class PyCapsule_SetContext extends CApiBinaryBuiltinNode {
338338
@Specialization
339339
int doCapsule(PyCapsule o, Object context) {
340340
if (o.getPointer() == null) {
@@ -351,7 +351,7 @@ Object doError(@SuppressWarnings("unused") Object o, @SuppressWarnings("unused")
351351
}
352352

353353
@CApiBuiltin(ret = Pointer, args = {ConstCharPtrAsTruffleString, Int}, call = Direct)
354-
public abstract static class PyCapsule_Import extends CApiBinaryBuiltinNode {
354+
abstract static class PyCapsule_Import extends CApiBinaryBuiltinNode {
355355
@Specialization
356356
Object doGeneric(TruffleString name, int noBlock,
357357
@Cached NameMatchesNode nameMatchesNode,

graalpython/com.oracle.graal.python/src/com/oracle/graal/python/builtins/modules/cext/PythonCextClassBuiltins.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -54,9 +54,9 @@
5454
public final class PythonCextClassBuiltins {
5555

5656
@CApiBuiltin(ret = PyObjectTransfer, args = {PyObject}, call = Direct)
57-
public abstract static class PyInstanceMethod_New extends CApiUnaryBuiltinNode {
57+
abstract static class PyInstanceMethod_New extends CApiUnaryBuiltinNode {
5858
@Specialization
59-
public Object staticmethod(Object func) {
59+
Object staticmethod(Object func) {
6060
checkNonNullArg(func);
6161
PDecoratedMethod res = factory().createInstancemethod(PythonBuiltinClassType.PInstancemethod);
6262
res.setCallable(func);

0 commit comments

Comments
 (0)