jitcontext.h
来自「This is a resource based on j2me embedde」· C头文件 代码 · 共 494 行 · 第 1/2 页
H
494 行
/* A mapping from block ID (PC) to CVMJITIRBlock* */ CVMJITBlockMap idToBlock; /* A counter for block ID assignment */ CVMUint32 blockIDCounter; CVMUint16 mapPcNodeCount; CVMUint16 saveRootCnt; /* maximum count per root node */ /* List of all Java blocks created in a method */ CVMJITIRList bkList; /* List of all artificial blocks created in a method */ CVMJITIRList artBkList; /* List of all JSR return target blocks in a method */ CVMJITIRList jsrRetTargetList; CVMJITStack* operandStack; /* IR operand stack */ /* queue for keeping blocks during IR generation */ CVMJITIRBlockQueue transQ; /* queue for pending local ref refinement */ CVMJITIRBlockQueue refQ; /* * Whether the locals information needs to be refined. */ CVMBool refineLocalsInformation; /* * A null-terminated DFS walk of the CFG. */ CVMJITIRBlock** dfsWalk; /* * Loops, one for each back edge discovered in the flow graph */ CVMJITLoop* loops; CVMUint32 numLoops; /* Nested loops, in order from smallest to largest */ CVMJITNestedLoop* nestedLoops; CVMUint32 numNestedLoops; /* Indicates if the compiled method has ret opcodes: */ CVMBool hasRet; /* true if we are currently emitting conditionally executed code. * Regman state is not allowed to change when true. */ CVMBool inConditionalCode; /* * stacks for use of code generator. * The first two are mutually exclusive, so can use the same space. struct CVMJITCompileExpression_rule_computation_state* rcs; struct CVMJITCompileExpression_match_computation_state* mcp; */ /* * This stack, the codegen semantic stack, is used at the * same time as one of the other two, so must be separately allocated * However, it can point to a place in the same allocation. */ struct CVMJITStackElement* cgsp; struct CVMJITStackElement* cgstackInit; struct CVMJITStackElement* cgstackLimit; void * compilationStateStack; void * goal_top; /* Flushed goal_top. */ /* * Block for which code is currently being generated. * Used by codegen to get phiSize. */ CVMJITIRBlock* currentCompilationBlock; /* * Maximum size (in words) of all the phi nodes entering any block. */ CVMUint16 maxPhiSize; /* * Maximum number of temps needed by code generation in this method. */ CVMInt32 maxTempWords; /* * Register management state. */ CVMJITRMCommonContext RMcommonContext; CVMJITRMContext RMcontext[2]; /* * Stack management state. */ CVMInt32 SMdepth; CVMInt32 SMmaxDepth;#ifndef CVMCPU_HAS_POSTINCREMENT_STORE /* * JSP offset (in words) for next argument push, which is also the amount * we need to eventually adjust JSP by before exiting the compiled method. */ CVMInt32 SMjspOffset;#endif CVMJITSet SMstackRefSet; /* * Refmap of the locals, as passed to codegen by way of LOCALREFS nodes */ CVMJITSet localRefSet; /* * list of stackmaps we collect during compilation. */ CVMInt32 stackmapListSize; CVMJITStackmapItem* stackmapList; CVMJITStackmapItem* stackmapListTail; CVMCompiledStackMaps* stackmaps; /* * list of GC check PC's we collect during compilation. */#ifdef CVMJIT_PATCH_BASED_GC_CHECKS CVMUint32 gcCheckPcsSize; CVMUint32 gcCheckPcsIndex; CVMCompiledGCCheckPCs* gcCheckPcs;#endif /* * Code emission related structures */ CVMInt32 curLogicalPC; CVMUint8* curPhysicalPC; CVMInt32 logicalPCstack[4]; /* for CVMJITcbufPushFixup */ CVMInt32 curDepth; /* depth of logicalPCstack */#ifdef IAI_CODE_SCHEDULER_SCORE_BOARD CVMUint32 logicalInstructionPC; CVMJITCSContext csContext;#endif /*IAI_CODE_SCHEDULER_SCORE_BOARD*/#ifdef CVM_DEBUG_ASSERTS /* These are for bounds checking OOL and fixup code emission: */ CVMUint8* oolPhysicalStartPCstack[4]; CVMUint8* oolPhysicalEndPCstack[4]; CVMInt32 oolCurDepth;#endif /* * Method prologue related */ /* The offset of the interpreted->compiled entry point from the beginning of the compiled method */ CVMInt32 intToCompOffset; /* * Some counts for estimating buffer size */ CVMUint32 numMainLineInstructionBytes; /* write barriers */ CVMUint32 numBarrierInstructionBytes; /* checkcast/instanceof */ CVMUint32 numCheckCastInstructionBytes; /* virtual inlining */ CVMUint32 numVirtinlineBytes; /* large opcodes: */ CVMUint32 numLargeOpcodeInstructionBytes; /* * Physical buffer stuff */ CVMUint8* codeBufAddr; /* The allocated code buffer */ CVMUint8* codeBufEnd; /* End of code buffer */ CVMUint8* codeEntry; /* start of generated code */ /* adjustment to expansion factor */ CVMUint32 extraCodeExpansion; /* estimate for stackmap memory */ CVMUint32 extraStackmapSpace;#ifdef CVM_JIT_PATCHED_METHOD_INVOCATIONS /* Total number direct methods calls made by this method. Setup by * the front end */ CVMUint32 numCallees; /* * The callee table. * * The structure of this table is as follows: * * The value stored at callees[0] is the number of * unique methods that are called by the method being compiled. * This number allows us to simplify the traversal of this table * on method decompilation. What follows is the mb* of each method * that this method calls directly. */ CVMMethodBlock** callees;#endif /* Error handler context to longjmp to */ jmp_buf errorHandlerContext; CVMUint16 constantPoolSize; CVMJITConstantEntry* constantPool; CVMUint32 numEntriesToEmit; /* Pending unemitted */ CVMInt32 earliestConstantRefPC; /* "Urgency" of dump */#ifdef CVM_JIT_USE_FP_HARDWARE CVMInt32 earliestFPConstantRefPC; /* "Urgency" of dump */#endif CVMCompiledPcMapTable *pcMapTable;#ifdef CVM_JIT_COLLECT_STATS CVMJITStats *stats;#endif /* * Memory allocator */ CVMJITMemChunk* memChunks; CVMUint32 workingMemory;#ifdef CVM_JIT_REGISTER_LOCALS /* * Array of ASSIGN nodes in the current block. * This array is copied to the block's assignNodes array after the * block is parsed. This way the global assignNodes[] can be estimated * on the high end, whereas each block has an accurate * size. If we exceed CVMJIT_MAX_ASSIGN_NODES within a block, then * we stop accumulating ASSIGN nodes, so this array is not * guaranteed to be complete. In this case we don't allow the block * to have any additional incoming locals because we don't want to * allow any locals that are assigned to to flow in from a prevous block, * because there may end up being a stackmap conflict. */ CVMJITIRNode* assignNodes[CVMJIT_MAX_ASSIGN_NODES]; CVMUint16 assignNodesCount;#endif /* * Target specific stuff. */ CVMJITTargetCompilationContext target;};#endif /* _INCLUDED_JIT_IMPL_H */
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?