package javalib

  1. Overview
  2. Docs
type jconst = [
  1. | `ANull
  2. | `Byte of int
  3. | `Class of JBasics.object_type
  4. | `Double of float
  5. | `Float of float
  6. | `Int of int32
  7. | `Long of int64
  8. | `Short of int
  9. | `String of JBasics.jstr
]
type jopcode =
  1. | OpLoad of JBasics.jvm_type * int
  2. | OpStore of JBasics.jvm_type * int
  3. | OpIInc of int * int
  4. | OpPop
  5. | OpPop2
  6. | OpDup
  7. | OpDupX1
  8. | OpDupX2
  9. | OpDup2
  10. | OpDup2X1
  11. | OpDup2X2
  12. | OpSwap
  13. | OpConst of jconst
  14. | OpAdd of JBasics.jvm_basic_type
  15. | OpSub of JBasics.jvm_basic_type
  16. | OpMult of JBasics.jvm_basic_type
  17. | OpDiv of JBasics.jvm_basic_type
  18. | OpRem of JBasics.jvm_basic_type
  19. | OpNeg of JBasics.jvm_basic_type
  20. | OpIShl
  21. | OpLShl
  22. | OpIShr
  23. | OpLShr
  24. | OpIUShr
  25. | OpLUShr
  26. | OpIAnd
  27. | OpLAnd
  28. | OpIOr
  29. | OpLOr
  30. | OpIXor
  31. | OpLXor
  32. | OpI2L
  33. | OpI2F
  34. | OpI2D
  35. | OpL2I
  36. | OpL2F
  37. | OpL2D
  38. | OpF2I
  39. | OpF2L
  40. | OpF2D
  41. | OpD2I
  42. | OpD2L
  43. | OpD2F
  44. | OpI2B
  45. | OpI2C
  46. | OpI2S
  47. | OpCmp of [ `DG | `DL | `FG | `FL | `L ]
  48. | OpIf of [ `Eq | `Ge | `Gt | `Le | `Lt | `Ne | `NonNull | `Null ] * int
  49. | OpIfCmp of [ `AEq | `ANe | `IEq | `IGe | `IGt | `ILe | `ILt | `INe ] * int
  50. | OpGoto of int
  51. | OpJsr of int
  52. | OpRet of int
  53. | OpTableSwitch of int * int32 * int32 * int array
  54. | OpLookupSwitch of int * (int32 * int) list
  55. | OpNew of JBasics.class_name
  56. | OpNewArray of JBasics.value_type
  57. | OpAMultiNewArray of JBasics.object_type * int
  58. | OpCheckCast of JBasics.object_type
  59. | OpInstanceOf of JBasics.object_type
  60. | OpGetStatic of JBasics.class_name * JBasics.field_signature
  61. | OpPutStatic of JBasics.class_name * JBasics.field_signature
  62. | OpGetField of JBasics.class_name * JBasics.field_signature
  63. | OpPutField of JBasics.class_name * JBasics.field_signature
  64. | OpArrayLength
  65. | OpArrayLoad of JBasics.jvm_array_type
  66. | OpArrayStore of JBasics.jvm_array_type
  67. | OpInvoke of [ `Dynamic of JBasics.method_handle_kind * JBasics.constant * JBasics.constant list | `Interface of JBasics.class_name | `Special of JBasics.class_name | `Static of JBasics.class_name | `Virtual of JBasics.object_type ] * JBasics.method_signature
  68. | OpReturn of JBasics.jvm_return_type
  69. | OpThrow
  70. | OpMonitorEnter
  71. | OpMonitorExit
  72. | OpNop
  73. | OpBreakpoint
  74. | OpInvalid
type jopcodes = jopcode array
type exception_handler = {
  1. e_start : int;
  2. e_end : int;
  3. e_handler : int;
  4. e_catch_type : JBasics.class_name option;
}
type jcode = {
  1. c_max_stack : int;
  2. c_max_locals : int;
  3. c_code : jopcodes;
  4. c_exc_tbl : exception_handler list;
  5. c_line_number_table : (int * int) list option;
  6. c_local_variable_table : (int * int * string * JBasics.value_type * int) list option;
  7. c_local_variable_type_table : (int * int * string * JSignature.fieldTypeSignature * int) list option;
  8. c_stack_map_midp : JBasics.stackmap list option;
  9. c_stack_map_java6 : JBasics.stackmap list option;
  10. c_attributes : (string * string) list;
}
val empty : jcode
val get_source_line_number : int -> jcode -> int option
val get_source_line_number' : int -> (int * int) list -> int option
val get_local_variable_info : int -> int -> jcode -> (string * JBasics.value_type) option
OCaml

Innovation. Community. Security.