Skip to content

Commit 25633cd

Browse files
committed
clean up after rebase
1 parent 661b2ac commit 25633cd

File tree

5 files changed

+14
-21
lines changed

5 files changed

+14
-21
lines changed

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

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2983,8 +2983,7 @@ Object call(VirtualFrame frame, LazyPythonClass cls, int argcount, int kwonlyarg
29832983
@CachedLibrary("codestring") PythonObjectLibrary codestringBufferLib,
29842984
@CachedLibrary("lnotab") PythonObjectLibrary lnotabBufferLib,
29852985
@Cached CodeNodes.CreateCodeNode createCodeNode,
2986-
@Cached GetObjectArrayNode getObjectArrayNode,
2987-
@CachedLibrary(limit = "1") HashingStorageLibrary lib) throws UnsupportedMessageException {
2986+
@Cached GetObjectArrayNode getObjectArrayNode) throws UnsupportedMessageException {
29882987
byte[] codeBytes = codestringBufferLib.getBufferBytes(codestring);
29892988
byte[] lnotabBytes = lnotabBufferLib.getBufferBytes(lnotab);
29902989

@@ -2999,7 +2998,7 @@ Object call(VirtualFrame frame, LazyPythonClass cls, int argcount, int kwonlyarg
29992998
codeBytes, constantsArr, namesArr,
30002999
varnamesArr, freevarsArr, cellcarsArr,
30013000
getStringArg(filename), getStringArg(name), firstlineno,
3002-
lnotabBytes, lib);
3001+
lnotabBytes);
30033002
}
30043003

30053004
@Specialization(guards = {"codestringBufferLib.isBuffer(codestring)", "lnotabBufferLib.isBuffer(lnotab)"}, limit = "2", rewriteOn = UnsupportedMessageException.class)

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

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -655,14 +655,13 @@ private PCode readCode(int depth, HashingStorageLibrary lib) {
655655

656656
return ensureCreateCodeNode().execute(null, PythonBuiltinClassType.PCode, argcount, kwonlyargcount,
657657
nlocals, stacksize, flags, codestring, constants, names,
658-
varnames, freevars, cellvars, filename, name, firstlineno, lnotab, lib);
658+
varnames, freevars, cellvars, filename, name, firstlineno, lnotab);
659659
}
660660

