harmony-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From mcfi...@apache.org
Subject svn commit: r659108 [16/19] - in /harmony/enhanced/drlvm/trunk/vm: em/src/ gc_gen/src/common/ gc_gen/src/mark_compact/ gc_gen/src/mark_sweep/ gc_gen/src/semi_space/ gc_gen/src/trace_forward/ include/open/ interpreter/src/ jitrino/src/codegenerator/ jit...
Date Thu, 22 May 2008 13:34:09 GMT
Modified: harmony/enhanced/drlvm/trunk/vm/jitrino/src/translator/java/JavaByteCodeTranslator.h
URL: http://svn.apache.org/viewvc/harmony/enhanced/drlvm/trunk/vm/jitrino/src/translator/java/JavaByteCodeTranslator.h?rev=659108&r1=659107&r2=659108&view=diff
==============================================================================
--- harmony/enhanced/drlvm/trunk/vm/jitrino/src/translator/java/JavaByteCodeTranslator.h (original)
+++ harmony/enhanced/drlvm/trunk/vm/jitrino/src/translator/java/JavaByteCodeTranslator.h Thu May 22 06:33:38 2008
@@ -52,8 +52,8 @@
     
     
 
-    void offset(uint32 offset);
-    void offset_done(uint32 offset);
+    void offset(U_32 offset);
+    void offset_done(U_32 offset);
     void checkStack();
     // called before parsing starts
     virtual void parseInit() {
@@ -69,18 +69,18 @@
     // generates the argument loading code
     void genArgLoads();
     // generated argument loading for inlined methods
-    void genArgLoads(uint32 numActualArgs,Opnd** actualArgs);
+    void genArgLoads(U_32 numActualArgs,Opnd** actualArgs);
 
     void nop();
     void aconst_null();
-    void iconst(int32 val);
+    void iconst(I_32 val);
     void lconst(int64 val);
     void fconst(float val);
     void dconst(double val);
     void bipush(int8 val);
     void sipush(int16 val);
-    void ldc(uint32 constPoolIndex);
-    void ldc2(uint32 constPoolIndex);
+    void ldc(U_32 constPoolIndex);
+    void ldc2(U_32 constPoolIndex);
     void iload(uint16 varIndex);
     void lload(uint16 varIndex);
     void fload(uint16 varIndex);
@@ -94,11 +94,11 @@
     void baload();
     void caload();
     void saload();
-    void istore(uint16 varIndex,uint32 off);
-    void lstore(uint16 varIndex,uint32 off);
-    void fstore(uint16 varIndex,uint32 off);
-    void dstore(uint16 varIndex,uint32 off);
-    void astore(uint16 varIndex,uint32 off);
+    void istore(uint16 varIndex,U_32 off);
+    void lstore(uint16 varIndex,U_32 off);
+    void fstore(uint16 varIndex,U_32 off);
+    void dstore(uint16 varIndex,U_32 off);
+    void astore(uint16 varIndex,U_32 off);
     void iastore();
     void lastore();
     void fastore();
@@ -152,7 +152,7 @@
     void lor();
     void ixor();
     void lxor();
-    void iinc(uint16 varIndex,int32 amount);
+    void iinc(uint16 varIndex,I_32 amount);
     void i2l();
     void i2f();
     void i2d();
@@ -173,68 +173,68 @@
     void fcmpg();
     void dcmpl();
     void dcmpg();
-    void ifeq(uint32 targetOffset,uint32 nextOffset);
-    void ifne(uint32 targetOffset,uint32 nextOffset);
-    void iflt(uint32 targetOffset,uint32 nextOffset);
-    void ifge(uint32 targetOffset,uint32 nextOffset);
-    void ifgt(uint32 targetOffset,uint32 nextOffset);
-    void ifle(uint32 targetOffset,uint32 nextOffset);
-    void if_icmpeq(uint32 targetOffset,uint32 nextOffset);
-    void if_icmpne(uint32 targetOffset,uint32 nextOffset);
-    void if_icmplt(uint32 targetOffset,uint32 nextOffset);
-    void if_icmpge(uint32 targetOffset,uint32 nextOffset);
-    void if_icmpgt(uint32 targetOffset,uint32 nextOffset);
-    void if_icmple(uint32 targetOffset,uint32 nextOffset);
-    void if_acmpeq(uint32 targetOffset,uint32 nextOffset);
-    void if_acmpne(uint32 targetOffset,uint32 nextOffset);
-    void goto_(uint32 targetOffset,uint32 nextOffset);
-    void jsr(uint32 offset, uint32 nextOffset);
+    void ifeq(U_32 targetOffset,U_32 nextOffset);
+    void ifne(U_32 targetOffset,U_32 nextOffset);
+    void iflt(U_32 targetOffset,U_32 nextOffset);
+    void ifge(U_32 targetOffset,U_32 nextOffset);
+    void ifgt(U_32 targetOffset,U_32 nextOffset);
+    void ifle(U_32 targetOffset,U_32 nextOffset);
+    void if_icmpeq(U_32 targetOffset,U_32 nextOffset);
+    void if_icmpne(U_32 targetOffset,U_32 nextOffset);
+    void if_icmplt(U_32 targetOffset,U_32 nextOffset);
+    void if_icmpge(U_32 targetOffset,U_32 nextOffset);
+    void if_icmpgt(U_32 targetOffset,U_32 nextOffset);
+    void if_icmple(U_32 targetOffset,U_32 nextOffset);
+    void if_acmpeq(U_32 targetOffset,U_32 nextOffset);
+    void if_acmpne(U_32 targetOffset,U_32 nextOffset);
+    void goto_(U_32 targetOffset,U_32 nextOffset);
+    void jsr(U_32 offset, U_32 nextOffset);
     void ret(uint16 varIndex, const uint8* byteCodes);
     void tableswitch(JavaSwitchTargetsIter*);
     void lookupswitch(JavaLookupSwitchTargetsIter*);
-    void ireturn(uint32 off);
-    void lreturn(uint32 off);
-    void freturn(uint32 off);
-    void dreturn(uint32 off);
-    void areturn(uint32 off);
-    void return_(uint32 off);
-    void getstatic(uint32 constPoolIndex);
-    void putstatic(uint32 constPoolIndex);
-    void getfield(uint32 constPoolIndex);
-    void putfield(uint32 constPoolIndex);
-    void invokevirtual(uint32 constPoolIndex);
-    void invokespecial(uint32 constPoolIndex);
-    void invokestatic(uint32 constPoolIndex);
-    void invokeinterface(uint32 constPoolIndex,uint32 count);
-    void new_(uint32 constPoolIndex);
+    void ireturn(U_32 off);
+    void lreturn(U_32 off);
+    void freturn(U_32 off);
+    void dreturn(U_32 off);
+    void areturn(U_32 off);
+    void return_(U_32 off);
+    void getstatic(U_32 constPoolIndex);
+    void putstatic(U_32 constPoolIndex);
+    void getfield(U_32 constPoolIndex);
+    void putfield(U_32 constPoolIndex);
+    void invokevirtual(U_32 constPoolIndex);
+    void invokespecial(U_32 constPoolIndex);
+    void invokestatic(U_32 constPoolIndex);
+    void invokeinterface(U_32 constPoolIndex,U_32 count);
+    void new_(U_32 constPoolIndex);
     void newarray(uint8 type);
-    void anewarray(uint32 constPoolIndex);
+    void anewarray(U_32 constPoolIndex);
     void arraylength();
     void athrow();
-    void checkcast(uint32 constPoolIndex);
-    int  instanceof(const uint8* bcp, uint32 constPoolIndex, uint32 off) ;
+    void checkcast(U_32 constPoolIndex);
+    int  instanceof(const uint8* bcp, U_32 constPoolIndex, U_32 off) ;
     void monitorenter();
     void monitorexit();
-    void multianewarray(uint32 constPoolIndex,uint8 dimensions);
-    void ifnull(uint32 targetOffset,uint32 nextOffset);
-    void ifnonnull(uint32 targetOffset,uint32 nextOffset);
+    void multianewarray(U_32 constPoolIndex,uint8 dimensions);
+    void ifnull(U_32 targetOffset,U_32 nextOffset);
+    void ifnonnull(U_32 targetOffset,U_32 nextOffset);
 private:
 
-    typedef StlMap<uint32, Inst*> OffsetToInstMap;
+    typedef StlMap<U_32, Inst*> OffsetToInstMap;
 
     //
     // helper methods for generating code
     //
-    Opnd**  popArgs(uint32 numArgs);
+    Opnd**  popArgs(U_32 numArgs);
     // for invoke emulation if resolution fails
     void    pseudoInvoke(const char* mdesc);
     void    genCallWithResolve(JavaByteCodes bc, unsigned cpIndex);
     void    invalid();    // called when invalid IR is encountered
-    void    genLdVar(uint32 varIndex,JavaLabelPrepass::JavaVarType javaType);
-    void    genStVar(uint32 varIndex,JavaLabelPrepass::JavaVarType javaType);
+    void    genLdVar(U_32 varIndex,JavaLabelPrepass::JavaVarType javaType);
+    void    genStVar(U_32 varIndex,JavaLabelPrepass::JavaVarType javaType);
     void    genTypeStVar(uint16 varIndex);
-    void    genReturn(JavaLabelPrepass::JavaVarType javaType,uint32 off);
-    void    genReturn(uint32 off);
+    void    genReturn(JavaLabelPrepass::JavaVarType javaType,U_32 off);
+    void    genReturn(U_32 off);
     void    genAdd(Type* dstType);
     void    genSub(Type* dstType);
     void    genMul(Type* dstType);
@@ -255,25 +255,25 @@
     void    genTypeArrayStore();
     void    genShl(Type* type, ShiftMaskModifier mod);
     void    genShr(Type* type, SignedModifier mod1, ShiftMaskModifier mod2);
-    void    genIf1(ComparisonModifier,int32 targetOffset,int32 nextOffset);
-    void    genIf1Commute(ComparisonModifier,int32 targetOffset,int32 nextOffset);
-    void    genIf2(ComparisonModifier,int32 targetOffset,int32 nextOffset);
-    void    genIf2Commute(ComparisonModifier mod,int32 targetOffset,int32 nextOffset);
-    void    genIfNull(ComparisonModifier,int32 targetOffset,int32 nextOffset);
+    void    genIf1(ComparisonModifier,I_32 targetOffset,I_32 nextOffset);
+    void    genIf1Commute(ComparisonModifier,I_32 targetOffset,I_32 nextOffset);
+    void    genIf2(ComparisonModifier,I_32 targetOffset,I_32 nextOffset);
+    void    genIf2Commute(ComparisonModifier mod,I_32 targetOffset,I_32 nextOffset);
+    void    genIfNull(ComparisonModifier,I_32 targetOffset,I_32 nextOffset);
     void    genThreeWayCmp(Type::Tag cmpType,ComparisonModifier src1ToSrc2); // Src2toSrc1 must be same
     //
     // LinkingException throw
     // 
-    void linkingException(uint32 constPoolIndex, uint32 operation);
+    void linkingException(U_32 constPoolIndex, U_32 operation);
     //
     // helper methods for inlining, call and return sequences
     //
-    bool    needsReturnLabel(uint32 off);
-    void    genInvokeStatic(MethodDesc * methodDesc,uint32 numArgs,Opnd ** srcOpnds,Type * returnType);
-    bool    genVMMagic(const char* mname, uint32 numArgs,Opnd ** srcOpnds,Type * returnType);
-    bool    genVMHelper(const char* mname, uint32 numArgs,Opnd ** srcOpnds,Type * returnType);
+    bool    needsReturnLabel(U_32 off);
+    void    genInvokeStatic(MethodDesc * methodDesc,U_32 numArgs,Opnd ** srcOpnds,Type * returnType);
+    bool    genVMMagic(const char* mname, U_32 numArgs,Opnd ** srcOpnds,Type * returnType);
+    bool    genVMHelper(const char* mname, U_32 numArgs,Opnd ** srcOpnds,Type * returnType);
     
-    bool    genMinMax(MethodDesc * methodDesc,uint32 numArgs,Opnd ** srcOpnds, Type * returnType);
+    bool    genMinMax(MethodDesc * methodDesc,U_32 numArgs,Opnd ** srcOpnds, Type * returnType);
     void    newFallthroughBlock();
 
     
@@ -287,19 +287,19 @@
     //
     // labels and control flow
     //
-    uint32            labelId(uint32 offset);
-    LabelInst* getLabel(uint32 labelId) {
+    U_32            labelId(U_32 offset);
+    LabelInst* getLabel(U_32 labelId) {
         assert(labelId < numLabels);
         LabelInst *label = labels[labelId];
         return label;
     }
-    void       setLabel(uint32 labelId, LabelInst *label) {
+    void       setLabel(U_32 labelId, LabelInst *label) {
         labels[labelId] = label;
     }
     LabelInst* getNextLabel() {
         return labels[nextLabel];
     }
-    uint32    getNextLabelId() {
+    U_32    getNextLabelId() {
         assert(nextLabel < numLabels);
         return nextLabel++;
     }
@@ -313,14 +313,14 @@
     //
     // field, method, and type resolution
     //
-    Type*            getFieldType(FieldDesc*, uint32 constPoolIndex);
-    const char*      methodSignatureString(uint32 cpIndex);
+    Type*            getFieldType(FieldDesc*, U_32 constPoolIndex);
+    const char*      methodSignatureString(U_32 cpIndex);
     //
     //
     // locals access
     //
-    Opnd*            getVarOpndLdVar(JavaLabelPrepass::JavaVarType javaType,uint32 index);
-    VarOpnd*         getVarOpndStVar(JavaLabelPrepass::JavaVarType javaType,uint32 index,Opnd *opnd);
+    Opnd*            getVarOpndLdVar(JavaLabelPrepass::JavaVarType javaType,U_32 index);
+    VarOpnd*         getVarOpndStVar(JavaLabelPrepass::JavaVarType javaType,U_32 index,Opnd *opnd);
     bool             needsReturnLabel();
     //
     //  synchronization
@@ -328,15 +328,15 @@
     void             genMethodMonitorEnter();
     void             genMethodMonitorExit();
     
-    void             applyMaskToTop(int32 mask);
+    void             applyMaskToTop(I_32 mask);
 
     // Method checks if following bytecodes are array initializers for newly created array.
     // If they are then substitute array initializers with jit helper array copy instruction.
     // Returns the length of bytecodes converted by this routine.
-    uint32 checkForArrayInitializer(Opnd* arrayOpnd, const uint8* byteCodes, uint32 offset, const uint32 byteCodeLength);
+    U_32 checkForArrayInitializer(Opnd* arrayOpnd, const uint8* byteCodes, U_32 offset, const U_32 byteCodeLength);
     // Obtain the next numeric value from the bytecode in array initialization sequence
     // Returns number of bytes read from the byteCodes array.
-    uint32 getNumericValue(const uint8* byteCodes, uint32 offset, const uint32 byteCodeLength, uint64& value);
+    U_32 getNumericValue(const uint8* byteCodes, U_32 offset, const U_32 byteCodeLength, uint64& value);
 
     //
     // private fields
@@ -372,21 +372,21 @@
     //
     ExceptionInfo*      inliningExceptionInfo; // instruction where inlining begins
     Node*            inliningNodeBegin;  // used by inlining of synchronized methods
-    uint32              numLabels;          // number of labels in this method
-    uint32              numVars;            // number of variables in this method
-    uint32              numStackVars;       // number of non-empty stack locations in this method
-    uint32              numArgs;            // number of arguments in this method
+    U_32              numLabels;          // number of labels in this method
+    U_32              numVars;            // number of variables in this method
+    U_32              numStackVars;       // number of non-empty stack locations in this method
+    U_32              numArgs;            // number of arguments in this method
     Type**              argTypes;           // types for each argument
     Opnd**              args;               // argument opnds
     Opnd*               resultOpnd;         // used for inlining only
     Type*               retType;            // return type of method
-    uint32              nextLabel;
+    U_32              nextLabel;
     LabelInst**         labels;
     Type*               javaTypeMap[JavaLabelPrepass::NumJavaVarTypes];
     JavaLabelPrepass    prepass;
     StateInfo           *stateInfo;
-    uint32              firstVarRef;
-    uint32              numberVarRef;
+    U_32              firstVarRef;
+    U_32              numberVarRef;
     // Synchronization
     Opnd*               lockAddr;
     Opnd*               oldLockValue;

Modified: harmony/enhanced/drlvm/trunk/vm/jitrino/src/translator/java/JavaFlowGraphBuilder.cpp
URL: http://svn.apache.org/viewvc/harmony/enhanced/drlvm/trunk/vm/jitrino/src/translator/java/JavaFlowGraphBuilder.cpp?rev=659108&r1=659107&r2=659108&view=diff
==============================================================================
--- harmony/enhanced/drlvm/trunk/vm/jitrino/src/translator/java/JavaFlowGraphBuilder.cpp (original)
+++ harmony/enhanced/drlvm/trunk/vm/jitrino/src/translator/java/JavaFlowGraphBuilder.cpp Thu May 22 06:33:38 2008
@@ -158,8 +158,8 @@
     case Op_Switch:
         {
             SwitchInst *sw = (SwitchInst*)last;
-            uint32 num = sw->getNumTargets();
-            for (uint32 i = 0; i < num; i++) {
+            U_32 num = sw->getNumTargets();
+            for (U_32 i = 0; i < num; i++) {
                 Node* target = sw->getTarget(i)->getNode();
                 // two switch values may go to the same block
                 if (!block->findTargetEdge(target)) {

Modified: harmony/enhanced/drlvm/trunk/vm/jitrino/src/translator/java/JavaLabelPrepass.cpp
URL: http://svn.apache.org/viewvc/harmony/enhanced/drlvm/trunk/vm/jitrino/src/translator/java/JavaLabelPrepass.cpp?rev=659108&r1=659107&r2=659108&view=diff
==============================================================================
--- harmony/enhanced/drlvm/trunk/vm/jitrino/src/translator/java/JavaLabelPrepass.cpp (original)
+++ harmony/enhanced/drlvm/trunk/vm/jitrino/src/translator/java/JavaLabelPrepass.cpp Thu May 22 06:33:38 2008
@@ -27,7 +27,7 @@
 
 namespace Jitrino {
 
-VariableIncarnation::VariableIncarnation(uint32 offset, Type* t)
+VariableIncarnation::VariableIncarnation(U_32 offset, Type* t)
 : definingOffset(offset), declaredType(t), opnd(NULL)
 {
     _prev = _next = NULL;
@@ -152,7 +152,7 @@
 }
 
 
-bool SlotVar::addVarIncarnations(SlotVar* var, MemoryManager& mm, uint32 linkOffset) {
+bool SlotVar::addVarIncarnations(SlotVar* var, MemoryManager& mm, U_32 linkOffset) {
     assert(var->_prev == NULL);
     SlotVar* this_sv = this;
     while(this_sv->_next) this_sv = (SlotVar*)this_sv->_next;
@@ -274,7 +274,7 @@
     }
 }
 
-void StateInfo::cleanFinallyInfo(uint32 offset)
+void StateInfo::cleanFinallyInfo(U_32 offset)
 {
     for (unsigned k=0; k < stackDepth; k++) {
         if (stack[k].jsrLabelOffset == offset) {
@@ -295,9 +295,9 @@
           compilationInterface(ci), enclosingMethod(method),
           prevCatch(NULL), nextRegionId(0) {}
 
-    uint32 parseHandlers() {
-        uint32 numHandlers = enclosingMethod->getNumHandlers();
-        for (uint32 i=0; i<numHandlers; i++) {
+    U_32 parseHandlers() {
+        U_32 numHandlers = enclosingMethod->getNumHandlers();
+        for (U_32 i=0; i<numHandlers; i++) {
             unsigned short beginOffset,endOffset,handlerOffset,handlerClassIndex;
             enclosingMethod->getHandlerInfo(i,&beginOffset,&endOffset,
                 &handlerOffset,&handlerClassIndex);
@@ -313,7 +313,7 @@
     }
 
     void addHandlerForCatchBlock(CatchBlock* block, 
-                                      uint32 handlerOffset,
+                                      U_32 handlerOffset,
                                       Type*  exceptionType) {
         jitrino_assert( exceptionType);
         assert(!exceptionType->isUnresolvedType());//must be resolved by verifier
@@ -346,7 +346,7 @@
         
     }
 
-    CatchBlock* splitBlockWithOffset(CatchBlock* block, uint32 offset)
+    CatchBlock* splitBlockWithOffset(CatchBlock* block, U_32 offset)
     {
         CatchBlock* newBlock = 
             new (memManager) CatchBlock(nextRegionId++, 
@@ -370,10 +370,10 @@
         return newBlock;
     }
 
-    bool catchBlock(uint32 tryOffset,
-                            uint32 tryLength,
-                            uint32 handlerOffset,
-                            uint32 exceptionTypeToken)  {
+    bool catchBlock(U_32 tryOffset,
+                            U_32 tryLength,
+                            U_32 handlerOffset,
+                            U_32 exceptionTypeToken)  {
  
         if (Log::isEnabled()) Log::out() << "CatchBlock @ " << (int)tryOffset << "," 
             << (int)tryOffset+(int)tryLength
@@ -381,7 +381,7 @@
              << " exception type " << (int)exceptionTypeToken << ","
              << " numCatch " << numCatch << ::std::endl;
 
-        uint32 endOffset = tryOffset + tryLength;
+        U_32 endOffset = tryOffset + tryLength;
         prepass.setLabel(handlerOffset);
         prepass.setLabel(tryOffset);
         prepass.setLabel(endOffset);
@@ -487,13 +487,13 @@
         return 1; // all exceptionTypes are OK
     }
 
-    uint32 numCatch;
+    U_32 numCatch;
     MemoryManager&            memManager;
     JavaLabelPrepass&      prepass;
     CompilationInterface&   compilationInterface;
     MethodDesc*             enclosingMethod;
     CatchBlock*             prevCatch;
-    uint32                  nextRegionId;
+    U_32                  nextRegionId;
 };
 
 
@@ -514,7 +514,7 @@
    exceptionTable(mm),
    problemTypeToken(MAX_UINT32)
 {
-    uint32 numByteCodes = methodDesc.getByteCodeSize();
+    U_32 numByteCodes = methodDesc.getByteCodeSize();
     //nextIsLabel = false;
     int32Type = typeManager.getInt32Type();
     int64Type = typeManager.getInt64Type();
@@ -528,7 +528,7 @@
     int numStack = methodDesc.getMaxStack()+1;
     stateInfo.stack  = new (memManager) StateInfo::SlotInfo[numVars+numStack];
     stateInfo.stackDepth = numVars;
-    for (uint32 k=0; k < numVars+numStack; k++) {
+    for (U_32 k=0; k < numVars+numStack; k++) {
         struct StateInfo::SlotInfo *slot = &stateInfo.stack[k];
         slot->type = NULL;
         slot->slotFlags = 0;
@@ -555,8 +555,8 @@
     }
     hasJsrLabels = false;
     isFallThruLabel = true;
-    uint32 numArgs = methodDesc.getNumParams();
-    for (uint32 i=0, j=0; i<numArgs; i++,j++) {
+    U_32 numArgs = methodDesc.getNumParams();
+    for (U_32 i=0, j=0; i<numArgs; i++,j++) {
         Type *type;
         struct StateInfo::SlotInfo *slot = &stateInfo.stack[j];
         if (actualArgs != NULL) { 
@@ -589,7 +589,7 @@
     stateTable->setStateInfo(&stateInfo, 0, false);
 }
 
-void JavaLabelPrepass::offset(uint32 offset) {
+void JavaLabelPrepass::offset(U_32 offset) {
     bytecodevisited->setBit(offset,true);
     if (offset==0)
         stateTable->restoreStateInfo(&stateInfo, offset);
@@ -602,7 +602,7 @@
             propagateStateInfo(offset,isFallThruLabel);
             isFallThruLabel = true;
         }
-        if (Log::isEnabled()) Log::out() << "BASICBLOCK " << (int32)offset << " #" << blockNumber << std::endl;
+        if (Log::isEnabled()) Log::out() << "BASICBLOCK " << (I_32)offset << " #" << blockNumber << std::endl;
         ++blockNumber;
         visited->setBit(offset,true);
         stateTable->restoreStateInfo(&stateInfo,offset);
@@ -615,7 +615,7 @@
 
 
 
-void JavaLabelPrepass::setLabel(uint32 offset) {
+void JavaLabelPrepass::setLabel(U_32 offset) {
     if (labels->getBit(offset)) // this label is already seen
         return;
     if (Log::isEnabled()) Log::out() << "SET LABEL " << (int) offset << " #" << (int) numLabels << ::std::endl;
@@ -624,30 +624,30 @@
 }
 
 struct LabelOffsetVisitor : public BitSet::Visitor {
-    LabelOffsetVisitor(uint32* l) : labelOffset(l) {}
-    void visit(uint32 elem) {*labelOffset++ = elem;}
-    uint32* labelOffset;
+    LabelOffsetVisitor(U_32* l) : labelOffset(l) {}
+    void visit(U_32 elem) {*labelOffset++ = elem;}
+    U_32* labelOffset;
 };
 
 
 // called to indicate end of parsing
 void JavaLabelPrepass::parseDone() {
-    labelOffsets = new (memManager) uint32[numLabels];
+    labelOffsets = new (memManager) U_32[numLabels];
     struct LabelOffsetVisitor avisitor(labelOffsets);
     labels->visitElems(avisitor);
     if (Log::isEnabled()) Log::out() << ::std::endl << "================= PREPASS IS FINISHED =================" << ::std::endl << ::std::endl;
 }
 
-uint32 JavaLabelPrepass::getLabelId(uint32 offset) {
+U_32 JavaLabelPrepass::getLabelId(U_32 offset) {
     if (numLabels == 0)
-        return (uint32) -1;
-    uint32 lo = 0;
-    uint32 hi = numLabels-1;
+        return (U_32) -1;
+    U_32 lo = 0;
+    U_32 hi = numLabels-1;
     if (offset > labelOffsets[hi] || offset < labelOffsets[lo])
         // not in this set
-        return (uint32) -1;
+        return (U_32) -1;
     while (hi-lo > 4) {
-        uint32 mid = lo + ((hi-lo) >> 1);
+        U_32 mid = lo + ((hi-lo) >> 1);
         if (offset < labelOffsets[mid]) 
             hi = mid;
         else
@@ -659,23 +659,23 @@
             return lo;
         lo++;
     }
-    return (uint32) -1;
+    return (U_32) -1;
 }
 
-VariableIncarnation* JavaLabelPrepass::getVarInc(uint32 offset, uint32 index)
+VariableIncarnation* JavaLabelPrepass::getVarInc(U_32 offset, U_32 index)
 {
     int numStack = methodDesc.getMaxStack()+1;
-    uint32 key = offset*(numVars+numStack)+index;
-    StlHashMap<uint32,VariableIncarnation*>::iterator iter = localVars.find(key);
+    U_32 key = offset*(numVars+numStack)+index;
+    StlHashMap<U_32,VariableIncarnation*>::iterator iter = localVars.find(key);
     if (iter==localVars.end()) return NULL;
     return (*iter).second;
 }
 
-VariableIncarnation* JavaLabelPrepass::getOrCreateVarInc(uint32 offset, uint32 index, Type* type)
+VariableIncarnation* JavaLabelPrepass::getOrCreateVarInc(U_32 offset, U_32 index, Type* type)
 {
     int numStack = methodDesc.getMaxStack()+1;
-    uint32 key = offset*(numVars+numStack)+index;
-    StlHashMap<uint32,VariableIncarnation*>::iterator iter = localVars.find(key);
+    U_32 key = offset*(numVars+numStack)+index;
+    StlHashMap<U_32,VariableIncarnation*>::iterator iter = localVars.find(key);
     VariableIncarnation* var;
     if (iter==localVars.end()) {
         var = new(memManager) VariableIncarnation(offset, type);
@@ -688,7 +688,7 @@
 
 void JavaLabelPrepass::createMultipleDefVarOpnds(IRBuilder* irBuilder)
 {
-    StlHashMap<uint32,VariableIncarnation*>::iterator iter;
+    StlHashMap<U_32,VariableIncarnation*>::iterator iter;
     for(iter = localVars.begin(); iter!=localVars.end(); ++iter) {
         VariableIncarnation* var = (*iter).second;
         var->createMultipleDefVarOpnd(irBuilder);
@@ -726,7 +726,7 @@
 }
 
 
-void    JavaLabelPrepass::pushType(Type *type, uint32 varNumber) {
+void    JavaLabelPrepass::pushType(Type *type, U_32 varNumber) {
     stateInfo.push(type).setVarNumber(varNumber);
 }
 
@@ -788,7 +788,7 @@
 // branches
 //
 
-void JavaLabelPrepass::checkTargetForRestart(uint32 target) {
+void JavaLabelPrepass::checkTargetForRestart(U_32 target) {
     // If the target of a branch has been visited, but has no state info, then we
     // will not merge information such as variable incarnations from that first visit
     // with the information from the current branch.
@@ -801,13 +801,13 @@
     }
 }
 
-void JavaLabelPrepass::propagateStateInfo(uint32 offset, bool isFallThru) {
+void JavaLabelPrepass::propagateStateInfo(U_32 offset, bool isFallThru) {
     setLabel(offset);
     stateTable->setStateInfo(&stateInfo,offset,isFallThru);
 }
 
 
-void JavaLabelPrepass::ifeq(uint32 targetOffset,uint32 nextOffset) {
+void JavaLabelPrepass::ifeq(U_32 targetOffset,U_32 nextOffset) {
     popAndCheck(int32Type);
     setStackVars();
     checkTargetForRestart(targetOffset);
@@ -816,7 +816,7 @@
     setLabel(nextOffset);
     isFallThruLabel = targetOffset > nextOffset;
 }
-void JavaLabelPrepass::ifne(uint32 targetOffset,uint32 nextOffset) {
+void JavaLabelPrepass::ifne(U_32 targetOffset,U_32 nextOffset) {
     popAndCheck(int32Type);
     setStackVars();
     checkTargetForRestart(targetOffset);
@@ -825,7 +825,7 @@
     setLabel(nextOffset);
     isFallThruLabel = targetOffset > nextOffset;
 }
-void JavaLabelPrepass::iflt(uint32 targetOffset,uint32 nextOffset) {
+void JavaLabelPrepass::iflt(U_32 targetOffset,U_32 nextOffset) {
     popAndCheck(int32Type);
     setStackVars();
     checkTargetForRestart(targetOffset);
@@ -834,7 +834,7 @@
     setLabel(nextOffset);
     isFallThruLabel = targetOffset > nextOffset;
 }
-void JavaLabelPrepass::ifge(uint32 targetOffset,uint32 nextOffset) {
+void JavaLabelPrepass::ifge(U_32 targetOffset,U_32 nextOffset) {
     popAndCheck(int32Type);
     setStackVars();
     checkTargetForRestart(targetOffset);
@@ -843,7 +843,7 @@
     setLabel(nextOffset);
     isFallThruLabel = targetOffset > nextOffset;
 }
-void JavaLabelPrepass::ifgt(uint32 targetOffset,uint32 nextOffset) {
+void JavaLabelPrepass::ifgt(U_32 targetOffset,U_32 nextOffset) {
     popAndCheck(int32Type);
     setStackVars();
     checkTargetForRestart(targetOffset);
@@ -852,7 +852,7 @@
     setLabel(nextOffset);
     isFallThruLabel = targetOffset > nextOffset;
 }
-void JavaLabelPrepass::ifle(uint32 targetOffset,uint32 nextOffset) {
+void JavaLabelPrepass::ifle(U_32 targetOffset,U_32 nextOffset) {
     popAndCheck(int32Type);
     setStackVars();
     checkTargetForRestart(targetOffset);
@@ -861,7 +861,7 @@
     setLabel(nextOffset);
     isFallThruLabel = targetOffset > nextOffset;
 }
-void JavaLabelPrepass::if_icmpeq(uint32 targetOffset,uint32 nextOffset)    {
+void JavaLabelPrepass::if_icmpeq(U_32 targetOffset,U_32 nextOffset)    {
     popAndCheck(int32Type); 
     popAndCheck(int32Type);
     setStackVars();
@@ -871,7 +871,7 @@
     setLabel(nextOffset);
     isFallThruLabel = targetOffset > nextOffset;
 }
-void JavaLabelPrepass::if_icmpne(uint32 targetOffset,uint32 nextOffset)    {
+void JavaLabelPrepass::if_icmpne(U_32 targetOffset,U_32 nextOffset)    {
     popAndCheck(int32Type); 
     popAndCheck(int32Type);
     setStackVars();
@@ -881,7 +881,7 @@
     setLabel(nextOffset);
     isFallThruLabel = targetOffset > nextOffset;
 }
-void JavaLabelPrepass::if_icmplt(uint32 targetOffset,uint32 nextOffset)    {
+void JavaLabelPrepass::if_icmplt(U_32 targetOffset,U_32 nextOffset)    {
     popAndCheck(int32Type); 
     popAndCheck(int32Type);
     setStackVars();
@@ -891,7 +891,7 @@
     setLabel(nextOffset);
     isFallThruLabel = targetOffset > nextOffset;
 }
-void JavaLabelPrepass::if_icmpge(uint32 targetOffset,uint32 nextOffset)    {
+void JavaLabelPrepass::if_icmpge(U_32 targetOffset,U_32 nextOffset)    {
     popAndCheck(int32Type); 
     popAndCheck(int32Type);
     setStackVars();
@@ -901,7 +901,7 @@
     setLabel(nextOffset);
     isFallThruLabel = targetOffset > nextOffset;
 }
-void JavaLabelPrepass::if_icmpgt(uint32 targetOffset,uint32 nextOffset)    {
+void JavaLabelPrepass::if_icmpgt(U_32 targetOffset,U_32 nextOffset)    {
     popAndCheck(int32Type); 
     popAndCheck(int32Type);
     setStackVars();
@@ -911,7 +911,7 @@
     setLabel(nextOffset);
     isFallThruLabel = targetOffset > nextOffset;
 }
-void JavaLabelPrepass::if_icmple(uint32 targetOffset,uint32 nextOffset)    {
+void JavaLabelPrepass::if_icmple(U_32 targetOffset,U_32 nextOffset)    {
     popAndCheck(int32Type); 
     popAndCheck(int32Type);
     setStackVars();
@@ -921,7 +921,7 @@
     setLabel(nextOffset);
     isFallThruLabel = targetOffset > nextOffset;
 }
-void JavaLabelPrepass::if_acmpeq(uint32 targetOffset,uint32 nextOffset)    {
+void JavaLabelPrepass::if_acmpeq(U_32 targetOffset,U_32 nextOffset)    {
     popAndCheck(A);
     popAndCheck(A);
     setStackVars();
@@ -931,7 +931,7 @@
     setLabel(nextOffset);
     isFallThruLabel = targetOffset > nextOffset;
 }
-void JavaLabelPrepass::if_acmpne(uint32 targetOffset,uint32 nextOffset)    {
+void JavaLabelPrepass::if_acmpne(U_32 targetOffset,U_32 nextOffset)    {
     popAndCheck(A);
     popAndCheck(A);
     setStackVars();
@@ -941,7 +941,7 @@
     setLabel(nextOffset);
     isFallThruLabel = targetOffset > nextOffset;
 }
-void JavaLabelPrepass::ifnull(uint32 targetOffset,uint32 nextOffset)    {
+void JavaLabelPrepass::ifnull(U_32 targetOffset,U_32 nextOffset)    {
     popAndCheck(A);
     setStackVars();
     checkTargetForRestart(targetOffset);
@@ -950,7 +950,7 @@
     setLabel(nextOffset);
     isFallThruLabel = targetOffset > nextOffset;
 }
-void JavaLabelPrepass::ifnonnull(uint32 targetOffset,uint32 nextOffset)    {
+void JavaLabelPrepass::ifnonnull(U_32 targetOffset,U_32 nextOffset)    {
     popAndCheck(A);
     setStackVars();
     checkTargetForRestart(targetOffset);
@@ -959,7 +959,7 @@
     setLabel(nextOffset);
     isFallThruLabel = targetOffset > nextOffset;
 }
-void JavaLabelPrepass::goto_(uint32 targetOffset,uint32 nextOffset)        {
+void JavaLabelPrepass::goto_(U_32 targetOffset,U_32 nextOffset)        {
     setStackVars();
     checkTargetForRestart(targetOffset);
     propagateStateInfo(targetOffset,false);
@@ -968,17 +968,17 @@
 //
 // returns
 //
-void JavaLabelPrepass::ireturn(uint32 off) {popAndCheck(int32Type); }
-void JavaLabelPrepass::lreturn(uint32 off) {popAndCheck(int64Type); }
-void JavaLabelPrepass::freturn(uint32 off) {popAndCheck(singleType);}
-void JavaLabelPrepass::dreturn(uint32 off) {popAndCheck(doubleType);}
-void JavaLabelPrepass::areturn(uint32 off) {popAndCheck(A);         }
-void JavaLabelPrepass::return_(uint32 off) {                        }
+void JavaLabelPrepass::ireturn(U_32 off) {popAndCheck(int32Type); }
+void JavaLabelPrepass::lreturn(U_32 off) {popAndCheck(int64Type); }
+void JavaLabelPrepass::freturn(U_32 off) {popAndCheck(singleType);}
+void JavaLabelPrepass::dreturn(U_32 off) {popAndCheck(doubleType);}
+void JavaLabelPrepass::areturn(U_32 off) {popAndCheck(A);         }
+void JavaLabelPrepass::return_(U_32 off) {                        }
 
 //
 // jsr/ret
 //
-void JavaLabelPrepass::jsr(uint32 targetOffset, uint32 nextOffset) {
+void JavaLabelPrepass::jsr(U_32 targetOffset, U_32 nextOffset) {
     stateTable->createStateInfo(targetOffset)->setSubroutineEntry();
     setSubroutineEntry(targetOffset);
     hasJsrLabels = true;
@@ -1000,7 +1000,7 @@
     assert(var);
     var->setMultipleDefs();
     setStackVars();
-    uint32 subEntryOffset = slot->jsrLabelOffset;
+    U_32 subEntryOffset = slot->jsrLabelOffset;
     stateInfo.cleanFinallyInfo(subEntryOffset);
     assert(retToSubEntryMap.find(currentOffset) == retToSubEntryMap.end() ||
         retToSubEntryMap[currentOffset] == subEntryOffset);
@@ -1009,7 +1009,7 @@
     JsrEntryToJsrNextMap::const_iterator iter;
     for (iter = sub_entry_range.first; iter != sub_entry_range.second; iter++) {
         assert((*iter).first == subEntryOffset);
-        uint32 jsrNextOffset = (*iter).second;
+        U_32 jsrNextOffset = (*iter).second;
 
         // according to JVM Spec:
         //      When executing the ret instruction, which implements a
@@ -1040,7 +1040,7 @@
 void JavaLabelPrepass::lookupswitch(JavaLookupSwitchTargetsIter* iter) {
     popAndCheck(int32Type);
     setStackVars();
-    uint32 dummy;
+    U_32 dummy;
     while (iter->hasNext()) 
         propagateStateInfo(iter->getNextTarget(&dummy),false);
     propagateStateInfo(iter->getDefaultTarget(),false);
@@ -1053,7 +1053,7 @@
 
 void JavaLabelPrepass::nop()                               {}
 void JavaLabelPrepass::aconst_null()                       { pushType(typeManager.getNullObjectType()); }
-void JavaLabelPrepass::iconst(int32 val)                   { pushType(int32Type); }
+void JavaLabelPrepass::iconst(I_32 val)                   { pushType(int32Type); }
 void JavaLabelPrepass::lconst(int64 val)                   { pushType(int64Type); }
 void JavaLabelPrepass::fconst(float val)                   { pushType(singleType); }
 void JavaLabelPrepass::dconst(double val)                  { pushType(doubleType); }
@@ -1066,11 +1066,11 @@
 void JavaLabelPrepass::dload(uint16 varIndex)              { genLoad(doubleType,varIndex); }
 void JavaLabelPrepass::aload(uint16 varIndex)              { genTypeLoad(varIndex); }
 
-void JavaLabelPrepass::istore(uint16 varIndex,uint32 off)  { genStore(int32Type,varIndex,off); }
-void JavaLabelPrepass::lstore(uint16 varIndex,uint32 off)  { genStore(int64Type,varIndex,off); }
-void JavaLabelPrepass::fstore(uint16 varIndex,uint32 off)  { genStore(singleType,varIndex,off); }
-void JavaLabelPrepass::dstore(uint16 varIndex,uint32 off)  { genStore(doubleType,varIndex,off); }
-void JavaLabelPrepass::astore(uint16 varIndex,uint32 off)  { genTypeStore(varIndex,off); }
+void JavaLabelPrepass::istore(uint16 varIndex,U_32 off)  { genStore(int32Type,varIndex,off); }
+void JavaLabelPrepass::lstore(uint16 varIndex,U_32 off)  { genStore(int64Type,varIndex,off); }
+void JavaLabelPrepass::fstore(uint16 varIndex,U_32 off)  { genStore(singleType,varIndex,off); }
+void JavaLabelPrepass::dstore(uint16 varIndex,U_32 off)  { genStore(doubleType,varIndex,off); }
+void JavaLabelPrepass::astore(uint16 varIndex,U_32 off)  { genTypeStore(varIndex,off); }
 
 void JavaLabelPrepass::iaload()                            { genArrayLoad(int32Type); }
 void JavaLabelPrepass::laload()                            { genArrayLoad(int64Type); }
@@ -1147,7 +1147,7 @@
 void JavaLabelPrepass::dcmpl()                             { genCompare(doubleType);}
 void JavaLabelPrepass::dcmpg()                             { genCompare(doubleType);}
 
-void JavaLabelPrepass::new_(uint32 constPoolIndex)         { 
+void JavaLabelPrepass::new_(U_32 constPoolIndex)         { 
     StateInfo::SlotInfo slot;
     StateInfo::setNonNull(&slot);
     StateInfo::setExactType(&slot);
@@ -1184,7 +1184,7 @@
 }
 
 
-void JavaLabelPrepass::anewarray(uint32 constPoolIndex)    { 
+void JavaLabelPrepass::anewarray(U_32 constPoolIndex)    { 
     popAndCheck(int32Type); 
     StateInfo::SlotInfo slot;
     StateInfo::setNonNull(&slot);
@@ -1207,7 +1207,7 @@
     popAndCheck(A); 
 }
 
-void JavaLabelPrepass::checkcast(uint32 constPoolIndex)    { 
+void JavaLabelPrepass::checkcast(U_32 constPoolIndex)    { 
     StateInfo::SlotInfo slot = stateInfo.stack[stateInfo.stackDepth - 1];
     if ( (slot.type) &&
          (slot.type->tag == Type::NullObject ) &&
@@ -1220,7 +1220,7 @@
     pushType(type);
 }
 
-int JavaLabelPrepass::instanceof(const uint8* bcp, uint32 constPoolIndex, uint32 off)   {
+int JavaLabelPrepass::instanceof(const uint8* bcp, U_32 constPoolIndex, U_32 off)   {
     popType();
     pushType(int32Type);
     return 3;  // length of instanceof
@@ -1228,11 +1228,11 @@
 void JavaLabelPrepass::monitorenter()                      { popAndCheck(A); }
 void JavaLabelPrepass::monitorexit()                       { popAndCheck(A); }
 
-void JavaLabelPrepass::iinc(uint16 varIndex,int32 amount)  { 
+void JavaLabelPrepass::iinc(uint16 varIndex,I_32 amount)  { 
     stateInfo.stack[varIndex].vars->getVarIncarnation()->setMultipleDefs();
 }
 
-void JavaLabelPrepass::ldc(uint32 constPoolIndex)          {
+void JavaLabelPrepass::ldc(U_32 constPoolIndex)          {
     // load 32-bit quantity or string from constant pool
     Type* constantType =
                 compilationInterface.getConstantType(&methodDesc,constPoolIndex);
@@ -1246,7 +1246,7 @@
         jitrino_assert( 0);
     }
 }
-void JavaLabelPrepass::ldc2(uint32 constPoolIndex)         {
+void JavaLabelPrepass::ldc2(U_32 constPoolIndex)         {
     // load 64-bit quantity from constant pool
     Type* constantType =
                 compilationInterface.getConstantType(&methodDesc,constPoolIndex);
@@ -1259,7 +1259,7 @@
     }
 }
 
-void JavaLabelPrepass::getstatic(uint32 constPoolIndex)    {
+void JavaLabelPrepass::getstatic(U_32 constPoolIndex)    {
     FieldDesc *fdesc = compilationInterface.getStaticField(methodDesc.getParentHandle(), constPoolIndex, false);
     Type* fieldType = 0;
     if (fdesc && fdesc->isStatic()) {
@@ -1272,7 +1272,7 @@
     pushType(typeManager.toInternalType(fieldType));
 }
 
-void JavaLabelPrepass::putstatic(uint32 constPoolIndex)    {
+void JavaLabelPrepass::putstatic(U_32 constPoolIndex)    {
     FieldDesc *fdesc = compilationInterface.getStaticField(methodDesc.getParentHandle(), constPoolIndex, true);
     Type* fieldType = fdesc ? fdesc->getFieldType() : NULL;
     if (fieldType){
@@ -1284,7 +1284,7 @@
     } 
 }
 
-void JavaLabelPrepass::getfield(uint32 constPoolIndex)     {
+void JavaLabelPrepass::getfield(U_32 constPoolIndex)     {
     popAndCheck(A);//obj
     FieldDesc *fdesc = compilationInterface.getNonStaticField(methodDesc.getParentHandle(), constPoolIndex, false);
     Type* fieldType = NULL;
@@ -1298,7 +1298,7 @@
     pushType(typeManager.toInternalType(fieldType));
 }
 
-void JavaLabelPrepass::putfield(uint32 constPoolIndex)     {
+void JavaLabelPrepass::putfield(U_32 constPoolIndex)     {
     FieldDesc *fdesc = compilationInterface.getNonStaticField(methodDesc.getParentHandle(), constPoolIndex, true);
     Type* fieldType = fdesc ? fdesc->getFieldType() : NULL;
     if (fieldType){
@@ -1311,7 +1311,7 @@
     popAndCheck(A);
 }
 
-void JavaLabelPrepass::invokevirtual(uint32 constPoolIndex){
+void JavaLabelPrepass::invokevirtual(U_32 constPoolIndex){
     MethodDesc *mdesc = compilationInterface.getVirtualMethod(methodDesc.getParentHandle(), constPoolIndex);
     if (mdesc) {// resolution was successful
         invoke(mdesc);
@@ -1322,7 +1322,7 @@
     }
 }
 
-void JavaLabelPrepass::invokespecial(uint32 constPoolIndex){
+void JavaLabelPrepass::invokespecial(U_32 constPoolIndex){
     MethodDesc* mdesc = compilationInterface.getSpecialMethod(methodDesc.getParentHandle(),constPoolIndex);
     if (mdesc) {// resolution was successful
         invoke(mdesc);
@@ -1333,7 +1333,7 @@
         pseudoInvoke(methodSig_string);
     }
 }
-void JavaLabelPrepass::invokestatic(uint32 constPoolIndex) {
+void JavaLabelPrepass::invokestatic(U_32 constPoolIndex) {
     MethodDesc *mdesc = compilationInterface.getStaticMethod(methodDesc.getParentHandle(), constPoolIndex);
     if (mdesc) {// resolution was successful
         invoke(mdesc);
@@ -1342,7 +1342,7 @@
         pseudoInvoke(methodSig_string);
     }
 }
-void JavaLabelPrepass::invokeinterface(uint32 constPoolIndex,uint32 count) {
+void JavaLabelPrepass::invokeinterface(U_32 constPoolIndex,U_32 count) {
     MethodDesc *mdesc = compilationInterface.getInterfaceMethod(methodDesc.getParentHandle(), constPoolIndex);
     if (mdesc) {// resolution was successful
         invoke(mdesc);
@@ -1352,7 +1352,7 @@
         pseudoInvoke(methodSig_string);
     }
 }
-void JavaLabelPrepass::multianewarray(uint32 constPoolIndex,uint8 dimensions) {
+void JavaLabelPrepass::multianewarray(U_32 constPoolIndex,uint8 dimensions) {
     for (int i =0; i < dimensions; i++) {
         popAndCheck(int32Type);
     }
@@ -1364,7 +1364,7 @@
 void JavaLabelPrepass::pseudoInvoke(const char* methodSig) {
 
     assert(methodSig);
-    uint32 numArgs = getNumArgsBySignature(methodSig); 
+    U_32 numArgs = getNumArgsBySignature(methodSig); 
 
     // pop numArgs items
     for (int i=numArgs-1; i>=0; i--)
@@ -1380,11 +1380,11 @@
     }
 }
 
-uint32 JavaLabelPrepass::getNumArgsBySignature(const char* methodSig) 
+U_32 JavaLabelPrepass::getNumArgsBySignature(const char* methodSig) 
 {
     assert(methodSig);
     assert(*methodSig == '(');
-    uint32 numArgs = 0; 
+    U_32 numArgs = 0; 
 
     // start just after '(' and go until ')' counting 'numArgs' 
     for(++methodSig ;*methodSig != ')'; methodSig++) {
@@ -1424,12 +1424,12 @@
     assert(*origSig== '(' || *origSig == ')');
     while( *(origSig++) != ')' ); 
 
-    uint32 stub=0;
+    U_32 stub=0;
     return getTypeByDescriptorString(ci, enclClass, origSig, stub);
 }
 
-Type* JavaLabelPrepass::getTypeByDescriptorString(CompilationInterface& ci, Class_Handle enclClass, const char* descriptorString, uint32& len) {
-    uint32 arrayDim = 0;
+Type* JavaLabelPrepass::getTypeByDescriptorString(CompilationInterface& ci, Class_Handle enclClass, const char* descriptorString, U_32& len) {
+    U_32 arrayDim = 0;
     len=1;
     Type* resType = NULL;
     // collect array dimension if any
@@ -1649,7 +1649,7 @@
 void JavaLabelPrepass::genReturn(Type *type) {
 }
 
-void JavaLabelPrepass::genStore(Type *type, uint32 index, uint32 offset) {
+void JavaLabelPrepass::genStore(Type *type, U_32 index, U_32 offset) {
     stateInfo.stack[index].jsrLabelOffset = stateInfo.stack[stateInfo.stackDepth-1].jsrLabelOffset;
     popAndCheck(type);
     stateInfo.stack[index].type     = type;
@@ -1658,7 +1658,7 @@
     propagateLocalVarToHandlers(index);
 }
 
-void JavaLabelPrepass::genTypeStore(uint32 index, uint32 offset) {
+void JavaLabelPrepass::genTypeStore(U_32 index, U_32 offset) {
     StateInfo::SlotInfo& slot = popType();
     Type *type = slot.type;
     stateInfo.stack[index].type     = type;
@@ -1677,7 +1677,7 @@
     propagateLocalVarToHandlers(index);
 }
 
-void JavaLabelPrepass::genLoad(Type *type, uint32 index) {
+void JavaLabelPrepass::genLoad(Type *type, U_32 index) {
     assert(stateInfo.stack[index].type == type);
     pushType(type,index);
     stateInfo.stack[stateInfo.stackDepth-1].jsrLabelOffset = stateInfo.stack[index].jsrLabelOffset;
@@ -1687,7 +1687,7 @@
     }
 }
 
-void JavaLabelPrepass::genTypeLoad(uint32 index) {
+void JavaLabelPrepass::genTypeLoad(U_32 index) {
     Type *type = stateInfo.stack[index].type;
     SlotVar* vars = stateInfo.stack[index].vars;
     if (vars) {
@@ -1759,7 +1759,7 @@
 
 
 
-const char*     JavaLabelPrepass::methodSignatureString(uint32 cpIndex) {
+const char*     JavaLabelPrepass::methodSignatureString(U_32 cpIndex) {
     return compilationInterface.getSignatureString(&methodDesc,cpIndex);
 }
 
@@ -1771,7 +1771,7 @@
     to.vars = from.vars ? new (memManager) SlotVar(from.vars, memManager) : NULL;
 }
 
-void  StateTable::setStateInfo(StateInfo *inState, uint32 offset, bool isFallThru, bool varsOnly) {
+void  StateTable::setStateInfo(StateInfo *inState, U_32 offset, bool isFallThru, bool varsOnly) {
     if(Log::isEnabled()) {
         Log::out() << "SETSTATE offset=" <<(int)offset << " depth=" << inState->stackDepth << ::std::endl;
         printState(inState);
@@ -1828,7 +1828,7 @@
     }
 }
 
-void  StateTable::setStackInfo(StateInfo *inState, uint32 offset, bool includeVars, bool includeStack)
+void  StateTable::setStackInfo(StateInfo *inState, U_32 offset, bool includeVars, bool includeStack)
 {
     if (Log::isEnabled()) Log::out() << "SETSTACK " << includeVars << ", " << includeStack << ::std::endl;
     unsigned stackDepth = inState->stackDepth;
@@ -1882,7 +1882,7 @@
     }
 }
 
-void StateTable::rewriteSlots(StateInfo::SlotInfo* inSlot, StateInfo::SlotInfo* slot, uint32 offset, bool isVar) {
+void StateTable::rewriteSlots(StateInfo::SlotInfo* inSlot, StateInfo::SlotInfo* slot, U_32 offset, bool isVar) {
 
     Type *intype = inSlot->type;
     slot->type = intype;
@@ -1902,7 +1902,7 @@
     slot->jsrLabelOffset = inSlot->jsrLabelOffset;
 }
 
-void StateTable::mergeSlots(StateInfo::SlotInfo* inSlot, StateInfo::SlotInfo* slot, uint32 offset, bool isVar) {
+void StateTable::mergeSlots(StateInfo::SlotInfo* inSlot, StateInfo::SlotInfo* slot, U_32 offset, bool isVar) {
 
     if (!getStateInfo(offset)->isVisited()) {
         if (!slot->type && !slot->vars) {
@@ -1963,7 +1963,7 @@
 }
 
 
-void  StateTable::setStateInfoFromFinally(StateInfo *inState, uint32 offset) {
+void  StateTable::setStateInfoFromFinally(StateInfo *inState, U_32 offset) {
     if(Log::isEnabled()) {
         Log::out() << "SETSTATE FROM FINALLY offset=" <<(int)offset << " depth=" << inState->stackDepth << ::std::endl;
         printState(inState);
@@ -2006,11 +2006,11 @@
     }
 }
 
-void JavaLabelPrepass::print_loc_vars(uint32 offset, uint32 index)
+void JavaLabelPrepass::print_loc_vars(U_32 offset, U_32 index)
 {
     int numStack = methodDesc.getMaxStack()+1;
-    uint32 key = offset*(numVars+numStack)+index;
-    StlHashMap<uint32,VariableIncarnation*>::iterator iter = localVars.find(key);
+    U_32 key = offset*(numVars+numStack)+index;
+    StlHashMap<U_32,VariableIncarnation*>::iterator iter = localVars.find(key);
     if (iter==localVars.end()) {
         Log::out() << "localVars[offset=" << offset 
                     << "][index=" << index << "] is empty" << ::std::endl;
@@ -2021,7 +2021,7 @@
     }
 }
 
-void JavaLabelPrepass::propagateLocalVarToHandlers(uint32 varIndex)
+void JavaLabelPrepass::propagateLocalVarToHandlers(U_32 varIndex)
 {
     assert(varIndex < numVars);
     struct StateInfo::SlotInfo *inSlot = &stateInfo.stack[varIndex];
@@ -2036,7 +2036,7 @@
                     handler != NULL; 
                     handler = handler->getNextHandler() ) {
 
-                        uint32 handler_offset = handler->getBeginOffset();
+                        U_32 handler_offset = handler->getBeginOffset();
                         struct StateInfo::SlotInfo *slot = &stateTable->getStateInfo(handler_offset)->stack[varIndex];
                         if (Log::isEnabled()) Log::out() << "HANDLER SLOT " << varIndex 
                             << " merged to offset " << handler_offset << ::std::endl;

Modified: harmony/enhanced/drlvm/trunk/vm/jitrino/src/translator/java/JavaLabelPrepass.h
URL: http://svn.apache.org/viewvc/harmony/enhanced/drlvm/trunk/vm/jitrino/src/translator/java/JavaLabelPrepass.h?rev=659108&r1=659107&r2=659108&view=diff
==============================================================================
--- harmony/enhanced/drlvm/trunk/vm/jitrino/src/translator/java/JavaLabelPrepass.h (original)
+++ harmony/enhanced/drlvm/trunk/vm/jitrino/src/translator/java/JavaLabelPrepass.h Thu May 22 06:33:38 2008
@@ -34,7 +34,7 @@
 
 class VariableIncarnation : private Dlink {
 public:
-    VariableIncarnation(uint32 offset, Type*);
+    VariableIncarnation(U_32 offset, Type*);
     void setMultipleDefs();
     Type* getDeclaredType();
     void setDeclaredType(Type*);
@@ -61,7 +61,7 @@
     void createVarOpnd(IRBuilder*);
 private:
     friend class SlotVar;
-    int32   definingOffset;  // offset where the def was found, -1 if multiple defs
+    I_32   definingOffset;  // offset where the def was found, -1 if multiple defs
     Type*   declaredType;
     Opnd*   opnd;
 };
@@ -82,14 +82,14 @@
     }
     // Add var incarnations from SlotVar to the list.
     // Return true if var incarnation has been added.
-    bool addVarIncarnations(SlotVar* var, MemoryManager& mm, uint32 linkOffset);
+    bool addVarIncarnations(SlotVar* var, MemoryManager& mm, U_32 linkOffset);
     VariableIncarnation* getVarIncarnation() {return var;}
     void mergeVarIncarnations(TypeManager* tm);
-    uint32 getLinkOffset() {return linkOffset;}
+    U_32 getLinkOffset() {return linkOffset;}
     void print(::std::ostream& out);
 private:
     VariableIncarnation* var;
-    uint32 linkOffset;
+    U_32 linkOffset;
 };
 
 
@@ -115,12 +115,12 @@
 
     struct SlotInfo {
         Type *type;
-        uint32 varNumber;
+        U_32 varNumber;
         uint16 slotFlags;
         SlotVar *vars;
-        uint32 jsrLabelOffset;
+        U_32 jsrLabelOffset;
         SlotInfo() : type(NULL), varNumber(0), slotFlags(0), vars(NULL), jsrLabelOffset(0){}
-        void setVarNumber(uint32 n) { varNumber = n;slotFlags |= VarNumberIsSet; }
+        void setVarNumber(U_32 n) { varNumber = n;slotFlags |= VarNumberIsSet; }
     };
 
     // Push type to modelled operand stack
@@ -130,7 +130,7 @@
     SlotInfo& top();
 
     // remove all slots containing returnAddress for RET instruction with jsrNexOffset == offset
-    void cleanFinallyInfo(uint32 offset);
+    void cleanFinallyInfo(U_32 offset);
 
     /* flags */
     enum {
@@ -193,13 +193,13 @@
                      CompilationInterface& ci,
                      Opnd** actualArgs);    // NULL for non-inlined methods
 
-    bool    isLabel(uint32 offset)            { return labels->getBit(offset); }
-    bool    isSubroutineEntry(uint32 offset)  { return subroutines->getBit(offset); }
+    bool    isLabel(U_32 offset)            { return labels->getBit(offset); }
+    bool    isSubroutineEntry(U_32 offset)  { return subroutines->getBit(offset); }
     bool    getHasJsrLabels()                 { return hasJsrLabels;}
-    uint32  getNumLabels()                    { return numLabels;}
-    uint32  getNumVars()                      { return numVars;}
-    uint32  getLabelId(uint32 offset);
-    void    print_loc_vars(uint32 offset, uint32 index);
+    U_32  getNumLabels()                    { return numLabels;}
+    U_32  getNumVars()                      { return numVars;}
+    U_32  getLabelId(U_32 offset);
+    void    print_loc_vars(U_32 offset, U_32 index);
     //
     // exception info
     //
@@ -216,10 +216,10 @@
     ///////////////////////////////////////////////////////////////////////////
 
     // called before each byte code to indicate the next byte code's offset
-    void offset(uint32 offset);
+    void offset(U_32 offset);
 
     // called after each byte code offset is worked out
-    void offset_done(uint32 offset) {}
+    void offset_done(U_32 offset) {}
 
     // called when an error occurs during the byte codes parsing
     void parseError();
@@ -233,8 +233,8 @@
     void parseDone();
 
     // Variable information
-    VariableIncarnation* getVarInc(uint32 offset, uint32 index);
-    VariableIncarnation* getOrCreateVarInc(uint32 offset, uint32 index, Type* type);
+    VariableIncarnation* getVarInc(U_32 offset, U_32 index);
+    VariableIncarnation* getOrCreateVarInc(U_32 offset, U_32 index, Type* type);
     void                 createMultipleDefVarOpnds(IRBuilder*);
 
     //
@@ -245,7 +245,7 @@
     void                    popAndCheck(Type *type);
     void                    popAndCheck(JavaVarType type);
     void                    pushType(StateInfo::SlotInfo& slot);
-    void                    pushType(Type *type, uint32 varNumber);
+    void                    pushType(Type *type, U_32 varNumber);
     void                    pushType(Type *type);
     bool isCategory2(StateInfo::SlotInfo& slot) { return slot.type == int64Type || slot.type == doubleType; }
 
@@ -256,7 +256,7 @@
     // cut and paste from Java_Translator.cpp
     // field, method, and type resolution
     //
-    const char*             methodSignatureString(uint32 cpIndex);
+    const char*             methodSignatureString(U_32 cpIndex);
     StateInfo*              getStateInfo()  { return &stateInfo; }
     StateTable*             getStateTable() { return stateTable; }
 
@@ -299,10 +299,10 @@
     // helper functions
     //
     void genReturn    (Type *type);
-    void genLoad      (Type *type, uint32 index);
-    void genTypeLoad  (uint32 index);
-    void genStore     (Type *type, uint32 index, uint32 offset);
-    void genTypeStore (uint32 index, uint32 offset);
+    void genLoad      (Type *type, U_32 index);
+    void genTypeLoad  (U_32 index);
+    void genStore     (Type *type, U_32 index, U_32 offset);
+    void genTypeStore (U_32 index, U_32 offset);
     void genArrayLoad (Type *type);
     void genTypeArrayLoad();
     void genArrayStore(Type *type);
@@ -314,22 +314,22 @@
     void genCompare   (Type *type);
     void invoke       (MethodDesc *mdesc);
     void pseudoInvoke (const char* mdesc);
-    static uint32  getNumArgsBySignature(const char* methodSig);
+    static U_32  getNumArgsBySignature(const char* methodSig);
     static Type*   getRetTypeBySignature(CompilationInterface& ci, Class_Handle enclClass, const char* methodSig);
-    static Type*   getTypeByDescriptorString(CompilationInterface& ci, Class_Handle enclClass, const char* descriptorString, uint32& len);
+    static Type*   getTypeByDescriptorString(CompilationInterface& ci, Class_Handle enclClass, const char* descriptorString, U_32& len);
 
     // remaining instructions
 
     void nop();
     void aconst_null();
-    void iconst(int32 val);
+    void iconst(I_32 val);
     void lconst(int64 val);
     void fconst(float val);
     void dconst(double val);
     void bipush(int8 val);
     void sipush(int16 val);
-    void ldc(uint32 constPoolIndex);
-    void ldc2(uint32 constPoolIndex);
+    void ldc(U_32 constPoolIndex);
+    void ldc2(U_32 constPoolIndex);
     void iload(uint16 varIndex) ;
     void lload(uint16 varIndex) ;
     void fload(uint16 varIndex) ;
@@ -343,11 +343,11 @@
     void baload() ;
     void caload() ;
     void saload() ;
-    void istore(uint16 varIndex, uint32 off) ;
-    void lstore(uint16 varIndex, uint32 off) ;
-    void fstore(uint16 varIndex, uint32 off) ;
-    void dstore(uint16 varIndex, uint32 off) ;
-    void astore(uint16 varIndex, uint32 off) ;
+    void istore(uint16 varIndex, U_32 off) ;
+    void lstore(uint16 varIndex, U_32 off) ;
+    void fstore(uint16 varIndex, U_32 off) ;
+    void dstore(uint16 varIndex, U_32 off) ;
+    void astore(uint16 varIndex, U_32 off) ;
     void iastore() ;
     void lastore() ;
     void fastore() ;
@@ -401,7 +401,7 @@
     void lor() ;
     void ixor() ;
     void lxor() ;
-    void iinc(uint16 varIndex,int32 amount) ;
+    void iinc(uint16 varIndex,I_32 amount) ;
     void i2l() ;
     void i2f() ;
     void i2d() ;
@@ -422,56 +422,56 @@
     void fcmpg() ;
     void dcmpl() ;
     void dcmpg() ;
-    void ifeq(uint32 targetOffset,uint32 nextOffset);
-    void ifne(uint32 targetOffset,uint32 nextOffset);
-    void iflt(uint32 targetOffset,uint32 nextOffset);
-    void ifge(uint32 targetOffset,uint32 nextOffset);
-    void ifgt(uint32 targetOffset,uint32 nextOffset);
-    void ifle(uint32 targetOffset,uint32 nextOffset);
-    void if_icmpeq(uint32 targetOffset,uint32 nextOffset);
-    void if_icmpne(uint32 targetOffset,uint32 nextOffset);
-    void if_icmplt(uint32 targetOffset,uint32 nextOffset);
-    void if_icmpge(uint32 targetOffset,uint32 nextOffset);
-    void if_icmpgt(uint32 targetOffset,uint32 nextOffset);
-    void if_icmple(uint32 targetOffset,uint32 nextOffset);
-    void if_acmpeq(uint32 targetOffset,uint32 nextOffset);
-    void if_acmpne(uint32 targetOffset,uint32 nextOffset);
-    void goto_(uint32 targetOffset,uint32 nextOffset);
-    void jsr(uint32 offset, uint32 nextOffset);
+    void ifeq(U_32 targetOffset,U_32 nextOffset);
+    void ifne(U_32 targetOffset,U_32 nextOffset);
+    void iflt(U_32 targetOffset,U_32 nextOffset);
+    void ifge(U_32 targetOffset,U_32 nextOffset);
+    void ifgt(U_32 targetOffset,U_32 nextOffset);
+    void ifle(U_32 targetOffset,U_32 nextOffset);
+    void if_icmpeq(U_32 targetOffset,U_32 nextOffset);
+    void if_icmpne(U_32 targetOffset,U_32 nextOffset);
+    void if_icmplt(U_32 targetOffset,U_32 nextOffset);
+    void if_icmpge(U_32 targetOffset,U_32 nextOffset);
+    void if_icmpgt(U_32 targetOffset,U_32 nextOffset);
+    void if_icmple(U_32 targetOffset,U_32 nextOffset);
+    void if_acmpeq(U_32 targetOffset,U_32 nextOffset);
+    void if_acmpne(U_32 targetOffset,U_32 nextOffset);
+    void goto_(U_32 targetOffset,U_32 nextOffset);
+    void jsr(U_32 offset, U_32 nextOffset);
     void ret(uint16 varIndex, const uint8* byteCodes);
     void tableswitch(JavaSwitchTargetsIter*);
     void lookupswitch(JavaLookupSwitchTargetsIter*);
     void incrementReturn();
-    void ireturn(uint32 off);
-    void lreturn(uint32 off);
-    void freturn(uint32 off);
-    void dreturn(uint32 off);
-    void areturn(uint32 off);
-    void return_(uint32 off);
-    void getstatic(uint32 constPoolIndex) ;
-    void putstatic(uint32 constPoolIndex) ;
-    void getfield(uint32 constPoolIndex) ;
-    void putfield(uint32 constPoolIndex) ;
-    void invokevirtual(uint32 constPoolIndex) ;
-    void invokespecial(uint32 constPoolIndex) ;
-    void invokestatic(uint32 constPoolIndex) ;
-    void invokeinterface(uint32 constPoolIndex,uint32 count) ;
-    void new_(uint32 constPoolIndex) ;
+    void ireturn(U_32 off);
+    void lreturn(U_32 off);
+    void freturn(U_32 off);
+    void dreturn(U_32 off);
+    void areturn(U_32 off);
+    void return_(U_32 off);
+    void getstatic(U_32 constPoolIndex) ;
+    void putstatic(U_32 constPoolIndex) ;
+    void getfield(U_32 constPoolIndex) ;
+    void putfield(U_32 constPoolIndex) ;
+    void invokevirtual(U_32 constPoolIndex) ;
+    void invokespecial(U_32 constPoolIndex) ;
+    void invokestatic(U_32 constPoolIndex) ;
+    void invokeinterface(U_32 constPoolIndex,U_32 count) ;
+    void new_(U_32 constPoolIndex) ;
     void newarray(uint8 type) ;
-    void anewarray(uint32 constPoolIndex) ;
+    void anewarray(U_32 constPoolIndex) ;
     void arraylength() ;
     void athrow() ;
-    void checkcast(uint32 constPoolIndex) ;
-    int  instanceof(const uint8* bcp, uint32 constPoolIndex, uint32 off) ;
+    void checkcast(U_32 constPoolIndex) ;
+    int  instanceof(const uint8* bcp, U_32 constPoolIndex, U_32 off) ;
     void monitorenter() ;
     void monitorexit() ;
-    void multianewarray(uint32 constPoolIndex,uint8 dimensions) ;
-    void ifnull(uint32 targetOffset,uint32 nextOffset);
-    void ifnonnull(uint32 targetOffset,uint32 nextOffset);
-    void pushCatchLabel(uint32 offset) {
+    void multianewarray(U_32 constPoolIndex,uint8 dimensions) ;
+    void ifnull(U_32 targetOffset,U_32 nextOffset);
+    void ifnonnull(U_32 targetOffset,U_32 nextOffset);
+    void pushCatchLabel(U_32 offset) {
         labelStack->push((uint8*)methodDesc.getByteCodes()+offset);
     }
-    void pushRestart(uint32 offset) {
+    void pushRestart(U_32 offset) {
         labelStack->push((uint8*)methodDesc.getByteCodes()+offset);
     }
 private:
@@ -479,9 +479,9 @@
     friend struct CatchOffsetVisitor;
     friend class JavaByteCodeTranslator;
 
-    typedef StlMultiMap<uint32, uint32> JsrEntryToJsrNextMap;
+    typedef StlMultiMap<U_32, U_32> JsrEntryToJsrNextMap;
     typedef std::pair<JsrEntryToJsrNextMap::const_iterator, JsrEntryToJsrNextMap::const_iterator> JsrEntriesMapCIterRange;
-    typedef StlMap<uint32, uint32> RetToSubEntryMap;
+    typedef StlMap<U_32, U_32> RetToSubEntryMap;
 
     // compilation environment
     MemoryManager&    memManager;
@@ -493,17 +493,17 @@
     StateInfo       stateInfo;
     StateTable*     stateTable;
     // information about variables
-    StlHashMap<uint32,VariableIncarnation*> localVars;
+    StlHashMap<U_32,VariableIncarnation*> localVars;
     // basic label info
     bool            nextIsLabel;
     BitSet*         labels;
     BitSet*         subroutines;
-    uint32*         labelOffsets;    // array containing offsets of labels
-    uint32          numLabels;
-    uint32          numVars; 
+    U_32*         labelOffsets;    // array containing offsets of labels
+    U_32          numLabels;
+    U_32          numVars; 
     bool            isFallThruLabel;
     // exception info
-    uint32          numCatchHandlers;
+    U_32          numCatchHandlers;
     // Java JSR
     bool            hasJsrLabels;
     //
@@ -523,13 +523,13 @@
     unsigned       problemTypeToken;
 
     // private helper methods
-    void setLabel(uint32 offset);
-    void setSubroutineEntry(uint32 offset) { subroutines->setBit(offset,true); }
-    void checkTargetForRestart(uint32 target);
-    void propagateStateInfo(uint32 offset, bool isFallthru);
-    void setJsrLabel(uint32 offset);
+    void setLabel(U_32 offset);
+    void setSubroutineEntry(U_32 offset) { subroutines->setBit(offset,true); }
+    void checkTargetForRestart(U_32 target);
+    void propagateStateInfo(U_32 offset, bool isFallthru);
+    void setJsrLabel(U_32 offset);
     void setStackVars();
-    void propagateLocalVarToHandlers(uint32 varIndex);
+    void propagateLocalVarToHandlers(U_32 varIndex);
     RetToSubEntryMap* getRetToSubEntryMapPtr() { return &retToSubEntryMap; }
 };
 
@@ -541,17 +541,17 @@
     virtual ~StateTable() {
     }
 
-    StateTable(MemoryManager& mm,TypeManager& tm, JavaLabelPrepass& jlp, uint32 numstack, uint32 numvars) :
+    StateTable(MemoryManager& mm,TypeManager& tm, JavaLabelPrepass& jlp, U_32 numstack, U_32 numvars) :
                memManager(mm), typeManager(tm), prepass(jlp),
                hashtable(mm), maxDepth(numvars + numstack), numVars(numvars)
                {
-                    assert(sizeof(POINTER_SIZE_INT)>=sizeof(uint32));
-                    assert(sizeof(uint32*)>=sizeof(uint32));
+                    assert(sizeof(POINTER_SIZE_INT)>=sizeof(U_32));
+                    assert(sizeof(U_32*)>=sizeof(U_32));
                }
-    StateInfo *getStateInfo(uint32 offset) {
+    StateInfo *getStateInfo(U_32 offset) {
         return hashtable[offset];
     }
-    StateInfo *createStateInfo(uint32 offset, unsigned stackDepth = MAX_UINT32) {
+    StateInfo *createStateInfo(U_32 offset, unsigned stackDepth = MAX_UINT32) {
         StateInfo *state = hashtable[offset];
         if (state == NULL) {
             state = new (memManager) StateInfo();
@@ -569,13 +569,13 @@
     }
 
     void copySlotInfo(StateInfo::SlotInfo& to, StateInfo::SlotInfo& from);
-    void mergeSlots(StateInfo::SlotInfo* inSlot, StateInfo::SlotInfo* slot, uint32 offset, bool isVar);
-    void rewriteSlots(StateInfo::SlotInfo* inSlot, StateInfo::SlotInfo* slot, uint32 offset, bool isVar);
-    void setStackInfo(StateInfo *inState, uint32 offset, bool includeVars, bool includeStack);
-    void setStateInfo(StateInfo *inState, uint32 offset, bool isFallThru, bool varsOnly = false);
-    void setStateInfoFromFinally(StateInfo *inState, uint32 offset);
+    void mergeSlots(StateInfo::SlotInfo* inSlot, StateInfo::SlotInfo* slot, U_32 offset, bool isVar);
+    void rewriteSlots(StateInfo::SlotInfo* inSlot, StateInfo::SlotInfo* slot, U_32 offset, bool isVar);
+    void setStackInfo(StateInfo *inState, U_32 offset, bool includeVars, bool includeStack);
+    void setStateInfo(StateInfo *inState, U_32 offset, bool isFallThru, bool varsOnly = false);
+    void setStateInfoFromFinally(StateInfo *inState, U_32 offset);
 
-    void restoreStateInfo(StateInfo *stateInfo, uint32 offset) {
+    void restoreStateInfo(StateInfo *stateInfo, U_32 offset) {
         if(Log::isEnabled()) {
             Log::out() << "INIT_STATE_FOR_BLOCK " <<(int)offset << " depth " << stateInfo->stackDepth << ::std::endl;
             printState(stateInfo);
@@ -614,18 +614,18 @@
         }
     }
 protected:
-    virtual bool keyEquals(uint32 *key1,uint32 *key2) const {
+    virtual bool keyEquals(U_32 *key1,U_32 *key2) const {
         return key1 == key2;
     }
-    virtual uint32 getKeyHashCode(uint32 *key) const {
+    virtual U_32 getKeyHashCode(U_32 *key) const {
         // return hash of address bits
-        return ((uint32)(POINTER_SIZE_INT)key);
+        return ((U_32)(POINTER_SIZE_INT)key);
     }
 private:
     MemoryManager& memManager;
     TypeManager& typeManager;
     JavaLabelPrepass& prepass;
-    StlHashMap<uint32, StateInfo*> hashtable;
+    StlHashMap<U_32, StateInfo*> hashtable;
     unsigned maxDepth;
     unsigned numVars;
 };

Modified: harmony/enhanced/drlvm/trunk/vm/jitrino/src/translator/java/JavaTranslator.cpp
URL: http://svn.apache.org/viewvc/harmony/enhanced/drlvm/trunk/vm/jitrino/src/translator/java/JavaTranslator.cpp?rev=659108&r1=659107&r2=659108&view=diff
==============================================================================
--- harmony/enhanced/drlvm/trunk/vm/jitrino/src/translator/java/JavaTranslator.cpp (original)
+++ harmony/enhanced/drlvm/trunk/vm/jitrino/src/translator/java/JavaTranslator.cpp Thu May 22 06:33:38 2008
@@ -36,7 +36,7 @@
 
 void JavaTranslator::translateMethod(CompilationInterface& ci, MethodDesc& methodDesc, IRBuilder& irBuilder) {
     
-    uint32 byteCodeSize = methodDesc.getByteCodeSize();
+    U_32 byteCodeSize = methodDesc.getByteCodeSize();
     const unsigned char* byteCodes = methodDesc.getByteCodes();
     MemoryManager  translatorMemManager("JavaTranslator::translateMethod.translatorMemManager");
 

Modified: harmony/enhanced/drlvm/trunk/vm/jitrino/src/vm/EMInterface.cpp
URL: http://svn.apache.org/viewvc/harmony/enhanced/drlvm/trunk/vm/jitrino/src/vm/EMInterface.cpp?rev=659108&r1=659107&r2=659108&view=diff
==============================================================================
--- harmony/enhanced/drlvm/trunk/vm/jitrino/src/vm/EMInterface.cpp (original)
+++ harmony/enhanced/drlvm/trunk/vm/jitrino/src/vm/EMInterface.cpp Thu May 22 06:33:38 2008
@@ -48,8 +48,8 @@
     } else if (type == ProfileType_Value) {
         p = new (mm) ValueMethodProfile(mpHandle, md, profileAccessInterface);
     } else {
-        uint32* eCounter = (uint32*)profileAccessInterface->eb_profiler_get_entry_counter_addr(mpHandle);
-        uint32* bCounter = (uint32*)profileAccessInterface->eb_profiler_get_backedge_counter_addr(mpHandle);
+        U_32* eCounter = (U_32*)profileAccessInterface->eb_profiler_get_entry_counter_addr(mpHandle);
+        U_32* bCounter = (U_32*)profileAccessInterface->eb_profiler_get_backedge_counter_addr(mpHandle);
         p = new (mm) EntryBackedgeMethodProfile(mpHandle, md, eCounter, bCounter);
     }
     return p;
@@ -80,7 +80,7 @@
     return false;
 }
 
-uint32 ProfilingInterface::getProfileMethodCount(MethodDesc& md, JITProfilingRole role) const {
+U_32 ProfilingInterface::getProfileMethodCount(MethodDesc& md, JITProfilingRole role) const {
     assert(jitRole == role);
     PC_Handle pcHandle = getPCHandle(ProfileType_Edge);
     ProfileType pcType = ProfileType_Edge;
@@ -94,11 +94,11 @@
     if (mph == NULL) {
         return 0;
     }
-    uint32* counterAddr = NULL;
+    U_32* counterAddr = NULL;
     if (pcType == ProfileType_Edge) { 
-        counterAddr = (uint32*)profileAccessInterface->edge_profiler_get_entry_counter_addr(mph);
+        counterAddr = (U_32*)profileAccessInterface->edge_profiler_get_entry_counter_addr(mph);
     } else {
-        counterAddr = (uint32*)profileAccessInterface->eb_profiler_get_entry_counter_addr(mph);
+        counterAddr = (U_32*)profileAccessInterface->eb_profiler_get_entry_counter_addr(mph);
     }
     return *counterAddr;
 }
@@ -151,8 +151,8 @@
     PC_Handle pcHandle = getPCHandle(ProfileType_EntryBackedge);
     Method_Profile_Handle mpHandle = profileAccessInterface->eb_profiler_create_profile(pcHandle, md.getMethodHandle());
     assert(mpHandle!=0);
-    uint32* eCounter = (uint32*)profileAccessInterface->eb_profiler_get_entry_counter_addr(mpHandle);
-    uint32* bCounter = (uint32*)profileAccessInterface->eb_profiler_get_backedge_counter_addr(mpHandle);
+    U_32* eCounter = (U_32*)profileAccessInterface->eb_profiler_get_entry_counter_addr(mpHandle);
+    U_32* bCounter = (U_32*)profileAccessInterface->eb_profiler_get_backedge_counter_addr(mpHandle);
 
     EntryBackedgeMethodProfile* p = new (mm) EntryBackedgeMethodProfile(mpHandle, md, eCounter, bCounter);
     return p;
@@ -161,9 +161,9 @@
 
 EdgeMethodProfile* ProfilingInterface::createEdgeMethodProfile( MemoryManager& mm,
                                                                   MethodDesc& md,
-                                                                  uint32 numCounters,
-                                                                  uint32* counterKeys,
-                                                                  uint32 checkSum )
+                                                                  U_32 numCounters,
+                                                                  U_32* counterKeys,
+                                                                  U_32 checkSum )
 {
     assert(isProfilingEnabled(ProfileType_Edge, JITProfilingRole_GEN));
     PC_Handle pcHandle = getPCHandle(ProfileType_Edge);
@@ -177,8 +177,8 @@
 
 ValueMethodProfile* ProfilingInterface::createValueMethodProfile(MemoryManager& mm,
                                                                     MethodDesc& md,
-                                                                    uint32 numKeys,
-                                                                    uint32* Keys)
+                                                                    U_32 numKeys,
+                                                                    U_32* Keys)
 {
     assert(isProfilingEnabled(ProfileType_Value, JITProfilingRole_GEN));
     PC_Handle pcHandle = getPCHandle(ProfileType_Value);
@@ -191,7 +191,7 @@
 }
 
 
-uint32 ProfilingInterface::getMethodEntryThreshold() const {
+U_32 ProfilingInterface::getMethodEntryThreshold() const {
     PC_Handle pcHandle = getPCHandle(ProfileType_Edge);
     if (pcHandle != NULL) {
         return profileAccessInterface->edge_profiler_get_entry_threshold(pcHandle);
@@ -202,7 +202,7 @@
     return 0;
 }
 
-uint32 ProfilingInterface::getBackedgeThreshold() const {
+U_32 ProfilingInterface::getBackedgeThreshold() const {
     PC_Handle pcHandle = getPCHandle(ProfileType_Edge);
     if (pcHandle != NULL) {
         return profileAccessInterface->edge_profiler_get_backedge_threshold(pcHandle);
@@ -225,24 +225,24 @@
 }
 
 
-uint32  EdgeMethodProfile::getNumCounters() const {
+U_32  EdgeMethodProfile::getNumCounters() const {
     return profileAccessInterface->edge_profiler_get_num_counters(getHandle());
 }
 
-uint32  EdgeMethodProfile::getCheckSum() const {
+U_32  EdgeMethodProfile::getCheckSum() const {
     return profileAccessInterface->edge_profiler_get_checksum(getHandle());
 }
 
-uint32* EdgeMethodProfile::getEntryCounter() const {
-    return (uint32*)profileAccessInterface->edge_profiler_get_entry_counter_addr(getHandle());
+U_32* EdgeMethodProfile::getEntryCounter() const {
+    return (U_32*)profileAccessInterface->edge_profiler_get_entry_counter_addr(getHandle());
 }
 
-uint32* EdgeMethodProfile::getCounter(uint32 key) const  {
-    uint32* counter = (uint32*)profileAccessInterface->edge_profiler_get_counter_addr(getHandle(), key);
+U_32* EdgeMethodProfile::getCounter(U_32 key) const  {
+    U_32* counter = (U_32*)profileAccessInterface->edge_profiler_get_counter_addr(getHandle(), key);
     return counter;
 }
 
-POINTER_SIZE_INT ValueMethodProfile::getTopValue(uint32 instructionKey) const {
+POINTER_SIZE_INT ValueMethodProfile::getTopValue(U_32 instructionKey) const {
     return profileAccessInterface->value_profiler_get_top_value(getHandle(), instructionKey);
 }
 

Modified: harmony/enhanced/drlvm/trunk/vm/jitrino/src/vm/EMInterface.h
URL: http://svn.apache.org/viewvc/harmony/enhanced/drlvm/trunk/vm/jitrino/src/vm/EMInterface.h?rev=659108&r1=659107&r2=659108&view=diff
==============================================================================
--- harmony/enhanced/drlvm/trunk/vm/jitrino/src/vm/EMInterface.h (original)
+++ harmony/enhanced/drlvm/trunk/vm/jitrino/src/vm/EMInterface.h Thu May 22 06:33:38 2008
@@ -56,17 +56,17 @@
 
 class EntryBackedgeMethodProfile : public MethodProfile {
 public:
-    EntryBackedgeMethodProfile(Method_Profile_Handle mph, MethodDesc& md, uint32* _entryCounter, uint32 *_backedgeCounter)
+    EntryBackedgeMethodProfile(Method_Profile_Handle mph, MethodDesc& md, U_32* _entryCounter, U_32 *_backedgeCounter)
         : MethodProfile(mph, ProfileType_EntryBackedge, md),  entryCounter(_entryCounter), backedgeCounter(_backedgeCounter){}
 
-        uint32 getEntryExecCount() const {return *entryCounter;}
-        uint32 getBackedgeExecCount() const {return *backedgeCounter;}
-        uint32* getEntryCounter() const {return entryCounter;}
-        uint32* getBackedgeCounter() const {return backedgeCounter;}
+        U_32 getEntryExecCount() const {return *entryCounter;}
+        U_32 getBackedgeExecCount() const {return *backedgeCounter;}
+        U_32* getEntryCounter() const {return entryCounter;}
+        U_32* getBackedgeCounter() const {return backedgeCounter;}
 
 private:
-    uint32* entryCounter;
-    uint32* backedgeCounter;
+    U_32* entryCounter;
+    U_32* backedgeCounter;
 };
 
 class EdgeMethodProfile : public MethodProfile {
@@ -74,10 +74,10 @@
     EdgeMethodProfile (Method_Profile_Handle handle, MethodDesc& md,  EM_ProfileAccessInterface* _profileAccessInterface)
         : MethodProfile(handle, ProfileType_Edge, md), profileAccessInterface(_profileAccessInterface){}
 
-        uint32  getNumCounters() const;
-        uint32  getCheckSum() const;
-        uint32* getEntryCounter() const;
-        uint32* getCounter(uint32 key) const;
+        U_32  getNumCounters() const;
+        U_32  getCheckSum() const;
+        U_32* getEntryCounter() const;
+        U_32* getCounter(U_32 key) const;
 
 private:
     EM_ProfileAccessInterface* profileAccessInterface;
@@ -88,7 +88,7 @@
     ValueMethodProfile (Method_Profile_Handle handle, MethodDesc& md,  EM_ProfileAccessInterface* _profileAccessInterface)
         : MethodProfile(handle, ProfileType_Value, md), profileAccessInterface(_profileAccessInterface){}
 
-        POINTER_SIZE_INT getTopValue(uint32 instructionKey) const;
+        POINTER_SIZE_INT getTopValue(U_32 instructionKey) const;
         void dumpValues(std::ostream& os) const;
 
 private:
@@ -114,7 +114,7 @@
     bool isProfilingEnabled(ProfileType pcType, JITProfilingRole jitRole) const;
 
 
-    uint32 getProfileMethodCount(MethodDesc& md, JITProfilingRole role = JITProfilingRole_USE) const;
+    U_32 getProfileMethodCount(MethodDesc& md, JITProfilingRole role = JITProfilingRole_USE) const;
 
     EntryBackedgeMethodProfile* createEBMethodProfile(MemoryManager& mm, MethodDesc& md);
     bool isEBProfilerInSyncMode() const;
@@ -123,11 +123,11 @@
     PC_Callback_Fn* getEBProfilerSyncModeCallback() const;
 
 
-    EdgeMethodProfile* createEdgeMethodProfile(MemoryManager& mm, MethodDesc& md, uint32 numEdgeCounters, uint32* counterKeys, uint32 checkSum);
+    EdgeMethodProfile* createEdgeMethodProfile(MemoryManager& mm, MethodDesc& md, U_32 numEdgeCounters, U_32* counterKeys, U_32 checkSum);
 
 
-    uint32 getMethodEntryThreshold() const;
-    uint32 getBackedgeThreshold() const;
+    U_32 getMethodEntryThreshold() const;
+    U_32 getBackedgeThreshold() const;
 
     EntryBackedgeMethodProfile* getEBMethodProfile(MemoryManager& mm, MethodDesc& md, JITProfilingRole role=JITProfilingRole_USE) const {
         return (EntryBackedgeMethodProfile*)getMethodProfile(mm, ProfileType_EntryBackedge, md, role);
@@ -139,7 +139,7 @@
     
     
     // value profiler
-    ValueMethodProfile* createValueMethodProfile (MemoryManager& mm, MethodDesc& md, uint32 numKeys, uint32* Keys);
+    ValueMethodProfile* createValueMethodProfile (MemoryManager& mm, MethodDesc& md, U_32 numKeys, U_32* Keys);
     
     ValueMethodProfile* getValueMethodProfile(MemoryManager& mm, MethodDesc& md, JITProfilingRole role=JITProfilingRole_USE) const {
         return (ValueMethodProfile*)getMethodProfile(mm, ProfileType_Value, md, role);    

Modified: harmony/enhanced/drlvm/trunk/vm/jitrino/src/vm/JITInterface.cpp
URL: http://svn.apache.org/viewvc/harmony/enhanced/drlvm/trunk/vm/jitrino/src/vm/JITInterface.cpp?rev=659108&r1=659107&r2=659108&view=diff
==============================================================================
--- harmony/enhanced/drlvm/trunk/vm/jitrino/src/vm/JITInterface.cpp (original)
+++ harmony/enhanced/drlvm/trunk/vm/jitrino/src/vm/JITInterface.cpp Thu May 22 06:33:38 2008
@@ -326,8 +326,8 @@
 }
 
 extern "C"
-JITEXPORT uint32
-JIT_get_inline_depth(JIT_Handle jit, InlineInfoPtr ptr, uint32 offset)
+JITEXPORT U_32
+JIT_get_inline_depth(JIT_Handle jit, InlineInfoPtr ptr, U_32 offset)
 {
     if (Log::cat_rt()->isEnabled()) {
         Log::cat_rt()->out() << "GET_INLINE_DEPTH()" << ::std::endl;
@@ -337,8 +337,8 @@
 
 extern "C"
 JITEXPORT Method_Handle
-JIT_get_inlined_method(JIT_Handle jit, InlineInfoPtr ptr, uint32 offset,
-                       uint32 inline_depth)
+JIT_get_inlined_method(JIT_Handle jit, InlineInfoPtr ptr, U_32 offset,
+                       U_32 inline_depth)
 {
     if (Log::cat_rt()->isEnabled()) {
         Log::cat_rt()->out() << "GET_INLINED_METHOD()" << ::std::endl;
@@ -352,7 +352,7 @@
 
 extern "C"
 JITEXPORT uint16
-JIT_get_inlined_bc(JIT_Handle jit, InlineInfoPtr ptr, uint32 offset, uint32 inline_depth)
+JIT_get_inlined_bc(JIT_Handle jit, InlineInfoPtr ptr, U_32 offset, U_32 inline_depth)
 {
     if (Log::cat_rt()->isEnabled()) {
         Log::cat_rt()->out() << "GET_INLINED_BC()" << ::std::endl;



Mime
View raw message