1
1
/*
2
- * Copyright (c) 2017, 2024 , Oracle and/or its affiliates. All rights reserved.
2
+ * Copyright (c) 2017, 2025 , Oracle and/or its affiliates. All rights reserved.
3
3
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4
4
*
5
5
* The Universal Permissive License (UPL), Version 1.0
@@ -1215,14 +1215,14 @@ protected static String getProgramName() {
1215
1215
@ SuppressWarnings ("unused" )
1216
1216
@ Deprecated (since = "20.3" )
1217
1217
protected final void maybeNativeExec (List <String > args , boolean isPolyglotLauncher , Map <String , String > polyglotOptions ) {
1218
- maybeNativeExec (args , args , isPolyglotLauncher );
1218
+ maybeNativeExec (args , args , false );
1219
1219
}
1220
1220
1221
1221
/**
1222
1222
* Possibly re-executes the launcher when JVM or polyglot mode is requested; call only if
1223
1223
* {@link #isAOT()} is true. If the result is to run native, then it applies VM options on the
1224
1224
* current process.
1225
- *
1225
+ * <p>
1226
1226
* The method parses the {@code unrecognizedArgs} for --jvm/--native/--polyglot flags and --vm.*
1227
1227
* options. If JVM mode is requested, it execs a Java process configured with supported JVM
1228
1228
* parameters and system properties over this process - in this case, the method does not return
@@ -1232,17 +1232,17 @@ protected final void maybeNativeExec(List<String> args, boolean isPolyglotLaunch
1232
1232
* @param unrecognizedArgs a subset of {@code originalArgs} that was not recognized by
1233
1233
* {@link AbstractLanguageLauncher#preprocessArguments(List, Map)}. All arguments
1234
1234
* recognized by maybeExec are removed from the list.
1235
- * @param isPolyglotLauncher whether this is the {@link PolyglotLauncher} (bin/polyglot)
1235
+ * @param isPolyglotLauncher no longer used, always false
1236
1236
* @since 20.0
1237
1237
*/
1238
- protected final void maybeNativeExec (List <String > originalArgs , List <String > unrecognizedArgs , boolean isPolyglotLauncher ) {
1238
+ protected final void maybeNativeExec (List <String > originalArgs , List <String > unrecognizedArgs , @ SuppressWarnings ( "unused" ) boolean isPolyglotLauncher ) {
1239
1239
if (!IS_AOT ) {
1240
1240
return ;
1241
1241
}
1242
- maybeExec (originalArgs , unrecognizedArgs , isPolyglotLauncher , getDefaultVMType (), false );
1242
+ maybeExec (originalArgs , unrecognizedArgs , getDefaultVMType (), false );
1243
1243
}
1244
1244
1245
- void maybeExec (List <String > originalArgs , List <String > unrecognizedArgs , boolean isPolyglotLauncher , VMType defaultVmType , boolean thinLauncher ) {
1245
+ void maybeExec (List <String > originalArgs , List <String > unrecognizedArgs , VMType defaultVmType , boolean thinLauncher ) {
1246
1246
assert isAOT ();
1247
1247
VMType vmType = null ;
1248
1248
boolean polyglot = false ;
@@ -1299,7 +1299,7 @@ void maybeExec(List<String> originalArgs, List<String> unrecognizedArgs, boolean
1299
1299
jvmArgs .add ('-' + vmOption );
1300
1300
}
1301
1301
1302
- if (! isPolyglotLauncher && polyglot ) {
1302
+ if (polyglot ) {
1303
1303
applicationArgs .add (0 , "--polyglot" );
1304
1304
}
1305
1305
assert !isStandalone ();
@@ -1329,7 +1329,7 @@ void maybeExec(List<String> originalArgs, List<String> unrecognizedArgs, boolean
1329
1329
*/
1330
1330
VMRuntime .initialize ();
1331
1331
1332
- if (! isPolyglotLauncher && polyglot ) {
1332
+ if (polyglot ) {
1333
1333
assert jvmArgs .isEmpty ();
1334
1334
if (isStandalone ()) {
1335
1335
throw abort ("--polyglot option is only supported when this launcher is part of a GraalVM." );
0 commit comments