661-
private PDict readDict(int depth) {
661+
private PDict readDict(int depth, HashingStorageLibrary lib) {
662662
int len = readInt();
663663
HashingStorage store = PDict.createNewStorage(false, len);
664664
PDict dict = factory().createDict(store);
665-
HashingStorageLibrary lib = HashingStorageLibrary.getUncached();
666665
for (int i = 0; i < len; i++) {
667666
Object key = readObject(depth + 1, lib);
668667
if (key == null) {
@@ -780,7 +779,7 @@ private Object readObject(int depth, HashingStorageLibrary lib) {
780779
return factory().createTuple(items);
781780
}
782781
case TYPE_DICT:
783-
return readDict(depth);
782+
return readDict(depth, lib);
784783
case TYPE_LIST:
785784
return readList(depth, lib);
786785
case TYPE_SET:

graalpython/com.oracle.graal.python/src/com/oracle/graal/python/builtins/objects/code/CodeNodes.java

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -43,8 +43,6 @@
4343
import com.oracle.graal.python.PythonLanguage;
4444
import com.oracle.graal.python.builtins.PythonBuiltinClassType;
4545
import com.oracle.graal.python.builtins.objects.PNone;
46-
import com.oracle.graal.python.builtins.objects.cell.PCell;
47-
import com.oracle.graal.python.builtins.objects.common.HashingStorageLibrary;
4846
import com.oracle.graal.python.builtins.objects.dict.PDict;
4947
import com.oracle.graal.python.builtins.objects.function.PArguments;
5048
import com.oracle.graal.python.builtins.objects.function.PFunction;
@@ -98,13 +96,13 @@ public PCode execute(VirtualFrame frame, LazyPythonClass cls, int argcount, int
9896
byte[] codestring, Object[] constants, Object[] names,
9997
Object[] varnames, Object[] freevars, Object[] cellvars,
10098
String filename, String name, int firstlineno,
101-
byte[] lnotab, HashingStorageLibrary lib) {
99+
byte[] lnotab) {
102100

103101
PythonContext context = getContextRef().get();
104102
Object state = IndirectCallContext.enter(frame, context, this);
105103
try {
106104
return createCode(cls, argcount, kwonlyargcount, nlocals, stacksize, flags, codestring,
107-
constants, names, varnames, freevars, cellvars, filename, name, firstlineno, lnotab, lib);
105+
constants, names, varnames, freevars, cellvars, filename, name, firstlineno, lnotab);
108106
} finally {
109107
IndirectCallContext.exit(frame, context, state);
110108
}

graalpython/com.oracle.graal.python/src/com/oracle/graal/python/builtins/objects/frame/FrameBuiltins.java

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,6 @@
3333
import com.oracle.graal.python.builtins.PythonBuiltins;
3434
import com.oracle.graal.python.builtins.objects.PNone;
3535
import com.oracle.graal.python.builtins.objects.code.CodeNodes;
36-
import com.oracle.graal.python.builtins.objects.common.HashingStorageLibrary;
3736
import com.oracle.graal.python.builtins.objects.frame.PFrame.Reference;
3837
import com.oracle.graal.python.builtins.objects.function.PArguments;
3938
import com.oracle.graal.python.builtins.objects.module.PythonModule;
@@ -54,7 +53,6 @@
5453
import com.oracle.truffle.api.dsl.NodeFactory;
5554
import com.oracle.truffle.api.dsl.Specialization;
5655
import com.oracle.truffle.api.frame.VirtualFrame;
57-
import com.oracle.truffle.api.library.CachedLibrary;
5856
import com.oracle.truffle.api.profiles.BranchProfile;
5957
import com.oracle.truffle.api.profiles.ConditionProfile;
6058

@@ -135,16 +133,15 @@ Object get(@SuppressWarnings("unused") PFrame self) {
135133
public abstract static class GetCodeNode extends PythonBuiltinNode {
136134
@Specialization
137135
Object get(VirtualFrame frame, PFrame self,
138-
@Cached("create()") CodeNodes.CreateCodeNode createCodeNode,
139-
@CachedLibrary(limit = "1") HashingStorageLibrary lib) {
136+
@Cached("create()") CodeNodes.CreateCodeNode createCodeNode) {
140137
RootCallTarget ct = self.getTarget();
141138
if (ct != null) {
142139
return factory().createCode(ct);
143140
}
144141
// TODO: frames: this just shouldn't happen anymore
145142
assert false : "should not be reached";
146143
return createCodeNode.execute(frame, PythonBuiltinClassType.PCode, -1, -1, -1, -1, -1, new byte[0], new Object[0], new Object[0], new Object[0], new Object[0], new Object[0], "<internal>",
147-
"<internal>", -1, new byte[0], lib);
144+
"<internal>", -1, new byte[0]);
148145
}
149146
}
150147

graalpython/com.oracle.graal.python/src/com/oracle/graal/python/builtins/objects/set/FrozenSetBuiltins.java

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -251,14 +251,14 @@ PBaseSet doPBaseSet(VirtualFrame frame, PFrozenSet left, String right,
251251
}
252252

253253
@Specialization(limit = "1")
254-
PBaseSet doPBaseSet(VirtualFrame frame, PSet left, PBaseSet right,
254+
PBaseSet doPBaseSet(@SuppressWarnings("unused") VirtualFrame frame, PSet left, PBaseSet right,
255255
@CachedLibrary("left.getDictStorage()") HashingStorageLibrary leftLib) {
256256
HashingStorage intersectedStorage = union(leftLib, left.getDictStorage(), right.getDictStorage());
257257
return factory().createSet(intersectedStorage);
258258
}
259259

260260
@Specialization(limit = "1")
261-
PBaseSet doPBaseSet(VirtualFrame frame, PFrozenSet left, PBaseSet right,
261+
PBaseSet doPBaseSet(@SuppressWarnings("unused") VirtualFrame frame, PFrozenSet left, PBaseSet right,
262262
@CachedLibrary("left.getDictStorage()") HashingStorageLibrary leftLib) {
263263
HashingStorage intersectedStorage = union(leftLib, left.getDictStorage(), right.getDictStorage());
264264
return factory().createFrozenSet(intersectedStorage);
@@ -293,14 +293,14 @@ Object doOr(Object self, Object other) {
293293
abstract static class SubNode extends PythonBinaryBuiltinNode {
294294

295295
@Specialization(limit = "1")
296-
PBaseSet doPBaseSet(VirtualFrame frame, PSet left, PBaseSet right,
296+
PBaseSet doPBaseSet(@SuppressWarnings("unused") VirtualFrame frame, PSet left, PBaseSet right,
297297
@CachedLibrary("left.getDictStorage()") HashingStorageLibrary lib) {
298298
HashingStorage storage = lib.diff(left.getDictStorage(), right.getDictStorage());
299299
return factory().createSet(storage);
300300
}
301301

302302
@Specialization(limit = "1")
303-
PBaseSet doPBaseSet(VirtualFrame frame, PFrozenSet left, PBaseSet right,
303+
PBaseSet doPBaseSet(@SuppressWarnings("unused") VirtualFrame frame, PFrozenSet left, PBaseSet right,
304304
@CachedLibrary("left.getDictStorage()") HashingStorageLibrary lib) {
305305
HashingStorage storage = lib.diff(left.getDictStorage(), right.getDictStorage());
306306
return factory().createSet(storage);
@@ -384,7 +384,7 @@ abstract static class BinaryUnionNode extends PNodeWithContext {
384384
public abstract HashingStorage execute(VirtualFrame frame, HashingStorage left, Object right);
385385

386386
@Specialization(limit = "1")
387-
HashingStorage doHashingCollection(VirtualFrame frame, EconomicMapStorage selfStorage, PHashingCollection other,
387+
HashingStorage doHashingCollection(@SuppressWarnings("unused") VirtualFrame frame, EconomicMapStorage selfStorage, PHashingCollection other,
388388
@CachedLibrary("selfStorage") HashingStorageLibrary lib) {
389389
return lib.union(selfStorage, other.getDictStorage());
390390
}

0 commit comments

Comments
 (0)