Skip to content

Commit 3231cdc

Browse files
committed
Use $node instead of this to address Truffle warnings
1 parent a4a7d58 commit 3231cdc

File tree

65 files changed

+118
-118
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

65 files changed

+118
-118
lines changed

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

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -111,7 +111,7 @@ abstract static class AsciiBufferConverter extends ArgumentCastNode {
111111
static Object doObject(VirtualFrame frame, Object value,
112112
@Bind Node inliningTarget,
113113
@Bind PythonContext context,
114-
@Cached("createFor(this)") IndirectCallData indirectCallData,
114+
@Cached("createFor($node)") IndirectCallData indirectCallData,
115115
@CachedLibrary("value") PythonBufferAcquireLibrary acquireLib) {
116116
return acquireLib.acquireReadonly(value, frame, context, context.getLanguage(inliningTarget), indirectCallData);
117117
}
@@ -193,7 +193,7 @@ public static AsciiBufferConverter create() {
193193
abstract static class A2bBase64Node extends PythonBinaryClinicBuiltinNode {
194194
@Specialization(limit = "3")
195195
PBytes doConvert(VirtualFrame frame, Object buffer, boolean strictMode,
196-
@Cached("createFor(this)") IndirectCallData indirectCallData,
196+
@Cached("createFor($node)") IndirectCallData indirectCallData,
197197
@CachedLibrary("buffer") PythonBufferAccessLibrary bufferLib,
198198
@Bind PythonLanguage language) {
199199
try {
@@ -278,7 +278,7 @@ protected ArgumentClinicProvider getArgumentClinic() {
278278
abstract static class A2bHexNode extends PythonUnaryClinicBuiltinNode {
279279
@Specialization(limit = "3")
280280
PBytes a2b(VirtualFrame frame, Object buffer,
281-
@Cached("createFor(this)") IndirectCallData indirectCallData,
281+
@Cached("createFor($node)") IndirectCallData indirectCallData,
282282
@CachedLibrary("buffer") PythonBufferAccessLibrary bufferLib,
283283
@Bind PythonLanguage language) {
284284
try {
@@ -342,7 +342,7 @@ private PBytes b2a(byte[] data, int lenght, boolean newline, PythonLanguage lang
342342

343343
@Specialization(limit = "3")
344344
PBytes b2aBuffer(VirtualFrame frame, Object buffer, boolean newline,
345-
@Cached("createFor(this)") IndirectCallData indirectCallData,
345+
@Cached("createFor($node)") IndirectCallData indirectCallData,
346346
@CachedLibrary("buffer") PythonBufferAccessLibrary bufferLib,
347347
@Bind PythonLanguage language) {
348348
try {
@@ -369,7 +369,7 @@ abstract static class B2aHexNode extends PythonTernaryClinicBuiltinNode {
369369
@Specialization(limit = "3")
370370
static PBytes b2a(VirtualFrame frame, Object buffer, Object sep, int bytesPerSep,
371371
@Bind Node inliningTarget,
372-
@Cached("createFor(this)") IndirectCallData indirectCallData,
372+
@Cached("createFor($node)") IndirectCallData indirectCallData,
373373
@CachedLibrary("buffer") PythonBufferAccessLibrary bufferLib,
374374
@Bind PythonLanguage language,
375375
@Cached PRaiseNode raiseNode) {
@@ -409,7 +409,7 @@ abstract static class Crc32Node extends PythonBinaryClinicBuiltinNode {
409409

410410
@Specialization(limit = "3")
411411
static long b2a(VirtualFrame frame, Object buffer, long crc,
412-
@Cached("createFor(this)") IndirectCallData indirectCallData,
412+
@Cached("createFor($node)") IndirectCallData indirectCallData,
413413
@CachedLibrary("buffer") PythonBufferAccessLibrary bufferLib) {
414414
try {
415415
return crc32((int) crc, bufferLib.getInternalOrCopiedByteArray(buffer), 0, bufferLib.getBufferLength(buffer));
@@ -432,7 +432,7 @@ abstract static class CrcHqxNode extends PythonBinaryClinicBuiltinNode {
432432

433433
@Specialization(limit = "3")
434434
static long b2a(VirtualFrame frame, Object buffer, long crc,
435-
@Cached("createFor(this)") IndirectCallData indirectCallData,
435+
@Cached("createFor($node)") IndirectCallData indirectCallData,
436436
@CachedLibrary("buffer") PythonBufferAccessLibrary bufferLib) {
437437
try {
438438
return crcHqx((int) crc, bufferLib.getInternalOrCopiedByteArray(buffer), 0, bufferLib.getBufferLength(buffer));

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

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1059,7 +1059,7 @@ Object generic(VirtualFrame frame, Object wSource, Object wFilename, TruffleStri
10591059
@CachedLibrary(limit = "3") PythonBufferAccessLibrary bufferLib,
10601060
@Bind PythonContext context,
10611061
@Bind Node inliningTarget,
1062-
@Cached("createFor(this)") IndirectCallData indirectCallData,
1062+
@Cached("createFor($node)") IndirectCallData indirectCallData,
10631063
@Cached CodecsModuleBuiltins.HandleDecodingErrorNode handleDecodingErrorNode,
10641064
@Cached PyObjectStrAsTruffleStringNode asStrNode,
10651065
@CachedLibrary("wSource") InteropLibrary interopLib,
@@ -1332,7 +1332,7 @@ static boolean doRecursiveWithNode(VirtualFrame frame, Object instance, PTuple c
13321332
@Specialization(guards = {"depth != NON_RECURSIVE", "depth >= getNodeRecursionLimit()"})
13331333
static boolean doRecursiveWithLoop(VirtualFrame frame, Object instance, PTuple clsTuple,
13341334
@Bind Node inliningTarget,
1335-
@Cached("createFor(this)") IndirectCallData indirectCallData,
1335+
@Cached("createFor($node)") IndirectCallData indirectCallData,
13361336
@Shared @Cached GetObjectArrayNode getObjectArrayNode,
13371337
@Cached("createNonRecursive()") RecursiveBinaryCheckBaseNode node) {
13381338
PythonContext context = PythonContext.get(inliningTarget);
@@ -2430,7 +2430,7 @@ private static Object buildJavaClass(VirtualFrame frame, Node inliningTarget, Py
24302430
protected Object doItNonFunction(VirtualFrame frame, Object function, Object[] arguments, PKeyword[] keywords,
24312431
@Bind Node inliningTarget,
24322432
@Cached CastToTruffleStringNode castToTruffleStringNode,
2433-
@Cached("createFor(this)") IndirectCallData indirectCallData,
2433+
@Cached("createFor($node)") IndirectCallData indirectCallData,
24342434
@Cached CalculateMetaclassNode calculateMetaClass,
24352435
@Cached("create(T___PREPARE__)") GetAttributeNode getPrepare,
24362436
@Cached PyMappingCheckNode pyMappingCheckNode,

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

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -683,7 +683,7 @@ protected ArgumentClinicProvider getArgumentClinic() {
683683
static Object decode(VirtualFrame frame, Object input, TruffleString encoding, TruffleString errors, boolean finalData,
684684
@Bind Node inliningTarget,
685685
@Bind PythonLanguage language,
686-
@Cached("createFor(this)") IndirectCallData indirectCallData,
686+
@Cached("createFor($node)") IndirectCallData indirectCallData,
687687
@CachedLibrary("input") PythonBufferAcquireLibrary acquireLib,
688688
@CachedLibrary(limit = "1") PythonBufferAccessLibrary bufferLib,
689689
@Cached TruffleString.EqualNode equalNode,
@@ -739,7 +739,7 @@ Object decodeByteArray(byte[] bytes, TruffleString errors,
739739
@Specialization(limit = "3")
740740
Object decode(VirtualFrame frame, Object buffer, TruffleString errors,
741741
@Bind PythonLanguage language,
742-
@Cached("createFor(this)") IndirectCallData indirectCallData,
742+
@Cached("createFor($node)") IndirectCallData indirectCallData,
743743
@CachedLibrary("buffer") PythonBufferAccessLibrary bufferLib) {
744744
try {
745745
int len = bufferLib.getBufferLength(buffer);
@@ -1532,7 +1532,7 @@ protected ArgumentClinicProvider getArgumentClinic() {
15321532
Object doIt(VirtualFrame frame, Object data, TruffleString errors, Object mapping,
15331533
@Bind Node inliningTarget,
15341534
@Bind PythonContext context,
1535-
@Cached("createFor(this)") IndirectCallData indirectCallData,
1535+
@Cached("createFor($node)") IndirectCallData indirectCallData,
15361536
@CachedLibrary("data") PythonBufferAcquireLibrary bufferAcquireLib,
15371537
@CachedLibrary(limit = "3") PythonBufferAccessLibrary bufferLib,
15381538
@Cached PyUnicodeDecodeCharmapNode pyUnicodeDecodeCharmapNode) {

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -134,7 +134,7 @@ abstract static class DumpTracebackNode extends PythonClinicBuiltinNode {
134134
PNone doit(VirtualFrame frame, Object fileObj, boolean allThreads,
135135
@Bind Node inliningTarget,
136136
@Cached GetFilenoNode getFilenoNode,
137-
@Cached("createFor(this)") IndirectCallData indirectCallData) {
137+
@Cached("createFor($node)") IndirectCallData indirectCallData) {
138138
int fileno = getFilenoNode.execute(frame, inliningTarget, fileObj);
139139
PythonContext context = getContext();
140140
PythonLanguage language = context.getLanguage(this);

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -203,7 +203,7 @@ Object ioctl(VirtualFrame frame, int fd, long request, Object arg, boolean mutat
203203
@CachedLibrary("context.getPosixSupport()") PosixSupportLibrary posixLib,
204204
@CachedLibrary(limit = "3") PythonBufferAcquireLibrary acquireLib,
205205
@CachedLibrary(limit = "3") PythonBufferAccessLibrary bufferLib,
206-
@Cached("createFor(this)") IndirectCallData indirectCallData,
206+
@Cached("createFor($node)") IndirectCallData indirectCallData,
207207
@Cached PyLongAsIntNode asIntNode,
208208
@Cached CastToTruffleStringNode castToString,
209209
@Cached TruffleString.SwitchEncodingNode switchEncodingNode,

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

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -286,7 +286,7 @@ public abstract static class CreateDynamic extends PythonBinaryBuiltinNode {
286286
Object run(VirtualFrame frame, PythonObject moduleSpec, @SuppressWarnings("unused") Object filename,
287287
@Bind Node inliningTarget,
288288
@Bind PythonContext context,
289-
@Cached("createFor(this)") IndirectCallData indirectCallData,
289+
@Cached("createFor($node)") IndirectCallData indirectCallData,
290290
@Cached ReadAttributeFromPythonObjectNode readNameNode,
291291
@Cached ReadAttributeFromPythonObjectNode readOriginNode,
292292
@Cached CastToTruffleStringNode castToTruffleStringNode,
@@ -344,7 +344,7 @@ public abstract static class ExecDynamicNode extends PythonBuiltinNode {
344344
@Specialization
345345
static int doPythonModule(VirtualFrame frame, PythonModule extensionModule,
346346
@Bind Node inliningTarget,
347-
@Cached("createFor(this)") IndirectCallData indirectCallData,
347+
@Cached("createFor($node)") IndirectCallData indirectCallData,
348348
@CachedLibrary(limit = "1") InteropLibrary lib,
349349
@Cached ExecModuleNode execModuleNode,
350350
@Cached PRaiseNode raiseNode) {
@@ -537,7 +537,7 @@ protected ArgumentClinicProvider getArgumentClinic() {
537537
static Object run(VirtualFrame frame, TruffleString name, Object dataObj,
538538
@Bind Node inliningTarget,
539539
@Bind PythonContext context,
540-
@Cached("createFor(this)") IndirectCallData indirectCallData,
540+
@Cached("createFor($node)") IndirectCallData indirectCallData,
541541
@CachedLibrary(limit = "1") PythonBufferAccessLibrary bufferLib,
542542
@Cached TruffleString.EqualNode equalNode,
543543
@Cached InlinedConditionProfile isCodeObjectProfile,

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -310,7 +310,7 @@ static Object doBytesByteStorage(PBytesLike object) {
310310

311311
@Specialization(guards = "!isBytes(object)", limit = "3")
312312
static Object doBuffer(VirtualFrame frame, Object object,
313-
@Cached("createFor(this)") IndirectCallData indirectCallData,
313+
@Cached("createFor($node)") IndirectCallData indirectCallData,
314314
@CachedLibrary("object") PythonBufferAcquireLibrary acquireLib,
315315
@CachedLibrary(limit = "1") PythonBufferAccessLibrary bufferLib) {
316316
Object buffer = acquireLib.acquireReadonly(object, frame, indirectCallData);

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

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -174,7 +174,7 @@ protected ArgumentClinicProvider getArgumentClinic() {
174174
static Object doit(VirtualFrame frame, Object value, Object file, int version,
175175
@Bind Node inliningTarget,
176176
@Bind PythonContext context,
177-
@Cached("createFor(this)") IndirectCallData indirectCallData,
177+
@Cached("createFor($node)") IndirectCallData indirectCallData,
178178
@Cached PyObjectCallMethodObjArgs callMethod,
179179
@Cached PRaiseNode raiseNode) {
180180
PythonLanguage language = context.getLanguage(inliningTarget);
@@ -207,7 +207,7 @@ protected ArgumentClinicProvider getArgumentClinic() {
207207
static Object doit(VirtualFrame frame, Object value, int version,
208208
@Bind Node inliningTarget,
209209
@Bind PythonContext context,
210-
@Cached("createFor(this)") IndirectCallData indirectCallData,
210+
@Cached("createFor($node)") IndirectCallData indirectCallData,
211211
@Cached PRaiseNode raiseNode) {
212212
PythonLanguage language = context.getLanguage(inliningTarget);
213213
PythonContext.PythonThreadState threadState = context.getThreadState(language);
@@ -262,7 +262,7 @@ abstract static class LoadsNode extends PythonUnaryClinicBuiltinNode {
262262
static Object doit(VirtualFrame frame, Object buffer,
263263
@Bind Node inliningTarget,
264264
@Bind PythonContext context,
265-
@Cached("createFor(this)") IndirectCallData indirectCallData,
265+
@Cached("createFor($node)") IndirectCallData indirectCallData,
266266
@CachedLibrary(limit = "3") PythonBufferAccessLibrary bufferLib,
267267
@Cached PRaiseNode raiseNode) {
268268
try {

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -146,7 +146,7 @@ abstract static class CompareDigestNode extends PythonBinaryBuiltinNode {
146146
@Specialization
147147
static boolean compare(VirtualFrame frame, Object left, Object right,
148148
@Bind Node inliningTarget,
149-
@Cached("createFor(this)") IndirectCallData indirectCallData,
149+
@Cached("createFor($node)") IndirectCallData indirectCallData,
150150
@Cached CastToJavaStringNode cast,
151151
@CachedLibrary(limit = "3") PythonBufferAcquireLibrary bufferAcquireLib,
152152
@CachedLibrary(limit = "3") PythonBufferAccessLibrary bufferLib,

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -955,7 +955,7 @@ protected ArgumentClinicProvider getArgumentClinic() {
955955
@Specialization(limit = "3")
956956
static long doWrite(VirtualFrame frame, int fd, Object dataBuffer,
957957
@Bind Node inliningTarget,
958-
@Cached("createFor(this)") IndirectCallData indirectCallData,
958+
@Cached("createFor($node)") IndirectCallData indirectCallData,
959959
@CachedLibrary("dataBuffer") PythonBufferAccessLibrary bufferLib,
960960
@Bind PythonContext context,
961961
@CachedLibrary("context.getPosixSupport()") PosixSupportLibrary posixLib,

0 commit comments

Comments
 (0)