harmony-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From hinde...@apache.org
Subject svn commit: r585882 - in /harmony/enhanced/drlvm/trunk/vm/jitrino/src: codegenerator/ia32/ main/ optimizer/ optimizer/abcd/ shared/
Date Thu, 18 Oct 2007 06:41:50 GMT
Author: hindessm
Date: Wed Oct 17 23:41:47 2007
New Revision: 585882

URL: http://svn.apache.org/viewvc?rev=585882&view=rev
Log:
Minimal fixes to allow jitrino to compile with gcc 4.2.  (This component
uses -Werror so it fails to build however there are lots of other warnings
not treated as errors that we should probably look at/fix.)

Tested with gcc 4.2, gcc 4.1.1, and gcc-3.4 to ensure they still compile
successfully.  Not tested on windows so there may be issues here.

Modified:
    harmony/enhanced/drlvm/trunk/vm/jitrino/src/codegenerator/ia32/Ia32InternalProfiler.cpp
    harmony/enhanced/drlvm/trunk/vm/jitrino/src/main/PMF.cpp
    harmony/enhanced/drlvm/trunk/vm/jitrino/src/optimizer/Inst.cpp
    harmony/enhanced/drlvm/trunk/vm/jitrino/src/optimizer/abcd/classic_abcd_solver.cpp
    harmony/enhanced/drlvm/trunk/vm/jitrino/src/optimizer/abcd/classic_abcd_solver.h
    harmony/enhanced/drlvm/trunk/vm/jitrino/src/optimizer/escanalyzer.cpp
    harmony/enhanced/drlvm/trunk/vm/jitrino/src/optimizer/escanalyzer.h
    harmony/enhanced/drlvm/trunk/vm/jitrino/src/shared/MemoryAttribute.h
    harmony/enhanced/drlvm/trunk/vm/jitrino/src/shared/Tree.h
    harmony/enhanced/drlvm/trunk/vm/jitrino/src/shared/Type.cpp

Modified: harmony/enhanced/drlvm/trunk/vm/jitrino/src/codegenerator/ia32/Ia32InternalProfiler.cpp
URL: http://svn.apache.org/viewvc/harmony/enhanced/drlvm/trunk/vm/jitrino/src/codegenerator/ia32/Ia32InternalProfiler.cpp?rev=585882&r1=585881&r2=585882&view=diff
==============================================================================
--- harmony/enhanced/drlvm/trunk/vm/jitrino/src/codegenerator/ia32/Ia32InternalProfiler.cpp
(original)
+++ harmony/enhanced/drlvm/trunk/vm/jitrino/src/codegenerator/ia32/Ia32InternalProfiler.cpp
Wed Oct 17 23:41:47 2007
@@ -26,7 +26,7 @@
 
     template<class T> struct AttrDesc {
         T value;
-        char * name;
+        const char * name;
     };
 
     struct BBStats {

Modified: harmony/enhanced/drlvm/trunk/vm/jitrino/src/main/PMF.cpp
URL: http://svn.apache.org/viewvc/harmony/enhanced/drlvm/trunk/vm/jitrino/src/main/PMF.cpp?rev=585882&r1=585881&r2=585882&view=diff
==============================================================================
--- harmony/enhanced/drlvm/trunk/vm/jitrino/src/main/PMF.cpp (original)
+++ harmony/enhanced/drlvm/trunk/vm/jitrino/src/main/PMF.cpp Wed Oct 17 23:41:47 2007
@@ -103,22 +103,20 @@
  
 static const char* c_str (MemoryManager& mm, Str& str)
 {
-    char* buffp = "";
-
     if (str.count != 0)
     {
-        buffp = new (mm) char[str.count + 1];
+        char* buffp = new (mm) char[str.count + 1];
         memcpy(buffp, str.ptr, str.count);
         buffp[str.count] = 0;
+        return buffp;
     }
 
-    return buffp;
+    return "";
 }
 
 
 static const char* c_str (MemoryManager& mm, Str* fqnamep, size_t fqnsize)
 {
-    char* buffp = "";
     size_t count = 0;
 
     Str* strp = fqnamep;
@@ -127,6 +125,7 @@
 
     if (count != 0)
     {
+        char* buffp;
         char* ptr = buffp = new (mm) char[count+1];
         strp = fqnamep;
         for (size_t n = fqnsize; n != 0; --n, ++strp)
@@ -138,9 +137,10 @@
         }
         --ptr;  // skip the last '.'
         *ptr = 0;
+        return buffp;
     }
 
-    return buffp;
+    return "";
 }
 
 

