Companion

object Companion

Properties

Link copied to clipboard
private const val BRIDGE: String
Link copied to clipboard
private const val BSM2: String
Link copied to clipboard
private const val BSM3: String
Link copied to clipboard
private const val INSTANTIATED_TYPE: Int = 2

Where metafactory and altMetafactory both put instantiatedMethodType — the one bootstrap argument describing the impl handle rather than the interface. See visitInvokeDynamicInsn.

Link copied to clipboard
private const val LMF: String
Link copied to clipboard

The JVM's two initializer methods: never dispatched through the bridge.

Link copied to clipboard
private val OPAQUE: Array<String>
Link copied to clipboard

Cache for inaccessible — keyed by internal name, one class-file read per class.

Functions

Link copied to clipboard
fun bridgeable(opcode: Int, owner: String, name: String): Boolean

Whether a call site can be rewritten to an AccessBridge indy at all: a widenable owner, and neither of the two shapes a bridge cannot carry — the JVM's initializers, and INVOKESPECIAL super-calls.

Link copied to clipboard
fun erase(desc: String): String

Erase one type descriptor to Object when a snippet cannot name its class. An array erases its ELEMENT type and keeps its dimensions: the real array is assignable to [Ljava/lang/Object; by covariance and it is still an array, so arraylength/aaload keep verifying — collapsing to a bare Object would not. Primitives and accessible types pass through untouched, so the common path keeps its precise types — and with them the JIT's ability to inline the call site.

Link copied to clipboard
fun eraseHandleDesc(tag: Int, desc: String): String

A field handle's desc is a FIELD descriptor, which eraseMethodDesc would read off the end of. Unreachable today.

Link copied to clipboard

erase applied to every parameter and to the return type of METHOD descriptor.

Link copied to clipboard
fun inaccessible(internalName: String): Boolean

True if internalName is NOT a public class — meaning a snippet cannot even NAME it, let alone touch its members: a snippet always sits in a different runtime package (different loader AND different package name), so package-private is out of reach by definition.

Link copied to clipboard