interp_vm_helpers.h File Reference


Detailed Description

Defines helper interfaces used by the interpreter.

The current DRLVM implementation describes the following helper interfaces:


Functions

void interp_throw_exception (const char *exc)
 Sets the thread-local exception with the name exc.
void interp_throw_exception (const char *exc, const char *message)
 Sets the thread-local exception with the names exc and message.
GenericFunctionPointer interp_find_native (Method_Handle method)
 Looks up the implementation for the native method.
Class * interp_resolve_class (Class *clazz, int classId)
 Resolves the class in the clazz constant pool with the index classId.
Class * interp_resolve_class_new (Class *clazz, int classId)
 Resolves the class suitable for a new operation in the clazz constant pool with the index classId.
Field * interp_resolve_static_field (Class *clazz, int fieldId, bool putfield)
 Resolves the static field in the clazz constant pool with the index fieldId.
Field * interp_resolve_nonstatic_field (Class *clazz, int fieldId, bool putfield)
 Resolves the nonstatic field in the clazz constant pool with the index fieldId.
Method * interp_resolve_virtual_method (Class *clazz, int methodId)
 Resolves the virtual method in the clazz constant pool with the index methodId.
Method * interp_resolve_interface_method (Class *clazz, int methodId)
 Resolves the interface method in the clazz constant pool with the index methodId.
Method * interp_resolve_static_method (Class *clazz, int methodId)
 Resolves the static method in the clazz constant pool with the index methodId.
Method * interp_resolve_special_method (Class *clazz, int methodId)
 Resolves the special method in the clazz constant pool with the index methodId.
Class * interp_class_get_array_of_class (Class *objClass)
 Resolves the class array for specified objClass.


Function Documentation

void interp_throw_exception ( const char *  exc  ) 

Sets the thread-local exception with the name exc.

Parameters:
[in] exc - the exception name

void interp_throw_exception ( const char *  exc,
const char *  message 
)

Sets the thread-local exception with the names exc and message.

Parameters:
[in] exc - the exception name
[in] message - the message

GenericFunctionPointer interp_find_native ( Method_Handle  method  ) 

Looks up the implementation for the native method.

Parameters:
[in] method - the searching native-method structure
Returns:
The pointer to find the native function.

Class* interp_resolve_class ( Class *  clazz,
int  classId 
)

Resolves the class in the clazz constant pool with the index classId.

Throws an exception if a resolution error occurs.

Parameters:
[in] clazz - the class which constant pool contains the reference to the target class
[in] classId - the constant-pool index
Returns:
A resolved class, if a resolution attempt succeeds.

Class* interp_resolve_class_new ( Class *  clazz,
int  classId 
)

Resolves the class suitable for a new operation in the clazz constant pool with the index classId.

Throws an exception if a resolution error occurs.

Parameters:
[in] clazz - the class which constant pool contains the reference to the target class
[in] classId - the constant-pool index
Returns:
A resolved class, if a resolution attempt succeeds.

Field* interp_resolve_static_field ( Class *  clazz,
int  fieldId,
bool  putfield 
)

Resolves the static field in the clazz constant pool with the index fieldId.

Throws an exception if a resolution error occurs.

Parameters:
[in] clazz - the class which constant pool contains the reference to the target field
[in] fieldId - the constant-pool index
[in] putfield - location where to put/get the field
Returns:
A resolved field, if a resolution attempt succeeds.

Field* interp_resolve_nonstatic_field ( Class *  clazz,
int  fieldId,
bool  putfield 
)

Resolves the nonstatic field in the clazz constant pool with the index fieldId.

Throws an exception if a resolution error occurs.

Parameters:
[in] clazz - the class which constant pool contains the reference to the target field
[in] fieldId - the constant-pool index
[in] putfield - location where to put/get thee field
Returns:
A resolved field, if a resolution attempt succeeds.

Method* interp_resolve_virtual_method ( Class *  clazz,
int  methodId 
)

Resolves the virtual method in the clazz constant pool with the index methodId.

Throws an exception if a resolution error occurs.

Parameters:
[in] clazz - the class which constant pool contains the reference to the method
[in] methodId - the constant-pool index
Returns:
A resolved method, if a resolution attempt succeeds.

Method* interp_resolve_interface_method ( Class *  clazz,
int  methodId 
)

Resolves the interface method in the clazz constant pool with the index methodId.

Throws an exception if a resolution error occurs.

Parameters:
[in] clazz - the class which constant pool contains the reference to the method
[in] methodId - the constant-pool index
Returns:
A resolved method, if a resolution attempt succeeds.

Method* interp_resolve_static_method ( Class *  clazz,
int  methodId 
)

Resolves the static method in the clazz constant pool with the index methodId.

Throws an exception if a resolution error occurs.

Parameters:
[in] clazz - the class which constant pool contains the reference to the method
[in] methodId - the constant-pool index
Returns:
A resolved method, if a resolution attempt succeeds.

Method* interp_resolve_special_method ( Class *  clazz,
int  methodId 
)

Resolves the special method in the clazz constant pool with the index methodId.

Throws an exception if a resolution error occurs.

Parameters:
[in] clazz - the class which constant pool contains the reference to the method
[in] methodId - the constant pool index
Returns:
A resolved method, if a resolution attempt succeeds.

Class* interp_class_get_array_of_class ( Class *  objClass  ) 

Resolves the class array for specified objClass.

Parameters:
[in] objClass - specified objClass
Returns:
A resolved array if a resolution attempt succeeds.


Genereated on Tue Mar 11 19:25:37 2008 by Doxygen.

(c) Copyright 2005, 2008 The Apache Software Foundation or its licensors, as applicable.