Return-Path: Delivered-To: apmail-harmony-commits-archive@www.apache.org Received: (qmail 44543 invoked from network); 18 Oct 2007 06:42:42 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 18 Oct 2007 06:42:42 -0000 Received: (qmail 30599 invoked by uid 500); 18 Oct 2007 06:42:30 -0000 Delivered-To: apmail-harmony-commits-archive@harmony.apache.org Received: (qmail 30575 invoked by uid 500); 18 Oct 2007 06:42:30 -0000 Mailing-List: contact commits-help@harmony.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@harmony.apache.org Delivered-To: mailing list commits@harmony.apache.org Received: (qmail 30566 invoked by uid 99); 18 Oct 2007 06:42:29 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 17 Oct 2007 23:42:29 -0700 X-ASF-Spam-Status: No, hits=-100.0 required=10.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [140.211.11.3] (HELO eris.apache.org) (140.211.11.3) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 18 Oct 2007 06:42:41 +0000 Received: by eris.apache.org (Postfix, from userid 65534) id 64AAF1A9832; Wed, 17 Oct 2007 23:41:51 -0700 (PDT) Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit 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 -0000 To: commits@harmony.apache.org From: hindessm@apache.org X-Mailer: svnmailer-1.0.8 Message-Id: <20071018064151.64AAF1A9832@eris.apache.org> X-Virus-Checked: Checked by ClamAV on apache.org 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 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, "")==0) return "_init_"; if (strcmp(string, "")==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()) {