AccessBridge
Bootstrap methods for invokedynamic call sites emitted by the access-widening bytecode transform in ScriptWeave. Each bootstrap resolves a private/protected/package-private member via privateLookupIn and returns a ConstantCallSite, which the JIT can inline.
This class lives on the game loader (not impl/), so script classes loaded by the masking loader can resolve it via parent delegation — same cross-loader pattern as ReplBridge and PatchEnterCallback.
The call-site MethodType is not the real signature. Widening a member's access is only half the job: a call site whose descriptor names an inaccessible class is rejected while the JVM resolves that descriptor, before any bootstrap here runs (e.g. a descriptor naming package-private kotlin.collections.EmptyMap is rejected). So the transform erases every inaccessible reference type in the call-site descriptor to Object and passes the real names through as string bootstrap arguments instead.
Two consequences for every bootstrap below:
Companion functions
private val has a backing field and no accessor, yet the metadata flip makes the frontend emit getXxx() against it — resolve such a call to the field instead.URL and _options keep their head.checkcast.::class, as a dynamic constant.desc is the constructor's own, and the instance comes back as the call's result.c's own field of the wanted kind, or null.GETFIELD call site.PUTFIELD call site.ref's hierarchy that declares method with mt's parameter types — the method analogue of findField.JvmAbi.getterName: an is-prefixed property is already its own getter.instanceof: isInstance is the same test, null failing it.ref, breadth-first.cls is host's companion object, which the host holds in a static field.JvmAbi.startsWithIsPrefix: is followed by anything that is not a lower-case letter.cls, or caller where its module refuses to open — java.base being the one that does.anewarray: owner is the element class, and the array a real array of it, so storing anything else still throws ArrayStoreException.JvmAbi.setterName: the is is dropped rather than kept — isEmpty sets via setEmpty.INVOKESTATIC call site; the real signature is in desc, the declaring class resolved via findMethodOwner.GETSTATIC call site.PUTSTATIC call site.super.method(...) call, opened like every other member: invokespecial from the declaring class findMethodOwner finds selects what the snippet's call would have — the first declaration up from the class the call names.INVOKEVIRTUAL/INVOKEINTERFACE call site; the real signature is in desc, the declaring class resolved via findMethodOwner.