Module Bootstrap

module Bootstrap: sig .. end
Bootstrap information for dynamic calls.


Base types and function

type method_handle = [ `getField of Reference.for_field
| `getStatic of Reference.for_field
| `invokeInterface of Reference.for_method
| `invokeSpecial of Reference.for_method
| `invokeStatic of Reference.for_method
| `invokeVirtual of Reference.for_method
| `newInvokeSpecial of Reference.for_constructor
| `putField of Reference.for_field
| `putStatic of Reference.for_field ]
The type for bootstrap methods used by invokedynamic instructions.
val equal_method_handle : method_handle -> method_handle -> bool
Equality over method handles.
val compare_method_handle : method_handle -> method_handle -> int
Comparison over method handles.
val hash_method_handle : method_handle -> int
Hash function over method handle.
type method_argument = [ `Class of Name.for_class
| `Double of float
| `Float of float
| `Integer of int32
| `Long of int64
| `MethodHandle of method_handle
| `MethodType of Descriptor.for_method
| `String of Utils.UTF8.t ]
The type for bootstrap arguments used by invokedynamic instructions.
val equal_method_argument : method_argument -> method_argument -> bool
Equality over method arguments.
val compare_method_argument : method_argument -> method_argument -> int
Comparison over method arguments.
val hash_method_argument : method_argument -> int
Hash function over method arguments.
type method_specifier = method_handle * method_argument list 
The type of method specifiers, that is complete bootstrap information for an invokedynamic instruction.
val equal_method_specifier : method_specifier -> method_specifier -> bool
Equality over method specifiers.
val compare_method_specifier : method_specifier -> method_specifier -> int
Comparison over method specifiers.
val hash_method_specifier : method_specifier -> int
Hash function over method specifiers.

Structure used for encoding

type methods = method_specifier ExtendableArray.t 
The type of information to be actually stored in a class file.
type error = 
| Too_large of int
exception Exception of error
val string_of_error : error -> string
val make_methods : unit -> methods
Constructs an empty array of method specifiers.
val is_empty : methods -> bool
Tests whether the passed array is empty.
val add_method_specifier : methods -> method_specifier -> Utils.u2
add_method_specifier m ms augments m with ms. Returns index of existing or created entry. Raises Exception if passed methods is too large.
val add : methods -> method_specifier -> unit
add m ms augments m with ms. Raises Exception if passed methods is too large.