Skip to content

Commit 788863f

Browse files
committed
Make the code compile with javac
1 parent 268c17b commit 788863f

File tree

5 files changed

+145
-148
lines changed

5 files changed

+145
-148
lines changed

graalpython/com.oracle.graal.python/src/com/oracle/graal/python/builtins/modules/BuiltinConstructors.java

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2196,7 +2196,7 @@ Object typeNew(VirtualFrame frame, Object cls, Object wName, PTuple bases, PDict
21962196
PDict namespace = factory().createDict();
21972197
PythonLanguage language = PythonLanguage.get(this);
21982198
namespace.setDictStorage(initNode.execute(frame, namespaceOrig, PKeyword.EMPTY_KEYWORDS));
2199-
PythonClass newType = typeMetaclass(frame, language, name, bases, namespace, metaclass, lib, hashingStoragelib,
2199+
PythonClass newType = typeMetaclass(frame, language, name, bases, namespace, metaclass, hashingStoragelib,
22002200
getDictAttrNode, getWeakRefAttrNode, getBestBaseNode, getItemSize, writeItemSize, isIdentifier);
22012201

22022202
for (DictEntry entry : hashingStoragelib.entries(namespace.getDictStorage())) {
@@ -2300,7 +2300,7 @@ private String getModuleNameFromGlobals(PythonObject globals, HashingStorageLibr
23002300
}
23012301

23022302
private PythonClass typeMetaclass(VirtualFrame frame, PythonLanguage language, String name, PTuple bases, PDict namespace, Object metaclass,
2303-
PythonObjectLibrary lib, HashingStorageLibrary hashingStorageLib, LookupAttributeInMRONode getDictAttrNode,
2303+
HashingStorageLibrary hashingStorageLib, LookupAttributeInMRONode getDictAttrNode,
23042304
LookupAttributeInMRONode getWeakRefAttrNode, GetBestBaseClassNode getBestBaseNode, GetItemsizeNode getItemSize, WriteAttributeToObjectNode writeItemSize,
23052305
IsIdentifierNode isIdentifier) {
23062306
Object[] array = ensureGetObjectArrayNode().execute(bases);
@@ -2342,7 +2342,7 @@ private PythonClass typeMetaclass(VirtualFrame frame, PythonLanguage language, S
23422342
// 2.) copy the dictionary slots
23432343
Object[] slots = new Object[1];
23442344
boolean[] qualnameSet = new boolean[]{false};
2345-
copyDictSlots(pythonClass, namespace, lib, hashingStorageLib, slots, qualnameSet);
2345+
copyDictSlots(pythonClass, namespace, hashingStorageLib, slots, qualnameSet);
23462346
if (!qualnameSet[0]) {
23472347
pythonClass.setQualName(name);
23482348
}
@@ -2521,7 +2521,7 @@ private static boolean hasPythonClassBases(PythonAbstractClass[] basesArray) {
25212521
return false;
25222522
}
25232523

2524-
private void copyDictSlots(PythonClass pythonClass, PDict namespace, PythonObjectLibrary lib, HashingStorageLibrary hashingStorageLib, Object[] slots, boolean[] qualnameSet) {
2524+
private void copyDictSlots(PythonClass pythonClass, PDict namespace, HashingStorageLibrary hashingStorageLib, Object[] slots, boolean[] qualnameSet) {
25252525
// copy the dictionary slots over, as CPython does through PyDict_Copy
25262526
// Also check for a __slots__ sequence variable in dict
25272527
PDict typeDict = null;

graalpython/com.oracle.graal.python/src/com/oracle/graal/python/builtins/modules/ctypes/StructUnionTypeBuiltins.java

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,6 @@
8080
import com.oracle.graal.python.builtins.objects.dict.PDict;
8181
import com.oracle.graal.python.builtins.objects.function.PKeyword;
8282
import com.oracle.graal.python.builtins.objects.object.PythonObject;
83-
import com.oracle.graal.python.builtins.objects.object.PythonObjectLibrary;
8483
import com.oracle.graal.python.builtins.objects.str.PString;
8584
import com.oracle.graal.python.builtins.objects.tuple.PTuple;
8685
import com.oracle.graal.python.builtins.objects.type.TypeNodes.GetBaseClassNode;
@@ -137,7 +136,6 @@ protected boolean isStruct() {
137136

138137
@Specialization
139138
protected Object StructUnionTypeNew(VirtualFrame frame, Object type, Object[] args, PKeyword[] kwds,
140-
@CachedLibrary(limit = "1") PythonObjectLibrary lib,
141139
@CachedLibrary(limit = "1") HashingStorageLibrary hlib,
142140
@Cached TypeNode typeNew,
143141
@Cached PyTypeStgDictNode pyTypeStgDictNode,

graalpython/com.oracle.graal.python/src/com/oracle/graal/python/builtins/objects/function/AbstractFunctionBuiltins.java

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -153,8 +153,7 @@ public abstract static class GetGlobalsNode extends PythonBuiltinNode {
153153
@Specialization(guards = "!isBuiltinFunction(self)")
154154
Object getGlobals(PFunction self,
155155
@Cached GetOrCreateDictNode getDict,
156-
@Cached ConditionProfile moduleGlobals,
157-
@Cached ConditionProfile moduleHasNoDict) {
156+
@Cached ConditionProfile moduleGlobals) {
158157
// see the make_globals_function from lib-graalpython/functions.py
159158
PythonObject globals = self.getGlobals();
160159
if (moduleGlobals.profile(globals instanceof PythonModule)) {

graalpython/com.oracle.graal.python/src/com/oracle/graal/python/builtins/objects/module/ModuleBuiltins.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -291,7 +291,7 @@ Object getattribute(VirtualFrame frame, PythonModule self, Object keyObj,
291291
return getattributeString(frame, self, key, objectGetattrNode, handleException);
292292
}
293293

294-
protected static abstract class HandleGetattrExceptionNode extends PNodeWithRaise {
294+
protected abstract static class HandleGetattrExceptionNode extends PNodeWithRaise {
295295
public abstract Object execute(VirtualFrame frame, PythonModule self, String key, PException e);
296296

297297
@Specialization

0 commit comments

Comments
 (0)