sig
type jconst =
[ `ANull
| `Byte of int
| `Class of JBasics.object_type
| `Double of float
| `Float of float
| `Int of int32
| `Long of int64
| `MethodHandle of JBasics.method_handle
| `MethodType of JBasics.method_descriptor
| `Short of int
| `String of JBasics.jstr ]
type jinterface_or_class = [ `Class | `Interface ]
type jopcode =
OpLoad of JBasics.jvm_type * int
| OpStore of JBasics.jvm_type * int
| OpIInc of int * int
| OpPop
| OpPop2
| OpDup
| OpDupX1
| OpDupX2
| OpDup2
| OpDup2X1
| OpDup2X2
| OpSwap
| OpConst of JCode.jconst
| OpAdd of JBasics.jvm_basic_type
| OpSub of JBasics.jvm_basic_type
| OpMult of JBasics.jvm_basic_type
| OpDiv of JBasics.jvm_basic_type
| OpRem of JBasics.jvm_basic_type
| OpNeg of JBasics.jvm_basic_type
| OpIShl
| OpLShl
| OpIShr
| OpLShr
| OpIUShr
| OpLUShr
| OpIAnd
| OpLAnd
| OpIOr
| OpLOr
| OpIXor
| OpLXor
| OpI2L
| OpI2F
| OpI2D
| OpL2I
| OpL2F
| OpL2D
| OpF2I
| OpF2L
| OpF2D
| OpD2I
| OpD2L
| OpD2F
| OpI2B
| OpI2C
| OpI2S
| OpCmp of [ `DG | `DL | `FG | `FL | `L ]
| OpIf of [ `Eq | `Ge | `Gt | `Le | `Lt | `Ne | `NonNull | `Null ] * int
| OpIfCmp of [ `AEq | `ANe | `IEq | `IGe | `IGt | `ILe | `ILt | `INe ] *
int
| OpGoto of int
| OpJsr of int
| OpRet of int
| OpTableSwitch of int * int32 * int32 * int array
| OpLookupSwitch of int * (int32 * int) list
| OpNew of JBasics.class_name
| OpNewArray of JBasics.value_type
| OpAMultiNewArray of JBasics.object_type * int
| OpCheckCast of JBasics.object_type
| OpInstanceOf of JBasics.object_type
| OpGetStatic of JBasics.class_name * JBasics.field_signature
| OpPutStatic of JBasics.class_name * JBasics.field_signature
| OpGetField of JBasics.class_name * JBasics.field_signature
| OpPutField of JBasics.class_name * JBasics.field_signature
| OpArrayLength
| OpArrayLoad of JBasics.jvm_array_type
| OpArrayStore of JBasics.jvm_array_type
| OpInvoke of
[ `Dynamic of JBasics.bootstrap_method
| `Interface of JBasics.class_name
| `Special of JCode.jinterface_or_class * JBasics.class_name
| `Static of JCode.jinterface_or_class * JBasics.class_name
| `Virtual of JBasics.object_type ] * JBasics.method_signature
| OpReturn of JBasics.jvm_return_type
| OpThrow
| OpMonitorEnter
| OpMonitorExit
| OpNop
| OpBreakpoint
| OpInvalid
type jopcodes = JCode.jopcode array
type exception_handler = {
e_start : int;
e_end : int;
e_handler : int;
e_catch_type : JBasics.class_name option;
}
type jcode = {
c_max_stack : int;
c_max_locals : int;
c_code : JCode.jopcodes;
c_exc_tbl : JCode.exception_handler list;
c_line_number_table : (int * int) list option;
c_local_variable_table :
(int * int * string * JBasics.value_type * int) list option;
c_local_variable_type_table :
(int * int * string * JSignature.fieldTypeSignature * int) list option;
c_stack_map : JBasics.stackmap_frame list option;
c_attributes : (string * string) list;
}
val empty : JCode.jcode
val get_source_line_number : int -> JCode.jcode -> int option
val get_source_line_number' : int -> (int * int) list -> int option
val get_local_variable_info :
int -> int -> JCode.jcode -> (string * JBasics.value_type) option
val replace_code :
?update_max_stack:bool ->
JCode.jcode -> int -> JCode.jopcode list -> JCode.jcode
val insert_code :
?update_max_stack:bool ->
JCode.jcode -> int -> JCode.jopcode list -> JCode.jcode
type lambda_info = {
functional_interface : JBasics.class_method_signature;
captured_arguments : JBasics.value_type list;
checkcast_arguments : JBasics.value_type list;
lambda_handle : JBasics.method_handle;
}
val build_lambda_info :
JBasics.bootstrap_method -> JBasics.method_signature -> JCode.lambda_info
end