Package io.quarkus.gizmo
Class FunctionCreatorImpl.FunctionBytecodeCreator
- java.lang.Object
-
- io.quarkus.gizmo.BytecodeCreatorImpl
-
- io.quarkus.gizmo.FunctionCreatorImpl.FunctionBytecodeCreator
-
- All Implemented Interfaces:
BytecodeCreator,java.lang.AutoCloseable
- Enclosing class:
- FunctionCreatorImpl
private static class FunctionCreatorImpl.FunctionBytecodeCreator extends BytecodeCreatorImpl
We need out own BytecodeCreator that captures all ResultHandles from the parent object that are passed inThese get transformed into local result handles, that are a read from a field
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class io.quarkus.gizmo.BytecodeCreatorImpl
BytecodeCreatorImpl.AssignOperation, BytecodeCreatorImpl.BlockOperation, BytecodeCreatorImpl.IfOperation, BytecodeCreatorImpl.InvokeOperation, BytecodeCreatorImpl.JumpOperation, BytecodeCreatorImpl.NewInstanceOperation, BytecodeCreatorImpl.Operation
-
-
Field Summary
Fields Modifier and Type Field Description private FunctionCreatorImplfunctionCreatorprivate MethodCreatorImplmethod-
Fields inherited from class io.quarkus.gizmo.BytecodeCreatorImpl
MAX_STRING_LENGTH, operations
-
-
Constructor Summary
Constructors Constructor Description FunctionBytecodeCreator(FunctionCreatorImpl functionCreator, MethodCreatorImpl method)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidbreakScope(BytecodeCreator scope)Go to the end of the given scope.voidcontinueScope(BytecodeCreator scope)Go to the top of the given scope.(package private) MethodCreatorImplgetMethod()ResultHandleinvokeSpecialInterfaceMethod(MethodDescriptor descriptor, ResultHandle object, ResultHandle... args)Invokes a special interface method, and returns aResultHandlewith the result, or null if the method is void.ResultHandleinvokeSpecialMethod(MethodDescriptor descriptor, ResultHandle object, ResultHandle... args)Invokes a special method, and returns aResultHandlewith the result, or null if the method is void.private java.lang.UnsupportedOperationExceptionnonLocalReturn()(package private) ResultHandle[]resolve(BytecodeCreator owner, ResultHandle... handle)(package private) ResultHandleresolve(ResultHandle handle, BytecodeCreator invoker)Turns a parent result handle into a local result handle.-
Methods inherited from class io.quarkus.gizmo.BytecodeCreatorImpl
add, allocateLocalVariables, arrayLength, assign, bitwiseAnd, bitwiseOr, bitwiseXor, checkCast, checkScope, checkScope, compareDouble, compareFloat, compareLong, convertPrimitive, createFunction, createNewInstanceOp, createScope, createVariable, divide, enumSwitch, findActiveResultHandles, forEach, getBottom, getMethodParam, getOwner, getThis, getTop, ifFalse, ifGreaterEqualZero, ifGreaterThanZero, ifIntegerEqual, ifIntegerGreaterEqual, ifIntegerGreaterThan, ifIntegerLessEqual, ifIntegerLessThan, ifLessEqualZero, ifLessThanZero, ifNonZero, ifNotNull, ifNull, ifReferencesEqual, ifReferencesNotEqual, ifThenElse, ifTrue, ifZero, instanceOf, invokeInterfaceMethod, invokeStaticInterfaceMethod, invokeStaticMethod, invokeVirtualMethod, isScopedWithin, jumpTo, load, load, load, load, load, load, load, load, load, loadClass, loadClassFromTCCL, loadNull, loadResultHandle, loadResultHandle, multiply, newArray, newInstance, readArrayValue, readInstanceField, readStaticField, remainder, resolve, resolve, returnValue, storeResultHandle, stringSwitch, subtract, throwException, tryBlock, whileLoop, writeArrayValue, writeInstanceField, writeInteriorOperations, writeOperations, writeStaticField
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface io.quarkus.gizmo.BytecodeCreator
breakScope, checkCast, close, continueScope, createVariable, increment, instanceOf, invokeInterfaceMethod, invokeSpecialInterfaceMethod, invokeSpecialMethod, invokeStaticInterfaceMethod, invokeStaticMethod, invokeVirtualMethod, load, loadClass, loadClass, loadClassFromTCCL, loadClassFromTCCL, marshalAsArray, newArray, newArray, newArray, newInstance, readArrayValue, readInstanceField, readStaticField, returnBoolean, returnInt, returnNull, returnVoid, throwException, throwException, writeArrayValue, writeInstanceField, writeStaticField
-
-
-
-
Field Detail
-
functionCreator
private final FunctionCreatorImpl functionCreator
-
method
private final MethodCreatorImpl method
-
-
Constructor Detail
-
FunctionBytecodeCreator
FunctionBytecodeCreator(FunctionCreatorImpl functionCreator, MethodCreatorImpl method)
-
-
Method Detail
-
resolve
ResultHandle resolve(ResultHandle handle, BytecodeCreator invoker)
Turns a parent result handle into a local result handle.This is done by storing them in fields on the object, and having them be passed into the constructor
- Overrides:
resolvein classBytecodeCreatorImpl- Parameters:
handle- The handle that may be a parent handle- Returns:
- The substituted handler
-
resolve
ResultHandle[] resolve(BytecodeCreator owner, ResultHandle... handle)
- Overrides:
resolvein classBytecodeCreatorImpl
-
getMethod
MethodCreatorImpl getMethod()
- Overrides:
getMethodin classBytecodeCreatorImpl
-
invokeSpecialMethod
public ResultHandle invokeSpecialMethod(MethodDescriptor descriptor, ResultHandle object, ResultHandle... args)
Description copied from interface:BytecodeCreatorInvokes a special method, and returns aResultHandlewith the result, or null if the method is void.Special methods are constructor invocations, or invocations on a superclass method of the current class.
- Specified by:
invokeSpecialMethodin interfaceBytecodeCreator- Overrides:
invokeSpecialMethodin classBytecodeCreatorImpl- Parameters:
descriptor- The method descriptorobject- AResultHandlerepresenting the object to invoke onargs- The method parameters- Returns:
- The method result, or null if a void method
-
invokeSpecialInterfaceMethod
public ResultHandle invokeSpecialInterfaceMethod(MethodDescriptor descriptor, ResultHandle object, ResultHandle... args)
Description copied from interface:BytecodeCreatorInvokes a special interface method, and returns aResultHandlewith the result, or null if the method is void.Special interface method invocations are invocations of a superinterface method of the current class.
- Specified by:
invokeSpecialInterfaceMethodin interfaceBytecodeCreator- Overrides:
invokeSpecialInterfaceMethodin classBytecodeCreatorImpl- Parameters:
descriptor- The method descriptorobject- AResultHandlerepresenting the object to invoke onargs- The method parameters- Returns:
- The method result, or null if a void method
-
continueScope
public void continueScope(BytecodeCreator scope)
Description copied from interface:BytecodeCreatorGo to the top of the given scope.- Specified by:
continueScopein interfaceBytecodeCreator- Overrides:
continueScopein classBytecodeCreatorImpl- Parameters:
scope- the scope to continue
-
breakScope
public void breakScope(BytecodeCreator scope)
Description copied from interface:BytecodeCreatorGo to the end of the given scope.- Specified by:
breakScopein interfaceBytecodeCreator- Overrides:
breakScopein classBytecodeCreatorImpl- Parameters:
scope- the scope to break out of
-
nonLocalReturn
private java.lang.UnsupportedOperationException nonLocalReturn()
-
-