Modified: harmony/enhanced/drlvm/trunk/vm/jitrino/src/optimizer/Inst.cpp
URL: http://svn.apache.org/viewvc/harmony/enhanced/drlvm/trunk/vm/jitrino/src/optimizer/Inst.cpp?rev=585882&r1=585881&r2=585882&view=diff
==============================================================================
--- harmony/enhanced/drlvm/trunk/vm/jitrino/src/optimizer/Inst.cpp (original)
+++ harmony/enhanced/drlvm/trunk/vm/jitrino/src/optimizer/Inst.cpp Wed Oct 17 23:41:47 2007
@@ -278,12 +278,12 @@
     }
 }
 
-char *messageStr(const char *string) {
+const char *messageStr(const char *string) {
     if (strcmp(string, "<init>")==0)
         return "_init_";
     if (strcmp(string, "<clinit>")==0)
         return "_clinit_";
-    return (char *)string;
+    return string;
 }
 
 void MethodEntryInst::handlePrintEscape(::std::ostream& os, char code) const {

Modified: harmony/enhanced/drlvm/trunk/vm/jitrino/src/optimizer/abcd/classic_abcd_solver.cpp
URL: http://svn.apache.org/viewvc/harmony/enhanced/drlvm/trunk/vm/jitrino/src/optimizer/abcd/classic_abcd_solver.cpp?rev=585882&r1=585881&r2=585882&view=diff
==============================================================================
--- harmony/enhanced/drlvm/trunk/vm/jitrino/src/optimizer/abcd/classic_abcd_solver.cpp (original)
+++ harmony/enhanced/drlvm/trunk/vm/jitrino/src/optimizer/abcd/classic_abcd_solver.cpp Wed
Oct 17 23:41:47 2007
@@ -807,7 +807,7 @@
     }
 }
 
-void ClassicAbcdSolver::Printer::prnStr(char* str)
+void ClassicAbcdSolver::Printer::prnStr(const char* str)
 {
     prnLevel();
     if (Log::isEnabled()) {
@@ -815,7 +815,7 @@
     }
 }
 
