public static final class LocalizationFeature.CharsetNodePlugin extends Object implements org.graalvm.compiler.nodes.graphbuilderconf.NodePlugin
Charset
initialize encoding and decoding tables lazily. They all
follow the same pattern: the methods "initc2b" and/or "initb2c" perform the initialization,
and then set a field "c2bInitialized" or "b2cInitialized" to true. We run the initialization
eagerly by creating an encoder and decoder during image generation in
LocalizationFeature.addCharset(java.nio.charset.Charset)
. So we know that the "init*" methods do nothing, and
we replace calls to them with nothing, i.e,, remove calls to them.
We could do all this with individual method substitutions
, but it would
require a lot of substitution methods that all look the same.Constructor and Description |
---|
CharsetNodePlugin() |
Modifier and Type | Method and Description |
---|---|
boolean |
handleInvoke(org.graalvm.compiler.nodes.graphbuilderconf.GraphBuilderContext b,
jdk.vm.ci.meta.ResolvedJavaMethod method,
org.graalvm.compiler.nodes.ValueNode[] args) |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
canChangeStackKind, handleCheckCast, handleInstanceOf, handleLoadField, handleLoadIndexed, handleLoadStaticField, handleNewArray, handleNewInstance, handleNewMultiArray, handleStoreField, handleStoreIndexed, handleStoreStaticField, instrumentExceptionDispatch
public boolean handleInvoke(org.graalvm.compiler.nodes.graphbuilderconf.GraphBuilderContext b, jdk.vm.ci.meta.ResolvedJavaMethod method, org.graalvm.compiler.nodes.ValueNode[] args)
handleInvoke
in interface org.graalvm.compiler.nodes.graphbuilderconf.NodePlugin