ccm_runtime.h

来自「This is a resource based on j2me embedde」· C头文件 代码 · 共 641 行 · 第 1/2 页

H
641
字号
		       CVMClassBlock *arrayCb);/* Purpose: Instantiates a multi dimensional object array of the specified            dimensions. *//* Type: STATE_FLUSHED_TOTALLY THROWS_MULTIPLE *//* Throws: OutOfMemoryError, NegativeArraySizeException. *//*  * CVMmultiArrayAlloc() is called from java opcode multianewarray * and passes the top of stack as parameter dimensions. * Because the width of the array dimensions is obtained via  * dimensions[i], dimensions has to be of the same type as  * the stack elements for proper access. */CVMObject *CVMCCMruntimeMultiANewArray(CVMCCExecEnv *ccee, CVMJavaInt nDimensions,                            CVMClassBlock *arrCb, CVMStackVal32 *dimensions);/* Purpose: Runs the static initializer for the specified class if            necessary. *//* Result:  -Returns true if the class has been intialized.            -Returns false if class is being intialized by current	     thread.	    -Otherwise attempts to intialize the class and will return	     to the address in the current frame when intialization	     is complete. *//* Type: STATE_FLUSHED_TOTALLY THROWS_??? */CVMBoolCVMCCMruntimeRunClassInitializer(CVMCCExecEnv *ccee, CVMExecEnv *ee,				 CVMClassBlock *cb);/* Purpose: Resolves the specified class block constant pool entry. *//* Result:  Always returns TRUE since no class initialization is needed. *//* Type: STATE_FLUSHED_TOTALLY THROWS_MULTIPLE *//* Throws: IllegalAccessError, etc. */CVMBoolCVMCCMruntimeResolveClassBlock(CVMCCExecEnv *ccee, CVMExecEnv *ee,                               CVMUint16 cpIndex,                               CVMClassBlock **cachedConstant);/* Purpose: Resolves the specified array class block constant pool entry. *//* Result:  Always returns TRUE since no class initialization is needed. *//* Type: STATE_FLUSHED_TOTALLY THROWS_MULTIPLE *//* Throws: IllegalAccessError, etc. */CVMBoolCVMCCMruntimeResolveArrayClassBlock(CVMCCExecEnv *ccee, CVMExecEnv *ee,				    CVMUint16 cpIndex,				    CVMClassBlock **cachedConstant);/* Purpose: Resolves the specified field block constant pool entry into a            field offset, and checks if the filed has changed into a static            field. *//* Result:  Always returns TRUE since no class initialization is needed. *//* Type: STATE_FLUSHED_TOTALLY THROWS_MULTIPLE *//* Throws: IllegalAccessError, IncompatibleClassChangeError, NoSuchFieldError,           etc. */CVMBoolCVMCCMruntimeResolveGetfieldFieldOffset(CVMCCExecEnv *ccee,                                        CVMExecEnv *ee,                                        CVMUint16 cpIndex,                                        CVMUint32 *cachedConstant);/* Purpose: Resolves the specified field block constant pool entry into a            field offset, checks if the filed has changed into a static field,            and checks if the field is final (i.e. not writable to). *//* Result:  Always returns TRUE since no class initialization is needed. *//* Type: STATE_FLUSHED_TOTALLY THROWS_MULTIPLE *//* Throws: IllegalAccessError, IncompatibleClassChangeError, NoSuchFieldError,           etc. */CVMBoolCVMCCMruntimeResolvePutfieldFieldOffset(CVMCCExecEnv *ccee,                                        CVMExecEnv *ee,                                        CVMUint16 cpIndex,                                        CVMUint32 *cachedConstant);/* Purpose: Resolves the specified method block constant pool entry. *//* Result:  Always returns TRUE since no class initialization is needed. *//* Type: STATE_FLUSHED_TOTALLY THROWS_MULTIPLE *//* Throws: IllegalAccessError, NoSuchMethodError, etc. */CVMBoolCVMCCMruntimeResolveMethodBlock(CVMCCExecEnv *ccee, CVMExecEnv *ee,                                CVMUint16 cpIndex,                                CVMMethodBlock **cachedConstant);/* Purpose: Resolves the specified method block constant pool entry for            invokespecial, and checks if the method has changed into a static            method. *//* Result:  Always returns TRUE since no class initialization is needed. *//* Type: STATE_FLUSHED_TOTALLY THROWS_MULTIPLE *//* Throws: IllegalAccessError, IncompatibleClassChangeError, NoSuchMethodError,           etc. */CVMBoolCVMCCMruntimeResolveSpecialMethodBlock(CVMCCExecEnv *ccee, CVMExecEnv *ee,                                       CVMUint16 cpIndex,                                       CVMMethodBlock **cachedConstant);/* Purpose: Resolves the specified method block constant pool entry into a            method table offset for invokevirtual, and checks if the method has            changed into a static method. *//* Result:  NULL if vtable offset stored in cached word. *          else mb pointer if the mb is not in a vtable. *//* Type: STATE_FLUSHED_TOTALLY THROWS_MULTIPLE *//* Throws: IllegalAccessError, IncompatibleClassChangeError, NoSuchMethodError,           etc. */CVMMethodBlock *CVMCCMruntimeResolveMethodTableOffset(CVMCCExecEnv *ccee, CVMExecEnv *ee,                                      CVMUint16 cpIndex,                                      CVMUint32 *cachedConstant);/* Purpose: Resolves the specified class block constant pool entry,            checks if it is Ok to instantiate an instance of this class,            and runs the static initializer if necessary. *//* Result:  Same as CVMCCMruntimeRunClassInitializer. *//* Type: STATE_FLUSHED_TOTALLY THROWS_MULTIPLE *//* Throws: IllegalAccessError, InstantiationError, etc. */CVMBoolCVMCCMruntimeResolveNewClassBlockAndClinit(CVMCCExecEnv *ccee,                                           CVMExecEnv *ee,                                           CVMUint16 cpIndex,                                           CVMClassBlock **cachedConstant);/* Purpose: Resolves the specified static field constant pool entry,            checks if the field has changed into a non-static field, and            runs the static initializer if necessary. *//* Result:  Same as CVMCCMruntimeRunClassInitializer. *//* Type: STATE_FLUSHED_TOTALLY THROWS_MULTIPLE *//* Throws: IllegalAccessError, IncompatibleClassChangeError, NoSuchFieldError,           etc. */CVMBoolCVMCCMruntimeResolveGetstaticFieldBlockAndClinit(CVMCCExecEnv *ccee,                                                 CVMExecEnv *ee,                                                 CVMUint16 cpIndex,                                                 void **cachedConstant);/* Purpose: Resolves the specified static field constant pool entry,            checks if the field has changed into a non-static field,            checks if the field is final (i.e. not writable to), and            runs the static initializer if necessary. *//* Result:  Same as CVMCCMruntimeRunClassInitializer. *//* Type: STATE_FLUSHED_TOTALLY THROWS_MULTIPLE *//* Throws: IllegalAccessError, IncompatibleClassChangeError, NoSuchFieldError,           etc. */CVMBoolCVMCCMruntimeResolvePutstaticFieldBlockAndClinit(CVMCCExecEnv *ccee,                                                 CVMExecEnv *ee,                                                 CVMUint16 cpIndex,                                                 void **cachedConstant);/* Purpose: Resolves the specified static method block constant pool entry,            and runs the static initializer if necessary. *//* Result:  Same as CVMCCMruntimeRunClassInitializer. *//* Type: STATE_FLUSHED_TOTALLY THROWS_MULTIPLE *//* Throws: IllegalAccessError, IncompatibleClassChangeError, NoSuchMethodError,           etc. */CVMBoolCVMCCMruntimeResolveStaticMethodBlockAndClinit(CVMCCExecEnv *ccee,                                               CVMExecEnv *ee,                                               CVMUint16 cpIndex,                                               CVMMethodBlock **cachedConstant);/* Purpose: Performs an atomic 64-bit putstatic. *//* Type: STATE_NOT_FLUSHED THROWS_NONE */void CVMCCMruntimePutstatic64Volatile(CVMJavaLong value, void *staticField);/* Purpose: Performs an atomic 64-bit getstatic. *//* Type: STATE_NOT_FLUSHED THROWS_NONE */CVMJavaLong CVMCCMruntimeGetstatic64Volatile(void *staticField);/* Purpose: Performs an atomic 64-bit putfield. *//* Type: STATE_NOT_FLUSHED THROWS_NONE */void CVMCCMruntimePutfield64Volatile(CVMJavaLong value,				     CVMObject *obj,				     CVMJavaInt fieldByteOffset);/* Purpose: Performs an atomic 64-bit getfield. *//* Type: STATE_NOT_FLUSHED THROWS_NONE */CVMJavaLong CVMCCMruntimeGetfield64Volatile(CVMObject *obj,					    CVMJavaInt fieldByteOffset);/* Purpose: Perform monitor enter. *//* Type: STATE_FLUSHED THROWS_MULTIPLE */voidCVMCCMruntimeMonitorEnter(CVMCCExecEnv *ccee, CVMExecEnv *ee, CVMObject *obj);/* Purpose: Perform monitor exit. *//* Type: STATE_FLUSHED THROWS_MULTIPLE */voidCVMCCMruntimeMonitorExit(CVMCCExecEnv *ccee, CVMExecEnv *ee, CVMObject *obj);/* Purpose: Rendezvous with GC thread. *//* Type: STATE_FLUSHED THROWS_NONE */voidCVMCCMruntimeGCRendezvous(CVMCCExecEnv *ccee, CVMExecEnv *ee);#if defined(CVMJIT_SIMPLE_SYNC_METHODS) && \    (CVM_FASTLOCK_TYPE == CVM_FASTLOCK_ATOMICOPS)/*  * Simple Sync helper function for unlocking in Simple Sync methods when * there is contention for the lock after locking. It is only needed for * CVM_FASTLOCK_ATOMICOPS since once locked, CVM_FASTLOCK_MICROLOCK * will never allow for contention of Simple Sync methods. */extern voidCVMCCMruntimeSimpleSyncUnlock(CVMExecEnv *ee, CVMObject* obj);#endif /* CVMJIT_SIMPLE_SYNC_METHODS */#ifdef CVM_CCM_COLLECT_STATS/*============================================================================// The following are used to collect statistics about the runtime activity of// compiled code:*/typedef enum CVMCCMStatsTag {    CVMCCM_STATS_FIRST_CCMRUNTIME_STATS,    CVMCCM_STATS_CVMCCMruntimeIDiv = CVMCCM_STATS_FIRST_CCMRUNTIME_STATS,    CVMCCM_STATS_CVMCCMruntimeIRem,    CVMCCM_STATS_CVMCCMruntimeLMul,    CVMCCM_STATS_CVMCCMruntimeLDiv,    CVMCCM_STATS_CVMCCMruntimeLRem,    CVMCCM_STATS_CVMCCMruntimeLNeg,    CVMCCM_STATS_CVMCCMruntimeLShl,    CVMCCM_STATS_CVMCCMruntimeLShr,    CVMCCM_STATS_CVMCCMruntimeLUshr,    CVMCCM_STATS_CVMCCMruntimeLAnd,    CVMCCM_STATS_CVMCCMruntimeLOr,    CVMCCM_STATS_CVMCCMruntimeLXor,    CVMCCM_STATS_CVMCCMruntimeFAdd,    CVMCCM_STATS_CVMCCMruntimeFSub,    CVMCCM_STATS_CVMCCMruntimeFMul,    CVMCCM_STATS_CVMCCMruntimeFDiv,    CVMCCM_STATS_CVMCCMruntimeFRem,    CVMCCM_STATS_CVMCCMruntimeFNeg,    CVMCCM_STATS_CVMCCMruntimeDAdd,    CVMCCM_STATS_CVMCCMruntimeDSub,    CVMCCM_STATS_CVMCCMruntimeDMul,    CVMCCM_STATS_CVMCCMruntimeDDiv,    CVMCCM_STATS_CVMCCMruntimeDRem,    CVMCCM_STATS_CVMCCMruntimeDNeg,    CVMCCM_STATS_CVMCCMruntimeI2L,    CVMCCM_STATS_CVMCCMruntimeI2F,    CVMCCM_STATS_CVMCCMruntimeI2D,    CVMCCM_STATS_CVMCCMruntimeL2I,    CVMCCM_STATS_CVMCCMruntimeL2F,    CVMCCM_STATS_CVMCCMruntimeL2D,    CVMCCM_STATS_CVMCCMruntimeF2I,    CVMCCM_STATS_CVMCCMruntimeF2L,    CVMCCM_STATS_CVMCCMruntimeF2D,    CVMCCM_STATS_CVMCCMruntimeD2I,    CVMCCM_STATS_CVMCCMruntimeD2L,    CVMCCM_STATS_CVMCCMruntimeD2F,    CVMCCM_STATS_CVMCCMruntimeLCmp,    CVMCCM_STATS_CVMCCMruntimeFCmp,    CVMCCM_STATS_CVMCCMruntimeDCmpl,    CVMCCM_STATS_CVMCCMruntimeDCmpg,    CVMCCM_STATS_CVMCCMruntimeThrowClass,    CVMCCM_STATS_CVMCCMruntimeThrowObject,    CVMCCM_STATS_CVMCCMruntimeCheckCast,    CVMCCM_STATS_CVMCCMruntimeCheckArrayAssignable,    CVMCCM_STATS_CVMCCMruntimeInstanceOf,    CVMCCM_STATS_CVMCCMruntimeLookupInterfaceMB,    CVMCCM_STATS_CVMCCMruntimeNew,    CVMCCM_STATS_CVMCCMruntimeNewArray,    CVMCCM_STATS_CVMCCMruntimeANewArray,    CVMCCM_STATS_CVMCCMruntimeMultiANewArray,    CVMCCM_STATS_CVMCCMruntimeRunClassInitializer,    CVMCCM_STATS_CVMCCMruntimeResolveClassBlock,    CVMCCM_STATS_CVMCCMruntimeResolveArrayClassBlock,    CVMCCM_STATS_CVMCCMruntimeResolveGetfieldFieldOffset,    CVMCCM_STATS_CVMCCMruntimeResolvePutfieldFieldOffset,    CVMCCM_STATS_CVMCCMruntimeResolveMethodBlock,    CVMCCM_STATS_CVMCCMruntimeResolveSpecialMethodBlock,    CVMCCM_STATS_CVMCCMruntimeResolveMethodTableOffset,    CVMCCM_STATS_CVMCCMruntimeResolveNewClassBlockAndClinit,    CVMCCM_STATS_CVMCCMruntimeResolveGetstaticFieldBlockAndClinit,    CVMCCM_STATS_CVMCCMruntimeResolvePutstaticFieldBlockAndClinit,    CVMCCM_STATS_CVMCCMruntimeResolveStaticMethodBlockAndClinit,    CVMCCM_STATS_CVMCCMruntimePutstatic64Volatile,    CVMCCM_STATS_CVMCCMruntimeGetstatic64Volatile,    CVMCCM_STATS_CVMCCMruntimePutfield64Volatile,    CVMCCM_STATS_CVMCCMruntimeGetfield64Volatile,    CVMCCM_STATS_CVMCCMruntimeMonitorEnter,    CVMCCM_STATS_CVMCCMruntimeMonitorExit,    CVMCCM_STATS_CVMCCMruntimeGCRendezvous,#if defined(CVMJIT_SIMPLE_SYNC_METHODS) && \    (CVM_FASTLOCK_TYPE == CVM_FASTLOCK_ATOMICOPS)    CVMCCM_STATS_CVMCCMruntimeSimpleSyncUnlock,#endif    /* NOTE: CVMCCM_STATS_NUM_TAGS must be last in this enum list. */    CVMCCM_STATS_NUM_TAGS                      /* Number of stats tags */} CVMCCMStatsTag;/* NOTE: CVMCCMGlobalStats encapsulates the global stats that will be         collected.*/typedef struct CVMCCMGlobalStats CVMCCMGlobalStats;struct CVMCCMGlobalStats{    CVMBool okToCollectStats;    CVMInt32 stats[CVMCCM_STATS_NUM_TAGS];};/* Purpose: Increments the specified CCM stat. */extern void CVMCCMstatsInc(CVMExecEnv *ee, CVMCCMStatsTag tag);/* Purpose: Dumps the collected CCM stats. */extern voidCVMCCMstatsDumpStats();#else#define CVMCCMstatsInc(ee, tag)#define CVMCCMstatsDumpStats()#endif /* CVM_CCM_COLLECT_STATS */#endif /* _INCLUDED_CCM_RUNTIME_H */

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?