Deprecated API
Contents
- Interfaces
- Classes
- Enum Classes
- Exception Classes
- Fields
- Methods
- Constructors
- Annotation Interface Elements
-
Deprecated InterfacesInterfaceDescription
-
Deprecated ClassesClassDescriptionDynamicObjectLibrary has been replaced by more lightweight DynamicObject nodes. Consult the javadoc of the individual messages for the corresponding API replacement, or see
DynamicObjectfor a list of new node-based APIs.DynamicObjectLibrarywill be removed in a future release.This class is deprecated and will be removed in a future version.
-
Deprecated Enum Classes
-
Deprecated Exception ClassesException ClassDescription
-
Deprecated FieldsFieldDescriptionin 24.1 without replacementin 24.1 without replacement
-
Deprecated MethodsMethodDescriptionno longer supported. Use
InstructionTracerinstead.no longer supported. UseInstructionTracerinstead.since 25.1, useMessage.resolveExact(Class, String, Class...)instead. Since library messages can now be deprecated and replaced, they need to be resolved with argument types.since 25.1, useMessage.resolveExact(Class, String, boolean, Class...)instead. Since library messages can now be deprecated and replaced, they need to be resolved with argument types.useBytecodeOSRNode.pollOSRBackEdge(BytecodeOSRNode, int)instead. It is recommended to batch up polls in the interpreter implementation. Important note:BytecodeOSRNode.pollOSRBackEdge(BytecodeOSRNode)did implicitlypollTruffle safepoints. The new method is no longer doing that. Make sure your bytecode interpreter contains a call toTruffleSafepoint.poll(Node)on loop back-edges when migrating.in 24.1 without replacementin 24.1 without replacementin 24.1, implement and useRootNode.isCaptureFramesForTrace(boolean)insteadin 24.1, implement and useRootNode.isCaptureFramesForTrace(boolean)insteadthe method will become final in future releases.UseLocation.isAssumedFinal()instead or replace byfalse.UseShape.Builder.layout(Class, MethodHandles.Lookup)instead.since 25.1, useAbstractTruffleString.materializeUncached(Encoding)instead.useTruffleStringIterator.nextUncached(Encoding)instead.useTruffleStringIterator.previousUncached(Encoding)instead.com.oracle.truffle.api.TruffleLanguage.createContextLocal(TruffleLanguage.ContextLocalFactory<C, T>) Use asHostObject.Use asHostObject.com.oracle.truffle.api.TruffleLanguage.Env.createThread(Runnable, TruffleContext, ThreadGroup, long) UseinteropLibrary.isHostObject(obj) && interopLibrary.isException(obj).UseinteropLibrary.isHostObject(obj) && interopLibrary.isExecutable(obj) && !interopLibrary.hasMembers(obj)Use isHostObject.UseinteropLibrary.isHostObject(obj) && interopLibrary.isScope(obj).in 24.1 useisPolyglotEvalAllowed(null) instead. Note that language implementations should now check whether polyglot eval is allowed also for individual languages, as access could be denied only for an individual language.To enable allTruffleStringencodings, it is sufficient to add theorg.graalvm.shadowed.jcodingsmodule to the language's module-inforequiresand ensure it is on the module path when languages are loaded. If the module can be found, and at least one languages requires it, all encodings are automatically enabled. When languages are loaded from the class path (i.e. as an unnamed module), having jcodings on the class path is enough to enable it.UseRuntimeReflection.register(Field...)instead. ParametersfinalIsWritableandallowUnsafeAccessno longer serve a purpose.UseRuntimeReflection.register(Field...)instead. ParameterfinalIsWritableno longer serves a purpose.UseRuntimeSerialization.register(Class[])instead. All possible custom constructors will be registered automatically.in 25.1 without replacement. This method is inherently unsafe as it can interfere with other code.OptionValuesshould be read-only. If the value of an option needs to be altered after options are set, then the new value should be stored in the language's context or instrument fields and read from there.If a file system was previously set useallowIO(IOAccess.newBuilder().fileSystem(fileSystem).build()).useContext.Builder.allowHostClassLookup(Predicate)instead.UseFileSystem.allowInternalResources(FileSystem)instead when migrating code that only reads internal resources. The replacement exposes internal resources and language homes through a read-only view. Code that needs mutable files based on internal resources should copy the resources to an application-controlled location, for example withEngine.copyResources(Path, String...), and expose that location through its configuredfileSystem.UseFileSystem.allowInternalResources(FileSystem)instead to expose language homes and other internal resources through a read-only view.useSource.getReader(),Source.getCharacters()orSource.getBytes()instead. The implementation is inefficient and can not distinguish byte and character based sources.useSourceSection.getCharacters()instead.
-
Deprecated ConstructorsConstructorDescriptionnew versions of the library generator won't use this constructor anymore
-
Deprecated Annotation Interface ElementsAnnotation Interface ElementDescriptionin 24.1 without replacementTo enable all
TruffleStringencodings, it is sufficient to add theorg.graalvm.shadowed.jcodingsmodule to the language's module-inforequiresand ensure it is on the module path when languages are loaded. If the module can be found, and at least one languages requires it, all encodings are automatically enabled. When languages are loaded from the class path (i.e. as an unnamed module), having jcodings on the class path is enough to enable it.