Index: interpreter_imports.h =================================================================== --- interpreter_imports.h (revision 519904) +++ interpreter_imports.h (working copy) @@ -18,6 +18,15 @@ * @author Ivan Volosyuk * @version $Revision: 1.1.2.1.4.3 $ */ + + +/** + * @file + * + * Import Interfaces which used by interpreter. + * + */ + #ifndef _INTERPRETER_IMPORTS_H_ #define _INTERPRETER_IMPORTS_H_ @@ -27,18 +36,59 @@ struct ManagedObject; typedef struct ManagedObject ManagedObject; + +/** Gains the ownership over monitor. + * Current thread blocks if the specified monitor is owned by other thread. + * + * @param[in] obj - monitor object where monitor is located. */ VMEXPORT void vm_monitor_enter_wrapper(ManagedObject *obj); + +/** Releases the ownership over monitor. + * + * @param[in] obj - monitor object where monitor is located. */ VMEXPORT void vm_monitor_exit_wrapper(ManagedObject *obj); + +/** Call class_throw_linking_error function which throw linking error. + * + * @param[in] ch - the class handle + * @param[in] cp_index - an index in the constant pool + * @param[in] opcode - an opcode of bytecodes. */ VMEXPORT void class_throw_linking_error_for_interpreter(Class_Handle ch, unsigned cp_index, unsigned opcode); +/** Return JNI environment. + * + * @return - JNI environment associated with this thread. */ VMEXPORT JNIEnv * get_jni_native_intf(); +/** Callback function for interpreter breakpoint processing. + * + * @param[in] method - method ID + * @param[in] loc - location. */ VMEXPORT jbyte jvmti_process_interpreter_breakpoint_event(jmethodID method, jlocation loc); + + +/** Function for single step event processing. + * @param[in] method - method ID + * @param[in] location - location. */ VMEXPORT void jvmti_process_single_step_event(jmethodID method, jlocation location); +/** Function for frame pop event processing. + * @param[in] env - jvmti environment + * @param[in] method - method ID + * @param[in] was_popped_by_exception - if frame was popped by exception */ VMEXPORT void jvmti_process_frame_pop_event(jvmtiEnv *env, jmethodID method, jboolean was_popped_by_exception); + + +/** Function looks for method in native libraries of class loader. + * + * @param[in] method - searching native method structure + * + * @return - Pointer to found native function. + * + * @note Function raises UnsatisfiedLinkError with method name + * in exception message if specified method is not found. */ VMEXPORT GenericFunctionPointer classloader_find_native(const Method_Handle method); #endif /* _INTERPRETER_IMPORTS_H_ */