@@ -543,6 +543,7 @@ static SpecialFlag const special_jvm_flags[] = {
543543 { " RequireSharedSpaces" , JDK_Version::jdk (18 ), JDK_Version::jdk (19 ), JDK_Version::undefined () },
544544 { " UseSharedSpaces" , JDK_Version::jdk (18 ), JDK_Version::jdk (19 ), JDK_Version::undefined () },
545545 { " LockingMode" , JDK_Version::jdk (24 ), JDK_Version::jdk (26 ), JDK_Version::jdk (27 ) },
546+ { " EnableValhalla" , JDK_Version::jdk (25 ), JDK_Version::jdk (26 ), JDK_Version::undefined () },
546547#ifdef _LP64
547548 { " UseCompressedClassPointers" , JDK_Version::jdk (25 ), JDK_Version::jdk (26 ), JDK_Version::undefined () },
548549#endif
@@ -2436,10 +2437,6 @@ jint Arguments::parse_each_vm_init_arg(const JavaVMInitArgs* args, JVMFlagOrigin
24362437 // --enable_preview
24372438 } else if (match_option (option, " --enable-preview" )) {
24382439 set_enable_preview ();
2439- // --enable-preview enables Valhalla, EnableValhalla VM option will eventually be removed before integration
2440- if (FLAG_SET_CMDLINE (EnableValhalla, true ) != JVMFlag::SUCCESS) {
2441- return JNI_EINVAL;
2442- }
24432440 // -Xnoclassgc
24442441 } else if (match_option (option, " -Xnoclassgc" )) {
24452442 if (FLAG_SET_CMDLINE (ClassUnloading, false ) != JVMFlag::SUCCESS) {
@@ -3979,7 +3976,8 @@ jint Arguments::apply_ergo() {
39793976 log_info (verification)(" Turning on remote verification because local verification is on" );
39803977 FLAG_SET_DEFAULT (BytecodeVerificationRemote, true );
39813978 }
3982- if (!EnableValhalla || (is_interpreter_only () && !CDSConfig::is_dumping_archive () && !UseSharedSpaces)) {
3979+ // EnablePreview legacy
3980+ if (!Arguments::enable_preview () || (is_interpreter_only () && !CDSConfig::is_dumping_archive () && !UseSharedSpaces)) {
39833981 // Disable calling convention optimizations if inline types are not supported.
39843982 // Also these aren't useful in -Xint. However, don't disable them when dumping or using
39853983 // the CDS archive, as the values must match between dumptime and runtime.
0 commit comments