sig
type locals
type stack
type t = { locals : StackState.locals; stack : StackState.stack; }
type error =
Unsupported_instruction of string
| Empty_stack
| Invalid_local_index of Utils.u2 * int
| Invalid_stack_top of Attribute.verification_type_info *
Attribute.verification_type_info
| Invalid_local_contents of Utils.u2 * Attribute.verification_type_info *
Attribute.verification_type_info
| Invalid_local_contents_placeholder of Utils.u2 *
Attribute.verification_type_info
| Reference_waited of Attribute.verification_type_info
| Reference_waited_placeholder_found
| Array_waited
| Category1_waited
| Category2_waited
| Different_stack_sizes of int * int
| Invalid_primitive_array_type
| Empty_frame_list
| Different_frames of Utils.u2
exception Exception of StackState.error
val string_of_error : StackState.error -> string
val make_empty : unit -> StackState.t
val make_of_parameters :
(Name.for_class * bool) option ->
Descriptor.for_parameter list -> StackState.t
val make_of_method : Name.for_class -> Method.t -> StackState.t
val locals_size : StackState.t -> int
val stack_size : StackState.t -> int
val equal : StackState.t -> StackState.t -> bool
val push :
Attribute.verification_type_info -> StackState.stack -> StackState.stack
val top : StackState.stack -> Attribute.verification_type_info
val pop : StackState.stack -> StackState.stack
val pop_if :
Attribute.verification_type_info -> StackState.stack -> StackState.stack
val pop_if_category1 :
StackState.stack -> Attribute.verification_type_info * StackState.stack
val empty : unit -> StackState.stack
val only_exception : Name.for_class -> StackState.stack
val update :
Name.for_class ->
Utils.u2 -> Instruction.t -> StackState.t -> StackState.t
type 'a unifier = 'a -> 'a -> 'a
type instance =
[ `Array_type of Descriptor.array_type
| `Class_or_interface of Name.for_class ]
val make_array_unifier :
Name.for_class StackState.unifier ->
Descriptor.array_type -> Descriptor.array_type -> StackState.instance
val make_unifier :
Name.for_class StackState.unifier ->
StackState.instance StackState.unifier
val unify_to_java_lang_Object : StackState.instance StackState.unifier
val unify_to_closest_common_parent :
ClassLoader.t ->
(Name.for_class * Name.for_class option) list ->
StackState.instance StackState.unifier
val unify_to_parent_list :
(Name.for_class * Name.for_class option) list ->
StackState.instance StackState.unifier
val unify :
StackState.instance StackState.unifier ->
StackState.t -> StackState.t -> StackState.t
val encode :
?optimize:bool ->
(Utils.u2 * StackState.t) list -> Attribute.stack_map_frame list
end