-void ClassicAbcdSolver::Printer::prnStrLn(char* str)
+void ClassicAbcdSolver::Printer::prnStrLn(const char* str)
 {
     if (Log::isEnabled()) {
         prnStr(str);

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=585882&r1=585881&r2=585882&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 Wed Oct
17 23:41:47 2007
@@ -533,9 +533,9 @@
 
         void prnLevel();
 
-        void prnStr(char* str);
+        void prnStr(const char* str);
 
-        void prnStrLn(char* str);
+        void prnStrLn(const char* str);
 
     private:
         uint32 _level;

Modified: harmony/enhanced/drlvm/trunk/vm/jitrino/src/optimizer/escanalyzer.cpp
URL: http://svn.apache.org/viewvc/harmony/enhanced/drlvm/trunk/vm/jitrino/src/optimizer/escanalyzer.cpp?rev=585882&r1=585881&r2=585882&view=diff
==============================================================================
--- harmony/enhanced/drlvm/trunk/vm/jitrino/src/optimizer/escanalyzer.cpp (original)
+++ harmony/enhanced/drlvm/trunk/vm/jitrino/src/optimizer/escanalyzer.cpp Wed Oct 17 23:41:47
2007
@@ -2185,7 +2185,7 @@
 
 
 void
-EscAnalyzer::printCnGNodes(char* text,::std::ostream& os) {
+EscAnalyzer::printCnGNodes(const char* text,::std::ostream& os) {
     CnGNodes::const_iterator it;
     std::string t1;
     std::string t2;
@@ -2285,7 +2285,7 @@
 
 
 void
-EscAnalyzer::printCnGEdges(char* text,::std::ostream& os) {
+EscAnalyzer::printCnGEdges(const char* text,::std::ostream& os) {
     CnGEdges* cge = cngEdges;
     CnGEdges::iterator it;
     CnGRefs::iterator it1;

Modified: harmony/enhanced/drlvm/trunk/vm/jitrino/src/optimizer/escanalyzer.h
URL: http://svn.apache.org/viewvc/harmony/enhanced/drlvm/trunk/vm/jitrino/src/optimizer/escanalyzer.h?rev=585882&r1=585881&r2=585882&view=diff
==============================================================================
--- harmony/enhanced/drlvm/trunk/vm/jitrino/src/optimizer/escanalyzer.h (original)
+++ harmony/enhanced/drlvm/trunk/vm/jitrino/src/optimizer/escanalyzer.h Wed Oct 17 23:41:47
2007
@@ -451,7 +451,7 @@
  * @param text - output information naming,
  * @param os - log.
  */
-    void printCnGNodes(char* text,::std::ostream& os);
+    void printCnGNodes(const char* text,::std::ostream& os);
 
 /**
  * Outputs connection graph node information into the specified log. 
@@ -472,7 +472,7 @@
  * @param text - output information naming,
  * @param os - log.
  */
-    void printCnGEdges(char* text,::std::ostream& os); 
+    void printCnGEdges(const char* text,::std::ostream& os); 
 
 /**
  * Creates string representing CnG edge type. 

Modified: harmony/enhanced/drlvm/trunk/vm/jitrino/src/shared/MemoryAttribute.h
URL: http://svn.apache.org/viewvc/harmony/enhanced/drlvm/trunk/vm/jitrino/src/shared/MemoryAttribute.h?rev=585882&r1=585881&r2=585882&view=diff
==============================================================================
--- harmony/enhanced/drlvm/trunk/vm/jitrino/src/shared/MemoryAttribute.h (original)
+++ harmony/enhanced/drlvm/trunk/vm/jitrino/src/shared/MemoryAttribute.h Wed Oct 17 23:41:47
2007
@@ -214,7 +214,7 @@
         //
         struct Info {
             Tag          tag;
-            char *       name;
+            const char * name;
             bool         canBeWrittenByJittedCode;
             bool         killedByCalls;
             IdKind       idKind;

Modified: harmony/enhanced/drlvm/trunk/vm/jitrino/src/shared/Tree.h
URL: http://svn.apache.org/viewvc/harmony/enhanced/drlvm/trunk/vm/jitrino/src/shared/Tree.h?rev=585882&r1=585881&r2=585882&view=diff
==============================================================================
--- harmony/enhanced/drlvm/trunk/vm/jitrino/src/shared/Tree.h (original)
+++ harmony/enhanced/drlvm/trunk/vm/jitrino/src/shared/Tree.h Wed Oct 17 23:41:47 2007
@@ -164,7 +164,7 @@
     Tree(): root(NULL) {}
     TreeNode* getRoot() {return root;}
 
-    virtual void printDotFile(MethodDesc& mh, char *suffix) {
+    virtual void printDotFile(MethodDesc& mh, const char *suffix) {
         if (root == NULL) return;
         PrintDotFile::printDotFile(mh,suffix);
     }

Modified: harmony/enhanced/drlvm/trunk/vm/jitrino/src/shared/Type.cpp
URL: http://svn.apache.org/viewvc/harmony/enhanced/drlvm/trunk/vm/jitrino/src/shared/Type.cpp?rev=585882&r1=585881&r2=585882&view=diff
==============================================================================
--- harmony/enhanced/drlvm/trunk/vm/jitrino/src/shared/Type.cpp (original)
+++ harmony/enhanced/drlvm/trunk/vm/jitrino/src/shared/Type.cpp Wed Oct 17 23:41:47 2007
@@ -967,7 +967,7 @@
     os << "enum:" << getName();
 }
 
-extern char *messageStr(const char *);
+extern const char *messageStr(const char *);
 
 void    ObjectType::print(::std::ostream& os) {
     if (isCompressedReference()) {



Mime
View raw message