@Specialization(guards = "operand != null", replaces = "doCached") @TruffleBoundary protected Object doGeneric(Object operand, Class<?> targetType, Type genericType, Object languageContext) { return convertImpl(operand, targetType, genericType, languageContext); }
@SuppressWarnings("unused") @Specialization(guards = {"operand != null", "operand.getClass() == cachedOperandType", "targetType == cachedTargetType"}, limit = "LIMIT") protected Object doCached(Object operand, Class<?> targetType, Type genericType, Object languageContext, @Cached("operand.getClass()") Class<?> cachedOperandType, @Cached("targetType") Class<?> cachedTargetType) { return convertImpl(cachedOperandType.cast(operand), cachedTargetType, genericType, languageContext); }