File tree Expand file tree Collapse file tree
runtime/compiler/optimizer Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -165,7 +165,9 @@ TR::RecognizedMethod TR_VarHandleTransformer::getVarHandleAccessMethod(TR::Node
165165 */
166166int32_t TR_VarHandleTransformer::perform ()
167167{
168- #if defined(J9VM_OPT_METHOD_HANDLE)
168+ // VarHandles only exist on JDK11+. On JDK8, java/lang/invoke/VarHandle is absent so any
169+ // call to it is unresolved
170+ #if defined(J9VM_OPT_METHOD_HANDLE) && (JAVA_SPEC_VERSION >= 11)
169171 bool doTrace = comp ()->getOption (TR_TraceILGen);
170172 TR ::ResolvedMethodSymbol *methodSymbol = comp ()->getMethodSymbol ();
171173 TR_J9VMBase *fej9 = (TR_J9VMBase *)(comp ()->fe ());
@@ -380,7 +382,7 @@ int32_t TR_VarHandleTransformer::perform()
380382 }
381383 }
382384 }
383- #endif /* defined(J9VM_OPT_METHOD_HANDLE) */
385+ #endif /* defined(J9VM_OPT_METHOD_HANDLE) && (JAVA_SPEC_VERSION >= 11) */
384386 return 0 ;
385387}
386388
You can’t perform that action at this time.
0 commit comments