Skip to content

Commit 47a1000

Browse files
committed
fix a few warnings and errors on eclipse
1 parent 5b7a097 commit 47a1000

File tree

5 files changed

+11
-12
lines changed

5 files changed

+11
-12
lines changed

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

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -152,7 +152,6 @@
152152
import com.oracle.graal.python.builtins.PythonOS;
153153
import com.oracle.graal.python.builtins.modules.SysModuleBuiltinsClinicProviders.GetFrameNodeClinicProviderGen;
154154
import com.oracle.graal.python.builtins.modules.SysModuleBuiltinsClinicProviders.SetDlopenFlagsClinicProviderGen;
155-
import com.oracle.graal.python.builtins.modules.SysModuleBuiltinsFactory.ExcInfoNodeFactory;
156155
import com.oracle.graal.python.builtins.modules.io.BufferedReaderBuiltins;
157156
import com.oracle.graal.python.builtins.modules.io.BufferedWriterBuiltins;
158157
import com.oracle.graal.python.builtins.modules.io.FileIOBuiltins;
@@ -856,12 +855,6 @@ static PTuple run(VirtualFrame frame,
856855
return factory.createTuple(new Object[]{getClassNode.execute(inliningTarget, exceptionObject), exceptionObject, traceback});
857856
}
858857
}
859-
860-
@NeverDefault
861-
public static ExcInfoNode create() {
862-
return ExcInfoNodeFactory.create(null);
863-
}
864-
865858
}
866859

867860
// ATTENTION: this is intentionally a PythonBuiltinNode and not PythonUnaryBuiltinNode,

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

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -73,6 +73,7 @@
7373
import com.oracle.graal.python.builtins.modules.PosixModuleBuiltins.ExitNode;
7474
import com.oracle.graal.python.builtins.modules.SysModuleBuiltins;
7575
import com.oracle.graal.python.builtins.modules.SysModuleBuiltins.ExcInfoNode;
76+
import com.oracle.graal.python.builtins.modules.SysModuleBuiltinsFactory.ExcInfoNodeFactory;
7677
import com.oracle.graal.python.builtins.modules.cext.PythonCextBuiltins.CApiBinaryBuiltinNode;
7778
import com.oracle.graal.python.builtins.modules.cext.PythonCextBuiltins.CApiBuiltin;
7879
import com.oracle.graal.python.builtins.modules.cext.PythonCextBuiltins.CApiNullaryBuiltinNode;
@@ -444,11 +445,15 @@ static Object write(Object msg, Object obj,
444445

445446
@CApiBuiltin(ret = Void, args = {Int}, call = Direct)
446447
abstract static class PyErr_PrintEx extends CApiUnaryBuiltinNode {
448+
static ExcInfoNode createExcInfoNode() {
449+
return ExcInfoNodeFactory.create(null);
450+
}
451+
447452
@TruffleBoundary
448453
@Specialization
449454
static Object raise(int set_sys_last_vars,
450455
@Cached IsInstanceNode isInstanceNode,
451-
@Cached ExcInfoNode excInfoNode,
456+
@Cached(neverDefault = true, value = "createExcInfoNode()") ExcInfoNode excInfoNode,
452457
@Cached PyErr_Restore restoreNode,
453458
@Cached PyFile_WriteObject writeFileNode,
454459
@Cached ExitNode exitNode,

graalpython/com.oracle.graal.python/src/com/oracle/graal/python/builtins/objects/cext/capi/PythonNativeWrapper.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -119,11 +119,11 @@ public final boolean isNative() {
119119
* transition code will consider that and eagerly return the pointer object. If {@code true} is
120120
* returned, the wrapper must also implement {@link #getReplacement(InteropLibrary)} which
121121
* returns the pointer object. Furthermore, wrappers must use
122-
* {@link #registerReplacement(Object, InteropLibrary)} to register the allocated native memory
123-
* in order that the native pointer can be resolved to the managed wrapper in the
122+
* {@link #registerReplacement(Object, boolean, InteropLibrary)} to register the allocated
123+
* native memory in order that the native pointer can be resolved to the managed wrapper in the
124124
* <it>native-to-Python</it> transition.
125125
* </p>
126-
*
126+
*
127127
* @return {@code true} if the wrapper should be materialized eagerly, {@code false} otherwise.
128128
*/
129129
public final boolean isReplacingWrapper() {

graalpython/com.oracle.graal.python/src/com/oracle/graal/python/nodes/argument/CreateArgumentsNode.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -235,7 +235,7 @@ public abstract static class CreateAndCheckArgumentsNode extends PNodeWithContex
235235
*
236236
* @param inliningTarget The inlining target.
237237
* @param callableOrName This object can either be the function/method object or just a name
238-
* ({@link TruffleString)}. It is primarily used to create error messages. It is
238+
* ({@link TruffleString}). It is primarily used to create error messages. It is
239239
* also used to check if the function
240240
* @param userArguments The positional arguments as provided by the caller (must not be
241241
* {@code null} but may be empty).
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1 +1,2 @@
11
org.eclipse.jdt.core.compiler.problem.unusedParameter=ignore
2+
org.eclipse.jdt.core.compiler.problem.missingOverrideAnnotation=warning

0 commit comments

Comments
 (0)