interp_native.h File Reference


Detailed Description

Defines native-related macros and functions used by the interpreter.


Defines

#define M2N_ALLOC_MACRO
 Allocates memory.
#define M2N_FREE_MACRO
 Frees memory.

Functions

void vm_enumerate_root_set_single_thread_not_on_stack (VM_thread *thread)
 Enumerates thread-assocciated references that are not stored on the thread's stack.
VMEXPORT void free_local_object_handles2 (ObjectHandles *head)
 Frees and deletes all local object handles.
GenericFunctionPointer interpreterGetNativeMethodAddr (Method *)
 Looks up the implementation for the native method.


Define Documentation

#define M2N_ALLOC_MACRO

Value:

assert(!hythread_is_suspend_enabled());                      \
    M2nFrame m2n;                                           \
    memset((void*)&m2n, 0, sizeof(M2nFrame));               \
    m2n.prev_m2nf = m2n_get_last_frame();                   \
    m2n_set_last_frame(&m2n);                               \
                                                            \
    union {                                                 \
        ObjectHandlesOld old;                               \
        ObjectHandlesNew nw;                                \
    } handles;                                              \
    handles.nw.capacity = 0;                                \
    handles.nw.size = 0;                                    \
    handles.nw.next = 0;                                    \
    m2n_set_local_handles(&m2n, (ObjectHandles*)&handles)
Allocates memory.

#define M2N_FREE_MACRO

Value:

assert(!hythread_is_suspend_enabled());                      \
    free_local_object_handles2(m2n_get_local_handles(&m2n));\
    m2n_set_last_frame(m2n_get_previous_frame(&m2n))
Frees memory.


Function Documentation

void vm_enumerate_root_set_single_thread_not_on_stack ( VM_thread *  thread  ) 

Enumerates thread-assocciated references that are not stored on the thread's stack.

Parameters:
[in] thread - the thread pointer

VMEXPORT void free_local_object_handles2 ( ObjectHandles *  head  ) 

Frees and deletes all local object handles.

Parameters:
[in] head - the object handles pointer

GenericFunctionPointer interpreterGetNativeMethodAddr ( 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.


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

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