harmony-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From mcfi...@apache.org
Subject svn commit: r659108 [11/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/optimizer/abcd/classic_abcd_solver.h
URL: http://svn.apache.org/viewvc/harmony/enhanced/drlvm/trunk/vm/jitrino/src/optimizer/abcd/classic_abcd_solver.h?rev=659108&r1=659107&r2=659108&view=diff
==============================================================================
--- harmony/enhanced/drlvm/trunk/vm/jitrino/src/optimizer/abcd/classic_abcd_solver.h (original)
+++ harmony/enhanced/drlvm/trunk/vm/jitrino/src/optimizer/abcd/classic_abcd_solver.h Thu May 22 06:33:38 2008
@@ -29,7 +29,7 @@
 
 class IOpnd {
 public:
-    IOpnd(uint32 id, bool is_phi = false, bool is_constant = false) :
+    IOpnd(U_32 id, bool is_phi = false, bool is_constant = false) :
         _id(id), _phi(is_phi), _const(is_constant), 
         _unconstrained(false), _value(0)
     {}
@@ -43,21 +43,21 @@
     void setIsConstant(bool s = true) { _const = s; }
     bool isConstant() const { return _const; }
 
-    void setConstant(int32 val) { setIsConstant(true); _value = val; }
-    int32 getConstant() const { assert(isConstant()); return _value; }
+    void setConstant(I_32 val) { setIsConstant(true); _value = val; }
+    I_32 getConstant() const { assert(isConstant()); return _value; }
 
     void setUnconstrained(bool unc) { _unconstrained = unc; }
     bool isUnconstrained() { return _unconstrained; }
 
-    void setID(uint32 id) { _id = id; }
-    uint32 getID() const { return _id; }
+    void setID(U_32 id) { _id = id; }
+    U_32 getID() const { return _id; }
 
     virtual void printName(std::ostream& os) const;
     void printFullName(std::ostream& os) const;
 private:
-    uint32 _id;
+    U_32 _id;
     bool   _phi, _const, _unconstrained;
-    int32  _value;
+    I_32  _value;
 };
 
 class BoundState {
@@ -86,16 +86,16 @@
 
 class IneqEdge {
 public:
-    IneqEdge(IOpnd* src, IOpnd* dst, int32 len) :
+    IneqEdge(IOpnd* src, IOpnd* dst, I_32 len) :
         _src(src), _dst(dst), _length(len)
     {}
     IOpnd* getSrc() const { return _src; }
     IOpnd* getDst() const { return _dst; }
-    int32 getLength() const { return _length; }
-    void setLength(int32 len) { _length = len; }
+    I_32 getLength() const { return _length; }
+    void setLength(I_32 len) { _length = len; }
 private:
     IOpnd *_src, *_dst;
-    int32 _length;
+    I_32 _length;
 };
 
 typedef StlList<IneqEdge*> EdgeList;
@@ -227,7 +227,7 @@
 };
 
 class TwoStateOpndToEdgeListMap {
-    typedef StlMap<uint32, TwoStateEdgeList* > MapIdTo2stList;
+    typedef StlMap<U_32, TwoStateEdgeList* > MapIdTo2stList;
 public:
     TwoStateOpndToEdgeListMap(MemoryManager& mm) :
         _is_lower(false),
@@ -239,13 +239,13 @@
 
     bool isLowerState() { return _is_lower; }
 
-    void addEdge(uint32 opnd_id, IneqEdge* edge);
+    void addEdge(U_32 opnd_id, IneqEdge* edge);
 
-    void addEdgeSingleState(uint32 opnd_id, IneqEdge *edge, bool is_lower);
+    void addEdgeSingleState(U_32 opnd_id, IneqEdge *edge, bool is_lower);
 
-    TwoStateEdgeList::iterator eListBegin(uint32 opnd_id) const;
+    TwoStateEdgeList::iterator eListBegin(U_32 opnd_id) const;
 
-    TwoStateEdgeList::iterator eListEnd(uint32 opnd_id) const;
+    TwoStateEdgeList::iterator eListEnd(U_32 opnd_id) const;
 private:
     friend class InequalityGraph;
 
@@ -268,7 +268,7 @@
 public:
     typedef TwoStateEdgeList::iterator edge_iterator;
 private:
-    typedef StlMap<uint32, StlList<IneqEdge*> > OpndEdgeMap;
+    typedef StlMap<U_32, StlList<IneqEdge*> > OpndEdgeMap;
 
 public:
     InequalityGraph(MemoryManager& mem_mgr) : 
@@ -288,16 +288,16 @@
     bool isLowerState() { return _is_lower; }
 
     // add edge by operands visible in all states
-    void addEdge(IOpnd* from, IOpnd* to, int32 distance);
+    void addEdge(IOpnd* from, IOpnd* to, I_32 distance);
 
     // add edge by operand IDs visible in all states
-    void addEdge(uint32 id_from, uint32 id_to, int32 distance);
+    void addEdge(U_32 id_from, U_32 id_to, I_32 distance);
 
     // add edge by operand IDs visible in a given state
-    void addEdgeSingleState(uint32 id_from, uint32 id_to, int32 distance, bool is_lower);
+    void addEdgeSingleState(U_32 id_from, U_32 id_to, I_32 distance, bool is_lower);
 
     // add edge by operands visible in a given state
-    void addEdgeSingleState(IOpnd* from, IOpnd* to, int32 distance, bool is_lower);
+    void addEdgeSingleState(IOpnd* from, IOpnd* to, I_32 distance, bool is_lower);
 
     void addOpnd(IOpnd* opnd);
 
@@ -313,13 +313,13 @@
 
     bool isEmpty() const { return _id_to_opnd_map.empty(); }
 
-    IOpnd* findOpnd(uint32 id) const;
+    IOpnd* findOpnd(U_32 id) const;
 
     MemoryManager& getMemoryManager() { return _mem_mgr; }
 private:
     friend class InequalityOpndIterator;
     friend class InequalityGraphPrinter;
-    typedef StlMap<uint32, IOpnd*> IdToOpndMap;
+    typedef StlMap<U_32, IOpnd*> IdToOpndMap;
 
     static bool has_other_opnd_with_same_id(IdToOpndMap& map, IOpnd* opnd);
 
@@ -327,7 +327,7 @@
     void printDotBody(std::ostream& os) const;
     void printDotEnd(std::ostream& os) const;
 
-    IOpnd* getOpndById(uint32 id) const;
+    IOpnd* getOpndById(U_32 id) const;
 
     enum PrnEdgeType
     {
@@ -356,10 +356,10 @@
 
 class Bound : public HasBoundState {
 public:
-    Bound(int32 bnd, const BoundState& bs) : HasBoundState(bs), _bound(bnd) {}
+    Bound(I_32 bnd, const BoundState& bs) : HasBoundState(bs), _bound(bnd) {}
 
-    // bound - int32 -> Bound
-    Bound(Bound* bound, int32 val, const BoundState& bs);
+    // bound - I_32 -> Bound
+    Bound(Bound* bound, I_32 val, const BoundState& bs);
 
     void printFullName(std::ostream& os);
 
@@ -367,16 +367,16 @@
 
     static bool eq(Bound* bound1, Bound* bound2);
 
-    static bool leq_int32(Bound* bound1, int32 value);
+    static bool leq_int32(Bound* bound1, I_32 value);
 
-    static bool int32_leq(int32 value, Bound* bound1);
+    static bool int32_leq(I_32 value, Bound* bound1);
 
     // returns (dst_val - src_val <= bound)
-    static bool const_distance_leq(int32 src_val, int32 dst_val, Bound* bound);
+    static bool const_distance_leq(I_32 src_val, I_32 dst_val, Bound* bound);
 
 private:
     friend class BoundAllocator;
-    int32 _bound;
+    I_32 _bound;
 };
 
 class TrueReducedFalseChart;
@@ -389,7 +389,7 @@
 
     Bound* create_dec1(Bound* bound);
 
-    Bound* create_dec_const(Bound* bound, int32 cnst);
+    Bound* create_dec_const(Bound* bound, I_32 cnst);
 
     TrueReducedFalseChart* create_empty_TRFChart();
 
@@ -398,7 +398,7 @@
 
     MemoryManager& getMemoryManager() { return _mem_mgr; }
 
-    Bound* newBound(int32 val, const BoundState& bs);
+    Bound* newBound(I_32 val, const BoundState& bs);
     MemoryManager& _mem_mgr;
 };
 
@@ -519,17 +519,17 @@
     {}
 
     bool demandProve
-        (IOpnd* source, IOpnd* dest, int32 bound_int, bool prove_upper_bound);
+        (IOpnd* source, IOpnd* dest, I_32 bound_int, bool prove_upper_bound);
 
 private:
-    ProveResult prove(IOpnd* dest, Bound* bound, uint32 prn_level);
+    ProveResult prove(IOpnd* dest, Bound* bound, U_32 prn_level);
 
     void updateMemDistanceWithPredecessors
-        (IOpnd* dest, Bound* bound, uint32 prn_level, meet_func_t meet_f);
+        (IOpnd* dest, Bound* bound, U_32 prn_level, meet_func_t meet_f);
 
     class Printer {
     public:
-        Printer(uint32 level, std::ostream& os) : _level(level), _os(os) {}
+        Printer(U_32 level, std::ostream& os) : _level(level), _os(os) {}
 
         void prnLevel();
 
@@ -538,7 +538,7 @@
         void prnStrLn(const char* str);
 
     private:
-        uint32 _level;
+        U_32 _level;
         std::ostream& _os; 
     };
 

Modified: harmony/enhanced/drlvm/trunk/vm/jitrino/src/optimizer/abcd/insertpi.cpp
URL: http://svn.apache.org/viewvc/harmony/enhanced/drlvm/trunk/vm/jitrino/src/optimizer/abcd/insertpi.cpp?rev=659108&r1=659107&r2=659108&view=diff
==============================================================================
--- harmony/enhanced/drlvm/trunk/vm/jitrino/src/optimizer/abcd/insertpi.cpp (original)
+++ harmony/enhanced/drlvm/trunk/vm/jitrino/src/optimizer/abcd/insertpi.cpp Thu May 22 06:33:38 2008
@@ -261,7 +261,7 @@
     case Op_NewMultiArray:
         {
             // the number of newarray dimensions must be >= 1.
-            uint32 numOpnds = lasti->getNumSrcOperands();
+            U_32 numOpnds = lasti->getNumSrcOperands();
             assert(numOpnds >= 1);
             StlSet<Opnd *> done(_mm);
             if (Log::isEnabled()) {
@@ -271,7 +271,7 @@
             }
             Opnd *tauOpnd = 0;
             // the number of newarray elements must be in [0, MAXINT32]
-            for (uint32 opndNum = 0; opndNum < numOpnds; opndNum++) {
+            for (U_32 opndNum = 0; opndNum < numOpnds; opndNum++) {
                 Opnd *thisOpnd = lasti->getSrc(opndNum);
                 if (!done.has(thisOpnd)) {
                     done.insert(thisOpnd);
@@ -763,7 +763,7 @@
                 ConstInst *cinst0 = inst0->asConstInst();
                 assert(cinst0);
                 ConstInst::ConstValue cv = cinst0->getValue();
-                int32 c = cv.i4;
+                I_32 c = cv.i4;
                 int64 sumc = c + addend;
                 if (add_overflowed<int64>(sumc, c, addend)) {
                     return false;
@@ -907,7 +907,7 @@
 void InsertPi::renamePiVariables()
 {
     MethodDesc &methodDesc= _irManager.getMethodDesc();
-    uint32 byteCodeSize = methodDesc.getByteCodeSize();
+    U_32 byteCodeSize = methodDesc.getByteCodeSize();
     MemoryManager localMemManager("Abcd::renamePiNodes");
 
     RenamePiWalker theWalker(this, localMemManager, _piMap, byteCodeSize);
@@ -963,8 +963,8 @@
             }
             
             // now process source operands
-            uint32 numOpnds = inst->getNumSrcOperands();
-            for (uint32 i=0; i<numOpnds; i++) {
+            U_32 numOpnds = inst->getNumSrcOperands();
+            for (U_32 i=0; i<numOpnds; i++) {
                 Opnd *opnd = inst->getSrc(i);
                 if (opnd->isPiOpnd())
                     opnd = opnd->asPiOpnd()->getOrg();
@@ -1093,8 +1093,8 @@
         inst->unlink();
     }else{
         // replace Pi operands with original ones
-        uint32 num_opnds = inst->getNumSrcOperands();
-        for (uint32 i = 0; i < num_opnds; i++) {
+        U_32 num_opnds = inst->getNumSrcOperands();
+        for (U_32 i = 0; i < num_opnds; i++) {
             Opnd* pi_opnd = inst->getSrc(i);
             while ( pi_opnd->isPiOpnd() ) {
                 pi_opnd = pi_opnd->asPiOpnd()->getOrg();

Modified: harmony/enhanced/drlvm/trunk/vm/jitrino/src/optimizer/codelowerer.cpp
URL: http://svn.apache.org/viewvc/harmony/enhanced/drlvm/trunk/vm/jitrino/src/optimizer/codelowerer.cpp?rev=659108&r1=659107&r2=659108&view=diff
==============================================================================
--- harmony/enhanced/drlvm/trunk/vm/jitrino/src/optimizer/codelowerer.cpp (original)
+++ harmony/enhanced/drlvm/trunk/vm/jitrino/src/optimizer/codelowerer.cpp Thu May 22 06:33:38 2008
@@ -1075,7 +1075,7 @@
             
             // b3: var = 1
             Opnd* one = opndManager.createSsaTmpOpnd(dst->getType());
-            b3->appendInst(instFactory.makeLdConst(one, (int32) 1));
+            b3->appendInst(instFactory.makeLdConst(one, (I_32) 1));
             fg.addEdge(b3, succ);
             
             VarOpnd* dstVar = opndManager.createVarOpnd(dst->getType(), false);
@@ -1178,12 +1178,12 @@
             
             // b3: var = 1
             Opnd* one = opndManager.createSsaTmpOpnd(dst->getType());
-            b3->appendInst(instFactory.makeLdConst(one, (int32) 1));
+            b3->appendInst(instFactory.makeLdConst(one, (I_32) 1));
             fg.addEdge(b3, succ);
             
             // b4: var = 0
             Opnd* zero = opndManager.createSsaTmpOpnd(dst->getType());
-            b4->appendInst(instFactory.makeLdConst(zero, (int32) 0));
+            b4->appendInst(instFactory.makeLdConst(zero, (I_32) 0));
             fg.addEdge(b4, succ);
             
             VarOpnd* dstVar = opndManager.createVarOpnd(dst->getType(), false);

Modified: harmony/enhanced/drlvm/trunk/vm/jitrino/src/optimizer/constantfolder.cpp
URL: http://svn.apache.org/viewvc/harmony/enhanced/drlvm/trunk/vm/jitrino/src/optimizer/constantfolder.cpp?rev=659108&r1=659107&r2=659108&view=diff
==============================================================================
--- harmony/enhanced/drlvm/trunk/vm/jitrino/src/optimizer/constantfolder.cpp (original)
+++ harmony/enhanced/drlvm/trunk/vm/jitrino/src/optimizer/constantfolder.cpp Thu May 22 06:33:38 2008
@@ -51,23 +51,23 @@
 
 // use templates here to decrease code to write for float2int below.
 template <typename tointtype> tointtype minint(tointtype);
-template < > inline int32 minint<int32>(int32) { return 0x80000000; }
+template < > inline I_32 minint<I_32>(I_32) { return 0x80000000; }
 template < > inline int64 minint<int64>(int64) { 
     return __INT64_C(0x8000000000000000); 
 }
 template <typename tointtype> tointtype maxint(tointtype);
-template < > inline int32 maxint<int32>(int32) { return 0x7fffffff; }
+template < > inline I_32 maxint<I_32>(I_32) { return 0x7fffffff; }
 template < > inline int64 maxint<int64>(int64) { 
     return __INT64_C(0x7fffffffffffffff); 
 }
 template <typename tointtype> tointtype maxuint(tointtype);
-template < > inline uint32 maxuint<uint32>(uint32) { return 0xffffffff; }
+template < > inline U_32 maxuint<U_32>(U_32) { return 0xffffffff; }
 template < > inline uint64 maxuint<uint64>(uint64) { 
     return __UINT64_C(0xffffffffffffffff); 
 }
 // get around VC++ problem with uint64->float conversions:
 template <typename tointtype> double maxuintasfloat(tointtype);
-template < > inline double maxuintasfloat<uint32>(uint32) { 
+template < > inline double maxuintasfloat<U_32>(U_32) { 
     return 4294967295.0;
 }
 template < > inline double maxuintasfloat<uint64>(uint64) { 
@@ -203,7 +203,7 @@
     ConstInst::ConstValue value = inst->getValue();
     switch (inst->getType()) {
     case Type::Int32:
-        return value.i4 == (int32) -1;
+        return value.i4 == (I_32) -1;
     case Type::Int64:
         return value.i8 == (int64) -1;
     default:
@@ -212,7 +212,7 @@
 }
 
 bool
-ConstantFolder::isConstant(Inst* inst, int32& value) {
+ConstantFolder::isConstant(Inst* inst, I_32& value) {
     ConstInst* constInst = inst->asConstInst();
     if (constInst == NULL || constInst->getType() != Type::Int32)
         return false;
@@ -247,7 +247,7 @@
 // Utilities for constant folding
 //-----------------------------------------------------------------------------
 bool
-ConstantFolder::fold8(Opcode opc, int8 c1, int8 c2, int32& result, bool is_signed) {
+ConstantFolder::fold8(Opcode opc, int8 c1, int8 c2, I_32& result, bool is_signed) {
     switch (opc) {
     case Op_Add:    result = c1 + c2; return true;
     case Op_Sub:    result = c1 - c2; return true;
@@ -259,7 +259,7 @@
         if (is_signed) {
             result = c1 * c2; return true;
         } else {
-            result = CAST(int32, CAST(uint32, (CAST(uint8, c1)*CAST(uint8, c2)))); return true;
+            result = CAST(I_32, CAST(U_32, (CAST(uint8, c1)*CAST(uint8, c2)))); return true;
         }
     // for div and rem, be careful c2 not be 0
     // also, need to handle signed/unsigned based on SignedModifier
@@ -268,16 +268,16 @@
         if (is_signed) {
             result = c1 / c2; return true;
         } else {
-            result = CAST(int32, CAST(uint32, CAST(uint8, c1) / CAST(uint8, c2))); return true;
+            result = CAST(I_32, CAST(U_32, CAST(uint8, c1) / CAST(uint8, c2))); return true;
         }
     case Op_TauRem:
         if (c2 == (int8)0) return false;
         if (is_signed) {
             result = c1 % c2; return true;
         } else {
-            result = CAST(int32, CAST(uint32, CAST(uint8, c1) % CAST(uint8, c2))); return true;
+            result = CAST(I_32, CAST(U_32, CAST(uint8, c1) % CAST(uint8, c2))); return true;
         }
-    case Op_MulHi:  result = (int32)(int8)((((int16)c1) * ((int16)c2)) >> 8);
+    case Op_MulHi:  result = (I_32)(int8)((((int16)c1) * ((int16)c2)) >> 8);
         return true;
     case Op_Min:
         result = ::std::min(c1,c2); return true;
@@ -288,7 +288,7 @@
     }
 }
 bool
-ConstantFolder::fold16(Opcode opc, int16 c1, int16 c2, int32& result, bool is_signed) {
+ConstantFolder::fold16(Opcode opc, int16 c1, int16 c2, I_32& result, bool is_signed) {
     switch (opc) {
     case Op_Add:    result = c1 + c2; return true;
     case Op_Sub:    result = c1 - c2; return true;
@@ -300,7 +300,7 @@
         if (is_signed) {
             result = c1 * c2; return true;
         } else {
-            result = CAST(int32, CAST(uint32, CAST(uint16, c1) * CAST(uint16, c2))); return true;
+            result = CAST(I_32, CAST(U_32, CAST(uint16, c1) * CAST(uint16, c2))); return true;
         }
     // for div and rem, be careful c2 not be 0
     // also, need to handle signed/unsigned based on SignedModifier
@@ -309,16 +309,16 @@
         if (is_signed) {
             result = c1 / c2; return true;
         } else {
-            result = CAST(int32, CAST(uint32, CAST(uint16, c1) / CAST(uint16, c2))); return true;
+            result = CAST(I_32, CAST(U_32, CAST(uint16, c1) / CAST(uint16, c2))); return true;
         }
     case Op_TauRem:
         if (c2 == (int16)0) return false;
         if (is_signed) {
             result = c1 % c2; return true;
         } else {
-            result = CAST(int32, CAST(uint32, CAST(uint16, c1) % CAST(uint16, c2))); return true;
+            result = CAST(I_32, CAST(U_32, CAST(uint16, c1) % CAST(uint16, c2))); return true;
         }
-    case Op_MulHi:  result = (int32)((int16)(((int32)c1) * ((int32)c2)) >> 16);
+    case Op_MulHi:  result = (I_32)((int16)(((I_32)c1) * ((I_32)c2)) >> 16);
         return true;
     case Op_Min:
         result = ::std::min(c1,c2); return true;
@@ -330,7 +330,7 @@
 }
 
 bool
-ConstantFolder::fold32(Opcode opc, int32 c1, int32 c2, int32& result, bool is_signed) {
+ConstantFolder::fold32(Opcode opc, I_32 c1, I_32 c2, I_32& result, bool is_signed) {
     switch (opc) {
     case Op_Add:    result = c1 + c2; return true;
     case Op_Sub:    result = c1 - c2; return true;
@@ -342,39 +342,39 @@
         if (is_signed) {
             result = c1 * c2; return true;
         } else {
-            result = CAST(int32, CAST(uint32, CAST(uint32, c1) * CAST(uint32, c2))); return true;
+            result = CAST(I_32, CAST(U_32, CAST(U_32, c1) * CAST(U_32, c2))); return true;
         }
     // for div and rem, be careful c2 not be 0
     // also, need to handle signed/unsigned based on SignedModifier
     case Op_TauDiv:    
-        if (c2 == (int32)0) return false;
+        if (c2 == (I_32)0) return false;
         if (is_signed) {
-            if ((c1 == (int32)0x80000000) && (c2 == -1)) {
+            if ((c1 == (I_32)0x80000000) && (c2 == -1)) {
                 result = c1; 
                 return true;
             }
 
             result = c1 / c2; return true;
         } else {
-            result = CAST(int32, CAST(uint32, CAST(uint32, c1 / CAST(uint32, c2)))); return true;
+            result = CAST(I_32, CAST(U_32, CAST(U_32, c1 / CAST(U_32, c2)))); return true;
         }
     case Op_TauRem:
-        if (c2 == (int32)0) return false;
+        if (c2 == (I_32)0) return false;
         if (is_signed) {
-            if ((c1 == (int32)0x80000000) && (c2 == -1)) {
+            if ((c1 == (I_32)0x80000000) && (c2 == -1)) {
                 result = 0; 
                 return true;
             }
 
             result = c1 % c2; return true;
         } else {
-            result = CAST(int32, CAST(uint32, CAST(uint32, c1) % CAST(uint32, c2))); return true;
+            result = CAST(I_32, CAST(U_32, CAST(U_32, c1) % CAST(U_32, c2))); return true;
         }
     case Op_MulHi:
         {
             int64 res = ((int64)c1) * ((int64)c2);
-            int64 res2 = (int64)((int32)(res >> 32));
-            result = (int32) res2;
+            int64 res2 = (int64)((I_32)(res >> 32));
+            result = (I_32) res2;
             return true;
         }
     case Op_Min:
@@ -434,7 +434,7 @@
             if (is_signed) {
                 result = mulhs<int64, uint64, 32>(c1, c2);
             } else {
-                result = mulhu<uint64, uint32, 32>(CAST(uint64, c1),
+                result = mulhu<uint64, U_32, 32>(CAST(uint64, c1),
                                                    CAST(uint64, c2));
             }
             return true;
@@ -481,7 +481,7 @@
 }
 
 bool
-ConstantFolder::fold8(Opcode opc, int8 c, int32& result) {
+ConstantFolder::fold8(Opcode opc, int8 c, I_32& result) {
     switch (opc) {
     case Op_Not:    result = ~c; return true;
     case Op_Neg:    result = -c; return true;
@@ -492,7 +492,7 @@
 }
 
 bool
-ConstantFolder::fold16(Opcode opc, int16 c, int32& result) {
+ConstantFolder::fold16(Opcode opc, int16 c, I_32& result) {
     switch (opc) {
     case Op_Not:    result = ~c; return true;
     case Op_Neg:    result = -c; return true;
@@ -503,7 +503,7 @@
 }
 
 bool
-ConstantFolder::fold32(Opcode opc, int32 c, int32& result) {
+ConstantFolder::fold32(Opcode opc, I_32 c, I_32& result) {
     switch (opc) {
     case Op_Not:    result = ~c; return true;
     case Op_Neg:    result = -c; return true;
@@ -560,21 +560,21 @@
                 if (ovfm && (src.i4 < 0)) return false;
                 return true;
             } else if (Type::isIntegerOf8Signed(fromType)) {
-                res.i4 = CAST(int32, src.i8);
+                res.i4 = CAST(I_32, src.i8);
                 if (ovfm && (src.i8 != CAST(int64, res.i4))) return false;
                 return true;
             } else if (Type::isIntegerOf8Unsigned(fromType)) {
-                res.i4 = CAST(int32, CAST(uint64, src.i8));
+                res.i4 = CAST(I_32, CAST(uint64, src.i8));
                 if (ovfm && (CAST(uint64, src.i8) != CAST(uint64, res.i4))) return false;
                 return true;
             }
             assert(0);
         } else if (fromType == Type::Single) {
-            res.i4 = float2int<int32, float>(src.s); 
+            res.i4 = float2int<I_32, float>(src.s); 
             if (ovfm && (src.s != CAST(float, res.i4))) return false;
             return true;
         } else if (fromType == Type::Double) {
-            res.i4 = float2int<int32, double>(src.d);
+            res.i4 = float2int<I_32, double>(src.d);
             if (ovfm && (src.d != CAST(double, res.i4))) return false;
             return true;
         }
@@ -587,22 +587,22 @@
             if (Type::isIntegerOf4Bytes(fromType)) {
                 res.i4 = src.i4; return true;
             } else if (Type::isIntegerOf8Signed(fromType)) {
-                res.i4 = CAST(int32, CAST(uint32, src.i8));
-                if (ovfm && (src.i8 != CAST(int64, CAST(uint32, res.i4)))) return false;
+                res.i4 = CAST(I_32, CAST(U_32, src.i8));
+                if (ovfm && (src.i8 != CAST(int64, CAST(U_32, res.i4)))) return false;
                 return true;
             } else if (Type::isIntegerOf8Unsigned(fromType)) {
-                res.i4 = CAST(int32, CAST(uint32, CAST(uint64, src.i8)));
-                if (ovfm && (CAST(uint64, src.i8) != CAST(uint64, CAST(uint32, res.i4)))) return false;
+                res.i4 = CAST(I_32, CAST(U_32, CAST(uint64, src.i8)));
+                if (ovfm && (CAST(uint64, src.i8) != CAST(uint64, CAST(U_32, res.i4)))) return false;
                 return true;
             }
             assert(0);
         } else if (fromType == Type::Single) {
-            res.i4 = float2uint<uint32, float>(src.s);
-            if (ovfm && (src.s != CAST(float, CAST(uint32, res.i4)))) return false;
+            res.i4 = float2uint<U_32, float>(src.s);
+            if (ovfm && (src.s != CAST(float, CAST(U_32, res.i4)))) return false;
             return true;
         } else if (fromType == Type::Double) {
-            res.i4 = float2uint<uint32, double>(src.d);
-            if (ovfm && (src.d != CAST(double, CAST(uint32, res.i4)))) return false;
+            res.i4 = float2uint<U_32, double>(src.d);
+            if (ovfm && (src.d != CAST(double, CAST(U_32, res.i4)))) return false;
             return true;
         }
         break;
@@ -615,7 +615,7 @@
             if (Type::isIntegerOf4Signed(fromType)) {
                 res.i8 = src.i4; return true;
             } else if (Type::isIntegerOf4Unsigned(fromType)) {
-                res.i8 = CAST(uint32, src.i4); 
+                res.i8 = CAST(U_32, src.i4); 
                 if (ovfm && (src.i4 < 0)) return false;
                 return true;
             } else if (Type::isIntegerOf8Signed(fromType)) {
@@ -643,11 +643,11 @@
         assert(!ovfm || mod.getOverflowModifier()==Overflow_Unsigned);
         if (Type::isInteger(fromType)) {
             if (Type::isIntegerOf4Signed(fromType)) {
-                res.i8 = CAST(uint64, CAST(uint32, src.i4));
+                res.i8 = CAST(uint64, CAST(U_32, src.i4));
                 if (ovfm && (src.i4 < 0)) return false;
                 return true;
             } else if (Type::isIntegerOf4Unsigned(fromType)) {
-                res.i8 = CAST(uint64, CAST(uint32, src.i4)); return true;
+                res.i8 = CAST(uint64, CAST(U_32, src.i4)); return true;
             } else if (Type::isIntegerOf8Bytes(fromType)) {
                 res.i8 = src.i8; return true;
             }
@@ -664,7 +664,7 @@
         case Type::Int32:
             res.s = CAST(float, src.i4); return true;
         case Type::UInt32:
-            res.s = CAST(float, CAST(uint32, src.i4)); return true;
+            res.s = CAST(float, CAST(U_32, src.i4)); return true;
         case Type::Int64:
             res.s = CAST(float, src.i8);
             if (ovfm && (src.i8 != float2int<int64, float>(res.s))) return false;
@@ -687,7 +687,7 @@
         case Type::Int32:
             res.d = CAST(double, src.i4); return true;
         case Type::UInt32:
-            res.d = CAST(double, CAST(uint32, src.i4)); return true;
+            res.d = CAST(double, CAST(U_32, src.i4)); return true;
         case Type::Int64:
             res.d = CAST(double, src.i8); return true;
         case Type::UInt64:
@@ -718,21 +718,21 @@
 }
 
 bool
-ConstantFolder::foldCmp32(ComparisonModifier mod, int32 c1, int32 c2, int32& result) {
+ConstantFolder::foldCmp32(ComparisonModifier mod, I_32 c1, I_32 c2, I_32& result) {
     switch (mod) {
     case Cmp_EQ:    result = ((c1 == c2)?1:0);                  return true;
     case Cmp_NE_Un: result = ((c1 != c2)?1:0);                  return true;
     case Cmp_GT:    result = ((c1 > c2)?1:0);                   return true;
-    case Cmp_GT_Un: result = ((CAST(uint32, c1) > CAST(uint32, c2))?1:0);   return true;
+    case Cmp_GT_Un: result = ((CAST(U_32, c1) > CAST(U_32, c2))?1:0);   return true;
     case Cmp_GTE:   result = ((c1 >= c2)?1:0);                  return true;
-    case Cmp_GTE_Un:result = ((CAST(uint32, c1) >= CAST(uint32, c2))?1:0);  return true;
+    case Cmp_GTE_Un:result = ((CAST(U_32, c1) >= CAST(U_32, c2))?1:0);  return true;
     default: break;
     }
     return false;
 }
 
 bool
-ConstantFolder::foldCmpRef(ComparisonModifier mod, void* c1, void* c2, int32& result) {
+ConstantFolder::foldCmpRef(ComparisonModifier mod, void* c1, void* c2, I_32& result) {
     switch (mod) {
     case Cmp_EQ:    result = ((c1 == c2)?1:0);                  return true;
     case Cmp_NE_Un: result = ((c1 != c2)?1:0);                  return true;
@@ -746,7 +746,7 @@
 }
 
 bool
-ConstantFolder::foldCmp64(ComparisonModifier mod, int64 c1, int64 c2, int32& result) {
+ConstantFolder::foldCmp64(ComparisonModifier mod, int64 c1, int64 c2, I_32& result) {
     switch (mod) {
     case Cmp_EQ:    result = ((c1 == c2)?1:0);                  return true;
     case Cmp_NE_Un: result = ((c1 != c2)?1:0);                  return true;
@@ -760,7 +760,7 @@
 }
 
 bool
-ConstantFolder::foldCmpSingle(ComparisonModifier mod, float c1, float c2, int32& result) {
+ConstantFolder::foldCmpSingle(ComparisonModifier mod, float c1, float c2, I_32& result) {
     switch (mod) {
     case Cmp_EQ:
         if (isnan(c1) || isnan(c2)) { result = false; }
@@ -786,7 +786,7 @@
 }
 
 bool
-ConstantFolder::foldCmpDouble(ComparisonModifier mod, double c1, double c2, int32& result){
+ConstantFolder::foldCmpDouble(ComparisonModifier mod, double c1, double c2, I_32& result){
     switch (mod) {
     case Cmp_EQ:
         if (isnan(c1) || isnan(c2)) { result = false; }
@@ -812,7 +812,7 @@
 }
 
 bool
-ConstantFolder::foldCmp32(ComparisonModifier mod, int32 c, int32& result) {
+ConstantFolder::foldCmp32(ComparisonModifier mod, I_32 c, I_32& result) {
     switch (mod) {
     case Cmp_Zero:      result = ((c == 0)?1:0);    return true;
     case Cmp_NonZero:   result = ((c != 0)?1:0);    return true;
@@ -822,7 +822,7 @@
 }
 
 bool
-ConstantFolder::foldCmp64(ComparisonModifier mod, int64 c, int32& result) {
+ConstantFolder::foldCmp64(ComparisonModifier mod, int64 c, I_32& result) {
     switch (mod) {
     case Cmp_Zero:      result = ((c == 0)?1:0);    return true;
     case Cmp_NonZero:   result = ((c != 0)?1:0);    return true;
@@ -832,7 +832,7 @@
 }
 
 bool
-ConstantFolder::foldCmpRef(ComparisonModifier mod, void* c, int32& result) {
+ConstantFolder::foldCmpRef(ComparisonModifier mod, void* c, I_32& result) {
     switch (mod) {
     case Cmp_Zero:      result = ((c == NULL)?1:0);    return true;
     case Cmp_NonZero:   result = ((c != NULL)?1:0);    return true;
@@ -943,7 +943,7 @@
 //
 bool
 ConstantFolder::fold(Inst* inst, ConstInst::ConstValue& result) {
-    uint32 numSrcs = inst->getNumSrcOperands();
+    U_32 numSrcs = inst->getNumSrcOperands();
     if (numSrcs == 0)
         return false;
     ConstInst* constSrc0 = inst->getSrc(0)->getInst()->asConstInst();

Modified: harmony/enhanced/drlvm/trunk/vm/jitrino/src/optimizer/constantfolder.h
URL: http://svn.apache.org/viewvc/harmony/enhanced/drlvm/trunk/vm/jitrino/src/optimizer/constantfolder.h?rev=659108&r1=659107&r2=659108&view=diff
==============================================================================
--- harmony/enhanced/drlvm/trunk/vm/jitrino/src/optimizer/constantfolder.h (original)
+++ harmony/enhanced/drlvm/trunk/vm/jitrino/src/optimizer/constantfolder.h Thu May 22 06:33:38 2008
@@ -36,7 +36,7 @@
     static bool isConstantZero(Opnd* opnd);
     static bool isConstantOne(Opnd* opnd);
     static bool isConstantAllOnes(Opnd* opnd);
-    static bool isConstant(Inst* inst, int32& value);
+    static bool isConstant(Inst* inst, I_32& value);
     static bool isConstant(Inst* inst, int64& value);
     static bool isConstant(Inst* inst, ConstInst::ConstValue& value);
     static bool hasConstant(Inst* inst);
@@ -49,29 +49,29 @@
     //
     // binary arithmetic/logical operations
     //
-    static bool fold8(Opcode,  int8 c1,  int8 c2,  int32& result, bool is_signed);
-    static bool fold16(Opcode, int16 c1, int16 c2, int32& result, bool is_signed);
-    static bool fold32(Opcode, int32 c1, int32 c2, int32& result, bool is_signed);
+    static bool fold8(Opcode,  int8 c1,  int8 c2,  I_32& result, bool is_signed);
+    static bool fold16(Opcode, int16 c1, int16 c2, I_32& result, bool is_signed);
+    static bool fold32(Opcode, I_32 c1, I_32 c2, I_32& result, bool is_signed);
     static bool fold64(Opcode, int64 c1, int64 c2, int64& result, bool is_signed);
     static bool foldSingle(Opcode, float c1, float c2, float& result);
     static bool foldDouble(Opcode, double c1, double c2, double& result);
     // 
     // unary arithmetic/logical operations
     //
-    static bool fold8(Opcode opc,  int8 c,  int32& result);
-    static bool fold16(Opcode opc, int16 c, int32& result);
-    static bool fold32(Opcode opc, int32 c, int32& result);
+    static bool fold8(Opcode opc,  int8 c,  I_32& result);
+    static bool fold16(Opcode opc, int16 c, I_32& result);
+    static bool fold32(Opcode opc, I_32 c, I_32& result);
     static bool fold64(Opcode opc, int64 c, int64& result);
     static bool foldSingle(Opcode, float c1, float& result);
     static bool foldDouble(Opcode, double c1, double& result);
     //
     // binary comparisons
     //
-    static bool foldCmp32(ComparisonModifier mod, int32 c1, int32 c2, int32& result);
-    static bool foldCmp64(ComparisonModifier mod, int64 c1, int64 c2, int32& result);
-    static bool foldCmpSingle(ComparisonModifier mod, float c1, float c2, int32& result);
-    static bool foldCmpDouble(ComparisonModifier mod, double c1, double c2, int32& result);
-    static bool foldCmpRef(ComparisonModifier, void* c1, void* c2, int32& result);
+    static bool foldCmp32(ComparisonModifier mod, I_32 c1, I_32 c2, I_32& result);
+    static bool foldCmp64(ComparisonModifier mod, int64 c1, int64 c2, I_32& result);
+    static bool foldCmpSingle(ComparisonModifier mod, float c1, float c2, I_32& result);
+    static bool foldCmpDouble(ComparisonModifier mod, double c1, double c2, I_32& result);
+    static bool foldCmpRef(ComparisonModifier, void* c1, void* c2, I_32& result);
     static bool foldCmp(Type::Tag cmpTypeTag,
                         ComparisonModifier mod,
                         ConstInst::ConstValue val1,
@@ -80,9 +80,9 @@
     //
     // unary comparisons
     //
-    static bool foldCmp32(ComparisonModifier, int32 c, int32& result);
-    static bool foldCmp64(ComparisonModifier, int64 c, int32& result);
-    static bool foldCmpRef(ComparisonModifier, void* c, int32& result);
+    static bool foldCmp32(ComparisonModifier, I_32 c, I_32& result);
+    static bool foldCmp64(ComparisonModifier, int64 c, I_32& result);
+    static bool foldCmpRef(ComparisonModifier, void* c, I_32& result);
     //
     // conversions
     //
@@ -90,20 +90,20 @@
                          ConstInst::ConstValue src,
                          ConstInst::ConstValue& res);
 
-    // result always written as an int32 so we overwrite extra bits
+    // result always written as an I_32 so we overwrite extra bits
     static bool foldCmp(Type::Tag cmpTypeTag,
                         ComparisonModifier mod,
                         ConstInst::ConstValue val,
                         ConstInst::ConstValue& result);
 
-    // result always written as an int32 or int64 depending on type
+    // result always written as an I_32 or int64 depending on type
     static bool foldConstant(Type::Tag type,
                              Opcode opc,
                              ConstInst::ConstValue val1,
                              ConstInst::ConstValue val2,
                              ConstInst::ConstValue& result,
                              bool is_signed);
-    // result always written as an int32 or int64 depending on type
+    // result always written as an I_32 or int64 depending on type
     static bool foldConstant(Type::Tag type,
                              Opcode opc,
                              ConstInst::ConstValue val,

Modified: harmony/enhanced/drlvm/trunk/vm/jitrino/src/optimizer/dabce.cpp
URL: http://svn.apache.org/viewvc/harmony/enhanced/drlvm/trunk/vm/jitrino/src/optimizer/dabce.cpp?rev=659108&r1=659107&r2=659108&view=diff
==============================================================================
--- harmony/enhanced/drlvm/trunk/vm/jitrino/src/optimizer/dabce.cpp (original)
+++ harmony/enhanced/drlvm/trunk/vm/jitrino/src/optimizer/dabce.cpp Thu May 22 06:33:38 2008
@@ -640,7 +640,7 @@
         Log::out() << "Duplicating original loop...\n";
     }
     
-    uint32 maxNodeId = flowGraph.getMaxNodeId();
+    U_32 maxNodeId = flowGraph.getMaxNodeId();
     StlBitVector nodesInLoop(memoryManager, maxNodeId);
     const Nodes& loopNodes = optimizedLoop->getNodesInLoop();
     

Modified: harmony/enhanced/drlvm/trunk/vm/jitrino/src/optimizer/dataflow.h
URL: http://svn.apache.org/viewvc/harmony/enhanced/drlvm/trunk/vm/jitrino/src/optimizer/dataflow.h?rev=659108&r1=659107&r2=659108&view=diff
==============================================================================
--- harmony/enhanced/drlvm/trunk/vm/jitrino/src/optimizer/dataflow.h (original)
+++ harmony/enhanced/drlvm/trunk/vm/jitrino/src/optimizer/dataflow.h Thu May 22 06:33:38 2008
@@ -60,7 +60,7 @@
 {
     StlVector<Node *> nodes(mm);
     fg->getNodesPostOrder(nodes, forwards);
-    uint32 numNodes = fg->getMaxNodeId();
+    U_32 numNodes = fg->getMaxNodeId();
     DataflowValue *beforeNode = new (mm) DataflowValue[numNodes];
     DataflowValue *afterNode = new (mm) DataflowValue[numNodes];
     for(unsigned i=0; i<numNodes; i++) {
@@ -79,7 +79,7 @@
         rend = nodes.rend();
     for ( ; riter != rend; ++riter) {
         Node *node = *riter;
-        uint32 nodeId = node->getId();
+        U_32 nodeId = node->getId();
         nodeTFs[nodeId] = instance.getNodeBehavior(node);
         queue.push_back(node);
         inQueue.setBit(nodeId);
@@ -87,8 +87,8 @@
 
     Node *entryNode = fg->getEntryNode();
     Node *exitNode = fg->getExitNode();
-    uint32 inId = forwards ? entryNode->getId() : exitNode->getId();
-    uint32 firstId = queue[0]->getId();
+    U_32 inId = forwards ? entryNode->getId() : exitNode->getId();
+    U_32 firstId = queue[0]->getId();
     if( !(firstId == inId) ) assert(0);
     beforeNode[firstId] = instance.getEntryValue();
 
@@ -96,7 +96,7 @@
         Node *node = queue.front();
         queue.pop_front();
         inQueue.setBit(false);
-        uint32 nodeId = node->getId();
+        U_32 nodeId = node->getId();
         DataflowTF<DataflowValue> *nodeTF = nodeTFs[nodeId];
         if (Log::isEnabled()) {
             Log::out() << "solve: visiting node " << (int) nodeId << ::std::endl;
@@ -124,7 +124,7 @@
                 Edge *e = *eiter;
                 Node *target = e->getTargetNode();
                 if (ignoreExceptionEdges && target->isDispatchNode()) continue;
-                uint32 targetId = target->getId();
+                U_32 targetId = target->getId();
                 if (Log::isEnabled()) {
                     Log::out() << "    (checking successor " 
                                << (int) targetId << ", was ";

Modified: harmony/enhanced/drlvm/trunk/vm/jitrino/src/optimizer/deadcodeeliminator.cpp
URL: http://svn.apache.org/viewvc/harmony/enhanced/drlvm/trunk/vm/jitrino/src/optimizer/deadcodeeliminator.cpp?rev=659108&r1=659107&r2=659108&view=diff
==============================================================================
--- harmony/enhanced/drlvm/trunk/vm/jitrino/src/optimizer/deadcodeeliminator.cpp (original)
+++ harmony/enhanced/drlvm/trunk/vm/jitrino/src/optimizer/deadcodeeliminator.cpp Thu May 22 06:33:38 2008
@@ -144,7 +144,7 @@
 // returns the number of bits of the given opnd_num which is used,
 // given that dst_bits of the dst are used
 static uint8
-usesBitsOfOpnd(uint8 dst_bits, Inst* inst, uint32 opnd_num) {
+usesBitsOfOpnd(uint8 dst_bits, Inst* inst, U_32 opnd_num) {
     uint8 opwidth = getBitWidth(inst->getType());
     Opnd *opnd = inst->getSrc(opnd_num);
     uint8 opndwidth = getBitWidth(opnd->getType()->tag);
@@ -173,7 +173,7 @@
             case 0:
                 {
                     Opnd *shiftAmount = inst->getSrc(1);
-                    int32 shiftby;
+                    I_32 shiftby;
                     bool isconst = 
                         ConstantFolder::isConstant(shiftAmount->getInst(), 
                                                    shiftby);
@@ -202,7 +202,7 @@
             case 0:
                 {
                     Opnd *shiftAmount = inst->getSrc(1);
-                    int32 shiftby;
+                    I_32 shiftby;
                     bool isconst 
                         = ConstantFolder::isConstant(shiftAmount->getInst(), 
                                                      shiftby);
@@ -302,8 +302,8 @@
     } else if(inst->getOpcode() == Op_Phi) {
 
         Opnd* tmp = NULL;
-        uint32 n = inst->getNumSrcOperands();
-        for(uint32 j=0; j < n; ++j) {
+        U_32 n = inst->getNumSrcOperands();
+        for(U_32 j=0; j < n; ++j) {
             Opnd* src = inst->getSrc(j);
             Inst* srcInst = src->getInst();
             assert(srcInst->getNode());
@@ -363,8 +363,8 @@
 
 void
 DeadCodeEliminator::copyPropagate(Inst* inst) {
-    uint32 numSrcs = inst->getNumSrcOperands();
-    for (uint32 i=0; i<numSrcs; i++) {
+    U_32 numSrcs = inst->getNumSrcOperands();
+    for (U_32 i=0; i<numSrcs; i++) {
         Opnd* opnd = inst->getSrc(i);
         Opnd* propagated = copyPropagate(opnd);
         if (opnd != propagated) {
@@ -386,8 +386,8 @@
               InstDeque& workSet,
               BitSet& usefulInstSet,
               BitSet& usefulVarSet,
-              uint32 minInstId,
-              uint32 maxInstId) {
+              U_32 minInstId,
+              U_32 maxInstId) {
     //
     // add instruction's sources to the work list
     //
@@ -403,7 +403,7 @@
         Log::out() << ::std::endl;
     }
 
-    for (uint32 i=0; i<inst->getNumSrcOperands(); i++) {
+    for (U_32 i=0; i<inst->getNumSrcOperands(); i++) {
         Opnd* src = inst->getSrc(i);
         // only follow ssa use-def links
         SsaOpnd* srcSsaOpnd = src->asSsaOpnd();
@@ -416,7 +416,7 @@
 
             assert(def->getNode());
             uint8 opndWidth = 255;
-            uint32 defId = def->getId();
+            U_32 defId = def->getId();
 
             if (usefulInstSet.setBit(defId-minInstId, true)) {
                 // was already marked as live, check old width.
@@ -472,12 +472,12 @@
                                Inst* inst,
                                BitSet& usefulInstSet,
                                BitSet& usefulVarSet,
-                               uint32 minInstId,
-                               uint32 maxInstId,
+                               U_32 minInstId,
+                               U_32 maxInstId,
                                bool canRemoveStvars) {
     assert(inst);
     assert(inst->getNode());
-    uint32 instId = inst->getId();
+    U_32 instId = inst->getId();
     if (inst->isMethodMarker()) {
         // don't remove a method marker, but remove opcode if it is dead
         if (inst->getNumSrcOperands() > 0) {
@@ -486,7 +486,7 @@
                 Inst *srcInst = opnd->getInst();
                 assert(srcInst);
                 assert(srcInst->getNode());
-                uint32 srcId = srcInst->getId();
+                U_32 srcId = srcInst->getId();
                 // instructions are only added during analysis for
                 // live instructions, so if it's not in the map, 
                 // assume it is live
@@ -554,14 +554,14 @@
              BitSet& usefulInstSet,
              BitSet& usefulVarSet,
              uint8 *usedInstWidth,
-             uint32 minInstId,
-             uint32 maxInstId) {
+             U_32 minInstId,
+             U_32 maxInstId) {
     //
     // add instruction's sources to the work list
     //
     assert(inst);
     assert(inst->getNode());
-    uint32 instId = inst->getId();
+    U_32 instId = inst->getId();
     assert(usedInstWidth);
     assert((instId >= minInstId) && (instId < maxInstId));
     uint8 dstWidth = usedInstWidth[instId-minInstId];
@@ -573,7 +573,7 @@
         Log::out() << ::std::endl;
     }
 
-    for (uint32 i=0; i<inst->getNumSrcOperands(); i++) {
+    for (U_32 i=0; i<inst->getNumSrcOperands(); i++) {
         Opnd* src = inst->getSrc(i);
         // only follow ssa use-def links
         SsaOpnd* srcSsaOpnd = src->asSsaOpnd();
@@ -587,7 +587,7 @@
             uint8 opndWidth = usesBitsOfOpnd(dstWidth, inst, i);
             assert(def);
             assert(def->getNode());
-            uint32 defId = def->getId();
+            U_32 defId = def->getId();
 
             if (!((minInstId <= defId) && (defId < maxInstId))) {
                 // this instruction is out of the region, skip it.
@@ -654,13 +654,13 @@
                               BitSet& usefulInstSet,
                               BitSet& usefulVarSet,
                               uint8 *usedInstWidth,
-                              uint32 minInstId,
-                              uint32 maxInstId,
+                              U_32 minInstId,
+                              U_32 maxInstId,
                               bool canRemoveStvars) {
     assert(usedInstWidth);
     assert(inst);
     assert(inst->getNode());
-    uint32 instId = inst->getId();
+    U_32 instId = inst->getId();
     if (inst->isMethodMarker()) {
         // don't remove a method marker, but remove opcode if it is dead
         if (inst->getNumSrcOperands() > 0) {
@@ -669,7 +669,7 @@
                 Inst *srcInst = opnd->getInst();
                 assert(srcInst);
                 assert(srcInst->getNode());
-                uint32 srcId = srcInst->getId();
+                U_32 srcId = srcInst->getId();
                 // instructions are only added during analysis for
                 // live instructions, so if it's not in the map, 
                 // assume it is live
@@ -798,7 +798,7 @@
         return false;
 
     // Clear the set of unreachable definitions.
-    StlHashSet<uint32> unreachableDefSet(memManager);
+    StlHashSet<U_32> unreachableDefSet(memManager);
 
     StlVector<Node*>::iterator niter;
     for(niter = unreachableNodes.begin(); niter != unreachableNodes.end(); ++niter) {
@@ -837,9 +837,9 @@
                 SsaVarOpnd* dst = inst->getDst()->asSsaVarOpnd();
                 assert(dst!=NULL);
 #endif
-                uint32 numSrc = inst->getNumSrcOperands();
-                uint32 numKill = 0;
-                for(uint32 i = 0; i < numSrc; ++i) {
+                U_32 numSrc = inst->getNumSrcOperands();
+                U_32 numKill = 0;
+                for(U_32 i = 0; i < numSrc; ++i) {
                     SsaVarOpnd* src = inst->getSrc(i)->asSsaVarOpnd();
                     assert(src != NULL);
                     if(unreachableDefSet.find(src->getId()) != unreachableDefSet.end()) {
@@ -874,10 +874,10 @@
 DeadCodeEliminator::eliminateDeadCode(bool keepEmptyNodes) {
     // user should call eliminateUnreachableCode() first
 
-    uint32 minInstId = irManager.getMinimumInstId();
-    uint32 maxInstId = irManager.getInstFactory().getNumInsts();
-    uint32 numInsts = maxInstId - minInstId;
-    uint32 numOpnds = irManager.getOpndManager().getNumVarOpnds();
+    U_32 minInstId = irManager.getMinimumInstId();
+    U_32 maxInstId = irManager.getInstFactory().getNumInsts();
+    U_32 numInsts = maxInstId - minInstId;
+    U_32 numOpnds = irManager.getOpndManager().getNumVarOpnds();
     MemoryManager memManager("DeadCodeEliminator::eliminateDeadCode");
     InstDeque workSet(memManager);
     Nodes nodes(memManager);
@@ -914,7 +914,7 @@
 
                     assert(inst);
                     assert(inst->getNode());
-                    uint32 instId = inst->getId();
+                    U_32 instId = inst->getId();
                     usefulInstSet.setBit(instId-minInstId, true);
                     if (usedInstWidth) {
                         uint8 usedWidth = getBitWidth(inst->getType());
@@ -947,7 +947,7 @@
 
                     assert(inst);
                     assert(inst->getNode());
-                    uint32 instId = inst->getId();
+                    U_32 instId = inst->getId();
                     usefulInstSet.setBit(instId-minInstId, true);
                 }
             }

Modified: harmony/enhanced/drlvm/trunk/vm/jitrino/src/optimizer/deadcodeeliminator.h
URL: http://svn.apache.org/viewvc/harmony/enhanced/drlvm/trunk/vm/jitrino/src/optimizer/deadcodeeliminator.h?rev=659108&r1=659107&r2=659108&view=diff
==============================================================================
--- harmony/enhanced/drlvm/trunk/vm/jitrino/src/optimizer/deadcodeeliminator.h (original)
+++ harmony/enhanced/drlvm/trunk/vm/jitrino/src/optimizer/deadcodeeliminator.h Thu May 22 06:33:38 2008
@@ -65,9 +65,9 @@
     static void fixInfiniteLoops(IRManager& irm, const InfiniteLoopsInfo& info);
 
 private:
-    void sweepInst(Node* node, Inst* inst, BitSet& usefulInstSet, BitSet& usefulVarSet, uint8 *usedInstWidth, uint32 minInstId, uint32 maxInstId, bool canRemoveStvars);
+    void sweepInst(Node* node, Inst* inst, BitSet& usefulInstSet, BitSet& usefulVarSet, uint8 *usedInstWidth, U_32 minInstId, U_32 maxInstId, bool canRemoveStvars);
     void sweepInst1(Node* node, Inst* inst, BitSet& usefulInstSet, BitSet& usefulVarSet,
-                    uint32 minInstId, uint32 maxInstId, bool canRemoveStvars); // if we're skipping instWidth
+                    U_32 minInstId, U_32 maxInstId, bool canRemoveStvars); // if we're skipping instWidth
     static Opnd* findDefiningTemp(Opnd* var);
     void markEssentialPseudoThrows(LoopNode* loopNode, BitSet& essentialNodes);
 

Modified: harmony/enhanced/drlvm/trunk/vm/jitrino/src/optimizer/devirtualizer.cpp
URL: http://svn.apache.org/viewvc/harmony/enhanced/drlvm/trunk/vm/jitrino/src/optimizer/devirtualizer.cpp?rev=659108&r1=659107&r2=659108&view=diff
==============================================================================
--- harmony/enhanced/drlvm/trunk/vm/jitrino/src/optimizer/devirtualizer.cpp (original)
+++ harmony/enhanced/drlvm/trunk/vm/jitrino/src/optimizer/devirtualizer.cpp Thu May 22 06:33:38 2008
@@ -68,7 +68,7 @@
 }
 
 bool
-Devirtualizer::isGuardableVirtualCall(Inst* inst, MethodInst*& methodInst, Opnd*& base, Opnd*& tauNullChecked, Opnd *&tauTypesChecked, uint32 &argOffset, bool &isIntfCall)
+Devirtualizer::isGuardableVirtualCall(Inst* inst, MethodInst*& methodInst, Opnd*& base, Opnd*& tauNullChecked, Opnd *&tauTypesChecked, U_32 &argOffset, bool &isIntfCall)
 {
     //
     // Returns true if this call site may be considered for guarded devirtualization
@@ -186,7 +186,7 @@
 
 
 void
-Devirtualizer::genGuardedDirectCall(IRManager &regionIRM, Node* node, Inst* call, MethodDesc* methodDesc, ObjectType* objectType, Opnd *tauNullChecked, Opnd *tauTypesChecked, uint32 argOffset) {
+Devirtualizer::genGuardedDirectCall(IRManager &regionIRM, Node* node, Inst* call, MethodDesc* methodDesc, ObjectType* objectType, Opnd *tauNullChecked, Opnd *tauTypesChecked, U_32 argOffset) {
     ControlFlowGraph &regionFG = regionIRM.getFlowGraph();
     assert(!methodDesc->isStatic());
     assert(call == node->getLastInst());
@@ -233,9 +233,9 @@
     // Create direct call instruction
     //
     Opnd* dst = call->getDst(); 
-    uint32 numArgs = call->getNumSrcOperands()-argOffset;
-    uint32 i = 0;
-    uint32 j = argOffset; // skip taus
+    U_32 numArgs = call->getNumSrcOperands()-argOffset;
+    U_32 i = 0;
+    U_32 j = argOffset; // skip taus
     Opnd** args = new (regionIRM.getMemoryManager()) Opnd*[numArgs];
     for(; i < numArgs; ++i, ++j)
         args[i] = call->getSrc(j); // skip taus
@@ -418,7 +418,7 @@
     uint16 bcOffset = call->getBCOffset();
     assert(bcOffset != 0);
     assert(bcOffset != ILLEGAL_BC_MAPPING_VALUE);
-    Log::out() << "Call instruction bcOffset = " << (int32)bcOffset << std::endl;
+    Log::out() << "Call instruction bcOffset = " << (I_32)bcOffset << std::endl;
 
     // Get profiled vtable value
     POINTER_SIZE_INT vtHandle = mp->getTopValue(bcOffset);
@@ -445,7 +445,7 @@
         Opnd* base = 0;
         Opnd* tauNullChecked = 0;
         Opnd* tauTypesChecked = 0;
-        uint32 argOffset = 0;
+        U_32 argOffset = 0;
         bool isIntfCall = false;
         if(isGuardableVirtualCall(last, methodInst, base, tauNullChecked, tauTypesChecked, argOffset, isIntfCall)) {
             assert(methodInst && base && tauNullChecked && tauTypesChecked && argOffset);

Modified: harmony/enhanced/drlvm/trunk/vm/jitrino/src/optimizer/devirtualizer.h
URL: http://svn.apache.org/viewvc/harmony/enhanced/drlvm/trunk/vm/jitrino/src/optimizer/devirtualizer.h?rev=659108&r1=659107&r2=659108&view=diff
==============================================================================
--- harmony/enhanced/drlvm/trunk/vm/jitrino/src/optimizer/devirtualizer.h (original)
+++ harmony/enhanced/drlvm/trunk/vm/jitrino/src/optimizer/devirtualizer.h Thu May 22 06:33:38 2008
@@ -38,12 +38,12 @@
     void unguardCallsInRegion(IRManager& irm);
 
     static bool isGuardableVirtualCall(Inst* inst, MethodInst*& methodInst, Opnd*& base, 
-        Opnd* & tauNullChecked, Opnd*&tauTypesChecked, uint32 &argOffset, bool &isIntfCall);
+        Opnd* & tauNullChecked, Opnd*&tauTypesChecked, U_32 &argOffset, bool &isIntfCall);
 
 
 private:
     void guardCallsInBlock(IRManager& irm, Node* node);
-    void genGuardedDirectCall(IRManager& irm, Node* node, Inst* call, MethodDesc* methodDesc, ObjectType* valuedType, Opnd *tauNullChecked, Opnd *tauTypesChecked, uint32 argOffset);
+    void genGuardedDirectCall(IRManager& irm, Node* node, Inst* call, MethodDesc* methodDesc, ObjectType* valuedType, Opnd *tauNullChecked, Opnd *tauTypesChecked, U_32 argOffset);
     bool doGuard(IRManager& irm, Node* node, MethodDesc& methodDesc);
     ObjectType *getTopProfiledCalleeType(IRManager& irm, MethodDesc *origMethodDesc, Inst *call);
 



Mime
View raw message