Skip to content

Commit a7e6195

Browse files
committed
fix deprecations
1 parent 8dbd7e5 commit a7e6195

File tree

4 files changed

+10
-15
lines changed

4 files changed

+10
-15
lines changed

graalpython/com.oracle.graal.python.shell/src/com/oracle/graal/python/shell/GraalPythonMain.java

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -554,12 +554,6 @@ protected void printHelp(OptionCategory maxCategory) {
554554
"GRAAL_PYTHON_OPTIONS: This environment variable can include default options that\n" +
555555
" are always passed to the launcher. These are not shell expanded and given to\n" +
556556
" the launcher as-is.");
557-
if (maxCategory.compareTo(OptionCategory.DEBUG) >= 0) {
558-
print("\nGraalPython performance debugging options:\n" +
559-
"-debug-perf : Enable tracing of Truffle compilations and its warnings\n" +
560-
"-dump : Enable dumping of compilation graphs to IGV\n" +
561-
"-compile-truffle-immediately : Start compiling on first invocation and throw compilation exceptions");
562-
}
563557
}
564558

565559
@Override

graalpython/com.oracle.graal.python/src/com/oracle/graal/python/builtins/objects/exception/PBaseException.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,6 @@
4040
*/
4141
package com.oracle.graal.python.builtins.objects.exception;
4242

43-
import java.util.ArrayList;
4443
import java.util.Iterator;
4544
import java.util.List;
4645

@@ -61,6 +60,7 @@
6160
import com.oracle.graal.python.runtime.sequence.storage.SequenceStorage;
6261
import com.oracle.truffle.api.CompilerAsserts;
6362
import com.oracle.truffle.api.CompilerDirectives.TruffleBoundary;
63+
import com.oracle.truffle.api.TruffleStackTrace;
6464
import com.oracle.truffle.api.TruffleStackTraceElement;
6565
import com.oracle.truffle.api.frame.Frame;
6666
import com.oracle.truffle.api.nodes.RootNode;
@@ -191,8 +191,8 @@ public List<TruffleStackTraceElement> getStackTrace() {
191191
@TruffleBoundary
192192
public void reifyException() {
193193
if (stackTrace == null && traceback == null) {
194-
TruffleStackTraceElement.fillIn(exception);
195-
stackTrace = new ArrayList<>(TruffleStackTraceElement.getStackTrace(exception));
194+
TruffleStackTrace.fillIn(exception);
195+
stackTrace = TruffleStackTrace.getStacktrace(exception);
196196
Iterator<TruffleStackTraceElement> iter = stackTrace.iterator();
197197
while (iter.hasNext()) {
198198
TruffleStackTraceElement element = iter.next();

graalpython/com.oracle.graal.python/src/com/oracle/graal/python/runtime/PythonOptions.java

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -84,16 +84,16 @@ private PythonOptions() {
8484
@Option(category = OptionCategory.USER, help = "Equivalent to the Python -v flag. Turn on verbose mode.") //
8585
public static final OptionKey<Boolean> VerboseFlag = new OptionKey<>(false);
8686

87-
@Option(category = OptionCategory.DEBUG, help = "Expose internal sources as normal sources, so they will show up in the debugger and stacks") //
87+
@Option(category = OptionCategory.INTERNAL, help = "Expose internal sources as normal sources, so they will show up in the debugger and stacks") //
8888
public static final OptionKey<Boolean> ExposeInternalSources = new OptionKey<>(false);
8989

90-
@Option(category = OptionCategory.DEBUG, help = "Print the java stacktrace if enabled") //
90+
@Option(category = OptionCategory.INTERNAL, help = "Print the java stacktrace if enabled") //
9191
public static final OptionKey<Boolean> WithJavaStacktrace = new OptionKey<>(false);
9292

93-
@Option(category = OptionCategory.DEBUG, help = "") //
93+
@Option(category = OptionCategory.INTERNAL, help = "") //
9494
public static final OptionKey<Boolean> CatchGraalPythonExceptionForUnitTesting = new OptionKey<>(false);
9595

96-
@Option(category = OptionCategory.DEBUG, help = "Enable catching all Exceptions in generic try-catch statements.") //
96+
@Option(category = OptionCategory.INTERNAL, help = "Enable catching all Exceptions in generic try-catch statements.") //
9797
public static final OptionKey<Boolean> CatchAllExceptions = new OptionKey<>(false);
9898

9999
@Option(category = OptionCategory.EXPERT, help = "") //

graalpython/com.oracle.graal.python/src/com/oracle/graal/python/runtime/exception/ExceptionUtils.java

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -44,8 +44,9 @@
4444
import java.util.List;
4545
import java.util.ListIterator;
4646

47-
import com.oracle.truffle.api.TruffleStackTraceElement;
4847
import com.oracle.truffle.api.CompilerDirectives.TruffleBoundary;
48+
import com.oracle.truffle.api.TruffleStackTrace;
49+
import com.oracle.truffle.api.TruffleStackTraceElement;
4950
import com.oracle.truffle.api.nodes.Node;
5051
import com.oracle.truffle.api.source.SourceSection;
5152

@@ -55,7 +56,7 @@ private ExceptionUtils() {
5556

5657
@TruffleBoundary
5758
public static void printPythonLikeStackTrace(PException e) {
58-
List<TruffleStackTraceElement> stackTrace = TruffleStackTraceElement.getStackTrace(e);
59+
List<TruffleStackTraceElement> stackTrace = TruffleStackTrace.getStacktrace(e);
5960
ArrayList<String> stack = new ArrayList<>();
6061
for (TruffleStackTraceElement frame : stackTrace) {
6162

0 commit comments

Comments
 (0)