mirror of
https://github.com/moses-smt/mosesdecoder.git
synced 2024-09-11 11:25:40 +03:00
merged upstream with origin for mingw
This commit is contained in:
commit
5f1217d793
1
.gitignore
vendored
1
.gitignore
vendored
@ -1,3 +1,4 @@
|
||||
*.d
|
||||
*.pyc
|
||||
*.lo
|
||||
*.o
|
||||
|
@ -97,7 +97,22 @@ ln -sf libbz2.so.1.0 $LIBDIR/libbz2.so
|
||||
|
||||
#For Boost:
|
||||
./bootstrap.sh
|
||||
./b2 --prefix=$PREFIX --libdir=$LIBDIR --layout=tagged link=static,shared threading=multi,single install || echo FAILURE
|
||||
./b2 --prefix=$PWD --libdir=$PWD/lib64 --layout=tagged link=static,shared threading=multi,single install || echo FAILURE
|
||||
|
||||
This will put the header files and libraries files in the current directory, rather than the system directory.
|
||||
|
||||
For most Linux systems, you should replace
|
||||
link=static,shared
|
||||
with
|
||||
link=static
|
||||
so it will only create static libraries. The minimised headaches when linking with Moses.
|
||||
|
||||
To link Moses to your version of boost,
|
||||
./bjam --with-boost=[boost/path]
|
||||
|
||||
Alternatively, you run
|
||||
./b2 --prefix=/usr/ --libdir=/usr/lib
|
||||
to install boost in the systems folder. However, this may override the built in boost and causes problems for your OS, therefore, it is not recommended.
|
||||
|
||||
--------------------------------------------------------------------------
|
||||
|
||||
|
28
Jamroot
28
Jamroot
@ -4,6 +4,8 @@
|
||||
#Language models (optional):
|
||||
#--with-irstlm=/path/to/irstlm
|
||||
#--with-srilm=/path/to/srilm See moses/LM/Jamfile for more options.
|
||||
#--with-maxent-srilm=true (requires a maxent-enabled version of SRILM to be specified via --with-srilm)
|
||||
#--with-nplm=/path/to/nplm
|
||||
#--with-randlm=/path/to/randlm
|
||||
#KenLM is always compiled.
|
||||
#
|
||||
@ -78,6 +80,7 @@ external-lib z ;
|
||||
|
||||
lib dl : : <runtime-link>static:<link>static <runtime-link>shared:<link>shared ;
|
||||
requirements += <library>dl ;
|
||||
requirements += <toolset>gcc:<cxxflags>-std=c++0x ;
|
||||
|
||||
if $NT {
|
||||
lib mman : : <runtime-link>static:<link>static <runtime-link>shared:<link>shared ;
|
||||
@ -91,7 +94,7 @@ if ! [ option.get "without-tcmalloc" : : "yes" ] && [ test_library "tcmalloc_min
|
||||
requirements += <library>tcmalloc_and_profiler <library>unwind <cflags>-fno-omit-frame-pointer <cxxflags>-fno-omit-frame-pointer ;
|
||||
} else {
|
||||
external-lib tcmalloc_minimal ;
|
||||
requirements += <threading>multi:<library>$(tcmalloc) ;
|
||||
requirements += <threading>multi:<library>$(tcmalloc_minimal) ;
|
||||
}
|
||||
} else {
|
||||
echo "Tip: install tcmalloc for faster threading. See BUILD-INSTRUCTIONS.txt for more information." ;
|
||||
@ -139,7 +142,28 @@ project : requirements
|
||||
#Add directories here if you want their incidental targets too (i.e. tests).
|
||||
build-projects lm util phrase-extract search moses moses/LM mert moses-cmd moses-chart-cmd mira scripts regression-testing ;
|
||||
|
||||
alias programs : lm//programs moses-chart-cmd//moses_chart moses-cmd//programs OnDiskPt//CreateOnDiskPt OnDiskPt//queryOnDiskPt mert//programs misc//programs symal phrase-extract phrase-extract//lexical-reordering phrase-extract//extract-ghkm phrase-extract//pcfg-extract phrase-extract//pcfg-score biconcor mira//mira contrib/server//mosesserver ;
|
||||
alias programs :
|
||||
lm//programs
|
||||
moses-chart-cmd//moses_chart
|
||||
moses-cmd//programs
|
||||
OnDiskPt//CreateOnDiskPt
|
||||
OnDiskPt//queryOnDiskPt
|
||||
mert//programs
|
||||
misc//programs
|
||||
symal
|
||||
phrase-extract
|
||||
phrase-extract//lexical-reordering
|
||||
phrase-extract//extract-ghkm
|
||||
phrase-extract//pcfg-extract
|
||||
phrase-extract//pcfg-score
|
||||
biconcor
|
||||
mira//mira
|
||||
contrib/server//mosesserver
|
||||
#moses/mm//mtt-build
|
||||
#moses/mm//mtt-dump
|
||||
#moses/mm//symal2mam
|
||||
#moses/mm//custom-pt
|
||||
;
|
||||
|
||||
install-bin-libs programs ;
|
||||
install-headers headers-base : [ path.glob-tree biconcor contrib lm mert misc moses-chart-cmd moses-cmd OnDiskPt phrase-extract symal util : *.hh *.h ] : . ;
|
||||
|
@ -62,8 +62,7 @@ int main (int argc, char * const argv[])
|
||||
Moses::InputFileStream inStream(filePath);
|
||||
|
||||
OnDiskWrapper onDiskWrapper;
|
||||
bool retDb = onDiskWrapper.BeginSave(destPath, numSourceFactors, numTargetFactors, numScores);
|
||||
assert(retDb);
|
||||
onDiskWrapper.BeginSave(destPath, numSourceFactors, numTargetFactors, numScores);
|
||||
|
||||
PhraseNode &rootNode = onDiskWrapper.GetRootSourceNode();
|
||||
size_t lineNum = 0;
|
||||
|
@ -21,9 +21,10 @@
|
||||
#include <direct.h>
|
||||
#endif
|
||||
#include <sys/stat.h>
|
||||
#include "util/check.hh"
|
||||
#include <string>
|
||||
#include "OnDiskWrapper.h"
|
||||
#include "moses/Factor.h"
|
||||
#include "util/exception.hh"
|
||||
|
||||
using namespace std;
|
||||
|
||||
@ -41,36 +42,45 @@ OnDiskWrapper::~OnDiskWrapper()
|
||||
delete m_rootSourceNode;
|
||||
}
|
||||
|
||||
bool OnDiskWrapper::BeginLoad(const std::string &filePath)
|
||||
void OnDiskWrapper::BeginLoad(const std::string &filePath)
|
||||
{
|
||||
if (!OpenForLoad(filePath))
|
||||
return false;
|
||||
if (!OpenForLoad(filePath)) {
|
||||
UTIL_THROW(util::FileOpenException, "Couldn't open for loading: " << filePath);
|
||||
}
|
||||
|
||||
if (!m_vocab.Load(*this))
|
||||
return false;
|
||||
UTIL_THROW(util::FileOpenException, "Couldn't load vocab");
|
||||
|
||||
UINT64 rootFilePos = GetMisc("RootNodeOffset");
|
||||
m_rootSourceNode = new PhraseNode(rootFilePos, *this);
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
bool OnDiskWrapper::OpenForLoad(const std::string &filePath)
|
||||
{
|
||||
m_fileSource.open((filePath + "/Source.dat").c_str(), ios::in | ios::binary);
|
||||
CHECK(m_fileSource.is_open());
|
||||
UTIL_THROW_IF(!m_fileSource.is_open(),
|
||||
util::FileOpenException,
|
||||
"Couldn't open file " << filePath << "/Source.dat");
|
||||
|
||||
m_fileTargetInd.open((filePath + "/TargetInd.dat").c_str(), ios::in | ios::binary);
|
||||
CHECK(m_fileTargetInd.is_open());
|
||||
UTIL_THROW_IF(!m_fileTargetInd.is_open(),
|
||||
util::FileOpenException,
|
||||
"Couldn't open file " << filePath << "/TargetInd.dat");
|
||||
|
||||
m_fileTargetColl.open((filePath + "/TargetColl.dat").c_str(), ios::in | ios::binary);
|
||||
CHECK(m_fileTargetColl.is_open());
|
||||
UTIL_THROW_IF(!m_fileTargetColl.is_open(),
|
||||
util::FileOpenException,
|
||||
"Couldn't open file " << filePath << "/TargetColl.dat");
|
||||
|
||||
m_fileVocab.open((filePath + "/Vocab.dat").c_str(), ios::in);
|
||||
CHECK(m_fileVocab.is_open());
|
||||
UTIL_THROW_IF(!m_fileVocab.is_open(),
|
||||
util::FileOpenException,
|
||||
"Couldn't open file " << filePath << "/Vocab.dat");
|
||||
|
||||
m_fileMisc.open((filePath + "/Misc.dat").c_str(), ios::in);
|
||||
CHECK(m_fileMisc.is_open());
|
||||
UTIL_THROW_IF(!m_fileMisc.is_open(),
|
||||
util::FileOpenException,
|
||||
"Couldn't open file " << filePath << "/Misc.dat");
|
||||
|
||||
// set up root node
|
||||
LoadMisc();
|
||||
@ -88,7 +98,9 @@ bool OnDiskWrapper::LoadMisc()
|
||||
while(m_fileMisc.getline(line, 100000)) {
|
||||
vector<string> tokens;
|
||||
Moses::Tokenize(tokens, line);
|
||||
CHECK(tokens.size() == 2);
|
||||
UTIL_THROW_IF2(tokens.size() != 2, "Except key value. Found " << line);
|
||||
|
||||
|
||||
const string &key = tokens[0];
|
||||
m_miscInfo[key] = Moses::Scan<UINT64>(tokens[1]);
|
||||
}
|
||||
@ -96,7 +108,7 @@ bool OnDiskWrapper::LoadMisc()
|
||||
return true;
|
||||
}
|
||||
|
||||
bool OnDiskWrapper::BeginSave(const std::string &filePath
|
||||
void OnDiskWrapper::BeginSave(const std::string &filePath
|
||||
, int numSourceFactors, int numTargetFactors, int numScores)
|
||||
{
|
||||
m_numSourceFactors = numSourceFactors;
|
||||
@ -111,45 +123,58 @@ bool OnDiskWrapper::BeginSave(const std::string &filePath
|
||||
#endif
|
||||
|
||||
m_fileSource.open((filePath + "/Source.dat").c_str(), ios::out | ios::in | ios::binary | ios::ate | ios::trunc);
|
||||
CHECK(m_fileSource.is_open());
|
||||
UTIL_THROW_IF(!m_fileSource.is_open(),
|
||||
util::FileOpenException,
|
||||
"Couldn't open file " << filePath << "/Source.dat");
|
||||
|
||||
m_fileTargetInd.open((filePath + "/TargetInd.dat").c_str(), ios::out | ios::binary | ios::ate | ios::trunc);
|
||||
CHECK(m_fileTargetInd.is_open());
|
||||
UTIL_THROW_IF(!m_fileTargetInd.is_open(),
|
||||
util::FileOpenException,
|
||||
"Couldn't open file " << filePath << "/TargetInd.dat");
|
||||
|
||||
m_fileTargetColl.open((filePath + "/TargetColl.dat").c_str(), ios::out | ios::binary | ios::ate | ios::trunc);
|
||||
CHECK(m_fileTargetColl.is_open());
|
||||
UTIL_THROW_IF(!m_fileTargetColl.is_open(),
|
||||
util::FileOpenException,
|
||||
"Couldn't open file " << filePath << "/TargetColl.dat");
|
||||
|
||||
m_fileVocab.open((filePath + "/Vocab.dat").c_str(), ios::out | ios::ate | ios::trunc);
|
||||
CHECK(m_fileVocab.is_open());
|
||||
UTIL_THROW_IF(!m_fileVocab.is_open(),
|
||||
util::FileOpenException,
|
||||
"Couldn't open file " << filePath << "/Vocab.dat");
|
||||
|
||||
m_fileMisc.open((filePath + "/Misc.dat").c_str(), ios::out | ios::ate | ios::trunc);
|
||||
CHECK(m_fileMisc.is_open());
|
||||
UTIL_THROW_IF(!m_fileMisc.is_open(),
|
||||
util::FileOpenException,
|
||||
"Couldn't open file " << filePath << "/Misc.dat");
|
||||
|
||||
// offset by 1. 0 offset is reserved
|
||||
char c = 0xff;
|
||||
m_fileSource.write(&c, 1);
|
||||
CHECK(1 == m_fileSource.tellp());
|
||||
UTIL_THROW_IF2(1 != m_fileSource.tellp(),
|
||||
"Couldn't write to stream m_fileSource");
|
||||
|
||||
m_fileTargetInd.write(&c, 1);
|
||||
CHECK(1 == m_fileTargetInd.tellp());
|
||||
UTIL_THROW_IF2(1 != m_fileTargetInd.tellp(),
|
||||
"Couldn't write to stream m_fileTargetInd");
|
||||
|
||||
m_fileTargetColl.write(&c, 1);
|
||||
CHECK(1 == m_fileTargetColl.tellp());
|
||||
UTIL_THROW_IF2(1 != m_fileTargetColl.tellp(),
|
||||
"Couldn't write to stream m_fileTargetColl");
|
||||
|
||||
// set up root node
|
||||
CHECK(GetNumCounts() == 1);
|
||||
UTIL_THROW_IF2(GetNumCounts() != 1,
|
||||
"Not sure what this is...");
|
||||
|
||||
vector<float> counts(GetNumCounts());
|
||||
counts[0] = DEFAULT_COUNT;
|
||||
m_rootSourceNode = new PhraseNode();
|
||||
m_rootSourceNode->AddCounts(counts);
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
void OnDiskWrapper::EndSave()
|
||||
{
|
||||
bool ret = m_rootSourceNode->Saved();
|
||||
CHECK(ret);
|
||||
UTIL_THROW_IF2(!ret, "Root node not saved");
|
||||
|
||||
GetVocab().Save(*this);
|
||||
|
||||
@ -186,7 +211,9 @@ UINT64 OnDiskWrapper::GetMisc(const std::string &key) const
|
||||
{
|
||||
std::map<std::string, UINT64>::const_iterator iter;
|
||||
iter = m_miscInfo.find(key);
|
||||
CHECK(iter != m_miscInfo.end());
|
||||
UTIL_THROW_IF2(iter == m_miscInfo.end()
|
||||
, "Couldn't find value for key " << key
|
||||
);
|
||||
|
||||
return iter->second;
|
||||
}
|
||||
@ -200,7 +227,7 @@ Word *OnDiskWrapper::ConvertFromMoses(const std::vector<Moses::FactorType> &fact
|
||||
|
||||
size_t factorType = factorsVec[0];
|
||||
const Moses::Factor *factor = origWord.GetFactor(factorType);
|
||||
CHECK(factor);
|
||||
UTIL_THROW_IF2(factor == NULL, "Expecting factor " << factorType);
|
||||
strme << factor->GetString();
|
||||
|
||||
for (size_t ind = 1 ; ind < factorsVec.size() ; ++ind) {
|
||||
@ -210,7 +237,8 @@ Word *OnDiskWrapper::ConvertFromMoses(const std::vector<Moses::FactorType> &fact
|
||||
// can have less factors than factorType.size()
|
||||
break;
|
||||
}
|
||||
CHECK(factor);
|
||||
UTIL_THROW_IF2(factor == NULL,
|
||||
"Expecting factor " << factorType << " at position " << ind);
|
||||
strme << "|" << factor->GetString();
|
||||
} // for (size_t factorType
|
||||
|
||||
|
@ -22,7 +22,7 @@
|
||||
#include <fstream>
|
||||
#include "Vocab.h"
|
||||
#include "PhraseNode.h"
|
||||
#include "../moses/Word.h"
|
||||
#include "moses/Word.h"
|
||||
|
||||
namespace OnDiskPt
|
||||
{
|
||||
@ -55,15 +55,16 @@ public:
|
||||
OnDiskWrapper();
|
||||
~OnDiskWrapper();
|
||||
|
||||
bool BeginLoad(const std::string &filePath);
|
||||
void BeginLoad(const std::string &filePath);
|
||||
|
||||
bool BeginSave(const std::string &filePath
|
||||
void BeginSave(const std::string &filePath
|
||||
, int numSourceFactors, int numTargetFactors, int numScores);
|
||||
void EndSave();
|
||||
|
||||
Vocab &GetVocab() {
|
||||
return m_vocab;
|
||||
}
|
||||
Vocab &GetVocab()
|
||||
{ return m_vocab; }
|
||||
const Vocab &GetVocab() const
|
||||
{ return m_vocab; }
|
||||
|
||||
size_t GetSourceWordSize() const;
|
||||
size_t GetTargetWordSize() const;
|
||||
|
@ -18,9 +18,9 @@
|
||||
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
||||
***********************************************************************/
|
||||
#include <iostream>
|
||||
#include "util/check.hh"
|
||||
#include "moses/Util.h"
|
||||
#include "Phrase.h"
|
||||
#include "util/exception.hh"
|
||||
|
||||
using namespace std;
|
||||
|
||||
@ -35,7 +35,8 @@ void Phrase::AddWord(WordPtr word)
|
||||
|
||||
void Phrase::AddWord(WordPtr word, size_t pos)
|
||||
{
|
||||
CHECK(pos < m_words.size());
|
||||
UTIL_THROW_IF2(!(pos < m_words.size()),
|
||||
"Trying to get word " << pos << " when phrase size is " << m_words.size());
|
||||
m_words.insert(m_words.begin() + pos + 1, word);
|
||||
}
|
||||
|
||||
@ -59,7 +60,7 @@ int Phrase::Compare(const Phrase &compare) const
|
||||
}
|
||||
|
||||
if (ret == 0) {
|
||||
CHECK(compare.GetSize() >= GetSize());
|
||||
assert(compare.GetSize() >= GetSize());
|
||||
ret = (compare.GetSize() > GetSize()) ? 1 : 0;
|
||||
}
|
||||
return ret;
|
||||
|
@ -17,12 +17,12 @@
|
||||
License along with this library; if not, write to the Free Software
|
||||
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
||||
***********************************************************************/
|
||||
#include "util/check.hh"
|
||||
#include "PhraseNode.h"
|
||||
#include "OnDiskWrapper.h"
|
||||
#include "TargetPhraseCollection.h"
|
||||
#include "SourcePhrase.h"
|
||||
#include "moses/Util.h"
|
||||
#include "util/exception.hh"
|
||||
|
||||
using namespace std;
|
||||
|
||||
@ -55,7 +55,7 @@ PhraseNode::PhraseNode(UINT64 filePos, OnDiskWrapper &onDiskWrapper)
|
||||
|
||||
std::fstream &file = onDiskWrapper.GetFileSource();
|
||||
file.seekg(filePos);
|
||||
CHECK(filePos == (UINT64)file.tellg());
|
||||
assert(filePos == (UINT64)file.tellg());
|
||||
|
||||
file.read((char*) &m_numChildrenLoad, sizeof(UINT64));
|
||||
|
||||
@ -64,11 +64,11 @@ PhraseNode::PhraseNode(UINT64 filePos, OnDiskWrapper &onDiskWrapper)
|
||||
|
||||
// go to start of node again
|
||||
file.seekg(filePos);
|
||||
CHECK(filePos == (UINT64)file.tellg());
|
||||
assert(filePos == (UINT64)file.tellg());
|
||||
|
||||
// read everything into memory
|
||||
file.read(m_memLoad, memAlloc);
|
||||
CHECK(filePos + memAlloc == (UINT64)file.tellg());
|
||||
assert(filePos + memAlloc == (UINT64)file.tellg());
|
||||
|
||||
// get value
|
||||
m_value = ((UINT64*)m_memLoad)[1];
|
||||
@ -76,7 +76,7 @@ PhraseNode::PhraseNode(UINT64 filePos, OnDiskWrapper &onDiskWrapper)
|
||||
// get counts
|
||||
float *memFloat = (float*) (m_memLoad + sizeof(UINT64) * 2);
|
||||
|
||||
CHECK(countSize == 1);
|
||||
assert(countSize == 1);
|
||||
m_counts[0] = memFloat[0];
|
||||
|
||||
m_memLoadLast = m_memLoad + memAlloc;
|
||||
@ -85,7 +85,6 @@ PhraseNode::PhraseNode(UINT64 filePos, OnDiskWrapper &onDiskWrapper)
|
||||
PhraseNode::~PhraseNode()
|
||||
{
|
||||
free(m_memLoad);
|
||||
//CHECK(m_saved);
|
||||
}
|
||||
|
||||
float PhraseNode::GetCount(size_t ind) const
|
||||
@ -95,7 +94,7 @@ float PhraseNode::GetCount(size_t ind) const
|
||||
|
||||
void PhraseNode::Save(OnDiskWrapper &onDiskWrapper, size_t pos, size_t tableLimit)
|
||||
{
|
||||
CHECK(!m_saved);
|
||||
UTIL_THROW_IF2(m_saved, "Already saved");
|
||||
|
||||
// save this node
|
||||
m_targetPhraseColl.Sort(tableLimit);
|
||||
@ -116,7 +115,7 @@ void PhraseNode::Save(OnDiskWrapper &onDiskWrapper, size_t pos, size_t tableLimi
|
||||
|
||||
// count info
|
||||
float *memFloat = (float*) (mem + memUsed);
|
||||
CHECK(numCounts == 1);
|
||||
UTIL_THROW_IF2(numCounts != 1, "Can only store 1 phrase count");
|
||||
memFloat[0] = (m_counts.size() == 0) ? DEFAULT_COUNT : m_counts[0]; // if count = 0, put in very large num to make sure its still used. HACK
|
||||
memUsed += sizeof(float) * numCounts;
|
||||
|
||||
@ -142,7 +141,7 @@ void PhraseNode::Save(OnDiskWrapper &onDiskWrapper, size_t pos, size_t tableLimi
|
||||
|
||||
// save this node
|
||||
//Moses::DebugMem(mem, memAlloc);
|
||||
CHECK(memUsed == memAlloc);
|
||||
assert(memUsed == memAlloc);
|
||||
|
||||
std::fstream &file = onDiskWrapper.GetFileSource();
|
||||
m_filePos = file.tellp();
|
||||
@ -150,7 +149,7 @@ void PhraseNode::Save(OnDiskWrapper &onDiskWrapper, size_t pos, size_t tableLimi
|
||||
file.write(mem, memUsed);
|
||||
|
||||
UINT64 endPos = file.tellp();
|
||||
CHECK(m_filePos + memUsed == endPos);
|
||||
assert(m_filePos + memUsed == endPos);
|
||||
|
||||
free(mem);
|
||||
|
||||
@ -235,7 +234,7 @@ void PhraseNode::GetChild(Word &wordFound, UINT64 &childFilePos, size_t ind, OnD
|
||||
+ childSize * ind;
|
||||
|
||||
size_t memRead = ReadChild(wordFound, childFilePos, currMem);
|
||||
CHECK(memRead == childSize);
|
||||
assert(memRead == childSize);
|
||||
}
|
||||
|
||||
size_t PhraseNode::ReadChild(Word &wordFound, UINT64 &childFilePos, const char *mem) const
|
||||
|
@ -17,7 +17,6 @@
|
||||
License along with this library; if not, write to the Free Software
|
||||
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
||||
***********************************************************************/
|
||||
#include "util/check.hh"
|
||||
#include "SourcePhrase.h"
|
||||
|
||||
namespace OnDiskPt
|
||||
|
@ -25,6 +25,7 @@
|
||||
#include "moses/TranslationModel/PhraseDictionary.h"
|
||||
#include "TargetPhrase.h"
|
||||
#include "OnDiskWrapper.h"
|
||||
#include "util/exception.hh"
|
||||
|
||||
#include <boost/algorithm/string.hpp>
|
||||
|
||||
@ -58,7 +59,7 @@ void TargetPhrase::Create1AlignFromString(const std::string &align1Str)
|
||||
{
|
||||
vector<size_t> alignPoints;
|
||||
Moses::Tokenize<size_t>(alignPoints, align1Str, "-");
|
||||
CHECK(alignPoints.size() == 2);
|
||||
UTIL_THROW_IF2(alignPoints.size() != 2, "Incorrectly formatted word alignment: " << align1Str);
|
||||
m_align.push_back(pair<size_t, size_t>(alignPoints[0], alignPoints[1]) );
|
||||
}
|
||||
|
||||
@ -76,7 +77,7 @@ void TargetPhrase::CreateAlignFromString(const std::string &alignStr)
|
||||
|
||||
void TargetPhrase::SetScore(float score, size_t ind)
|
||||
{
|
||||
CHECK(ind < m_scores.size());
|
||||
assert(ind < m_scores.size());
|
||||
m_scores[ind] = score;
|
||||
}
|
||||
|
||||
@ -132,7 +133,7 @@ char *TargetPhrase::WriteToMemory(OnDiskWrapper &onDiskWrapper, size_t &memUsed)
|
||||
memUsed += word.WriteToMemory((char*) currPtr);
|
||||
}
|
||||
|
||||
CHECK(memUsed == memNeeded);
|
||||
assert(memUsed == memNeeded);
|
||||
return (char *) mem;
|
||||
}
|
||||
|
||||
@ -150,7 +151,7 @@ void TargetPhrase::Save(OnDiskWrapper &onDiskWrapper)
|
||||
file.write(mem, memUsed);
|
||||
|
||||
UINT64 endPos = file.tellp();
|
||||
CHECK(startPos + memUsed == endPos);
|
||||
assert(startPos + memUsed == endPos);
|
||||
|
||||
m_filePos = startPos;
|
||||
free(mem);
|
||||
@ -183,7 +184,7 @@ char *TargetPhrase::WriteOtherInfoToMemory(OnDiskWrapper &onDiskWrapper, size_t
|
||||
memUsed += WriteScoresToMemory(mem + memUsed);
|
||||
|
||||
//DebugMem(mem, memNeeded);
|
||||
CHECK(memNeeded == memUsed);
|
||||
assert(memNeeded == memUsed);
|
||||
return mem;
|
||||
}
|
||||
|
||||
@ -234,7 +235,7 @@ Moses::TargetPhrase *TargetPhrase::ConvertToMoses(const std::vector<Moses::Facto
|
||||
|
||||
// words
|
||||
size_t phraseSize = GetSize();
|
||||
CHECK(phraseSize > 0); // last word is lhs
|
||||
UTIL_THROW_IF2(phraseSize == 0, "Target phrase cannot be empty"); // last word is lhs
|
||||
if (isSyntax) {
|
||||
--phraseSize;
|
||||
}
|
||||
@ -278,25 +279,25 @@ Moses::TargetPhrase *TargetPhrase::ConvertToMoses(const std::vector<Moses::Facto
|
||||
|
||||
// scores
|
||||
ret->GetScoreBreakdown().Assign(&phraseDict, m_scores);
|
||||
ret->Evaluate(mosesSP);
|
||||
ret->Evaluate(mosesSP, phraseDict.GetFeaturesToApply());
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
||||
UINT64 TargetPhrase::ReadOtherInfoFromFile(UINT64 filePos, std::fstream &fileTPColl)
|
||||
{
|
||||
CHECK(filePos == (UINT64)fileTPColl.tellg());
|
||||
assert(filePos == (UINT64)fileTPColl.tellg());
|
||||
|
||||
UINT64 memUsed = 0;
|
||||
fileTPColl.read((char*) &m_filePos, sizeof(UINT64));
|
||||
memUsed += sizeof(UINT64);
|
||||
CHECK(m_filePos != 0);
|
||||
assert(m_filePos != 0);
|
||||
|
||||
memUsed += ReadAlignFromFile(fileTPColl);
|
||||
CHECK((memUsed + filePos) == (UINT64)fileTPColl.tellg());
|
||||
assert((memUsed + filePos) == (UINT64)fileTPColl.tellg());
|
||||
|
||||
memUsed += ReadScoresFromFile(fileTPColl);
|
||||
CHECK((memUsed + filePos) == (UINT64)fileTPColl.tellg());
|
||||
assert((memUsed + filePos) == (UINT64)fileTPColl.tellg());
|
||||
|
||||
return memUsed;
|
||||
}
|
||||
@ -355,7 +356,7 @@ UINT64 TargetPhrase::ReadAlignFromFile(std::fstream &fileTPColl)
|
||||
|
||||
UINT64 TargetPhrase::ReadScoresFromFile(std::fstream &fileTPColl)
|
||||
{
|
||||
CHECK(m_scores.size() > 0);
|
||||
UTIL_THROW_IF2(m_scores.size() == 0, "Translation rules must must have some scores");
|
||||
|
||||
UINT64 bytesRead = 0;
|
||||
|
||||
|
@ -107,7 +107,7 @@ void TargetPhraseCollection::Save(OnDiskWrapper &onDiskWrapper)
|
||||
free(mem);
|
||||
|
||||
UINT64 endPos = file.tellp();
|
||||
CHECK(startPos + memUsed == endPos);
|
||||
assert(startPos + memUsed == endPos);
|
||||
|
||||
m_filePos = startPos;
|
||||
|
||||
|
@ -21,6 +21,7 @@
|
||||
#include <fstream>
|
||||
#include "OnDiskWrapper.h"
|
||||
#include "Vocab.h"
|
||||
#include "util/exception.hh"
|
||||
|
||||
using namespace std;
|
||||
|
||||
@ -35,7 +36,7 @@ bool Vocab::Load(OnDiskWrapper &onDiskWrapper)
|
||||
while(getline(file, line)) {
|
||||
vector<string> tokens;
|
||||
Moses::Tokenize(tokens, line);
|
||||
CHECK(tokens.size() == 2);
|
||||
UTIL_THROW_IF2(tokens.size() != 2, "Vocab file corrupted");
|
||||
const string &key = tokens[0];
|
||||
m_vocabColl[key] = Moses::Scan<UINT64>(tokens[1]);
|
||||
}
|
||||
|
@ -46,7 +46,7 @@ public:
|
||||
}
|
||||
UINT64 AddVocabId(const std::string &str);
|
||||
UINT64 GetVocabId(const std::string &str, bool &found) const;
|
||||
const std::string &GetString(UINT32 vocabId) const {
|
||||
const std::string &GetString(UINT64 vocabId) const {
|
||||
return m_lookup[vocabId];
|
||||
}
|
||||
|
||||
|
@ -91,7 +91,7 @@ size_t Word::ReadFromFile(std::fstream &file)
|
||||
file.read(mem, memAlloc);
|
||||
|
||||
size_t memUsed = ReadFromMemory(mem);
|
||||
CHECK(memAlloc == memUsed);
|
||||
assert(memAlloc == memUsed);
|
||||
|
||||
return memAlloc;
|
||||
}
|
||||
@ -108,10 +108,10 @@ void Word::ConvertToMoses(
|
||||
util::TokenIter<util::SingleCharacter> tok(vocab.GetString(m_vocabId), '|');
|
||||
|
||||
for (std::vector<Moses::FactorType>::const_iterator t = outputFactorsVec.begin(); t != outputFactorsVec.end(); ++t, ++tok) {
|
||||
UTIL_THROW_IF(!tok, util::Exception, "Too few factors in \"" << vocab.GetString(m_vocabId) << "\"; was expecting " << outputFactorsVec.size());
|
||||
UTIL_THROW_IF2(!tok, "Too few factors in \"" << vocab.GetString(m_vocabId) << "\"; was expecting " << outputFactorsVec.size());
|
||||
overwrite.SetFactor(*t, factorColl.AddFactor(*tok));
|
||||
}
|
||||
UTIL_THROW_IF(tok, util::Exception, "Too many factors in \"" << vocab.GetString(m_vocabId) << "\"; was expecting " << outputFactorsVec.size());
|
||||
UTIL_THROW_IF2(tok, "Too many factors in \"" << vocab.GetString(m_vocabId) << "\"; was expecting " << outputFactorsVec.size());
|
||||
}
|
||||
|
||||
int Word::Compare(const Word &compare) const
|
||||
|
@ -41,8 +41,7 @@ int main(int argc, char **argv)
|
||||
usage();
|
||||
|
||||
OnDiskWrapper onDiskWrapper;
|
||||
bool retDb = onDiskWrapper.BeginLoad(ttable);
|
||||
CHECK(retDb);
|
||||
onDiskWrapper.BeginLoad(ttable);
|
||||
OnDiskQuery onDiskQuery(onDiskWrapper);
|
||||
|
||||
cerr << "Ready..." << endl;
|
||||
|
290
contrib/DIMwid/DIMputs.py
Normal file
290
contrib/DIMwid/DIMputs.py
Normal file
@ -0,0 +1,290 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
|
||||
import collections
|
||||
import re
|
||||
|
||||
|
||||
class DataInput():
|
||||
def __init__(self, file_name):
|
||||
self.file = open(file_name, "r")
|
||||
self.sentences = None
|
||||
|
||||
|
||||
def read_phrase(self):
|
||||
self.sentences = []
|
||||
sentence = None
|
||||
span_reg = re.compile("\|[0-9]+-[0-9]+\|")
|
||||
previous = ""
|
||||
for line in self.file:
|
||||
sentence = Single()
|
||||
for word in line.split():
|
||||
if span_reg.match(word):
|
||||
sentence.spans[tuple([int(i) for i in word.strip("|").split("-")])] = previous.strip()
|
||||
previous = " "
|
||||
else:
|
||||
previous += word + " "
|
||||
sentence.set_length()
|
||||
self.sentences.append(sentence)
|
||||
sentence.number = len(self.sentences)
|
||||
|
||||
def read_syntax(self):
|
||||
self.sentences = []
|
||||
sentence = None
|
||||
number = -1
|
||||
for line in self.file:
|
||||
if int(line.split()[2]) != number:
|
||||
if sentence is not None:
|
||||
sentence.set_length()
|
||||
self.sentences.append(sentence)
|
||||
sentence = Single()
|
||||
sentence.number = int(line.split()[2])
|
||||
number = sentence.number
|
||||
sentence.spans[tuple([int(i) for i in line.split()[3].strip(":[]").split("..")])] \
|
||||
= line.strip()
|
||||
|
||||
if sentence is not None:
|
||||
sentence.set_length()
|
||||
self.sentences.append(sentence)
|
||||
# = tuple([line.split(":")[1], line.split(":")[2], line.split(":")[3]])
|
||||
|
||||
|
||||
def read_syntax_cubes(self, cell_limit):
|
||||
self.sentences = []
|
||||
sentence = None
|
||||
number = -1
|
||||
new_item = False
|
||||
for line in self.file:
|
||||
if line.startswith("Chart Cell"):
|
||||
pass # we dont care for those lines
|
||||
elif line.startswith("---------"):
|
||||
new_item = True
|
||||
elif line.startswith("Trans Opt") and new_item is True:
|
||||
new_item = False
|
||||
if int(line.split()[2]) != number:
|
||||
if sentence is not None:
|
||||
sentence.set_length()
|
||||
self.sentences.append(sentence)
|
||||
sentence = Multiple()
|
||||
sentence.number = int(line.split()[2])
|
||||
number = sentence.number
|
||||
span = tuple([int(i) for i in line.split()[3].strip(":[]").split("..")])
|
||||
if len(sentence.spans[span]) < cell_limit:
|
||||
sentence.spans[span].append(line.strip())
|
||||
if sentence is not None:
|
||||
sentence.set_length()
|
||||
self.sentences.append(sentence)
|
||||
|
||||
def read_phrase_stack_flag(self, cell_limit):
|
||||
self.sentences = []
|
||||
sentence = None
|
||||
number = -1
|
||||
for line in self.file:
|
||||
if len(line.split()) < 6:
|
||||
pass
|
||||
# elif re.match("recombined=[0-9]+", line.split()[6]):
|
||||
# pass
|
||||
else:
|
||||
if int(line.split()[0]) != number:
|
||||
if sentence is not None:
|
||||
sentence.set_length()
|
||||
self.sentences.append(sentence)
|
||||
sentence = Multiple()
|
||||
sentence.number = int(line.split()[0])
|
||||
number = sentence.number
|
||||
# span = tuple([int(i) for i in line.split()[8].split("=")[1].split("-")])
|
||||
span = re.search(r"covered=([0-9]+\-[0-9]+)", line).expand("\g<1>")
|
||||
# print span.expand("\g<1>")
|
||||
span = tuple([int(i) for i in span.split("-")])
|
||||
if len(sentence.spans[span]) < cell_limit:
|
||||
sentence.spans[span].append(line.strip())
|
||||
if sentence is not None:
|
||||
sentence.set_length()
|
||||
self.sentences.append(sentence)
|
||||
|
||||
def read_phrase_stack_verbose(self, cell_limit):
|
||||
self.sentences = []
|
||||
sentence = None
|
||||
number = -1
|
||||
span_input = False
|
||||
for line in self.file:
|
||||
if line.startswith("Translating: "):
|
||||
if sentence is not None:
|
||||
sentence.set_length()
|
||||
self.sentences.append(sentence)
|
||||
|
||||
number += 1
|
||||
sentence = Multiple()
|
||||
sentence.number = number
|
||||
else:
|
||||
if re.match("\[[A-Z,a-z,\ ]+;\ [0-9]+-[0-9]+\]", line):
|
||||
span = tuple([int(i) for i in line.split(";")[1].strip().strip("]").split("-")])
|
||||
sentence.spans[span].append(line.strip())
|
||||
span_input = True
|
||||
# print line,
|
||||
elif span_input is True:
|
||||
if line.strip() == "":
|
||||
span_input = False
|
||||
# print "X"
|
||||
else:
|
||||
if len(sentence.spans[span]) < cell_limit:
|
||||
sentence.spans[span].append(line.strip())
|
||||
# print line,
|
||||
if sentence is not None:
|
||||
sentence.set_length()
|
||||
self.sentences.append(sentence)
|
||||
|
||||
|
||||
|
||||
def read_syntax_cube_flag(self, cell_limit):
|
||||
self.sentences = []
|
||||
sentence = None
|
||||
number = -1
|
||||
for line in self.file:
|
||||
if len(line.split()) < 6:
|
||||
pass
|
||||
else:
|
||||
if int(line.split()[0]) != number:
|
||||
if sentence is not None:
|
||||
sentence.set_length()
|
||||
self.sentences.append(sentence)
|
||||
sentence = Multiple() #
|
||||
sentence.number = int(line.split()[0])
|
||||
number = sentence.number
|
||||
span = re.search(r"\[([0-9]+)\.\.([0-9]+)\]", line).expand("\g<1> \g<2>")
|
||||
span = tuple([int(i) for i in span.split()])
|
||||
if len(sentence.spans[span]) < cell_limit:
|
||||
sentence.spans[span].append(line.strip())
|
||||
if sentence is not None:
|
||||
sentence.set_length()
|
||||
self.sentences.append(sentence)
|
||||
|
||||
|
||||
def read_mbot(self, cell_limit):
|
||||
self.sentences = []
|
||||
sentence = None
|
||||
number = -1
|
||||
hypo = False
|
||||
rule = False
|
||||
popping = False
|
||||
target = ""
|
||||
source = ""
|
||||
source_parent = ""
|
||||
target_parent = ""
|
||||
alignment = ""
|
||||
for line in self.file:
|
||||
if line.startswith("Translating:"):
|
||||
if sentence is not None:
|
||||
sentence.set_length()
|
||||
self.sentences.append(sentence)
|
||||
sentence = Multiple()
|
||||
sentence.number = number + 1
|
||||
number = sentence.number
|
||||
elif line.startswith("POPPING"):
|
||||
popping = True
|
||||
elif popping is True:
|
||||
popping = False
|
||||
span = tuple([int(i) for i in line.split()[1].strip("[").split("]")[0].split("..")])
|
||||
hypo = True
|
||||
elif hypo is True:
|
||||
if line.startswith("Target Phrases"):
|
||||
target = line.split(":", 1)[1].strip()
|
||||
|
||||
elif line.startswith("Alignment Info"):
|
||||
alignment = line.split(":", 1)[1].strip()
|
||||
if alignment == "":
|
||||
alignment = "(1)"
|
||||
|
||||
elif line.startswith("Source Phrase"):
|
||||
source = line.split(":", 1)[1].strip()
|
||||
|
||||
elif line.startswith("Source Left-hand-side"):
|
||||
source_parent = line.split(":", 1)[1].strip()
|
||||
|
||||
elif line.startswith("Target Left-hand-side"):
|
||||
target_parent = line.split(":", 1)[1].strip()
|
||||
|
||||
# Input stored: now begin translation into rule-format
|
||||
alignment = re.sub(r"\([0-9]+\)", "||", alignment)
|
||||
align_blocks = alignment.split("||")[:-1]
|
||||
target = re.sub(r"\([0-9]+\)", "||", target)
|
||||
target = [x.split() for x in target.split("||")][:-1]
|
||||
source = source.split()
|
||||
|
||||
for i in range(len(source)):
|
||||
if source[i].isupper():
|
||||
source[i] = "[" + source[i] + "]"
|
||||
for k in range(len(align_blocks)):
|
||||
align_pairs = [tuple([int(y) for y in x.split("-")]) for x in align_blocks[k].split()]
|
||||
for j in filter(lambda x: x[0] == i, align_pairs):
|
||||
source[i] = source[i] + "[" + target[k][j[1]] + "]"
|
||||
|
||||
for i in range(len(target)):
|
||||
for j in range(len(target[i])):
|
||||
align_pairs = [tuple([int(y) for y in x.split("-")]) for x in align_blocks[i].split()]
|
||||
for k in filter(lambda x: x[1] == j, align_pairs):
|
||||
target[i][j] = source[k[0]].split("]")[0] + "][" + target[i][j] + "]"
|
||||
|
||||
|
||||
|
||||
target = " || ".join([" ".join(x) for x in target]) + " ||"
|
||||
|
||||
source = " ".join(source)
|
||||
source = source + " [" + source_parent + "]"
|
||||
|
||||
tp = re.sub(r"\([0-9]+\)", "", target_parent).split()
|
||||
for i in tp:
|
||||
target = target.replace("||", " [" + i + "] !!", 1)
|
||||
target = target.replace("!!", "||")
|
||||
|
||||
rule = False
|
||||
search_pattern = "||| " + source + " ||| " + target + "| --- ||| " + alignment + "|"
|
||||
|
||||
sentence.spans[span].append(search_pattern)
|
||||
# print search_pattern, span
|
||||
if len(sentence.spans[span]) < cell_limit:
|
||||
sentence.spans[span].append(search_pattern)
|
||||
else:
|
||||
pass
|
||||
if sentence is not None:
|
||||
sentence.set_length()
|
||||
self.sentences.append(sentence)
|
||||
|
||||
|
||||
|
||||
|
||||
class Single():
|
||||
def __init__(self):
|
||||
self.number = None
|
||||
self.spans = {}
|
||||
self.length = None
|
||||
|
||||
def set_length(self):
|
||||
self.length = max([x[1] for x in self.spans.keys()])
|
||||
|
||||
def __str__(self):
|
||||
number = str(self.number)
|
||||
length = str(self.length)
|
||||
spans = "\n"
|
||||
for i in self.spans.keys():
|
||||
spans += str(i) + " - " + str(self.spans[i]) + "\n"
|
||||
return str((number, length, spans))
|
||||
|
||||
class Multiple():
|
||||
def __init__(self):
|
||||
self.number = None
|
||||
self.spans = collections.defaultdict(list)
|
||||
self.length = None
|
||||
|
||||
def set_length(self):
|
||||
self.length = max([x[1] for x in self.spans.keys()])
|
||||
|
||||
def __str__(self):
|
||||
number = str(self.number)
|
||||
length = str(self.length)
|
||||
spans = "\n"
|
||||
for i in self.spans.keys():
|
||||
spans += str(i) + " - " + str(self.spans[i]) + "\n"
|
||||
return str((number, length, spans))
|
||||
|
||||
|
||||
|
381
contrib/DIMwid/DIMterface.py
Normal file
381
contrib/DIMwid/DIMterface.py
Normal file
@ -0,0 +1,381 @@
|
||||
#!/usr/bin/env python
|
||||
# -*- coding: utf-8 -*-
|
||||
|
||||
from PyQt4 import QtCore, QtGui
|
||||
|
||||
import DIMputs as my_DI
|
||||
|
||||
|
||||
|
||||
class MainWindow(QtGui.QWidget):
|
||||
updateSignal = QtCore.pyqtSignal()
|
||||
def __init__(self, parent=None):
|
||||
|
||||
|
||||
self.path = ""
|
||||
self.cur_rein_num = 0
|
||||
self.data = None
|
||||
self.format = ""
|
||||
self.cell_limit = float("inf")
|
||||
|
||||
super(MainWindow, self).__init__(parent)
|
||||
|
||||
# upper buttons
|
||||
pathLabel = QtGui.QLabel("Path:")
|
||||
self.pathLabel = QtGui.QLabel(self.path)
|
||||
self.pathLabel.setFrameStyle(QtGui.QFrame.StyledPanel |
|
||||
QtGui.QFrame.Sunken)
|
||||
self.pathLabel.setToolTip("Current File")
|
||||
self.pathButton = QtGui.QPushButton("P&ath...")
|
||||
self.pathButton.setToolTip("Set the item you want to inspect")
|
||||
self.connect(self.pathButton, QtCore.SIGNAL("clicked()"), self.setPath)
|
||||
|
||||
|
||||
# cell limit label and text field
|
||||
cell_limit_label = QtGui.QLabel("Cell Limit:")
|
||||
self.cell_limit_chooser = QtGui.QSpinBox()
|
||||
self.cell_limit_chooser.setMaximum(99999)
|
||||
cell_limit_label.setToolTip("Limits the number of elements per cell")
|
||||
self.cell_limit_chooser.setToolTip("Set to zero to show all elements")
|
||||
|
||||
# format drop down menu
|
||||
self.format_drop = QtGui.QToolButton(self)
|
||||
self.format_drop.setPopupMode(QtGui.QToolButton.MenuButtonPopup)
|
||||
self.format_drop.setMenu(QtGui.QMenu(self.format_drop))
|
||||
self.format_drop.setText("Format")
|
||||
|
||||
self.format_syntax = QtGui.QPushButton("Syntax")
|
||||
self.format_phrase = QtGui.QPushButton("Phrase")
|
||||
self.format_syntaxCube = QtGui.QPushButton("Syntax Cube (-Tall flag)")
|
||||
self.format_phraseStackFlag = QtGui.QPushButton("Phrase Stack (search-graph)")
|
||||
self.format_phraseStackVerbose = QtGui.QPushButton("Phrase Stack (verbose)")
|
||||
self.format_syntaxCubeFlag = QtGui.QPushButton("Syntax Cube (search-graph)")
|
||||
self.format_mbot = QtGui.QPushButton("MBOT")
|
||||
|
||||
|
||||
format_action_syntax = QtGui.QWidgetAction(self.format_drop)
|
||||
format_action_syntax.setDefaultWidget(self.format_syntax)
|
||||
|
||||
format_action_phrase = QtGui.QWidgetAction(self.format_drop)
|
||||
format_action_phrase.setDefaultWidget(self.format_phrase)
|
||||
|
||||
format_action_syntaxCube = QtGui.QWidgetAction(self.format_drop)
|
||||
format_action_syntaxCube.setDefaultWidget(self.format_syntaxCube)
|
||||
|
||||
format_action_phraseStackFlag = QtGui.QWidgetAction(self.format_drop)
|
||||
format_action_phraseStackFlag.setDefaultWidget(self.format_phraseStackFlag)
|
||||
|
||||
format_action_phraseStackVerbose = QtGui.QWidgetAction(self.format_drop)
|
||||
format_action_phraseStackVerbose.setDefaultWidget(self.format_phraseStackVerbose)
|
||||
|
||||
format_action_syntaxCubeFlag = QtGui.QWidgetAction(self.format_drop)
|
||||
format_action_syntaxCubeFlag.setDefaultWidget(self.format_syntaxCubeFlag)
|
||||
|
||||
format_action_mbot = QtGui.QWidgetAction(self.format_drop)
|
||||
format_action_mbot.setDefaultWidget(self.format_mbot)
|
||||
|
||||
self.format_drop.menu().addAction(format_action_syntax)
|
||||
self.format_drop.menu().addAction(format_action_phrase)
|
||||
self.format_drop.menu().addAction(format_action_syntaxCube)
|
||||
self.format_drop.menu().addAction(format_action_phraseStackFlag)
|
||||
self.format_drop.menu().addAction(format_action_phraseStackVerbose)
|
||||
self.format_drop.menu().addAction(format_action_syntaxCubeFlag)
|
||||
self.format_drop.menu().addAction(format_action_mbot)
|
||||
|
||||
|
||||
self.format_syntax.clicked.connect(self.set_format_syntax)
|
||||
self.format_phrase.clicked.connect(self.set_format_phrase)
|
||||
self.format_syntaxCube.clicked.connect(self.set_format_syntaxCube)
|
||||
self.format_phraseStackFlag.clicked.connect(self.set_format_phraseStackFlag)
|
||||
self.format_phraseStackVerbose.clicked.connect(self.set_format_phraseStackVerbose)
|
||||
self.format_syntaxCubeFlag.clicked.connect(self.set_format_syntaxCubeFlag)
|
||||
self.format_mbot.clicked.connect(self.set_format_mbot)
|
||||
|
||||
|
||||
|
||||
# table
|
||||
self.table_widget = HoverTable(self)
|
||||
self.w = [] # future popup window
|
||||
# self.table_widget = QtGui.QTableWidget(self)
|
||||
|
||||
# lower buttons
|
||||
self.buttonBox = QtGui.QDialogButtonBox()
|
||||
self.sentence_spinbox = QtGui.QSpinBox(parent=self.buttonBox)
|
||||
self.sentence_spinbox.setMaximum(999999)
|
||||
|
||||
self.goto_button = self.buttonBox.addButton(
|
||||
"&GoTo", QtGui.QDialogButtonBox.ActionRole)
|
||||
self.next_button = self.buttonBox.addButton(
|
||||
"&Next", QtGui.QDialogButtonBox.ActionRole)
|
||||
self.prev_button = self.buttonBox.addButton(
|
||||
"&Prev", QtGui.QDialogButtonBox.ActionRole)
|
||||
self.next_button.clicked.connect(self.next_parse)
|
||||
self.prev_button.clicked.connect(self.prev_parse)
|
||||
self.goto_button.clicked.connect(self.cur_parse)
|
||||
self.quit_button = self.buttonBox.addButton(
|
||||
"&Quit", QtGui.QDialogButtonBox.ActionRole)
|
||||
self.quit_button.clicked.connect(
|
||||
QtCore.QCoreApplication.instance().quit)
|
||||
|
||||
|
||||
|
||||
# Disable navigation buttons until data is loaded: see setPath for reactivation
|
||||
self.goto_button.setDisabled(True)
|
||||
self.next_button.setDisabled(True)
|
||||
self.prev_button.setDisabled(True)
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
# Layouting
|
||||
|
||||
layout = QtGui.QVBoxLayout()
|
||||
|
||||
topLayout = QtGui.QHBoxLayout()
|
||||
topLayout.addWidget(self.format_drop)
|
||||
topLayout.addWidget(cell_limit_label)
|
||||
topLayout.addWidget(self.cell_limit_chooser)
|
||||
self.cell_limit_chooser.valueChanged.connect(self.setCellLimit)
|
||||
topLayout.addWidget(pathLabel)
|
||||
topLayout.addWidget(self.pathLabel, 1)
|
||||
topLayout.addWidget(self.pathButton)
|
||||
|
||||
bottomLayout = QtGui.QHBoxLayout()
|
||||
bottomLayout.addWidget(self.buttonBox)
|
||||
|
||||
layout.addLayout(topLayout)
|
||||
layout.addWidget(self.table_widget)
|
||||
layout.addLayout(bottomLayout)
|
||||
|
||||
self.sentence_spinbox.valueChanged.connect(self.set_cur_rein_num)
|
||||
|
||||
self.setLayout(layout)
|
||||
self.updateSignal.connect(self.update_table)
|
||||
|
||||
QtCore.QObject.connect(
|
||||
self.table_widget,
|
||||
QtCore.SIGNAL("cellDoubleClicked(int, int)"),
|
||||
self.popup)
|
||||
|
||||
|
||||
def closeEvent(self, *args, **kwargs):
|
||||
# reimplementation of the close-event for closing down everything
|
||||
# when the main window is closed
|
||||
QtCore.QCoreApplication.quit()
|
||||
return QtGui.QWidget.closeEvent(self, *args, **kwargs)
|
||||
|
||||
|
||||
def setCellLimit(self, value):
|
||||
if value == 0:
|
||||
value = float("inf")
|
||||
self.cell_limit = value
|
||||
|
||||
|
||||
def setPath(self):
|
||||
path = QtGui.QFileDialog.getOpenFileName(self,
|
||||
"Select File", self.pathLabel.text())
|
||||
if path:
|
||||
self.goto_button.setDisabled(False)
|
||||
self.prev_button.setDisabled(False)
|
||||
self.next_button.setDisabled(False)
|
||||
self.pathLabel.setText(QtCore.QDir.toNativeSeparators(path))
|
||||
self.path = unicode(path)
|
||||
self.data = my_DI.DataInput(self.path)
|
||||
try:
|
||||
if self.format == "syntax":
|
||||
self.data.read_syntax()
|
||||
elif self.format == "phrase":
|
||||
self.data.read_phrase()
|
||||
elif self.format == "syntaxCube":
|
||||
self.data.read_syntax_cubes(self.cell_limit)
|
||||
elif self.format == "phraseStackFlag":
|
||||
self.data.read_phrase_stack_flag(self.cell_limit)
|
||||
elif self.format == "phraseStackVerbose":
|
||||
self.data.read_phrase_stack_verbose(self.cell_limit)
|
||||
elif self.format == "syntaxCubeFlag":
|
||||
self.data.read_syntax_cube_flag(self.cell_limit)
|
||||
elif self.format == "mbot":
|
||||
self.data.read_mbot(self.cell_limit)
|
||||
self.populate(0)
|
||||
self.sentence_spinbox.setValue(0)
|
||||
except (ValueError, IndexError) as exc:
|
||||
self.error_dialog = QtGui.QDialog()
|
||||
self.error_dialog.setModal(True)
|
||||
layout = QtGui.QVBoxLayout()
|
||||
text = QtGui.QLabel(
|
||||
"""Something went wrong when choosing your input format/file
|
||||
\n""")
|
||||
button = QtGui.QPushButton("Ok")
|
||||
button.clicked.connect(self.error_dialog.close)
|
||||
layout.addWidget(text)
|
||||
layout.addWidget(button)
|
||||
self.error_dialog.setLayout(layout)
|
||||
self.error_dialog.show()
|
||||
|
||||
|
||||
|
||||
def next_parse(self):
|
||||
self.cur_rein_num += 1
|
||||
if self.cur_rein_num < 0:
|
||||
self.cur_rein_num = len(self.data.sentences) + self.cur_rein_num
|
||||
if self.cur_rein_num >= len(self.data.sentences):
|
||||
self.cur_rein_num = 0
|
||||
self.sentence_spinbox.setValue(self.cur_rein_num)
|
||||
self.populate(self.cur_rein_num)
|
||||
|
||||
def prev_parse(self):
|
||||
self.cur_rein_num -= 1
|
||||
if self.cur_rein_num < 0:
|
||||
self.cur_rein_num = len(self.data.sentences) + self.cur_rein_num
|
||||
if self.cur_rein_num >= len(self.data.sentences):
|
||||
self.cur_rein_num = 0
|
||||
self.sentence_spinbox.setValue(self.cur_rein_num)
|
||||
self.populate(self.cur_rein_num)
|
||||
|
||||
def cur_parse(self):
|
||||
if self.cur_rein_num >= len(self.data.sentences):
|
||||
self.cur_rein_num = 0
|
||||
self.sentence_spinbox.setValue(self.cur_rein_num)
|
||||
self.populate(self.cur_rein_num)
|
||||
|
||||
|
||||
def set_cur_rein_num(self, value):
|
||||
self.cur_rein_num = value # self.sentence_spinbox.value()
|
||||
|
||||
def populate(self, cur_rein_num):
|
||||
cur_sent = self.data.sentences[cur_rein_num]
|
||||
nrows, ncols = cur_sent.length + 1, cur_sent.length + 1
|
||||
nrows, ncols = ncols, nrows # switcher
|
||||
self.table_widget.setSortingEnabled(False)
|
||||
self.table_widget.setRowCount(nrows)
|
||||
self.table_widget.setColumnCount(ncols)
|
||||
# for starting the numbering of the table at zero as the spans
|
||||
self.table_widget.setHorizontalHeaderLabels([str(x) for x in range(ncols)])
|
||||
self.table_widget.setVerticalHeaderLabels([str(x) for x in range(nrows)])
|
||||
for i in range(nrows):
|
||||
for j in range(ncols):
|
||||
try:
|
||||
# item = TableItem("%s:%s \n %s"
|
||||
# % (i+1, j+1, cur_sent.spans[(i,j)]))
|
||||
item = str(i) + ".." + str(j) + " \n"
|
||||
if isinstance(cur_sent.spans[(i, j)], basestring):
|
||||
item += cur_sent.spans[(i, j)] + "\n"
|
||||
else:
|
||||
for rule in cur_sent.spans[(i, j)]:
|
||||
item += str(rule) + "\n"
|
||||
if cur_sent.spans[(i, j)] == []:
|
||||
if j - i < 0:
|
||||
item = ""
|
||||
else:
|
||||
item = "-"
|
||||
item = TableItem(item.decode("utf-8"))
|
||||
|
||||
|
||||
except KeyError:
|
||||
if j - i < 0:
|
||||
item = QtGui.QTableWidgetItem("")
|
||||
else:
|
||||
item = QtGui.QTableWidgetItem("-")
|
||||
self.table_widget.setItem(i, j, item)
|
||||
self.table_widget.setColumnWidth(j, 40)
|
||||
# self.connect(
|
||||
# self.table_widget, QtCore.SIGNAL("itemDoubleClicked(QTableWidgetItem)"),
|
||||
# self.popup)
|
||||
|
||||
self.updateSignal.emit()
|
||||
self.table_widget.setSortingEnabled(True)
|
||||
|
||||
def update_table(self):
|
||||
self.table_widget.sortItems(0, QtCore.Qt.DescendingOrder)
|
||||
|
||||
|
||||
|
||||
|
||||
def set_format_syntax(self):
|
||||
self.format = "syntax"
|
||||
self.format_drop.setText("Syntax")
|
||||
self.format_drop.menu().hide()
|
||||
|
||||
def set_format_phrase(self):
|
||||
self.format = "phrase"
|
||||
self.format_drop.setText("Phrase")
|
||||
self.format_drop.menu().hide()
|
||||
|
||||
def set_format_syntaxCube(self):
|
||||
self.format = "syntaxCube"
|
||||
self.format_drop.setText("Syntax Cube (-Tall flag)")
|
||||
self.format_drop.menu().hide()
|
||||
|
||||
def set_format_phraseStackFlag(self):
|
||||
self.format = "phraseStackFlag"
|
||||
self.format_drop.setText("Phrase Stack (search-graph)")
|
||||
self.format_drop.menu().hide()
|
||||
|
||||
def set_format_phraseStackVerbose(self):
|
||||
self.format = "phraseStackVerbose"
|
||||
self.format_drop.setText("Phrase Stack (verbose)")
|
||||
self.format_drop.menu().hide()
|
||||
|
||||
def set_format_syntaxCubeFlag(self):
|
||||
self.format = "syntaxCubeFlag"
|
||||
self.format_drop.setText("Syntax Cube (search-graph)")
|
||||
self.format_drop.menu().hide()
|
||||
|
||||
def set_format_mbot(self):
|
||||
self.format = "mbot"
|
||||
self.format_drop.setText("MBOT")
|
||||
self.format_drop.menu().hide()
|
||||
|
||||
|
||||
# @QtCore.pyqtSlot(QtGui.QTableWidgetItem, result=QtCore.QObject)
|
||||
# def popup(self, item):
|
||||
# @pyqtSlot(int, int, result=QtCore.QObject)
|
||||
# @pyqtSignature("popup(int int)")
|
||||
def popup(self, r, c):
|
||||
# """ C++: QObject popup(int, int) """
|
||||
# self.w = PopUpCell(item.text)
|
||||
self.w.append(PopUpCell(self.table_widget.item(r, c).text()))
|
||||
# self.w.setGeometry(QRect(100, 100, 400, 200))
|
||||
self.w[-1].show()
|
||||
|
||||
|
||||
class HoverTable(QtGui.QTableWidget):
|
||||
|
||||
def __init__(self, parent=None):
|
||||
super(HoverTable, self).__init__(parent)
|
||||
self.setMouseTracking(True)
|
||||
self.horizontalHeader().setClickable(False)
|
||||
# self.verticalHeader().setDefaultSectionSize(self.verticalHeader.fontMetrics().height()+2);
|
||||
|
||||
|
||||
|
||||
class PopUpCell(QtGui.QWidget):
|
||||
def __init__(self, cell_text):
|
||||
QtGui.QWidget.__init__(self)
|
||||
layout = QtGui.QHBoxLayout()
|
||||
text_list = map(lambda x: x, cell_text.split("\n"))
|
||||
wind_cont = QtGui.QTextEdit() # "<br/>".join(text_list[1:]))
|
||||
wind_cont.setReadOnly(True)
|
||||
wind_cont.setWindowTitle(text_list[0])
|
||||
wind_cont.setPlainText(cell_text) # "\n".join(text_list))
|
||||
layout.addWidget(wind_cont)
|
||||
self.setWindowTitle(text_list[0])
|
||||
self.setLayout(layout)
|
||||
self.resize(960, 320)
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
class TableItem(QtGui.QTableWidgetItem):
|
||||
|
||||
def __init__(self, cell_text, type=1000):
|
||||
super(TableItem, self).__init__(cell_text)
|
||||
if len(cell_text.split("\n")) > 20:
|
||||
self.setToolTip("\n".join(cell_text.split("\n")[:19]))
|
||||
else:
|
||||
self.setToolTip(cell_text)
|
||||
self.cell_text = cell_text
|
||||
|
||||
|
16
contrib/DIMwid/DIMwid.py
Normal file
16
contrib/DIMwid/DIMwid.py
Normal file
@ -0,0 +1,16 @@
|
||||
#!/usr/bin/env python
|
||||
# -*- coding: utf-8 -*-
|
||||
import sys
|
||||
from PyQt4 import QtCore, QtGui
|
||||
|
||||
import DIMterface as my_gui
|
||||
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
app = QtGui.QApplication(sys.argv)
|
||||
wnd = my_gui.MainWindow()
|
||||
wnd.resize(640, 480)
|
||||
wnd.setWindowTitle("DIMwid")
|
||||
wnd.show()
|
||||
sys.exit(app.exec_())
|
20
contrib/DIMwid/LICENSE
Normal file
20
contrib/DIMwid/LICENSE
Normal file
@ -0,0 +1,20 @@
|
||||
The MIT License (MIT)
|
||||
|
||||
Copyright (c) 2013 RobinQrtz
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy of
|
||||
this software and associated documentation files (the "Software"), to deal in
|
||||
the Software without restriction, including without limitation the rights to
|
||||
use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
|
||||
the Software, and to permit persons to whom the Software is furnished to do so,
|
||||
subject to the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be included in all
|
||||
copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
|
||||
FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
|
||||
COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
|
||||
IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
|
||||
CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
67
contrib/DIMwid/README.md
Normal file
67
contrib/DIMwid/README.md
Normal file
@ -0,0 +1,67 @@
|
||||
DIMwid
|
||||
======
|
||||
|
||||
DIMwid (Decoder Inspection for Moses using widgets) is a tool
|
||||
presenting Moses' different chart/stack outputs in a readable tabular
|
||||
view.
|
||||
|
||||
|
||||
Installation
|
||||
============
|
||||
|
||||
In order to run DIMwid you need to install PyQt, Qt 4.8 and Python
|
||||
2.7. Other versions have not yet been tested. Linux/Unix users simply
|
||||
install these packages using their package-manager or built them from
|
||||
source. Windows can skip the installation of Qt since PyQt itself
|
||||
does cover everything, except Python.
|
||||
|
||||
Usage
|
||||
=====
|
||||
|
||||
Users are recommended to read the accompanying paper "DIMwid --
|
||||
Decoder Inspection for Moses (using Widgets)" appearing in PBML XY.
|
||||
|
||||
DIMwid is able to read multiple decoder outputs of the Moses
|
||||
translation system. These include the standard trace outputs for both
|
||||
phrase- and syntax-based decoding, the search-graphs for both, the
|
||||
"level 3 verbose" output for phrase-based and a special trace output
|
||||
(available as a Moses fork at :
|
||||
https://github.com/RobinQrtz/mosesdecoder) for all possible
|
||||
translations for syntax-based decoding.
|
||||
|
||||
After producing the outputs from Moses, start DIMwid by running
|
||||
DIMwid.py and first select your format and after that your file. If
|
||||
you have chosen the wrong file or format an error message will
|
||||
appear. Otherwise you will see the first sentence. Cells can be
|
||||
inspected by either double-clicking, opening a new window with the
|
||||
full content, or hovering over the cell, showing a tooltip with the
|
||||
first 20 lines of the cell's content.
|
||||
|
||||
If needed, the user can restrict the number of rules per cell, using
|
||||
the "Cell Limit" spinbox.
|
||||
|
||||
Navigating through the sentences of the input file can be done by
|
||||
either using the "Next" and "Prev" buttons, or choosing a certain
|
||||
sentence number using the lower left spinbox and clicking the "GoTo"
|
||||
button.
|
||||
|
||||
Moses
|
||||
=====
|
||||
|
||||
Information about Moses can be found here: http://statmt.org/moses/
|
||||
|
||||
The used flags for the output are:
|
||||
* -t for phrase-based trace
|
||||
* -T for syntax-based trace
|
||||
* -v 3 for phrase-based verbose level 3
|
||||
* -output-search-graph for both search graphs
|
||||
* -Tall for the Moses fork's new feature
|
||||
|
||||
|
||||
Trouble
|
||||
=======
|
||||
|
||||
If you are running into trouble using DIMwid or have suggestions for
|
||||
improvements or new features email me at
|
||||
|
||||
robin DOT qrtz AT gmail DOT com
|
@ -27,6 +27,7 @@ To use the PCL compiler and run-time set the following environment variables (as
|
||||
|
||||
$ export PATH=$PATH:`pwd`/python/pcl/src/pclc:`pwd`/python/pcl/src/pcl-run
|
||||
$ export PYTHONPATH=$PYTHONPATH:`pwd`/python/pcl/libs/pypeline/src
|
||||
$ export PCL_IMPORT_PATH=`pwd`/python/pcl/src/runtime:`pwd`/pcl
|
||||
|
||||
Three environment variables need to be set before the pipeline can be run, they are:
|
||||
|
||||
@ -51,7 +52,7 @@ $ pcl-run.py training_pipeline
|
||||
|
||||
Once complete the output of the pipeline can be found in the directories:
|
||||
|
||||
- test_data/tokenisation
|
||||
- test_data/model
|
||||
- test_data/lm
|
||||
- test_data/mert
|
||||
- training/tokenisation
|
||||
- training/model
|
||||
- training/lm
|
||||
- training/mert
|
||||
|
226
contrib/arrow-pipelines/bash/training_pipeline.sh
Executable file
226
contrib/arrow-pipelines/bash/training_pipeline.sh
Executable file
@ -0,0 +1,226 @@
|
||||
#!/bin/bash
|
||||
|
||||
MOSES_HOME=/opt/moses
|
||||
GIZA_HOME=${MOSES_HOME}/giza++-v1.0.7
|
||||
IRSTLM=${MOSES_HOME}/irstlm-5.70.04
|
||||
|
||||
function tokenise() {
|
||||
local LANG="$1"
|
||||
local FILENAME="$2"
|
||||
local WORKING_DIR="$3"
|
||||
local BASENAME="`basename ${FILENAME}`"
|
||||
|
||||
if [ ! -f ${WORKING_DIR} ]; then
|
||||
mkdir -p ${WORKING_DIR}
|
||||
fi
|
||||
|
||||
NEW_BASENAME=`echo ${BASENAME} | gawk '{split($0, a, "."); for(i = 1; i <= length(a); i++) { printf a[i]; if (i<length(a)) { printf "."; } if (i==length(a)-1) { printf "tok."; } } }'`
|
||||
|
||||
TOKENISED_FILENAME="${WORKING_DIR}/${NEW_BASENAME}"
|
||||
${MOSES_HOME}/scripts/tokenizer/tokenizer.perl -q -l ${LANG} < ${FILENAME} > ${TOKENISED_FILENAME}
|
||||
}
|
||||
|
||||
function cleanup() {
|
||||
local SRC_FILENAME="$1"
|
||||
local TGT_FILENAME="$2"
|
||||
local SEGMENT_LENGTH="$3"
|
||||
SRC_CLEANUP_FILENAME=`echo ${SRC_FILENAME} | gawk '{split($0, a, "."); for(i = 1; i <= length(a); i++) { printf a[i]; if (i<length(a)) { printf "."; } if (i==length(a)-1) { printf "clean."; } } }'`
|
||||
TGT_CLEANUP_FILENAME=`echo ${TGT_FILENAME} | gawk '{split($0, a, "."); for(i = 1; i <= length(a); i++) { printf a[i]; if (i<length(a)) { printf "."; } if (i==length(a)-1) { printf "clean."; } } }'`
|
||||
|
||||
truncate -s 0 ${SRC_CLEANUP_FILENAME}
|
||||
truncate -s 0 ${TGT_CLEANUP_FILENAME}
|
||||
|
||||
paste -d'\n' ${SRC_FILENAME} ${TGT_FILENAME} | while read SRC_LINE && read TGT_LINE;
|
||||
do
|
||||
declare -i SRC_NO_WORDS=`echo "${SRC_LINE}" | wc -w`
|
||||
declare -i TGT_NO_WORDS=`echo "${TGT_LINE}" | wc -w`
|
||||
if [ ${SRC_NO_WORDS} -lt 20 -a ${TGT_NO_WORDS} -lt 20 ]; then
|
||||
echo "${SRC_LINE}" >> ${SRC_CLEANUP_FILENAME}
|
||||
echo "${TGT_LINE}" >> ${TGT_CLEANUP_FILENAME}
|
||||
fi
|
||||
done
|
||||
}
|
||||
|
||||
function data_split() {
|
||||
local SRC_FILENAME="$1"
|
||||
local TGT_FILENAME="$2"
|
||||
declare -i DEV_SIZE="$3"
|
||||
declare -i EVAL_SIZE="$4"
|
||||
|
||||
SRC_TRAIN_FILENAME=`echo ${SRC_FILENAME} | gawk '{split($0, a, "."); for(i = 1; i <= length(a); i++) { printf a[i]; if (i<length(a)) { printf "."; } if (i==length(a)-1) { printf "train."; } } }'`
|
||||
TGT_TRAIN_FILENAME=`echo ${TGT_FILENAME} | gawk '{split($0, a, "."); for(i = 1; i <= length(a); i++) { printf a[i]; if (i<length(a)) { printf "."; } if (i==length(a)-1) { printf "train."; } } }'`
|
||||
SRC_DEVEL_FILENAME=`echo ${SRC_FILENAME} | gawk '{split($0, a, "."); for(i = 1; i <= length(a); i++) { printf a[i]; if (i<length(a)) { printf "."; } if (i==length(a)-1) { printf "devel."; } } }'`
|
||||
TGT_DEVEL_FILENAME=`echo ${TGT_FILENAME} | gawk '{split($0, a, "."); for(i = 1; i <= length(a); i++) { printf a[i]; if (i<length(a)) { printf "."; } if (i==length(a)-1) { printf "devel."; } } }'`
|
||||
SRC_EVAL_FILENAME=`echo ${SRC_FILENAME} | gawk '{split($0, a, "."); for(i = 1; i <= length(a); i++) { printf a[i]; if (i<length(a)) { printf "."; } if (i==length(a)-1) { printf "eval."; } } }'`
|
||||
TGT_EVAL_FILENAME=`echo ${TGT_FILENAME} | gawk '{split($0, a, "."); for(i = 1; i <= length(a); i++) { printf a[i]; if (i<length(a)) { printf "."; } if (i==length(a)-1) { printf "eval."; } } }'`
|
||||
|
||||
local ALL_FILES=(${SRC_TRAIN_FILENAME} ${TGT_TRAIN_FILENAME} ${SRC_DEVEL_FILENAME} ${TGT_DEVEL_FILENAME} ${SRC_EVAL_FILENAME} ${TGT_EVAL_FILENAME})
|
||||
for FN in ${ALL_FILES}
|
||||
do
|
||||
truncate -s 0 ${FN}
|
||||
done
|
||||
|
||||
declare -i DEV_EVAL_SIZE=$(($DEV_SIZE + $EVAL_SIZE))
|
||||
declare -i LINE_CNT=1
|
||||
paste -d'\n' ${SRC_FILENAME} ${TGT_FILENAME} | while read SRC_LINE && read TGT_LINE;
|
||||
do
|
||||
if [ ${LINE_CNT} -le ${DEV_EVAL_SIZE} ]; then
|
||||
if [ ${LINE_CNT} -le ${DEV_SIZE} ]; then
|
||||
echo "${SRC_LINE}" >> ${SRC_DEVEL_FILENAME}
|
||||
echo "${TGT_LINE}" >> ${TGT_DEVEL_FILENAME}
|
||||
else
|
||||
echo "${SRC_LINE}" >> ${SRC_EVAL_FILENAME}
|
||||
echo "${TGT_LINE}" >> ${TGT_EVAL_FILENAME}
|
||||
fi
|
||||
else
|
||||
echo "${SRC_LINE}" >> ${SRC_TRAIN_FILENAME}
|
||||
echo "${TGT_LINE}" >> ${TGT_TRAIN_FILENAME}
|
||||
fi
|
||||
LINE_CNT=$(($LINE_CNT + 1))
|
||||
done
|
||||
}
|
||||
|
||||
function translation_model_train() {
|
||||
declare -l TT_SRC_LANG="$1"
|
||||
declare -l TT_TGT_LANG="$2"
|
||||
local SRC_FILENAME="`realpath $3`"
|
||||
local TGT_FILENAME="`realpath $4`"
|
||||
local ALIGNMENT_METHOD="$5"
|
||||
local REORDERING_METHOD="$6"
|
||||
local WORKING_DIR="$7"
|
||||
|
||||
declare -r SRC_CORPORA_NAME=`echo ${SRC_FILENAME} | gawk '{split($0, a, "."); for(i = 1; i < length(a); i++) { printf a[i]; if (i < length(a) - 1) { printf "."; } } }'`
|
||||
declare -r TGT_CORPORA_NAME=`echo ${TGT_FILENAME} | gawk '{split($0, a, "."); for(i = 1; i < length(a); i++) { printf a[i]; if (i < length(a) - 1) { printf "."; } } }'`
|
||||
|
||||
if [ "${SRC_CORPORA_NAME}" != "${TGT_CORPORA_NAME}" ]; then
|
||||
echo "Arrrgh"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
if [ -f ${WORKING_DIR} ]; then
|
||||
rm -Rf ${WORKING_DIR} >& /dev/null
|
||||
fi
|
||||
mkdir -p ${WORKING_DIR}
|
||||
WORKING_DIR=`realpath ${WORKING_DIR}`
|
||||
|
||||
declare -r DUMMY_FILE="${WORKING_DIR}/dummy.lm"
|
||||
echo "dummy lm file" > ${DUMMY_FILE}
|
||||
|
||||
declare -r LOG_FILE="${WORKING_DIR}/log"
|
||||
|
||||
${MOSES_HOME}/scripts/training/train-model.perl -root-dir ${WORKING_DIR} -corpus ${SRC_CORPORA_NAME} -f ${TT_SRC_LANG} -e ${TT_TGT_LANG} -alignment ${ALIGNMENT_METHOD} -reordering ${REORDERING_METHOD} -lm 0:5:${DUMMY_FILE}:0 -external-bin-dir ${GIZA_HOME} 2> ${LOG_FILE}
|
||||
|
||||
MOSES_INI_FILE="${WORKING_DIR}/model/moses.ini"
|
||||
}
|
||||
|
||||
function language_model_train() {
|
||||
local FILENAME="$1"
|
||||
local SMOOTHING_METHOD="$2"
|
||||
local WORKING_DIR="$3"
|
||||
|
||||
if [ ! -f ${WORKING_DIR} ]; then
|
||||
mkdir -p ${WORKING_DIR}
|
||||
fi
|
||||
|
||||
declare -r BASENAME=`basename ${FILENAME}`
|
||||
declare -r START_END_OUTPUT_FILENAME=${WORKING_DIR}/`echo ${BASENAME} | gawk '{split($0, a, "."); for(i = 1; i <= length(a); i++) {if(i == 3) { printf "sb."; } else { printf a[i]; if (i < length(a) - 1) { printf "."; } } } }'`
|
||||
declare -r LM_FILENAME=${WORKING_DIR}/`echo ${BASENAME} | gawk '{split($0, a, "."); for(i = 1; i <= length(a); i++) {if(i == 3) { printf "lm."; } else { printf a[i]; if (i < length(a) - 1) { printf "."; } } } }'`
|
||||
COMPILED_LM_FILENAME=${WORKING_DIR}/`echo ${BASENAME} | gawk '{split($0, a, "."); for(i = 1; i <= length(a); i++) {if(i == 3) { printf "arpa."; } else { printf a[i]; if (i < length(a) - 1) { printf "."; } } } }'`
|
||||
|
||||
export IRSTLM
|
||||
|
||||
${IRSTLM}/bin/add-start-end.sh < ${FILENAME} > ${START_END_OUTPUT_FILENAME}
|
||||
|
||||
declare -r TMP_DIR=`mktemp -dp /tmp`
|
||||
${IRSTLM}/bin/build-lm.sh -i ${START_END_OUTPUT_FILENAME} -t ${TMP_DIR} -p -s ${SMOOTHING_METHOD} -o ${LM_FILENAME}
|
||||
if [ -f ${TMP_DIR} ]; then
|
||||
rm -Rf ${TMP_DIR} >& /dev/null
|
||||
fi
|
||||
|
||||
${IRSTLM}/bin/compile-lm --text yes ${LM_FILENAME}.gz ${COMPILED_LM_FILENAME}
|
||||
}
|
||||
|
||||
function mert() {
|
||||
local MOSES_INI_FILENAME="`realpath $1`"
|
||||
local COMPILED_LM_FILENAME="`realpath $2`"
|
||||
local EVAL_FILENAME="$3"
|
||||
declare -lr _SRC_LANG="$4"
|
||||
declare -lr _TGT_LANG="$5"
|
||||
declare -ri MODEL_ORDER="$6"
|
||||
declare -ri MODEL_TYPE="$7"
|
||||
local WORKING_DIR="$8"
|
||||
declare -ri MAX_NO_ITERS="$9"
|
||||
|
||||
local INFILENAME=`realpath ${EVAL_FILENAME}`
|
||||
INFILENAME=`echo ${INFILENAME} | gawk '{split($0, a, "."); for(i = 1; i < length(a); i++) { printf a[i]; if (i < length(a) - 1) { printf "."; } } }'`
|
||||
|
||||
if [ ! -f ${MOSES_INI_FILENAME} ]; then
|
||||
echo "${MOSES_INI_FILENAME} does not exist."
|
||||
exit 1
|
||||
fi
|
||||
|
||||
if [ -f ${WORKING_DIR} ]; then
|
||||
rm -Rf ${WORKING_DIR} >& /dev/null
|
||||
fi
|
||||
mkdir -p ${WORKING_DIR}
|
||||
|
||||
WORKING_DIR=`realpath ${WORKING_DIR}`
|
||||
MERT_INI_FILENAME="${WORKING_DIR}/trained-moses.ini"
|
||||
local SED_PROG="/\[lmodel-file\]/,/^[[:space:]]*\$/c\[lmodel-file\]\n${MODEL_TYPE} 0 ${MODEL_ORDER} ${COMPILED_LM_FILENAME}\n"
|
||||
eval cat ${MOSES_INI_FILENAME} | sed "${SED_PROG}" > ${MERT_INI_FILENAME}
|
||||
|
||||
${MOSES_HOME}/scripts/training/mert-moses.pl --maximum-iterations ${MAX_NO_ITERS} --mertdir ${MOSES_HOME}/bin --working-dir ${WORKING_DIR} ${INFILENAME}.${_SRC_LANG} ${INFILENAME}.${_TGT_LANG} ${MOSES_HOME}/bin/moses ${MERT_INI_FILENAME} 2> ${WORKING_DIR}/log
|
||||
}
|
||||
|
||||
|
||||
if [ $# -lt 4 ]; then
|
||||
echo "`basename $0` usage:"
|
||||
echo " `basename $0` src_file tgt_file src_lang tgt_lang"
|
||||
echo
|
||||
exit 1
|
||||
fi
|
||||
|
||||
declare -r SRC_LANG="$3"
|
||||
declare -r TGT_LANG="$4"
|
||||
|
||||
# Tokenise
|
||||
tokenise "${SRC_LANG}" "$1" "training/tokeniser"
|
||||
declare -r SRC_TOKENISED_FILENAME="${TOKENISED_FILENAME}"
|
||||
|
||||
tokenise "${TGT_LANG}" "$2" "training/tokeniser"
|
||||
declare -r TGT_TOKENISED_FILENAME="${TOKENISED_FILENAME}"
|
||||
|
||||
echo ${SRC_TOKENISED_FILENAME}
|
||||
echo ${TGT_TOKENISED_FILENAME}
|
||||
|
||||
# Cleanup
|
||||
cleanup "${SRC_TOKENISED_FILENAME}" "${TGT_TOKENISED_FILENAME}" 20
|
||||
|
||||
echo ${SRC_CLEANUP_FILENAME}
|
||||
echo ${TGT_CLEANUP_FILENAME}
|
||||
|
||||
# Data split: src, tgt, dev size, eval size
|
||||
data_split "${SRC_CLEANUP_FILENAME}" "${TGT_CLEANUP_FILENAME}" 1000 500
|
||||
|
||||
echo ${SRC_TRAIN_FILENAME}
|
||||
echo ${TGT_TRAIN_FILENAME}
|
||||
echo ${SRC_DEVEL_FILENAME}
|
||||
echo ${TGT_DEVEL_FILENAME}
|
||||
echo ${SRC_EVAL_FILENAME}
|
||||
echo ${TGT_EVAL_FILENAME}
|
||||
|
||||
# Train the translation model
|
||||
translation_model_train "${SRC_LANG}" "${TGT_LANG}" "${SRC_DEVEL_FILENAME}" "${TGT_DEVEL_FILENAME}" "grow-diag-final-and" "msd-bidirectional-fe" "training/model"
|
||||
|
||||
declare -r MOSES_TT_INI_FILENAME="${MOSES_INI_FILE}"
|
||||
echo ${MOSES_TT_INI_FILENAME}
|
||||
|
||||
# Language model training
|
||||
language_model_train "${TGT_TOKENISED_FILENAME}" "improved-kneser-ney" "training/lm"
|
||||
|
||||
echo ${COMPILED_LM_FILENAME}
|
||||
|
||||
# MERT
|
||||
mert "${MOSES_TT_INI_FILENAME}" "${COMPILED_LM_FILENAME}" "${SRC_EVAL_FILENAME}" "${SRC_LANG}" "${TGT_LANG}" 3 9 "training/mert" 1
|
||||
|
||||
echo ${MERT_INI_FILENAME}
|
@ -1,9 +1,10 @@
|
||||
CC = pclc.py
|
||||
CFLAGS=-i
|
||||
CFLAGS = -i
|
||||
SOURCES = src_trg_tokeniser.pcl translation_model_training.pcl
|
||||
OBJS = $(SOURCES:.pcl=.py)
|
||||
SUBDIRS = wrappers
|
||||
|
||||
all: build
|
||||
all: subdirs build
|
||||
|
||||
build: $(OBJS)
|
||||
|
||||
@ -11,4 +12,13 @@ build: $(OBJS)
|
||||
$(CC) $(CFLAGS) $<
|
||||
|
||||
clean:
|
||||
for dir in $(SUBDIRS); do \
|
||||
$(MAKE) -C $$dir clean; \
|
||||
done
|
||||
rm -f *.py *.pyc *.log *~
|
||||
|
||||
subdirs:
|
||||
for dir in $(SUBDIRS); do \
|
||||
$(MAKE) -C $$dir ; \
|
||||
done
|
||||
|
||||
|
@ -25,16 +25,16 @@ component src_trg_tokeniser
|
||||
tokeniser.moses.installation
|
||||
declare
|
||||
src_tokeniser := new tokeniser with
|
||||
tokeniser.src.language -> language,
|
||||
tokeniser.src.tokenisation_dir -> tokenisation_dir,
|
||||
tokeniser.moses.installation -> moses_installation_dir
|
||||
tokeniser.src.language -> corpus.language,
|
||||
tokeniser.src.tokenisation_dir -> working.directory.root,
|
||||
tokeniser.moses.installation -> moses.installation
|
||||
trg_tokeniser := new tokeniser with
|
||||
tokeniser.trg.language -> language,
|
||||
tokeniser.trg.tokenisation_dir -> tokenisation_dir,
|
||||
tokeniser.moses.installation -> moses_installation_dir
|
||||
tokeniser.trg.language -> corpus.language,
|
||||
tokeniser.trg.tokenisation_dir -> working.directory.root,
|
||||
tokeniser.moses.installation -> moses.installation
|
||||
as
|
||||
wire (src_filename -> filename),
|
||||
(trg_filename -> filename) >>>
|
||||
wire (src_filename -> corpus.filename),
|
||||
(trg_filename -> corpus.filename) >>>
|
||||
(src_tokeniser *** trg_tokeniser) >>>
|
||||
wire (tokenised_filename -> tokenised_src_filename),
|
||||
(tokenised_filename -> tokenised_trg_filename)
|
||||
wire (corpus.tokenised.filename -> tokenised_src_filename),
|
||||
(corpus.tokenised.filename -> tokenised_trg_filename)
|
||||
|
14
contrib/arrow-pipelines/pcl/components/wrappers/Makefile
Normal file
14
contrib/arrow-pipelines/pcl/components/wrappers/Makefile
Normal file
@ -0,0 +1,14 @@
|
||||
SUBDIRS = tokenizer
|
||||
|
||||
all: subdirs
|
||||
|
||||
clean:
|
||||
for dir in $(SUBDIRS); do \
|
||||
$(MAKE) -C $$dir clean; \
|
||||
done
|
||||
|
||||
subdirs:
|
||||
for dir in $(SUBDIRS); do \
|
||||
$(MAKE) -C $$dir ; \
|
||||
done
|
||||
|
@ -15,7 +15,8 @@ def get_outputs():
|
||||
|
||||
def get_configuration():
|
||||
return ['source_language', 'target_language',
|
||||
'moses_installation_dir', 'mert_working_directory']
|
||||
'moses_installation_dir', 'mert_working_directory',
|
||||
'mert_max_no_iterations']
|
||||
|
||||
def configure(args):
|
||||
result = {}
|
||||
@ -23,6 +24,7 @@ def configure(args):
|
||||
result['trg_lang'] = args['target_language']
|
||||
result['moses_installation_dir'] = args['moses_installation_dir']
|
||||
result['mert_working_dir'] = args['mert_working_directory']
|
||||
result['max_no_iterations'] = args['mert_max_no_iterations']
|
||||
return result
|
||||
|
||||
def initialise(config):
|
||||
@ -32,6 +34,7 @@ def initialise(config):
|
||||
lm_file = os.path.abspath(a['trg_language_model_filename'])
|
||||
lm_order = int(a['trg_language_model_order'])
|
||||
lm_type = int(a['trg_language_model_type'])
|
||||
max_no_iters = int(config['max_no_iterations'])
|
||||
orig_moses_ini = os.path.abspath(a['moses_ini_filename'])
|
||||
|
||||
if not os.path.exists(orig_moses_ini):
|
||||
@ -59,7 +62,7 @@ def initialise(config):
|
||||
os.system(cmd)
|
||||
|
||||
#the command
|
||||
cmd = '%(mert_perl)s --mertdir %(bin_dir)s --working-dir %(workdir)s %(src_file)s %(ref_file)s %(moses_bin)s %(moses_ini)s 2> %(logfile)s'
|
||||
cmd = '%(mert_perl)s --maximum-iterations %(max_no_iters)d --mertdir %(bin_dir)s --working-dir %(workdir)s %(src_file)s %(ref_file)s %(moses_bin)s %(moses_ini)s 2> %(logfile)s'
|
||||
cmd = cmd % locals()
|
||||
|
||||
pipe = subprocess.Popen(cmd, stdin = subprocess.PIPE, stdout = subprocess.PIPE, shell=True)
|
||||
|
@ -0,0 +1,15 @@
|
||||
CC = pclc.py
|
||||
CFLAGS = -i
|
||||
SOURCES = tokenizer.pcl
|
||||
OBJS = $(SOURCES:.pcl=.py)
|
||||
|
||||
all: build
|
||||
|
||||
build: $(OBJS)
|
||||
|
||||
%.py: %.pcl
|
||||
$(CC) $(CFLAGS) $<
|
||||
|
||||
clean:
|
||||
rm -f *.py *.pyc *.log *~
|
||||
|
@ -1,7 +1,7 @@
|
||||
[Configuration]
|
||||
language = en
|
||||
tokenisation_dir = tokenised
|
||||
moses_installation_dir = /opt/moses
|
||||
corpus.language = en
|
||||
working.directory.root = tokenised
|
||||
moses.installation = /opt/moses
|
||||
|
||||
[Inputs]
|
||||
filename = test_data/test.en
|
||||
corpus.filename = test_data/test.en
|
||||
|
@ -0,0 +1,38 @@
|
||||
import pcl.io.file as file
|
||||
import pcl.os.path as path
|
||||
import pcl.system.process as process
|
||||
import pcl.util.list as list
|
||||
import pcl.util.string as string
|
||||
|
||||
component tokenizer
|
||||
input corpus.filename
|
||||
output corpus.tokenised.filename
|
||||
configuration corpus.language, working.directory.root, moses.installation
|
||||
do
|
||||
language <- string.lower(@corpus.language)
|
||||
|
||||
corpus.file.basename <- path.basename(corpus.filename)
|
||||
corpus.file.basename.bits <- string.split(corpus.file.basename, ".")
|
||||
list.insert(corpus.file.basename.bits, -1, "tok")
|
||||
result.basename <- string.join(corpus.file.basename.bits, ".")
|
||||
result.pathname <- path.join(@working.directory.root, result.basename)
|
||||
|
||||
working.exists <- path.exists(@working.directory.root)
|
||||
if working.exists == False then
|
||||
path.makedirs(@working.directory.root)
|
||||
return ()
|
||||
else
|
||||
return ()
|
||||
endif
|
||||
|
||||
tokeniser.cmd <- path.join(@moses.installation, "scripts",
|
||||
"tokenizer", "tokenizer.perl")
|
||||
tokeniser.cmd.line <- list.cons(tokeniser.cmd, "-l", language, "-q")
|
||||
|
||||
corpus.file <- file.openFile(corpus.filename, "r")
|
||||
result.file <- file.openFile(result.pathname, "w")
|
||||
process.callAndCheck(tokeniser.cmd.line, corpus.file, result.file)
|
||||
file.closeFile(result.file)
|
||||
file.closeFile(corpus.file)
|
||||
|
||||
return corpus.tokenised.filename <- result.pathname
|
@ -1,60 +0,0 @@
|
||||
import sys, os, subprocess
|
||||
|
||||
|
||||
class BatchTokenizer(object):
|
||||
def __init__(self, language, working_dir, moses_installation_dir):
|
||||
# Ensure the perl tokenizer is exists
|
||||
self.__tokeniser = os.path.join(moses_installation_dir,
|
||||
'scripts',
|
||||
'tokenizer',
|
||||
'tokenizer.perl')
|
||||
if not os.path.exists(self.__tokeniser):
|
||||
raise Exception("Perl tokenizer does not exist at [%s]" % self.__tokeniser)
|
||||
|
||||
self.__working_dir = working_dir
|
||||
if not os.path.exists(self.__working_dir):
|
||||
os.makedirs(self.__working_dir)
|
||||
|
||||
self.__language = language
|
||||
|
||||
def tokenise(self, filename):
|
||||
basefilename = os.path.basename(filename)
|
||||
bits = basefilename.split(".")
|
||||
bits.insert(-1, "tok")
|
||||
basefilename = ".".join(bits)
|
||||
outfilename = os.path.join(self.__working_dir, basefilename)
|
||||
cmd = '%s -q -l %s < %s > %s' % (self.__tokeniser, self.__language, filename, outfilename)
|
||||
pipe = subprocess.Popen(cmd, stdin = subprocess.PIPE, stdout = subprocess.PIPE, shell=True)
|
||||
pipe.wait()
|
||||
|
||||
return outfilename
|
||||
|
||||
def get_name():
|
||||
return 'tokeniser'
|
||||
|
||||
def get_inputs():
|
||||
return ['filename']
|
||||
|
||||
def get_outputs():
|
||||
return ['tokenised_filename']
|
||||
|
||||
def get_configuration():
|
||||
return ['language',
|
||||
'tokenisation_dir',
|
||||
'moses_installation_dir']
|
||||
|
||||
def configure(args):
|
||||
return {'language' : args['language'],
|
||||
'tokenisation_dir' : args['tokenisation_dir'],
|
||||
'moses_installation_dir' : args['moses_installation_dir']}
|
||||
|
||||
def initialise(config):
|
||||
tokenizer = BatchTokenizer(config['language'],
|
||||
config['tokenisation_dir'],
|
||||
config['moses_installation_dir'])
|
||||
|
||||
def process(a, s):
|
||||
tokenised_filename = tokenizer.tokenise(a['filename'])
|
||||
return {'tokenised_filename' : tokenised_filename}
|
||||
|
||||
return process
|
@ -7,14 +7,15 @@ corpus_evaluation_size = 500
|
||||
alignment_method = grow-diag-final-and
|
||||
reordering_method = msd-bidirectional-fe
|
||||
smoothing_method = improved-kneser-ney
|
||||
tokenisation_directory = test_data/tokenisation
|
||||
translation_model_directory = test_data/model
|
||||
language_model_directory = test_data/lm
|
||||
mert_directory = test_data/mert
|
||||
tokenisation_directory = training/tokenisation
|
||||
translation_model_directory = training/model
|
||||
language_model_directory = training/lm
|
||||
mert_directory = training/mert
|
||||
mert_max_no_iterations = 10
|
||||
moses_installation_directory = $(MOSES_HOME)
|
||||
giza_installation_directory = $(GIZA_HOME)
|
||||
irstlm_installation_directory = $(IRSTLM)
|
||||
|
||||
[Inputs]
|
||||
src_filename = test_data/cleantrain.en
|
||||
trg_filename = test_data/cleantrain.lt
|
||||
src_filename = ../test_data/cleantrain.en
|
||||
trg_filename = ../test_data/cleantrain.lt
|
||||
|
@ -46,6 +46,7 @@ component training_pipeline
|
||||
translation_model_directory,
|
||||
language_model_directory,
|
||||
mert_directory,
|
||||
mert_max_no_iterations,
|
||||
moses_installation_directory,
|
||||
giza_installation_directory,
|
||||
irstlm_installation_directory
|
||||
@ -75,7 +76,8 @@ component training_pipeline
|
||||
source_language -> source_language,
|
||||
target_language -> target_language,
|
||||
moses_installation_directory -> moses_installation_dir,
|
||||
mert_directory -> mert_working_directory
|
||||
mert_directory -> mert_working_directory,
|
||||
mert_max_no_iterations -> mert_max_no_iterations
|
||||
as
|
||||
# Split and transform the input to the tokeniser component
|
||||
# Inputs: src_filename, trg_filename
|
||||
|
@ -1 +1 @@
|
||||
Subproject commit 408b85900ac1c84c3224f478da8f290c92ca328a
|
||||
Subproject commit e33ae59b40a6e17fe60e436b3795f0bc559fa8b8
|
@ -10,7 +10,7 @@ m4mdir := $(patsubst %modules/,%,\
|
||||
M4M_MODULES := aux init
|
||||
#M4M_MODULES += directory-structure
|
||||
M4M_MODULES += tools moses-parameters prepare-corpus
|
||||
M4M_MODULES += mgiza fastalign phrase-table moses-ini
|
||||
M4M_MODULES += mgiza fastalign mmbitext phrase-table moses-ini
|
||||
M4M_MODULES += tune-moses eval-system kenlm
|
||||
|
||||
NUMCORES = $(shell parallel --number-of-cores)
|
||||
|
35
contrib/m4m/modules/mmbitext.m4m
Normal file
35
contrib/m4m/modules/mmbitext.m4m
Normal file
@ -0,0 +1,35 @@
|
||||
# -*- makefile -*-
|
||||
|
||||
# Makefile for building a Moses system from a word-aligned corpus
|
||||
# (c) 2011 - 2012 Ulrich Germann
|
||||
|
||||
define mmap_ttrack
|
||||
|
||||
.INTERMEDIATE += $(strip $1).txt.gz
|
||||
$2/$(notdir $1).mct: | $2/$(notdir $1).sfa
|
||||
$2/$(notdir $1).tdx: | $2/$(notdir $1).sfa
|
||||
$2/$(notdir $1).sfa: | $(strip $1).txt.gz
|
||||
$$(lock)
|
||||
zcat -f $$< | ${MOSES_BIN}/mtt-build -i -o $$@.lock/$$(basename $${@F})
|
||||
mv $$@.lock/$$(basename $${@F}).tdx $${@D}
|
||||
mv $$@.lock/$$(basename $${@F}).sfa $${@D}
|
||||
mv $$@.lock/$$(basename $${@F}).mct $${@D}
|
||||
$$(unlock)
|
||||
|
||||
endef
|
||||
|
||||
# $1: base name of word-aligned corpus in text format
|
||||
# $2: directory for mmapped bitext
|
||||
define mmap_bitext
|
||||
|
||||
$(call mmap_ttrack,$1${L1},$2)
|
||||
$(call mmap_ttrack,$1${L2},$2)
|
||||
$2/$(notdir $1)${L1}-${L2}.mam: | $(strip $1)${L1}-${L2}.symal.gz
|
||||
$$(lock)
|
||||
zcat -f $$< | ${MOSES_BIN}/symal2mam $$@_ && mv $$@_ $$@
|
||||
$$(unlock)
|
||||
|
||||
.INTERMEDIATE += $(strip $1)${L1}-${L2}.symal.gz
|
||||
|
||||
endef
|
||||
|
@ -270,3 +270,20 @@ PTABLES += $(strip $4) $(strip $5) $(strip $6)
|
||||
|
||||
endef
|
||||
#################################################################################
|
||||
|
||||
define add_mmsapt
|
||||
|
||||
$(call mmap_bitext,$(strip $5),$(strip $4))
|
||||
ffname := PT$(words ${PTABLE_ENTRIES})
|
||||
MY_ENTRY := Mmsapt
|
||||
MY_ENTRY += name=$$(ffname)
|
||||
MY_ETNRY += input-factor=$(strip $1)
|
||||
MY_ENTRY += output-factor=$(strip $2)
|
||||
MY_ENTRY += num-features=$(strip $3)
|
||||
MY_ENTRY += base=$(abspath $4)/ L1=${L1} L2=${L2}
|
||||
PTABLE_ENTRIES += $$(subst $$(space),;,$${MY_ENTRY})
|
||||
MOSES_INI_PREREQ += $(addprefix $(strip $4),${L1}.mct ${L1}.tdx ${L1}.sfa)
|
||||
MOSES_INI_PREREQ += $(addprefix $(strip $4),${L2}.mct ${L2}.tdx ${L2}.sfa)
|
||||
MOSES_INI_PREREQ += $(strip $4)${L1}-${L2}.mam
|
||||
|
||||
endef
|
||||
|
@ -5,12 +5,12 @@
|
||||
<storageModule buildSystemId="org.eclipse.cdt.managedbuilder.core.configurationDataProvider" id="cdt.managedbuild.config.gnu.cross.exe.debug.1438215292" moduleId="org.eclipse.cdt.core.settings" name="Debug">
|
||||
<externalSettings/>
|
||||
<extensions>
|
||||
<extension id="org.eclipse.cdt.core.ELF" point="org.eclipse.cdt.core.BinaryParser"/>
|
||||
<extension id="org.eclipse.cdt.core.GmakeErrorParser" point="org.eclipse.cdt.core.ErrorParser"/>
|
||||
<extension id="org.eclipse.cdt.core.CWDLocator" point="org.eclipse.cdt.core.ErrorParser"/>
|
||||
<extension id="org.eclipse.cdt.core.GCCErrorParser" point="org.eclipse.cdt.core.ErrorParser"/>
|
||||
<extension id="org.eclipse.cdt.core.GASErrorParser" point="org.eclipse.cdt.core.ErrorParser"/>
|
||||
<extension id="org.eclipse.cdt.core.GLDErrorParser" point="org.eclipse.cdt.core.ErrorParser"/>
|
||||
<extension id="org.eclipse.cdt.core.ELF" point="org.eclipse.cdt.core.BinaryParser"/>
|
||||
</extensions>
|
||||
</storageModule>
|
||||
<storageModule moduleId="cdtBuildSystem" version="4.0.0">
|
||||
@ -18,12 +18,12 @@
|
||||
<folderInfo id="cdt.managedbuild.config.gnu.cross.exe.debug.1438215292." name="/" resourcePath="">
|
||||
<toolChain id="cdt.managedbuild.toolchain.gnu.cross.exe.debug.124769989" name="Cross GCC" superClass="cdt.managedbuild.toolchain.gnu.cross.exe.debug">
|
||||
<targetPlatform archList="all" binaryParser="org.eclipse.cdt.core.ELF" id="cdt.managedbuild.targetPlatform.gnu.cross.266544803" isAbstract="false" osList="all" superClass="cdt.managedbuild.targetPlatform.gnu.cross"/>
|
||||
<builder buildPath="${workspace_loc:/extract-rules}/Debug" id="cdt.managedbuild.builder.gnu.cross.335858926" keepEnvironmentInBuildfile="false" managedBuildOn="true" name="Gnu Make Builder" superClass="cdt.managedbuild.builder.gnu.cross"/>
|
||||
<builder buildPath="${workspace_loc:/extract-rules}/Debug" id="cdt.managedbuild.builder.gnu.cross.335858926" keepEnvironmentInBuildfile="false" managedBuildOn="true" name="Gnu Make Builder" parallelBuildOn="true" parallelizationNumber="optimal" superClass="cdt.managedbuild.builder.gnu.cross"/>
|
||||
<tool id="cdt.managedbuild.tool.gnu.cross.c.compiler.1376077469" name="Cross GCC Compiler" superClass="cdt.managedbuild.tool.gnu.cross.c.compiler">
|
||||
<option defaultValue="gnu.c.optimization.level.none" id="gnu.c.compiler.option.optimization.level.947547329" name="Optimization Level" superClass="gnu.c.compiler.option.optimization.level" valueType="enumerated"/>
|
||||
<option id="gnu.c.compiler.option.debugging.level.426953885" name="Debug Level" superClass="gnu.c.compiler.option.debugging.level" value="gnu.c.debugging.level.max" valueType="enumerated"/>
|
||||
<option id="gnu.c.compiler.option.include.paths.1671695899" name="Include paths (-I)" superClass="gnu.c.compiler.option.include.paths" valueType="includePath"/>
|
||||
<option id="gnu.c.compiler.option.include.files.1838960067" name="Include files (-include)" superClass="gnu.c.compiler.option.include.files" valueType="includeFiles"/>
|
||||
<option id="gnu.c.compiler.option.include.paths.1671695899" name="Include paths (-I)" superClass="gnu.c.compiler.option.include.paths"/>
|
||||
<option id="gnu.c.compiler.option.include.files.1838960067" name="Include files (-include)" superClass="gnu.c.compiler.option.include.files"/>
|
||||
<inputType id="cdt.managedbuild.tool.gnu.c.compiler.input.985831394" superClass="cdt.managedbuild.tool.gnu.c.compiler.input"/>
|
||||
</tool>
|
||||
<tool id="cdt.managedbuild.tool.gnu.cross.cpp.compiler.53480540" name="Cross G++ Compiler" superClass="cdt.managedbuild.tool.gnu.cross.cpp.compiler">
|
||||
@ -42,7 +42,7 @@
|
||||
<listOptionValue builtIn="false" value="boost_system-mt"/>
|
||||
<listOptionValue builtIn="false" value="boost_filesystem-mt"/>
|
||||
</option>
|
||||
<option id="gnu.cpp.link.option.paths.1030374421" superClass="gnu.cpp.link.option.paths" valueType="libPaths">
|
||||
<option id="gnu.cpp.link.option.paths.1030374421" name="Library search path (-L)" superClass="gnu.cpp.link.option.paths" valueType="libPaths">
|
||||
<listOptionValue builtIn="false" value=""${workspace_loc:}/../../boost/lib64""/>
|
||||
</option>
|
||||
<inputType id="cdt.managedbuild.tool.gnu.cpp.linker.input.272393234" superClass="cdt.managedbuild.tool.gnu.cpp.linker.input">
|
||||
@ -64,12 +64,12 @@
|
||||
<storageModule buildSystemId="org.eclipse.cdt.managedbuilder.core.configurationDataProvider" id="cdt.managedbuild.config.gnu.cross.exe.release.1200693544" moduleId="org.eclipse.cdt.core.settings" name="Release">
|
||||
<externalSettings/>
|
||||
<extensions>
|
||||
<extension id="org.eclipse.cdt.core.ELF" point="org.eclipse.cdt.core.BinaryParser"/>
|
||||
<extension id="org.eclipse.cdt.core.GmakeErrorParser" point="org.eclipse.cdt.core.ErrorParser"/>
|
||||
<extension id="org.eclipse.cdt.core.CWDLocator" point="org.eclipse.cdt.core.ErrorParser"/>
|
||||
<extension id="org.eclipse.cdt.core.GCCErrorParser" point="org.eclipse.cdt.core.ErrorParser"/>
|
||||
<extension id="org.eclipse.cdt.core.GASErrorParser" point="org.eclipse.cdt.core.ErrorParser"/>
|
||||
<extension id="org.eclipse.cdt.core.GLDErrorParser" point="org.eclipse.cdt.core.ErrorParser"/>
|
||||
<extension id="org.eclipse.cdt.core.ELF" point="org.eclipse.cdt.core.BinaryParser"/>
|
||||
</extensions>
|
||||
</storageModule>
|
||||
<storageModule moduleId="cdtBuildSystem" version="4.0.0">
|
||||
@ -125,5 +125,12 @@
|
||||
</scannerConfigBuildInfo>
|
||||
</storageModule>
|
||||
<storageModule moduleId="org.eclipse.cdt.core.LanguageSettingsProviders"/>
|
||||
<storageModule moduleId="refreshScope"/>
|
||||
<storageModule moduleId="refreshScope" versionNumber="2">
|
||||
<configuration configurationName="Release">
|
||||
<resource resourceType="PROJECT" workspacePath="/extract-rules"/>
|
||||
</configuration>
|
||||
<configuration configurationName="Debug">
|
||||
<resource resourceType="PROJECT" workspacePath="/extract-rules"/>
|
||||
</configuration>
|
||||
</storageModule>
|
||||
</cproject>
|
||||
|
@ -25,11 +25,6 @@
|
||||
<nature>org.eclipse.cdt.managedbuilder.core.ScannerConfigNature</nature>
|
||||
</natures>
|
||||
<linkedResources>
|
||||
<link>
|
||||
<name>ExtractedRule.cpp</name>
|
||||
<type>1</type>
|
||||
<locationURI>PARENT-3-PROJECT_LOC/phrase-extract/ExtractedRule.cpp</locationURI>
|
||||
</link>
|
||||
<link>
|
||||
<name>ExtractedRule.h</name>
|
||||
<type>1</type>
|
||||
|
@ -5,12 +5,12 @@
|
||||
<storageModule buildSystemId="org.eclipse.cdt.managedbuilder.core.configurationDataProvider" id="cdt.managedbuild.config.gnu.cross.exe.debug.386290689" moduleId="org.eclipse.cdt.core.settings" name="Debug">
|
||||
<externalSettings/>
|
||||
<extensions>
|
||||
<extension id="org.eclipse.cdt.core.ELF" point="org.eclipse.cdt.core.BinaryParser"/>
|
||||
<extension id="org.eclipse.cdt.core.GmakeErrorParser" point="org.eclipse.cdt.core.ErrorParser"/>
|
||||
<extension id="org.eclipse.cdt.core.CWDLocator" point="org.eclipse.cdt.core.ErrorParser"/>
|
||||
<extension id="org.eclipse.cdt.core.GCCErrorParser" point="org.eclipse.cdt.core.ErrorParser"/>
|
||||
<extension id="org.eclipse.cdt.core.GASErrorParser" point="org.eclipse.cdt.core.ErrorParser"/>
|
||||
<extension id="org.eclipse.cdt.core.GLDErrorParser" point="org.eclipse.cdt.core.ErrorParser"/>
|
||||
<extension id="org.eclipse.cdt.core.ELF" point="org.eclipse.cdt.core.BinaryParser"/>
|
||||
</extensions>
|
||||
</storageModule>
|
||||
<storageModule moduleId="cdtBuildSystem" version="4.0.0">
|
||||
@ -18,7 +18,7 @@
|
||||
<folderInfo id="cdt.managedbuild.config.gnu.cross.exe.debug.386290689." name="/" resourcePath="">
|
||||
<toolChain id="cdt.managedbuild.toolchain.gnu.cross.exe.debug.671913278" name="Cross GCC" superClass="cdt.managedbuild.toolchain.gnu.cross.exe.debug">
|
||||
<targetPlatform archList="all" binaryParser="org.eclipse.cdt.core.ELF" id="cdt.managedbuild.targetPlatform.gnu.cross.1231657738" isAbstract="false" osList="all" superClass="cdt.managedbuild.targetPlatform.gnu.cross"/>
|
||||
<builder buildPath="${workspace_loc:/extract}/Debug" id="cdt.managedbuild.builder.gnu.cross.571044108" keepEnvironmentInBuildfile="false" managedBuildOn="true" name="Gnu Make Builder" superClass="cdt.managedbuild.builder.gnu.cross"/>
|
||||
<builder buildPath="${workspace_loc:/extract}/Debug" id="cdt.managedbuild.builder.gnu.cross.571044108" keepEnvironmentInBuildfile="false" managedBuildOn="true" name="Gnu Make Builder" parallelBuildOn="true" parallelizationNumber="optimal" superClass="cdt.managedbuild.builder.gnu.cross"/>
|
||||
<tool id="cdt.managedbuild.tool.gnu.cross.c.compiler.332036857" name="Cross GCC Compiler" superClass="cdt.managedbuild.tool.gnu.cross.c.compiler">
|
||||
<option defaultValue="gnu.c.optimization.level.none" id="gnu.c.compiler.option.optimization.level.1292572253" name="Optimization Level" superClass="gnu.c.compiler.option.optimization.level" valueType="enumerated"/>
|
||||
<option id="gnu.c.compiler.option.debugging.level.1873227592" name="Debug Level" superClass="gnu.c.compiler.option.debugging.level" value="gnu.c.debugging.level.max" valueType="enumerated"/>
|
||||
@ -40,7 +40,7 @@
|
||||
<listOptionValue builtIn="false" value="boost_system-mt"/>
|
||||
<listOptionValue builtIn="false" value="boost_filesystem-mt"/>
|
||||
</option>
|
||||
<option id="gnu.cpp.link.option.paths.298225069" superClass="gnu.cpp.link.option.paths" valueType="libPaths">
|
||||
<option id="gnu.cpp.link.option.paths.298225069" name="Library search path (-L)" superClass="gnu.cpp.link.option.paths" valueType="libPaths">
|
||||
<listOptionValue builtIn="false" value=""${workspace_loc:}/../../boost/lib64""/>
|
||||
</option>
|
||||
<inputType id="cdt.managedbuild.tool.gnu.cpp.linker.input.1339210059" superClass="cdt.managedbuild.tool.gnu.cpp.linker.input">
|
||||
@ -62,12 +62,12 @@
|
||||
<storageModule buildSystemId="org.eclipse.cdt.managedbuilder.core.configurationDataProvider" id="cdt.managedbuild.config.gnu.cross.exe.release.140124152" moduleId="org.eclipse.cdt.core.settings" name="Release">
|
||||
<externalSettings/>
|
||||
<extensions>
|
||||
<extension id="org.eclipse.cdt.core.ELF" point="org.eclipse.cdt.core.BinaryParser"/>
|
||||
<extension id="org.eclipse.cdt.core.GmakeErrorParser" point="org.eclipse.cdt.core.ErrorParser"/>
|
||||
<extension id="org.eclipse.cdt.core.CWDLocator" point="org.eclipse.cdt.core.ErrorParser"/>
|
||||
<extension id="org.eclipse.cdt.core.GCCErrorParser" point="org.eclipse.cdt.core.ErrorParser"/>
|
||||
<extension id="org.eclipse.cdt.core.GASErrorParser" point="org.eclipse.cdt.core.ErrorParser"/>
|
||||
<extension id="org.eclipse.cdt.core.GLDErrorParser" point="org.eclipse.cdt.core.ErrorParser"/>
|
||||
<extension id="org.eclipse.cdt.core.ELF" point="org.eclipse.cdt.core.BinaryParser"/>
|
||||
</extensions>
|
||||
</storageModule>
|
||||
<storageModule moduleId="cdtBuildSystem" version="4.0.0">
|
||||
@ -123,5 +123,12 @@
|
||||
</scannerConfigBuildInfo>
|
||||
</storageModule>
|
||||
<storageModule moduleId="org.eclipse.cdt.core.LanguageSettingsProviders"/>
|
||||
<storageModule moduleId="refreshScope"/>
|
||||
<storageModule moduleId="refreshScope" versionNumber="2">
|
||||
<configuration configurationName="Release">
|
||||
<resource resourceType="PROJECT" workspacePath="/extract"/>
|
||||
</configuration>
|
||||
<configuration configurationName="Debug">
|
||||
<resource resourceType="PROJECT" workspacePath="/extract"/>
|
||||
</configuration>
|
||||
</storageModule>
|
||||
</cproject>
|
||||
|
@ -46,8 +46,9 @@
|
||||
</tool>
|
||||
</toolChain>
|
||||
</folderInfo>
|
||||
<fileInfo id="cdt.managedbuild.config.gnu.lib.debug.1721952013.933309045" name="PreProcessFilter.h" rcbsApplicability="disable" resourcePath="mert/PreProcessFilter.h" toolsToInvoke=""/>
|
||||
<sourceEntries>
|
||||
<entry excluding="mert/UtilTest.cpp|mert/TimerTest.cpp|mert/SingletonTest.cpp|mert/PointTest.cpp|mert/OptimizerFactoryTest.cpp|mert/NgramTest.cpp|mert/FeatureDataTest.cpp|mert/DataTest.cpp|mert/ReferenceTest.cpp|mert/VocabularyTest.cpp|mert/extractor.cpp" flags="VALUE_WORKSPACE_PATH|RESOLVED" kind="sourcePath" name=""/>
|
||||
<entry excluding="mert/PreProcessFilter.h|mert/PreProcessFilter.cpp|mert/UtilTest.cpp|mert/TimerTest.cpp|mert/SingletonTest.cpp|mert/PointTest.cpp|mert/OptimizerFactoryTest.cpp|mert/NgramTest.cpp|mert/FeatureDataTest.cpp|mert/DataTest.cpp|mert/ReferenceTest.cpp|mert/VocabularyTest.cpp|mert/extractor.cpp" flags="VALUE_WORKSPACE_PATH|RESOLVED" kind="sourcePath" name=""/>
|
||||
</sourceEntries>
|
||||
</configuration>
|
||||
</storageModule>
|
||||
|
176
contrib/other-builds/mira/.cproject
Normal file
176
contrib/other-builds/mira/.cproject
Normal file
@ -0,0 +1,176 @@
|
||||
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||
<?fileVersion 4.0.0?><cproject storage_type_id="org.eclipse.cdt.core.XmlProjectDescriptionStorage">
|
||||
<storageModule moduleId="org.eclipse.cdt.core.settings">
|
||||
<cconfiguration id="cdt.managedbuild.config.gnu.cross.exe.debug.1385309092">
|
||||
<storageModule buildSystemId="org.eclipse.cdt.managedbuilder.core.configurationDataProvider" id="cdt.managedbuild.config.gnu.cross.exe.debug.1385309092" moduleId="org.eclipse.cdt.core.settings" name="Debug">
|
||||
<externalSettings/>
|
||||
<extensions>
|
||||
<extension id="org.eclipse.cdt.core.ELF" point="org.eclipse.cdt.core.BinaryParser"/>
|
||||
<extension id="org.eclipse.cdt.core.GmakeErrorParser" point="org.eclipse.cdt.core.ErrorParser"/>
|
||||
<extension id="org.eclipse.cdt.core.CWDLocator" point="org.eclipse.cdt.core.ErrorParser"/>
|
||||
<extension id="org.eclipse.cdt.core.GCCErrorParser" point="org.eclipse.cdt.core.ErrorParser"/>
|
||||
<extension id="org.eclipse.cdt.core.GASErrorParser" point="org.eclipse.cdt.core.ErrorParser"/>
|
||||
<extension id="org.eclipse.cdt.core.GLDErrorParser" point="org.eclipse.cdt.core.ErrorParser"/>
|
||||
</extensions>
|
||||
</storageModule>
|
||||
<storageModule moduleId="cdtBuildSystem" version="4.0.0">
|
||||
<configuration artifactName="${ProjName}" buildArtefactType="org.eclipse.cdt.build.core.buildArtefactType.exe" buildProperties="org.eclipse.cdt.build.core.buildType=org.eclipse.cdt.build.core.buildType.debug,org.eclipse.cdt.build.core.buildArtefactType=org.eclipse.cdt.build.core.buildArtefactType.exe" cleanCommand="rm -rf" description="" id="cdt.managedbuild.config.gnu.cross.exe.debug.1385309092" name="Debug" parent="cdt.managedbuild.config.gnu.cross.exe.debug">
|
||||
<folderInfo id="cdt.managedbuild.config.gnu.cross.exe.debug.1385309092." name="/" resourcePath="">
|
||||
<toolChain id="cdt.managedbuild.toolchain.gnu.cross.exe.debug.377583226" name="Cross GCC" superClass="cdt.managedbuild.toolchain.gnu.cross.exe.debug">
|
||||
<targetPlatform archList="all" binaryParser="org.eclipse.cdt.core.ELF" id="cdt.managedbuild.targetPlatform.gnu.cross.2071063316" isAbstract="false" osList="all" superClass="cdt.managedbuild.targetPlatform.gnu.cross"/>
|
||||
<builder buildPath="${workspace_loc:/mira/Debug}" id="cdt.managedbuild.builder.gnu.cross.881204887" keepEnvironmentInBuildfile="false" managedBuildOn="true" name="Gnu Make Builder" parallelBuildOn="true" parallelizationNumber="optimal" superClass="cdt.managedbuild.builder.gnu.cross"/>
|
||||
<tool id="cdt.managedbuild.tool.gnu.cross.c.compiler.1218877049" name="Cross GCC Compiler" superClass="cdt.managedbuild.tool.gnu.cross.c.compiler">
|
||||
<option defaultValue="gnu.c.optimization.level.none" id="gnu.c.compiler.option.optimization.level.1094111510" name="Optimization Level" superClass="gnu.c.compiler.option.optimization.level" valueType="enumerated"/>
|
||||
<option id="gnu.c.compiler.option.debugging.level.2142370493" name="Debug Level" superClass="gnu.c.compiler.option.debugging.level" value="gnu.c.debugging.level.max" valueType="enumerated"/>
|
||||
<inputType id="cdt.managedbuild.tool.gnu.c.compiler.input.1560615310" superClass="cdt.managedbuild.tool.gnu.c.compiler.input"/>
|
||||
</tool>
|
||||
<tool command="g++" id="cdt.managedbuild.tool.gnu.cross.cpp.compiler.115638939" name="Cross G++ Compiler" superClass="cdt.managedbuild.tool.gnu.cross.cpp.compiler">
|
||||
<option id="gnu.cpp.compiler.option.optimization.level.1315998281" name="Optimization Level" superClass="gnu.cpp.compiler.option.optimization.level" value="gnu.cpp.compiler.optimization.level.none" valueType="enumerated"/>
|
||||
<option id="gnu.cpp.compiler.option.debugging.level.778416356" name="Debug Level" superClass="gnu.cpp.compiler.option.debugging.level" value="gnu.cpp.compiler.debugging.level.max" valueType="enumerated"/>
|
||||
<option id="gnu.cpp.compiler.option.preprocessor.def.317569168" name="Defined symbols (-D)" superClass="gnu.cpp.compiler.option.preprocessor.def" valueType="definedSymbols">
|
||||
<listOptionValue builtIn="false" value="HAVE_BOOST"/>
|
||||
<listOptionValue builtIn="false" value="MAX_NUM_FACTORS=4"/>
|
||||
<listOptionValue builtIn="false" value="TRACE_ENABLE"/>
|
||||
<listOptionValue builtIn="false" value="WITH_THREADS"/>
|
||||
</option>
|
||||
<option id="gnu.cpp.compiler.option.include.paths.1743631842" name="Include paths (-I)" superClass="gnu.cpp.compiler.option.include.paths" valueType="includePath">
|
||||
<listOptionValue builtIn="false" value=""${workspace_loc}/../..""/>
|
||||
<listOptionValue builtIn="false" value=""${workspace_loc}/../../boost/include""/>
|
||||
</option>
|
||||
<inputType id="cdt.managedbuild.tool.gnu.cpp.compiler.input.1454738757" superClass="cdt.managedbuild.tool.gnu.cpp.compiler.input"/>
|
||||
</tool>
|
||||
<tool id="cdt.managedbuild.tool.gnu.cross.c.linker.1480777831" name="Cross GCC Linker" superClass="cdt.managedbuild.tool.gnu.cross.c.linker"/>
|
||||
<tool id="cdt.managedbuild.tool.gnu.cross.cpp.linker.485611005" name="Cross G++ Linker" superClass="cdt.managedbuild.tool.gnu.cross.cpp.linker">
|
||||
<option id="gnu.cpp.link.option.libs.1007486529" name="Libraries (-l)" superClass="gnu.cpp.link.option.libs" valueType="libs">
|
||||
<listOptionValue builtIn="false" value="moses"/>
|
||||
<listOptionValue builtIn="false" value="irstlm"/>
|
||||
<listOptionValue builtIn="false" value="dstruct"/>
|
||||
<listOptionValue builtIn="false" value="flm"/>
|
||||
<listOptionValue builtIn="false" value="oolm"/>
|
||||
<listOptionValue builtIn="false" value="lattice"/>
|
||||
<listOptionValue builtIn="false" value="misc"/>
|
||||
<listOptionValue builtIn="false" value="dalm"/>
|
||||
<listOptionValue builtIn="false" value="MurmurHash3"/>
|
||||
<listOptionValue builtIn="false" value="search"/>
|
||||
<listOptionValue builtIn="false" value="RandLM"/>
|
||||
<listOptionValue builtIn="false" value="OnDiskPt"/>
|
||||
<listOptionValue builtIn="false" value="lm"/>
|
||||
<listOptionValue builtIn="false" value="util"/>
|
||||
<listOptionValue builtIn="false" value="boost_iostreams-mt"/>
|
||||
<listOptionValue builtIn="false" value="boost_system-mt"/>
|
||||
<listOptionValue builtIn="false" value="boost_thread-mt"/>
|
||||
<listOptionValue builtIn="false" value="boost_filesystem-mt"/>
|
||||
<listOptionValue builtIn="false" value="boost_program_options-mt"/>
|
||||
<listOptionValue builtIn="false" value="pthread"/>
|
||||
<listOptionValue builtIn="false" value="z"/>
|
||||
<listOptionValue builtIn="false" value="bz2"/>
|
||||
<listOptionValue builtIn="false" value="dl"/>
|
||||
<listOptionValue builtIn="false" value="rt"/>
|
||||
</option>
|
||||
<option id="gnu.cpp.link.option.paths.132082917" name="Library search path (-L)" superClass="gnu.cpp.link.option.paths" valueType="libPaths">
|
||||
<listOptionValue builtIn="false" value=""${workspace_loc:}/../../irstlm/lib""/>
|
||||
<listOptionValue builtIn="false" value=""${workspace_loc:}/../../DALM/lib""/>
|
||||
<listOptionValue builtIn="false" value=""${workspace_loc:}/../../nplm/lib""/>
|
||||
<listOptionValue builtIn="false" value=""${workspace_loc:}/../../randlm/lib""/>
|
||||
<listOptionValue builtIn="false" value=""${workspace_loc:}/../../cmph/lib""/>
|
||||
<listOptionValue builtIn="false" value=""${workspace_loc:}/../../boost/lib64""/>
|
||||
<listOptionValue builtIn="false" value=""${workspace_loc:}/../../srilm/lib/macosx""/>
|
||||
<listOptionValue builtIn="false" value=""${workspace_loc:}/../../srilm/lib/i686-m64""/>
|
||||
<listOptionValue builtIn="false" value=""${workspace_loc:}/../../srilm/lib/i686""/>
|
||||
<listOptionValue builtIn="false" value=""${workspace_loc:}/moses/Debug""/>
|
||||
<listOptionValue builtIn="false" value=""${workspace_loc:}/lm/Debug""/>
|
||||
<listOptionValue builtIn="false" value=""${workspace_loc:}/OnDiskPt/Debug""/>
|
||||
<listOptionValue builtIn="false" value=""${workspace_loc:}/util/Debug""/>
|
||||
<listOptionValue builtIn="false" value=""${workspace_loc:}/search/Debug""/>
|
||||
<listOptionValue builtIn="false" value="/opt/local/lib"/>
|
||||
</option>
|
||||
<inputType id="cdt.managedbuild.tool.gnu.cpp.linker.input.1827477602" superClass="cdt.managedbuild.tool.gnu.cpp.linker.input">
|
||||
<additionalInput kind="additionalinputdependency" paths="$(USER_OBJS)"/>
|
||||
<additionalInput kind="additionalinput" paths="$(LIBS)"/>
|
||||
</inputType>
|
||||
</tool>
|
||||
<tool id="cdt.managedbuild.tool.gnu.cross.archiver.1554055737" name="Cross GCC Archiver" superClass="cdt.managedbuild.tool.gnu.cross.archiver"/>
|
||||
<tool id="cdt.managedbuild.tool.gnu.cross.assembler.1335019965" name="Cross GCC Assembler" superClass="cdt.managedbuild.tool.gnu.cross.assembler">
|
||||
<inputType id="cdt.managedbuild.tool.gnu.assembler.input.1106765201" superClass="cdt.managedbuild.tool.gnu.assembler.input"/>
|
||||
</tool>
|
||||
</toolChain>
|
||||
</folderInfo>
|
||||
</configuration>
|
||||
</storageModule>
|
||||
<storageModule moduleId="org.eclipse.cdt.core.externalSettings"/>
|
||||
</cconfiguration>
|
||||
<cconfiguration id="cdt.managedbuild.config.gnu.cross.exe.release.2038764866">
|
||||
<storageModule buildSystemId="org.eclipse.cdt.managedbuilder.core.configurationDataProvider" id="cdt.managedbuild.config.gnu.cross.exe.release.2038764866" moduleId="org.eclipse.cdt.core.settings" name="Release">
|
||||
<externalSettings/>
|
||||
<extensions>
|
||||
<extension id="org.eclipse.cdt.core.ELF" point="org.eclipse.cdt.core.BinaryParser"/>
|
||||
<extension id="org.eclipse.cdt.core.GmakeErrorParser" point="org.eclipse.cdt.core.ErrorParser"/>
|
||||
<extension id="org.eclipse.cdt.core.CWDLocator" point="org.eclipse.cdt.core.ErrorParser"/>
|
||||
<extension id="org.eclipse.cdt.core.GCCErrorParser" point="org.eclipse.cdt.core.ErrorParser"/>
|
||||
<extension id="org.eclipse.cdt.core.GASErrorParser" point="org.eclipse.cdt.core.ErrorParser"/>
|
||||
<extension id="org.eclipse.cdt.core.GLDErrorParser" point="org.eclipse.cdt.core.ErrorParser"/>
|
||||
</extensions>
|
||||
</storageModule>
|
||||
<storageModule moduleId="cdtBuildSystem" version="4.0.0">
|
||||
<configuration artifactName="${ProjName}" buildArtefactType="org.eclipse.cdt.build.core.buildArtefactType.exe" buildProperties="org.eclipse.cdt.build.core.buildType=org.eclipse.cdt.build.core.buildType.release,org.eclipse.cdt.build.core.buildArtefactType=org.eclipse.cdt.build.core.buildArtefactType.exe" cleanCommand="rm -rf" description="" id="cdt.managedbuild.config.gnu.cross.exe.release.2038764866" name="Release" parent="cdt.managedbuild.config.gnu.cross.exe.release">
|
||||
<folderInfo id="cdt.managedbuild.config.gnu.cross.exe.release.2038764866." name="/" resourcePath="">
|
||||
<toolChain id="cdt.managedbuild.toolchain.gnu.cross.exe.release.1722081106" name="Cross GCC" superClass="cdt.managedbuild.toolchain.gnu.cross.exe.release">
|
||||
<targetPlatform archList="all" binaryParser="org.eclipse.cdt.core.ELF" id="cdt.managedbuild.targetPlatform.gnu.cross.36030994" isAbstract="false" osList="all" superClass="cdt.managedbuild.targetPlatform.gnu.cross"/>
|
||||
<builder buildPath="${workspace_loc:/mira/Release}" id="cdt.managedbuild.builder.gnu.cross.329863268" keepEnvironmentInBuildfile="false" managedBuildOn="true" name="Gnu Make Builder" superClass="cdt.managedbuild.builder.gnu.cross"/>
|
||||
<tool id="cdt.managedbuild.tool.gnu.cross.c.compiler.299271422" name="Cross GCC Compiler" superClass="cdt.managedbuild.tool.gnu.cross.c.compiler">
|
||||
<option defaultValue="gnu.c.optimization.level.most" id="gnu.c.compiler.option.optimization.level.1049770857" name="Optimization Level" superClass="gnu.c.compiler.option.optimization.level" valueType="enumerated"/>
|
||||
<option id="gnu.c.compiler.option.debugging.level.1354488968" name="Debug Level" superClass="gnu.c.compiler.option.debugging.level" value="gnu.c.debugging.level.none" valueType="enumerated"/>
|
||||
<inputType id="cdt.managedbuild.tool.gnu.c.compiler.input.674520633" superClass="cdt.managedbuild.tool.gnu.c.compiler.input"/>
|
||||
</tool>
|
||||
<tool id="cdt.managedbuild.tool.gnu.cross.cpp.compiler.568828285" name="Cross G++ Compiler" superClass="cdt.managedbuild.tool.gnu.cross.cpp.compiler">
|
||||
<option id="gnu.cpp.compiler.option.optimization.level.1042930447" name="Optimization Level" superClass="gnu.cpp.compiler.option.optimization.level" value="gnu.cpp.compiler.optimization.level.most" valueType="enumerated"/>
|
||||
<option id="gnu.cpp.compiler.option.debugging.level.305563840" name="Debug Level" superClass="gnu.cpp.compiler.option.debugging.level" value="gnu.cpp.compiler.debugging.level.none" valueType="enumerated"/>
|
||||
<inputType id="cdt.managedbuild.tool.gnu.cpp.compiler.input.1424960921" superClass="cdt.managedbuild.tool.gnu.cpp.compiler.input"/>
|
||||
</tool>
|
||||
<tool id="cdt.managedbuild.tool.gnu.cross.c.linker.460791828" name="Cross GCC Linker" superClass="cdt.managedbuild.tool.gnu.cross.c.linker"/>
|
||||
<tool id="cdt.managedbuild.tool.gnu.cross.cpp.linker.945282347" name="Cross G++ Linker" superClass="cdt.managedbuild.tool.gnu.cross.cpp.linker">
|
||||
<inputType id="cdt.managedbuild.tool.gnu.cpp.linker.input.561813601" superClass="cdt.managedbuild.tool.gnu.cpp.linker.input">
|
||||
<additionalInput kind="additionalinputdependency" paths="$(USER_OBJS)"/>
|
||||
<additionalInput kind="additionalinput" paths="$(LIBS)"/>
|
||||
</inputType>
|
||||
</tool>
|
||||
<tool id="cdt.managedbuild.tool.gnu.cross.archiver.1813861310" name="Cross GCC Archiver" superClass="cdt.managedbuild.tool.gnu.cross.archiver"/>
|
||||
<tool id="cdt.managedbuild.tool.gnu.cross.assembler.991451934" name="Cross GCC Assembler" superClass="cdt.managedbuild.tool.gnu.cross.assembler">
|
||||
<inputType id="cdt.managedbuild.tool.gnu.assembler.input.1702585996" superClass="cdt.managedbuild.tool.gnu.assembler.input"/>
|
||||
</tool>
|
||||
</toolChain>
|
||||
</folderInfo>
|
||||
</configuration>
|
||||
</storageModule>
|
||||
<storageModule moduleId="org.eclipse.cdt.core.externalSettings"/>
|
||||
</cconfiguration>
|
||||
</storageModule>
|
||||
<storageModule moduleId="cdtBuildSystem" version="4.0.0">
|
||||
<project id="mira.cdt.managedbuild.target.gnu.cross.exe.1862989567" name="Executable" projectType="cdt.managedbuild.target.gnu.cross.exe"/>
|
||||
</storageModule>
|
||||
<storageModule moduleId="scannerConfiguration">
|
||||
<autodiscovery enabled="true" problemReportingEnabled="true" selectedProfileId=""/>
|
||||
<scannerConfigBuildInfo instanceId="cdt.managedbuild.config.gnu.cross.exe.debug.1385309092;cdt.managedbuild.config.gnu.cross.exe.debug.1385309092.;cdt.managedbuild.tool.gnu.cross.c.compiler.1218877049;cdt.managedbuild.tool.gnu.c.compiler.input.1560615310">
|
||||
<autodiscovery enabled="true" problemReportingEnabled="true" selectedProfileId="org.eclipse.cdt.managedbuilder.core.GCCManagedMakePerProjectProfileC"/>
|
||||
</scannerConfigBuildInfo>
|
||||
<scannerConfigBuildInfo instanceId="cdt.managedbuild.config.gnu.cross.exe.release.2038764866;cdt.managedbuild.config.gnu.cross.exe.release.2038764866.;cdt.managedbuild.tool.gnu.cross.cpp.compiler.568828285;cdt.managedbuild.tool.gnu.cpp.compiler.input.1424960921">
|
||||
<autodiscovery enabled="true" problemReportingEnabled="true" selectedProfileId="org.eclipse.cdt.managedbuilder.core.GCCManagedMakePerProjectProfileCPP"/>
|
||||
</scannerConfigBuildInfo>
|
||||
<scannerConfigBuildInfo instanceId="cdt.managedbuild.config.gnu.cross.exe.debug.1385309092;cdt.managedbuild.config.gnu.cross.exe.debug.1385309092.;cdt.managedbuild.tool.gnu.cross.cpp.compiler.115638939;cdt.managedbuild.tool.gnu.cpp.compiler.input.1454738757">
|
||||
<autodiscovery enabled="true" problemReportingEnabled="true" selectedProfileId="org.eclipse.cdt.managedbuilder.core.GCCManagedMakePerProjectProfileCPP"/>
|
||||
</scannerConfigBuildInfo>
|
||||
<scannerConfigBuildInfo instanceId="cdt.managedbuild.config.gnu.cross.exe.release.2038764866;cdt.managedbuild.config.gnu.cross.exe.release.2038764866.;cdt.managedbuild.tool.gnu.cross.c.compiler.299271422;cdt.managedbuild.tool.gnu.c.compiler.input.674520633">
|
||||
<autodiscovery enabled="true" problemReportingEnabled="true" selectedProfileId="org.eclipse.cdt.managedbuilder.core.GCCManagedMakePerProjectProfileC"/>
|
||||
</scannerConfigBuildInfo>
|
||||
</storageModule>
|
||||
<storageModule moduleId="org.eclipse.cdt.core.LanguageSettingsProviders"/>
|
||||
<storageModule moduleId="refreshScope" versionNumber="2">
|
||||
<configuration configurationName="Release">
|
||||
<resource resourceType="PROJECT" workspacePath="/mira"/>
|
||||
</configuration>
|
||||
<configuration configurationName="Debug">
|
||||
<resource resourceType="PROJECT" workspacePath="/mira"/>
|
||||
</configuration>
|
||||
</storageModule>
|
||||
<storageModule moduleId="org.eclipse.cdt.internal.ui.text.commentOwnerProjectMappings"/>
|
||||
</cproject>
|
81
contrib/other-builds/mira/.project
Normal file
81
contrib/other-builds/mira/.project
Normal file
@ -0,0 +1,81 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<projectDescription>
|
||||
<name>mira</name>
|
||||
<comment></comment>
|
||||
<projects>
|
||||
<project>mert_lib</project>
|
||||
<project>moses</project>
|
||||
</projects>
|
||||
<buildSpec>
|
||||
<buildCommand>
|
||||
<name>org.eclipse.cdt.managedbuilder.core.genmakebuilder</name>
|
||||
<triggers>clean,full,incremental,</triggers>
|
||||
<arguments>
|
||||
</arguments>
|
||||
</buildCommand>
|
||||
<buildCommand>
|
||||
<name>org.eclipse.cdt.managedbuilder.core.ScannerConfigBuilder</name>
|
||||
<triggers>full,incremental,</triggers>
|
||||
<arguments>
|
||||
</arguments>
|
||||
</buildCommand>
|
||||
</buildSpec>
|
||||
<natures>
|
||||
<nature>org.eclipse.cdt.core.cnature</nature>
|
||||
<nature>org.eclipse.cdt.core.ccnature</nature>
|
||||
<nature>org.eclipse.cdt.managedbuilder.core.managedBuildNature</nature>
|
||||
<nature>org.eclipse.cdt.managedbuilder.core.ScannerConfigNature</nature>
|
||||
</natures>
|
||||
<linkedResources>
|
||||
<link>
|
||||
<name>Decoder.cpp</name>
|
||||
<type>1</type>
|
||||
<locationURI>PARENT-3-PROJECT_LOC/mira/Decoder.cpp</locationURI>
|
||||
</link>
|
||||
<link>
|
||||
<name>Decoder.h</name>
|
||||
<type>1</type>
|
||||
<locationURI>PARENT-3-PROJECT_LOC/mira/Decoder.h</locationURI>
|
||||
</link>
|
||||
<link>
|
||||
<name>Hildreth.cpp</name>
|
||||
<type>1</type>
|
||||
<locationURI>PARENT-3-PROJECT_LOC/mira/Hildreth.cpp</locationURI>
|
||||
</link>
|
||||
<link>
|
||||
<name>Hildreth.h</name>
|
||||
<type>1</type>
|
||||
<locationURI>PARENT-3-PROJECT_LOC/mira/Hildreth.h</locationURI>
|
||||
</link>
|
||||
<link>
|
||||
<name>HypothesisQueue.cpp</name>
|
||||
<type>1</type>
|
||||
<locationURI>PARENT-3-PROJECT_LOC/mira/HypothesisQueue.cpp</locationURI>
|
||||
</link>
|
||||
<link>
|
||||
<name>HypothesisQueue.h</name>
|
||||
<type>1</type>
|
||||
<locationURI>PARENT-3-PROJECT_LOC/mira/HypothesisQueue.h</locationURI>
|
||||
</link>
|
||||
<link>
|
||||
<name>Main.cpp</name>
|
||||
<type>1</type>
|
||||
<locationURI>PARENT-3-PROJECT_LOC/mira/Main.cpp</locationURI>
|
||||
</link>
|
||||
<link>
|
||||
<name>Main.h</name>
|
||||
<type>1</type>
|
||||
<locationURI>PARENT-3-PROJECT_LOC/mira/Main.h</locationURI>
|
||||
</link>
|
||||
<link>
|
||||
<name>MiraOptimiser.cpp</name>
|
||||
<type>1</type>
|
||||
<locationURI>PARENT-3-PROJECT_LOC/mira/MiraOptimiser.cpp</locationURI>
|
||||
</link>
|
||||
<link>
|
||||
<name>Perceptron.cpp</name>
|
||||
<type>1</type>
|
||||
<locationURI>PARENT-3-PROJECT_LOC/mira/Perceptron.cpp</locationURI>
|
||||
</link>
|
||||
</linkedResources>
|
||||
</projectDescription>
|
@ -1,7 +1,5 @@
|
||||
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||
<?fileVersion 4.0.0?>
|
||||
|
||||
<cproject storage_type_id="org.eclipse.cdt.core.XmlProjectDescriptionStorage">
|
||||
<?fileVersion 4.0.0?><cproject storage_type_id="org.eclipse.cdt.core.XmlProjectDescriptionStorage">
|
||||
<storageModule moduleId="org.eclipse.cdt.core.settings">
|
||||
<cconfiguration id="cdt.managedbuild.config.gnu.exe.debug.162355801">
|
||||
<storageModule buildSystemId="org.eclipse.cdt.managedbuilder.core.configurationDataProvider" id="cdt.managedbuild.config.gnu.exe.debug.162355801" moduleId="org.eclipse.cdt.core.settings" name="Debug">
|
||||
@ -35,7 +33,6 @@
|
||||
<option id="gnu.cpp.compiler.option.preprocessor.def.1785368241" name="Defined symbols (-D)" superClass="gnu.cpp.compiler.option.preprocessor.def" valueType="definedSymbols">
|
||||
<listOptionValue builtIn="false" value="HAVE_BOOST"/>
|
||||
<listOptionValue builtIn="false" value="TRACE_ENABLE"/>
|
||||
<listOptionValue builtIn="false" value="HAVE_CMPH"/>
|
||||
<listOptionValue builtIn="false" value="KENLM_MAX_ORDER=7"/>
|
||||
<listOptionValue builtIn="false" value="WITH_THREADS"/>
|
||||
<listOptionValue builtIn="false" value="MAX_NUM_FACTORS=4"/>
|
||||
@ -50,7 +47,9 @@
|
||||
<tool id="cdt.managedbuild.tool.gnu.c.linker.exe.debug.755343734" name="GCC C Linker" superClass="cdt.managedbuild.tool.gnu.c.linker.exe.debug"/>
|
||||
<tool id="cdt.managedbuild.tool.gnu.cpp.linker.exe.debug.816413868" name="GCC C++ Linker" superClass="cdt.managedbuild.tool.gnu.cpp.linker.exe.debug">
|
||||
<option id="gnu.cpp.link.option.paths.330225535" name="Library search path (-L)" superClass="gnu.cpp.link.option.paths" valueType="libPaths">
|
||||
<listOptionValue builtIn="false" value=""${workspace_loc:}/../../nplm/lib""/>
|
||||
<listOptionValue builtIn="false" value=""${workspace_loc:}/../../boost/lib64""/>
|
||||
<listOptionValue builtIn="false" value=""${workspace_loc:}/../../DALM/lib""/>
|
||||
<listOptionValue builtIn="false" value=""${workspace_loc:}/../../cmph/lib""/>
|
||||
<listOptionValue builtIn="false" value=""${workspace_loc:}/../../boost/lib""/>
|
||||
<listOptionValue builtIn="false" value=""${workspace_loc:}/../../boost/lib64""/>
|
||||
@ -67,26 +66,29 @@
|
||||
<listOptionValue builtIn="false" value="/opt/local/lib"/>
|
||||
</option>
|
||||
<option id="gnu.cpp.link.option.libs.1177721357" name="Libraries (-l)" superClass="gnu.cpp.link.option.libs" valueType="libs">
|
||||
<listOptionValue builtIn="false" value="moses"/>
|
||||
<listOptionValue builtIn="false" value="irstlm"/>
|
||||
<listOptionValue builtIn="false" value="dstruct"/>
|
||||
<listOptionValue builtIn="false" value="dalm"/>
|
||||
<listOptionValue builtIn="false" value="MurmurHash3"/>
|
||||
<listOptionValue builtIn="false" value="flm"/>
|
||||
<listOptionValue builtIn="false" value="oolm"/>
|
||||
<listOptionValue builtIn="false" value="lattice"/>
|
||||
<listOptionValue builtIn="false" value="misc"/>
|
||||
<listOptionValue builtIn="false" value="moses"/>
|
||||
<listOptionValue builtIn="false" value="search"/>
|
||||
<listOptionValue builtIn="false" value="irstlm"/>
|
||||
<listOptionValue builtIn="false" value="RandLM"/>
|
||||
<listOptionValue builtIn="false" value="OnDiskPt"/>
|
||||
<listOptionValue builtIn="false" value="lm"/>
|
||||
<listOptionValue builtIn="false" value="util"/>
|
||||
<listOptionValue builtIn="false" value="RandLM"/>
|
||||
<listOptionValue builtIn="false" value="boost_iostreams-mt"/>
|
||||
<listOptionValue builtIn="false" value="boost_system-mt"/>
|
||||
<listOptionValue builtIn="false" value="boost_thread-mt"/>
|
||||
<listOptionValue builtIn="false" value="boost_filesystem-mt"/>
|
||||
<listOptionValue builtIn="false" value="cmph"/>
|
||||
<listOptionValue builtIn="false" value="pthread"/>
|
||||
<listOptionValue builtIn="false" value="z"/>
|
||||
<listOptionValue builtIn="false" value="bz2"/>
|
||||
<listOptionValue builtIn="false" value="dl"/>
|
||||
<listOptionValue builtIn="false" value="rt"/>
|
||||
</option>
|
||||
<inputType id="cdt.managedbuild.tool.gnu.cpp.linker.input.128214028" superClass="cdt.managedbuild.tool.gnu.cpp.linker.input">
|
||||
<additionalInput kind="additionalinputdependency" paths="$(USER_OBJS)"/>
|
||||
|
@ -1,7 +1,5 @@
|
||||
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||
<?fileVersion 4.0.0?>
|
||||
|
||||
<cproject storage_type_id="org.eclipse.cdt.core.XmlProjectDescriptionStorage">
|
||||
<?fileVersion 4.0.0?><cproject storage_type_id="org.eclipse.cdt.core.XmlProjectDescriptionStorage">
|
||||
<storageModule moduleId="org.eclipse.cdt.core.settings">
|
||||
<cconfiguration id="cdt.managedbuild.config.gnu.exe.debug.461114338">
|
||||
<storageModule buildSystemId="org.eclipse.cdt.managedbuilder.core.configurationDataProvider" id="cdt.managedbuild.config.gnu.exe.debug.461114338" moduleId="org.eclipse.cdt.core.settings" name="Debug">
|
||||
@ -49,6 +47,8 @@
|
||||
<tool id="cdt.managedbuild.tool.gnu.cpp.linker.exe.debug.1546774818" name="GCC C++ Linker" superClass="cdt.managedbuild.tool.gnu.cpp.linker.exe.debug">
|
||||
<option id="gnu.cpp.link.option.paths.523170942" name="Library search path (-L)" superClass="gnu.cpp.link.option.paths" valueType="libPaths">
|
||||
<listOptionValue builtIn="false" value=""${workspace_loc:}/../../irstlm/lib""/>
|
||||
<listOptionValue builtIn="false" value=""${workspace_loc:}/../../DALM/lib""/>
|
||||
<listOptionValue builtIn="false" value=""${workspace_loc:}/../../nplm/lib""/>
|
||||
<listOptionValue builtIn="false" value=""${workspace_loc:}/../../randlm/lib""/>
|
||||
<listOptionValue builtIn="false" value=""${workspace_loc:}/../../cmph/lib""/>
|
||||
<listOptionValue builtIn="false" value=""${workspace_loc:}/../../boost/lib64""/>
|
||||
@ -63,26 +63,29 @@
|
||||
<listOptionValue builtIn="false" value="/opt/local/lib"/>
|
||||
</option>
|
||||
<option id="gnu.cpp.link.option.libs.998577284" name="Libraries (-l)" superClass="gnu.cpp.link.option.libs" valueType="libs">
|
||||
<listOptionValue builtIn="false" value="moses"/>
|
||||
<listOptionValue builtIn="false" value="irstlm"/>
|
||||
<listOptionValue builtIn="false" value="dstruct"/>
|
||||
<listOptionValue builtIn="false" value="flm"/>
|
||||
<listOptionValue builtIn="false" value="oolm"/>
|
||||
<listOptionValue builtIn="false" value="lattice"/>
|
||||
<listOptionValue builtIn="false" value="misc"/>
|
||||
<listOptionValue builtIn="false" value="moses"/>
|
||||
<listOptionValue builtIn="false" value="dalm"/>
|
||||
<listOptionValue builtIn="false" value="MurmurHash3"/>
|
||||
<listOptionValue builtIn="false" value="search"/>
|
||||
<listOptionValue builtIn="false" value="irstlm"/>
|
||||
<listOptionValue builtIn="false" value="RandLM"/>
|
||||
<listOptionValue builtIn="false" value="OnDiskPt"/>
|
||||
<listOptionValue builtIn="false" value="lm"/>
|
||||
<listOptionValue builtIn="false" value="util"/>
|
||||
<listOptionValue builtIn="false" value="RandLM"/>
|
||||
<listOptionValue builtIn="false" value="boost_iostreams-mt"/>
|
||||
<listOptionValue builtIn="false" value="boost_system-mt"/>
|
||||
<listOptionValue builtIn="false" value="boost_thread-mt"/>
|
||||
<listOptionValue builtIn="false" value="boost_filesystem-mt"/>
|
||||
<listOptionValue builtIn="false" value="cmph"/>
|
||||
<listOptionValue builtIn="false" value="pthread"/>
|
||||
<listOptionValue builtIn="false" value="z"/>
|
||||
<listOptionValue builtIn="false" value="bz2"/>
|
||||
<listOptionValue builtIn="false" value="dl"/>
|
||||
<listOptionValue builtIn="false" value="rt"/>
|
||||
</option>
|
||||
<option id="gnu.cpp.link.option.userobjs.1542590830" name="Other objects" superClass="gnu.cpp.link.option.userobjs"/>
|
||||
<inputType id="cdt.managedbuild.tool.gnu.cpp.linker.input.983725033" superClass="cdt.managedbuild.tool.gnu.cpp.linker.input">
|
||||
|
@ -34,20 +34,25 @@
|
||||
<listOptionValue builtIn="false" value=""${workspace_loc}/../../cmph/include""/>
|
||||
<listOptionValue builtIn="false" value="/opt/local/include/"/>
|
||||
<listOptionValue builtIn="false" value="${workspace_loc}/../../irstlm/include"/>
|
||||
<listOptionValue builtIn="false" value=""${workspace_loc}/../../nplm/src""/>
|
||||
<listOptionValue builtIn="false" value=""${workspace_loc}/../../eigen""/>
|
||||
<listOptionValue builtIn="false" value="${workspace_loc}/../../srilm/include"/>
|
||||
<listOptionValue builtIn="false" value=""${workspace_loc}/../../DALM/include""/>
|
||||
<listOptionValue builtIn="false" value=""${workspace_loc}/../../DALM/darts-clone""/>
|
||||
<listOptionValue builtIn="false" value=""${workspace_loc}/../../randlm/include/RandLM""/>
|
||||
<listOptionValue builtIn="false" value="${workspace_loc}/../../"/>
|
||||
</option>
|
||||
<option id="gnu.cpp.compiler.option.preprocessor.def.752586397" name="Defined symbols (-D)" superClass="gnu.cpp.compiler.option.preprocessor.def" valueType="definedSymbols">
|
||||
<listOptionValue builtIn="false" value="IS_ECLIPSE"/>
|
||||
<listOptionValue builtIn="false" value="HAVE_CMPH"/>
|
||||
<listOptionValue builtIn="false" value="HAVE_BOOST"/>
|
||||
<listOptionValue builtIn="false" value="MAX_NUM_FACTORS=4"/>
|
||||
<listOptionValue builtIn="false" value="WITH_THREADS"/>
|
||||
<listOptionValue builtIn="false" value="KENLM_MAX_ORDER=7"/>
|
||||
<listOptionValue builtIn="false" value="TRACE_ENABLE"/>
|
||||
<listOptionValue builtIn="false" value="LM_DALM"/>
|
||||
<listOptionValue builtIn="false" value="LM_IRST"/>
|
||||
<listOptionValue builtIn="false" value="LM_RAND"/>
|
||||
<listOptionValue builtIn="false" value="LM_NPLM"/>
|
||||
<listOptionValue builtIn="false" value="_FILE_OFFSET_BIT=64"/>
|
||||
<listOptionValue builtIn="false" value="_LARGE_FILES"/>
|
||||
</option>
|
||||
@ -71,11 +76,9 @@
|
||||
</toolChain>
|
||||
</folderInfo>
|
||||
<fileInfo id="cdt.managedbuild.config.gnu.exe.debug.656913512.511477442" name="Rand.h" rcbsApplicability="disable" resourcePath="LM/Rand.h" toolsToInvoke=""/>
|
||||
<fileInfo id="cdt.managedbuild.config.gnu.exe.debug.656913512.1742823107" name="ChartTranslationOption.cpp" rcbsApplicability="disable" resourcePath="ChartTranslationOption.cpp" toolsToInvoke="cdt.managedbuild.tool.gnu.cpp.compiler.exe.debug.1774992327.1616881050">
|
||||
<tool id="cdt.managedbuild.tool.gnu.cpp.compiler.exe.debug.1774992327.1616881050" name="GCC C++ Compiler" superClass="cdt.managedbuild.tool.gnu.cpp.compiler.exe.debug.1774992327"/>
|
||||
</fileInfo>
|
||||
<fileInfo id="cdt.managedbuild.config.gnu.exe.debug.656913512.790052015" name="IRST.h" rcbsApplicability="disable" resourcePath="LM/IRST.h" toolsToInvoke=""/>
|
||||
<sourceEntries>
|
||||
<entry excluding="FF/PhraseLengthFeatureTest.cpp|PhraseLengthFeatureTest.cpp|LM/BackwardTest.cpp|LM/BackwardLMState.h|LM/BackwardLMState.cpp|LM/Backward.h|LM/Backward.cpp|FeatureVectorTest.cpp|LM/ParallelBackoff.h|LM/ParallelBackoff.cpp|src/SyntacticLanguageModelState.h|src/SyntacticLanguageModelFiles.h|src/SyntacticLanguageModel.h|src/SyntacticLanguageModel.cpp|src/LM/SRI.h|src/LM/SRI.cpp|src/LM/Rand.h|src/LM/Rand.cpp|src/LM/LDHT.h|src/LM/LDHT.cpp|SyntacticLanguageModelState.h|SyntacticLanguageModelFiles.h|SyntacticLanguageModel.h|SyntacticLanguageModel.cpp|LM/LDHT.h|LM/LDHT.cpp" flags="VALUE_WORKSPACE_PATH|RESOLVED" kind="sourcePath" name=""/>
|
||||
<entry excluding="TranslationModel/CompactPT|LM/NeuralLMWrapper.cpp|FF/PhraseLengthFeatureTest.cpp|PhraseLengthFeatureTest.cpp|LM/BackwardTest.cpp|LM/BackwardLMState.h|LM/BackwardLMState.cpp|LM/Backward.h|LM/Backward.cpp|FeatureVectorTest.cpp|LM/ParallelBackoff.h|LM/ParallelBackoff.cpp|src/SyntacticLanguageModelState.h|src/SyntacticLanguageModelFiles.h|src/SyntacticLanguageModel.h|src/SyntacticLanguageModel.cpp|src/LM/SRI.h|src/LM/SRI.cpp|src/LM/Rand.h|src/LM/Rand.cpp|src/LM/LDHT.h|src/LM/LDHT.cpp|SyntacticLanguageModelState.h|SyntacticLanguageModelFiles.h|SyntacticLanguageModel.h|SyntacticLanguageModel.cpp|LM/LDHT.h|LM/LDHT.cpp" flags="VALUE_WORKSPACE_PATH|RESOLVED" kind="sourcePath" name=""/>
|
||||
</sourceEntries>
|
||||
</configuration>
|
||||
</storageModule>
|
||||
|
@ -871,6 +871,16 @@
|
||||
<type>1</type>
|
||||
<locationURI>PARENT-3-PROJECT_LOC/moses/TranslationOptionCollectionConfusionNet.h</locationURI>
|
||||
</link>
|
||||
<link>
|
||||
<name>TranslationOptionCollectionLattice.cpp</name>
|
||||
<type>1</type>
|
||||
<locationURI>PARENT-3-PROJECT_LOC/moses/TranslationOptionCollectionLattice.cpp</locationURI>
|
||||
</link>
|
||||
<link>
|
||||
<name>TranslationOptionCollectionLattice.h</name>
|
||||
<type>1</type>
|
||||
<locationURI>PARENT-3-PROJECT_LOC/moses/TranslationOptionCollectionLattice.h</locationURI>
|
||||
</link>
|
||||
<link>
|
||||
<name>TranslationOptionCollectionText.cpp</name>
|
||||
<type>1</type>
|
||||
@ -1036,6 +1046,16 @@
|
||||
<type>1</type>
|
||||
<locationURI>PARENT-3-PROJECT_LOC/moses/FF/BleuScoreFeature.h</locationURI>
|
||||
</link>
|
||||
<link>
|
||||
<name>FF/ConstrainedDecoding.cpp</name>
|
||||
<type>1</type>
|
||||
<locationURI>PARENT-3-PROJECT_LOC/moses/FF/ConstrainedDecoding.cpp</locationURI>
|
||||
</link>
|
||||
<link>
|
||||
<name>FF/ConstrainedDecoding.h</name>
|
||||
<type>1</type>
|
||||
<locationURI>PARENT-3-PROJECT_LOC/moses/FF/ConstrainedDecoding.h</locationURI>
|
||||
</link>
|
||||
<link>
|
||||
<name>FF/ControlRecombination.cpp</name>
|
||||
<type>1</type>
|
||||
@ -1046,6 +1066,16 @@
|
||||
<type>1</type>
|
||||
<locationURI>PARENT-3-PROJECT_LOC/moses/FF/ControlRecombination.h</locationURI>
|
||||
</link>
|
||||
<link>
|
||||
<name>FF/CoveredReferenceFeature.cpp</name>
|
||||
<type>1</type>
|
||||
<locationURI>PARENT-3-PROJECT_LOC/moses/FF/CoveredReferenceFeature.cpp</locationURI>
|
||||
</link>
|
||||
<link>
|
||||
<name>FF/CoveredReferenceFeature.h</name>
|
||||
<type>1</type>
|
||||
<locationURI>PARENT-3-PROJECT_LOC/moses/FF/CoveredReferenceFeature.h</locationURI>
|
||||
</link>
|
||||
<link>
|
||||
<name>FF/DecodeFeature.cpp</name>
|
||||
<type>1</type>
|
||||
@ -1136,6 +1166,16 @@
|
||||
<type>1</type>
|
||||
<locationURI>PARENT-3-PROJECT_LOC/moses/FF/InputFeature.h</locationURI>
|
||||
</link>
|
||||
<link>
|
||||
<name>FF/InternalStructStatelessFF.cpp</name>
|
||||
<type>1</type>
|
||||
<locationURI>PARENT-3-PROJECT_LOC/moses/FF/InternalStructStatelessFF.cpp</locationURI>
|
||||
</link>
|
||||
<link>
|
||||
<name>FF/InternalStructStatelessFF.h</name>
|
||||
<type>1</type>
|
||||
<locationURI>PARENT-3-PROJECT_LOC/moses/FF/InternalStructStatelessFF.h</locationURI>
|
||||
</link>
|
||||
<link>
|
||||
<name>FF/LexicalReordering</name>
|
||||
<type>2</type>
|
||||
@ -1341,6 +1381,16 @@
|
||||
<type>1</type>
|
||||
<locationURI>PARENT-3-PROJECT_LOC/moses/LM/ChartState.h</locationURI>
|
||||
</link>
|
||||
<link>
|
||||
<name>LM/DALMWrapper.cpp</name>
|
||||
<type>1</type>
|
||||
<locationURI>PARENT-3-PROJECT_LOC/moses/LM/DALMWrapper.cpp</locationURI>
|
||||
</link>
|
||||
<link>
|
||||
<name>LM/DALMWrapper.h</name>
|
||||
<type>1</type>
|
||||
<locationURI>PARENT-3-PROJECT_LOC/moses/LM/DALMWrapper.h</locationURI>
|
||||
</link>
|
||||
<link>
|
||||
<name>LM/IRST.cpp</name>
|
||||
<type>1</type>
|
||||
@ -1406,6 +1456,16 @@
|
||||
<type>1</type>
|
||||
<locationURI>PARENT-3-PROJECT_LOC/moses/LM/MultiFactor.h</locationURI>
|
||||
</link>
|
||||
<link>
|
||||
<name>LM/NeuralLMWrapper.cpp</name>
|
||||
<type>1</type>
|
||||
<locationURI>PARENT-3-PROJECT_LOC/moses/LM/NeuralLMWrapper.cpp</locationURI>
|
||||
</link>
|
||||
<link>
|
||||
<name>LM/NeuralLMWrapper.h</name>
|
||||
<type>1</type>
|
||||
<locationURI>PARENT-3-PROJECT_LOC/moses/LM/NeuralLMWrapper.h</locationURI>
|
||||
</link>
|
||||
<link>
|
||||
<name>LM/ORLM.cpp</name>
|
||||
<type>1</type>
|
||||
@ -1471,6 +1531,16 @@
|
||||
<type>1</type>
|
||||
<locationURI>PARENT-3-PROJECT_LOC/moses/LM/SingleFactor.h</locationURI>
|
||||
</link>
|
||||
<link>
|
||||
<name>LM/SkeletonLM.cpp</name>
|
||||
<type>1</type>
|
||||
<locationURI>PARENT-3-PROJECT_LOC/moses/LM/SkeletonLM.cpp</locationURI>
|
||||
</link>
|
||||
<link>
|
||||
<name>LM/SkeletonLM.h</name>
|
||||
<type>1</type>
|
||||
<locationURI>PARENT-3-PROJECT_LOC/moses/LM/SkeletonLM.h</locationURI>
|
||||
</link>
|
||||
<link>
|
||||
<name>LM/backward.arpa</name>
|
||||
<type>1</type>
|
||||
@ -1571,6 +1641,26 @@
|
||||
<type>1</type>
|
||||
<locationURI>PARENT-3-PROJECT_LOC/moses/TranslationModel/PhraseDictionaryNodeMemory.h</locationURI>
|
||||
</link>
|
||||
<link>
|
||||
<name>TranslationModel/PhraseDictionaryScope3.cpp</name>
|
||||
<type>1</type>
|
||||
<locationURI>PARENT-3-PROJECT_LOC/moses/TranslationModel/PhraseDictionaryScope3.cpp</locationURI>
|
||||
</link>
|
||||
<link>
|
||||
<name>TranslationModel/PhraseDictionaryScope3.h</name>
|
||||
<type>1</type>
|
||||
<locationURI>PARENT-3-PROJECT_LOC/moses/TranslationModel/PhraseDictionaryScope3.h</locationURI>
|
||||
</link>
|
||||
<link>
|
||||
<name>TranslationModel/PhraseDictionaryTransliteration.cpp</name>
|
||||
<type>1</type>
|
||||
<locationURI>PARENT-3-PROJECT_LOC/moses/TranslationModel/PhraseDictionaryTransliteration.cpp</locationURI>
|
||||
</link>
|
||||
<link>
|
||||
<name>TranslationModel/PhraseDictionaryTransliteration.h</name>
|
||||
<type>1</type>
|
||||
<locationURI>PARENT-3-PROJECT_LOC/moses/TranslationModel/PhraseDictionaryTransliteration.h</locationURI>
|
||||
</link>
|
||||
<link>
|
||||
<name>TranslationModel/PhraseDictionaryTree.cpp</name>
|
||||
<type>1</type>
|
||||
@ -1601,6 +1691,16 @@
|
||||
<type>2</type>
|
||||
<locationURI>virtual:/virtual</locationURI>
|
||||
</link>
|
||||
<link>
|
||||
<name>TranslationModel/SkeletonPT.cpp</name>
|
||||
<type>1</type>
|
||||
<locationURI>PARENT-3-PROJECT_LOC/moses/TranslationModel/SkeletonPT.cpp</locationURI>
|
||||
</link>
|
||||
<link>
|
||||
<name>TranslationModel/SkeletonPT.h</name>
|
||||
<type>1</type>
|
||||
<locationURI>PARENT-3-PROJECT_LOC/moses/TranslationModel/SkeletonPT.h</locationURI>
|
||||
</link>
|
||||
<link>
|
||||
<name>TranslationModel/WordCoocTable.cpp</name>
|
||||
<type>1</type>
|
||||
@ -1726,6 +1826,16 @@
|
||||
<type>1</type>
|
||||
<locationURI>PARENT-3-PROJECT_LOC/moses/TranslationModel/CYKPlusParser/ChartRuleLookupManagerOnDisk.h</locationURI>
|
||||
</link>
|
||||
<link>
|
||||
<name>TranslationModel/CYKPlusParser/ChartRuleLookupManagerSkeleton.cpp</name>
|
||||
<type>1</type>
|
||||
<locationURI>PARENT-3-PROJECT_LOC/moses/TranslationModel/CYKPlusParser/ChartRuleLookupManagerSkeleton.cpp</locationURI>
|
||||
</link>
|
||||
<link>
|
||||
<name>TranslationModel/CYKPlusParser/ChartRuleLookupManagerSkeleton.h</name>
|
||||
<type>1</type>
|
||||
<locationURI>PARENT-3-PROJECT_LOC/moses/TranslationModel/CYKPlusParser/ChartRuleLookupManagerSkeleton.h</locationURI>
|
||||
</link>
|
||||
<link>
|
||||
<name>TranslationModel/CYKPlusParser/DotChart.h</name>
|
||||
<type>1</type>
|
||||
|
128
contrib/other-builds/score/.cproject
Normal file
128
contrib/other-builds/score/.cproject
Normal file
@ -0,0 +1,128 @@
|
||||
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||
<?fileVersion 4.0.0?><cproject storage_type_id="org.eclipse.cdt.core.XmlProjectDescriptionStorage">
|
||||
<storageModule moduleId="org.eclipse.cdt.core.settings">
|
||||
<cconfiguration id="cdt.managedbuild.config.gnu.cross.exe.debug.634831890">
|
||||
<storageModule buildSystemId="org.eclipse.cdt.managedbuilder.core.configurationDataProvider" id="cdt.managedbuild.config.gnu.cross.exe.debug.634831890" moduleId="org.eclipse.cdt.core.settings" name="Debug">
|
||||
<externalSettings/>
|
||||
<extensions>
|
||||
<extension id="org.eclipse.cdt.core.ELF" point="org.eclipse.cdt.core.BinaryParser"/>
|
||||
<extension id="org.eclipse.cdt.core.GmakeErrorParser" point="org.eclipse.cdt.core.ErrorParser"/>
|
||||
<extension id="org.eclipse.cdt.core.CWDLocator" point="org.eclipse.cdt.core.ErrorParser"/>
|
||||
<extension id="org.eclipse.cdt.core.GCCErrorParser" point="org.eclipse.cdt.core.ErrorParser"/>
|
||||
<extension id="org.eclipse.cdt.core.GASErrorParser" point="org.eclipse.cdt.core.ErrorParser"/>
|
||||
<extension id="org.eclipse.cdt.core.GLDErrorParser" point="org.eclipse.cdt.core.ErrorParser"/>
|
||||
</extensions>
|
||||
</storageModule>
|
||||
<storageModule moduleId="cdtBuildSystem" version="4.0.0">
|
||||
<configuration artifactName="${ProjName}" buildArtefactType="org.eclipse.cdt.build.core.buildArtefactType.exe" buildProperties="org.eclipse.cdt.build.core.buildType=org.eclipse.cdt.build.core.buildType.debug,org.eclipse.cdt.build.core.buildArtefactType=org.eclipse.cdt.build.core.buildArtefactType.exe" cleanCommand="rm -rf" description="" id="cdt.managedbuild.config.gnu.cross.exe.debug.634831890" name="Debug" parent="cdt.managedbuild.config.gnu.cross.exe.debug">
|
||||
<folderInfo id="cdt.managedbuild.config.gnu.cross.exe.debug.634831890." name="/" resourcePath="">
|
||||
<toolChain id="cdt.managedbuild.toolchain.gnu.cross.exe.debug.1361730953" name="Cross GCC" superClass="cdt.managedbuild.toolchain.gnu.cross.exe.debug">
|
||||
<targetPlatform archList="all" binaryParser="org.eclipse.cdt.core.ELF" id="cdt.managedbuild.targetPlatform.gnu.cross.2040884960" isAbstract="false" osList="all" superClass="cdt.managedbuild.targetPlatform.gnu.cross"/>
|
||||
<builder buildPath="${workspace_loc:/score/Debug}" id="cdt.managedbuild.builder.gnu.cross.1709170788" keepEnvironmentInBuildfile="false" managedBuildOn="true" name="Gnu Make Builder" superClass="cdt.managedbuild.builder.gnu.cross"/>
|
||||
<tool id="cdt.managedbuild.tool.gnu.cross.c.compiler.786339685" name="Cross GCC Compiler" superClass="cdt.managedbuild.tool.gnu.cross.c.compiler">
|
||||
<option defaultValue="gnu.c.optimization.level.none" id="gnu.c.compiler.option.optimization.level.1516054114" name="Optimization Level" superClass="gnu.c.compiler.option.optimization.level" valueType="enumerated"/>
|
||||
<option id="gnu.c.compiler.option.debugging.level.1061705384" name="Debug Level" superClass="gnu.c.compiler.option.debugging.level" value="gnu.c.debugging.level.max" valueType="enumerated"/>
|
||||
<inputType id="cdt.managedbuild.tool.gnu.c.compiler.input.2108019237" superClass="cdt.managedbuild.tool.gnu.c.compiler.input"/>
|
||||
</tool>
|
||||
<tool id="cdt.managedbuild.tool.gnu.cross.cpp.compiler.1013232238" name="Cross G++ Compiler" superClass="cdt.managedbuild.tool.gnu.cross.cpp.compiler">
|
||||
<option id="gnu.cpp.compiler.option.optimization.level.1874109813" name="Optimization Level" superClass="gnu.cpp.compiler.option.optimization.level" value="gnu.cpp.compiler.optimization.level.none" valueType="enumerated"/>
|
||||
<option id="gnu.cpp.compiler.option.debugging.level.2032778777" name="Debug Level" superClass="gnu.cpp.compiler.option.debugging.level" value="gnu.cpp.compiler.debugging.level.max" valueType="enumerated"/>
|
||||
<option id="gnu.cpp.compiler.option.include.paths.1713606194" name="Include paths (-I)" superClass="gnu.cpp.compiler.option.include.paths" valueType="includePath">
|
||||
<listOptionValue builtIn="false" value=""${workspace_loc}/../../boost/include""/>
|
||||
<listOptionValue builtIn="false" value=""${workspace_loc}/../../""/>
|
||||
</option>
|
||||
<inputType id="cdt.managedbuild.tool.gnu.cpp.compiler.input.509920006" superClass="cdt.managedbuild.tool.gnu.cpp.compiler.input"/>
|
||||
</tool>
|
||||
<tool id="cdt.managedbuild.tool.gnu.cross.c.linker.1279743060" name="Cross GCC Linker" superClass="cdt.managedbuild.tool.gnu.cross.c.linker"/>
|
||||
<tool id="cdt.managedbuild.tool.gnu.cross.cpp.linker.1563503789" name="Cross G++ Linker" superClass="cdt.managedbuild.tool.gnu.cross.cpp.linker">
|
||||
<option id="gnu.cpp.link.option.paths.1704292838" name="Library search path (-L)" superClass="gnu.cpp.link.option.paths" valueType="libPaths">
|
||||
<listOptionValue builtIn="false" value=""${workspace_loc:}/../../boost/lib64""/>
|
||||
</option>
|
||||
<option id="gnu.cpp.link.option.libs.936233947" name="Libraries (-l)" superClass="gnu.cpp.link.option.libs" valueType="libs">
|
||||
<listOptionValue builtIn="false" value="z"/>
|
||||
<listOptionValue builtIn="false" value="boost_iostreams-mt"/>
|
||||
<listOptionValue builtIn="false" value="boost_system-mt"/>
|
||||
<listOptionValue builtIn="false" value="boost_filesystem-mt"/>
|
||||
</option>
|
||||
<inputType id="cdt.managedbuild.tool.gnu.cpp.linker.input.589709979" superClass="cdt.managedbuild.tool.gnu.cpp.linker.input">
|
||||
<additionalInput kind="additionalinputdependency" paths="$(USER_OBJS)"/>
|
||||
<additionalInput kind="additionalinput" paths="$(LIBS)"/>
|
||||
</inputType>
|
||||
</tool>
|
||||
<tool id="cdt.managedbuild.tool.gnu.cross.archiver.1829423265" name="Cross GCC Archiver" superClass="cdt.managedbuild.tool.gnu.cross.archiver"/>
|
||||
<tool id="cdt.managedbuild.tool.gnu.cross.assembler.52947560" name="Cross GCC Assembler" superClass="cdt.managedbuild.tool.gnu.cross.assembler">
|
||||
<inputType id="cdt.managedbuild.tool.gnu.assembler.input.1165474354" superClass="cdt.managedbuild.tool.gnu.assembler.input"/>
|
||||
</tool>
|
||||
</toolChain>
|
||||
</folderInfo>
|
||||
</configuration>
|
||||
</storageModule>
|
||||
<storageModule moduleId="org.eclipse.cdt.core.externalSettings"/>
|
||||
</cconfiguration>
|
||||
<cconfiguration id="cdt.managedbuild.config.gnu.cross.exe.release.1994357180">
|
||||
<storageModule buildSystemId="org.eclipse.cdt.managedbuilder.core.configurationDataProvider" id="cdt.managedbuild.config.gnu.cross.exe.release.1994357180" moduleId="org.eclipse.cdt.core.settings" name="Release">
|
||||
<externalSettings/>
|
||||
<extensions>
|
||||
<extension id="org.eclipse.cdt.core.ELF" point="org.eclipse.cdt.core.BinaryParser"/>
|
||||
<extension id="org.eclipse.cdt.core.GmakeErrorParser" point="org.eclipse.cdt.core.ErrorParser"/>
|
||||
<extension id="org.eclipse.cdt.core.CWDLocator" point="org.eclipse.cdt.core.ErrorParser"/>
|
||||
<extension id="org.eclipse.cdt.core.GCCErrorParser" point="org.eclipse.cdt.core.ErrorParser"/>
|
||||
<extension id="org.eclipse.cdt.core.GASErrorParser" point="org.eclipse.cdt.core.ErrorParser"/>
|
||||
<extension id="org.eclipse.cdt.core.GLDErrorParser" point="org.eclipse.cdt.core.ErrorParser"/>
|
||||
</extensions>
|
||||
</storageModule>
|
||||
<storageModule moduleId="cdtBuildSystem" version="4.0.0">
|
||||
<configuration artifactName="${ProjName}" buildArtefactType="org.eclipse.cdt.build.core.buildArtefactType.exe" buildProperties="org.eclipse.cdt.build.core.buildType=org.eclipse.cdt.build.core.buildType.release,org.eclipse.cdt.build.core.buildArtefactType=org.eclipse.cdt.build.core.buildArtefactType.exe" cleanCommand="rm -rf" description="" id="cdt.managedbuild.config.gnu.cross.exe.release.1994357180" name="Release" parent="cdt.managedbuild.config.gnu.cross.exe.release">
|
||||
<folderInfo id="cdt.managedbuild.config.gnu.cross.exe.release.1994357180." name="/" resourcePath="">
|
||||
<toolChain id="cdt.managedbuild.toolchain.gnu.cross.exe.release.743463783" name="Cross GCC" superClass="cdt.managedbuild.toolchain.gnu.cross.exe.release">
|
||||
<targetPlatform archList="all" binaryParser="org.eclipse.cdt.core.ELF" id="cdt.managedbuild.targetPlatform.gnu.cross.1353054437" isAbstract="false" osList="all" superClass="cdt.managedbuild.targetPlatform.gnu.cross"/>
|
||||
<builder buildPath="${workspace_loc:/score/Release}" id="cdt.managedbuild.builder.gnu.cross.1851758128" keepEnvironmentInBuildfile="false" managedBuildOn="true" name="Gnu Make Builder" superClass="cdt.managedbuild.builder.gnu.cross"/>
|
||||
<tool id="cdt.managedbuild.tool.gnu.cross.c.compiler.323743241" name="Cross GCC Compiler" superClass="cdt.managedbuild.tool.gnu.cross.c.compiler">
|
||||
<option defaultValue="gnu.c.optimization.level.most" id="gnu.c.compiler.option.optimization.level.534423111" name="Optimization Level" superClass="gnu.c.compiler.option.optimization.level" valueType="enumerated"/>
|
||||
<option id="gnu.c.compiler.option.debugging.level.518786530" name="Debug Level" superClass="gnu.c.compiler.option.debugging.level" value="gnu.c.debugging.level.none" valueType="enumerated"/>
|
||||
<inputType id="cdt.managedbuild.tool.gnu.c.compiler.input.392640311" superClass="cdt.managedbuild.tool.gnu.c.compiler.input"/>
|
||||
</tool>
|
||||
<tool id="cdt.managedbuild.tool.gnu.cross.cpp.compiler.307472312" name="Cross G++ Compiler" superClass="cdt.managedbuild.tool.gnu.cross.cpp.compiler">
|
||||
<option id="gnu.cpp.compiler.option.optimization.level.407718562" name="Optimization Level" superClass="gnu.cpp.compiler.option.optimization.level" value="gnu.cpp.compiler.optimization.level.most" valueType="enumerated"/>
|
||||
<option id="gnu.cpp.compiler.option.debugging.level.1687450255" name="Debug Level" superClass="gnu.cpp.compiler.option.debugging.level" value="gnu.cpp.compiler.debugging.level.none" valueType="enumerated"/>
|
||||
<inputType id="cdt.managedbuild.tool.gnu.cpp.compiler.input.593478428" superClass="cdt.managedbuild.tool.gnu.cpp.compiler.input"/>
|
||||
</tool>
|
||||
<tool id="cdt.managedbuild.tool.gnu.cross.c.linker.165176764" name="Cross GCC Linker" superClass="cdt.managedbuild.tool.gnu.cross.c.linker"/>
|
||||
<tool id="cdt.managedbuild.tool.gnu.cross.cpp.linker.178129273" name="Cross G++ Linker" superClass="cdt.managedbuild.tool.gnu.cross.cpp.linker">
|
||||
<inputType id="cdt.managedbuild.tool.gnu.cpp.linker.input.25375344" superClass="cdt.managedbuild.tool.gnu.cpp.linker.input">
|
||||
<additionalInput kind="additionalinputdependency" paths="$(USER_OBJS)"/>
|
||||
<additionalInput kind="additionalinput" paths="$(LIBS)"/>
|
||||
</inputType>
|
||||
</tool>
|
||||
<tool id="cdt.managedbuild.tool.gnu.cross.archiver.986435372" name="Cross GCC Archiver" superClass="cdt.managedbuild.tool.gnu.cross.archiver"/>
|
||||
<tool id="cdt.managedbuild.tool.gnu.cross.assembler.1833814398" name="Cross GCC Assembler" superClass="cdt.managedbuild.tool.gnu.cross.assembler">
|
||||
<inputType id="cdt.managedbuild.tool.gnu.assembler.input.1026471548" superClass="cdt.managedbuild.tool.gnu.assembler.input"/>
|
||||
</tool>
|
||||
</toolChain>
|
||||
</folderInfo>
|
||||
</configuration>
|
||||
</storageModule>
|
||||
<storageModule moduleId="org.eclipse.cdt.core.externalSettings"/>
|
||||
</cconfiguration>
|
||||
</storageModule>
|
||||
<storageModule moduleId="cdtBuildSystem" version="4.0.0">
|
||||
<project id="score.cdt.managedbuild.target.gnu.cross.exe.1539177197" name="Executable" projectType="cdt.managedbuild.target.gnu.cross.exe"/>
|
||||
</storageModule>
|
||||
<storageModule moduleId="scannerConfiguration">
|
||||
<autodiscovery enabled="true" problemReportingEnabled="true" selectedProfileId=""/>
|
||||
<scannerConfigBuildInfo instanceId="cdt.managedbuild.config.gnu.cross.exe.debug.634831890;cdt.managedbuild.config.gnu.cross.exe.debug.634831890.;cdt.managedbuild.tool.gnu.cross.c.compiler.786339685;cdt.managedbuild.tool.gnu.c.compiler.input.2108019237">
|
||||
<autodiscovery enabled="true" problemReportingEnabled="true" selectedProfileId="org.eclipse.cdt.managedbuilder.core.GCCManagedMakePerProjectProfileC"/>
|
||||
</scannerConfigBuildInfo>
|
||||
<scannerConfigBuildInfo instanceId="cdt.managedbuild.config.gnu.cross.exe.release.1994357180;cdt.managedbuild.config.gnu.cross.exe.release.1994357180.;cdt.managedbuild.tool.gnu.cross.cpp.compiler.307472312;cdt.managedbuild.tool.gnu.cpp.compiler.input.593478428">
|
||||
<autodiscovery enabled="true" problemReportingEnabled="true" selectedProfileId="org.eclipse.cdt.managedbuilder.core.GCCManagedMakePerProjectProfileCPP"/>
|
||||
</scannerConfigBuildInfo>
|
||||
<scannerConfigBuildInfo instanceId="cdt.managedbuild.config.gnu.cross.exe.debug.634831890;cdt.managedbuild.config.gnu.cross.exe.debug.634831890.;cdt.managedbuild.tool.gnu.cross.cpp.compiler.1013232238;cdt.managedbuild.tool.gnu.cpp.compiler.input.509920006">
|
||||
<autodiscovery enabled="true" problemReportingEnabled="true" selectedProfileId="org.eclipse.cdt.managedbuilder.core.GCCManagedMakePerProjectProfileCPP"/>
|
||||
</scannerConfigBuildInfo>
|
||||
<scannerConfigBuildInfo instanceId="cdt.managedbuild.config.gnu.cross.exe.release.1994357180;cdt.managedbuild.config.gnu.cross.exe.release.1994357180.;cdt.managedbuild.tool.gnu.cross.c.compiler.323743241;cdt.managedbuild.tool.gnu.c.compiler.input.392640311">
|
||||
<autodiscovery enabled="true" problemReportingEnabled="true" selectedProfileId="org.eclipse.cdt.managedbuilder.core.GCCManagedMakePerProjectProfileC"/>
|
||||
</scannerConfigBuildInfo>
|
||||
</storageModule>
|
||||
<storageModule moduleId="org.eclipse.cdt.core.LanguageSettingsProviders"/>
|
||||
<storageModule moduleId="refreshScope"/>
|
||||
</cproject>
|
109
contrib/other-builds/score/.project
Normal file
109
contrib/other-builds/score/.project
Normal file
@ -0,0 +1,109 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<projectDescription>
|
||||
<name>score</name>
|
||||
<comment></comment>
|
||||
<projects>
|
||||
</projects>
|
||||
<buildSpec>
|
||||
<buildCommand>
|
||||
<name>org.eclipse.cdt.managedbuilder.core.genmakebuilder</name>
|
||||
<triggers>clean,full,incremental,</triggers>
|
||||
<arguments>
|
||||
</arguments>
|
||||
</buildCommand>
|
||||
<buildCommand>
|
||||
<name>org.eclipse.cdt.managedbuilder.core.ScannerConfigBuilder</name>
|
||||
<triggers>full,incremental,</triggers>
|
||||
<arguments>
|
||||
</arguments>
|
||||
</buildCommand>
|
||||
</buildSpec>
|
||||
<natures>
|
||||
<nature>org.eclipse.cdt.core.cnature</nature>
|
||||
<nature>org.eclipse.cdt.core.ccnature</nature>
|
||||
<nature>org.eclipse.cdt.managedbuilder.core.managedBuildNature</nature>
|
||||
<nature>org.eclipse.cdt.managedbuilder.core.ScannerConfigNature</nature>
|
||||
</natures>
|
||||
<linkedResources>
|
||||
<link>
|
||||
<name>InputFileStream.cpp</name>
|
||||
<type>1</type>
|
||||
<locationURI>PARENT-3-PROJECT_LOC/phrase-extract/InputFileStream.cpp</locationURI>
|
||||
</link>
|
||||
<link>
|
||||
<name>InputFileStream.h</name>
|
||||
<type>1</type>
|
||||
<locationURI>PARENT-3-PROJECT_LOC/phrase-extract/InputFileStream.h</locationURI>
|
||||
</link>
|
||||
<link>
|
||||
<name>InternalStructFeature.cpp</name>
|
||||
<type>1</type>
|
||||
<locationURI>PARENT-3-PROJECT_LOC/phrase-extract/InternalStructFeature.cpp</locationURI>
|
||||
</link>
|
||||
<link>
|
||||
<name>InternalStructFeature.h</name>
|
||||
<type>1</type>
|
||||
<locationURI>PARENT-3-PROJECT_LOC/phrase-extract/InternalStructFeature.h</locationURI>
|
||||
</link>
|
||||
<link>
|
||||
<name>OutputFileStream.cpp</name>
|
||||
<type>1</type>
|
||||
<locationURI>PARENT-3-PROJECT_LOC/phrase-extract/OutputFileStream.cpp</locationURI>
|
||||
</link>
|
||||
<link>
|
||||
<name>OutputFileStream.h</name>
|
||||
<type>1</type>
|
||||
<locationURI>PARENT-3-PROJECT_LOC/phrase-extract/OutputFileStream.h</locationURI>
|
||||
</link>
|
||||
<link>
|
||||
<name>PhraseAlignment.cpp</name>
|
||||
<type>1</type>
|
||||
<locationURI>PARENT-3-PROJECT_LOC/phrase-extract/PhraseAlignment.cpp</locationURI>
|
||||
</link>
|
||||
<link>
|
||||
<name>ScoreFeature.cpp</name>
|
||||
<type>1</type>
|
||||
<locationURI>PARENT-3-PROJECT_LOC/phrase-extract/ScoreFeature.cpp</locationURI>
|
||||
</link>
|
||||
<link>
|
||||
<name>ScoreFeature.h</name>
|
||||
<type>1</type>
|
||||
<locationURI>PARENT-3-PROJECT_LOC/phrase-extract/ScoreFeature.h</locationURI>
|
||||
</link>
|
||||
<link>
|
||||
<name>domain.cpp</name>
|
||||
<type>1</type>
|
||||
<locationURI>PARENT-3-PROJECT_LOC/phrase-extract/domain.cpp</locationURI>
|
||||
</link>
|
||||
<link>
|
||||
<name>domain.h</name>
|
||||
<type>1</type>
|
||||
<locationURI>PARENT-3-PROJECT_LOC/phrase-extract/domain.h</locationURI>
|
||||
</link>
|
||||
<link>
|
||||
<name>exception.cc</name>
|
||||
<type>1</type>
|
||||
<locationURI>PARENT-3-PROJECT_LOC/util/exception.cc</locationURI>
|
||||
</link>
|
||||
<link>
|
||||
<name>exception.hh</name>
|
||||
<type>1</type>
|
||||
<locationURI>PARENT-3-PROJECT_LOC/util/exception.hh</locationURI>
|
||||
</link>
|
||||
<link>
|
||||
<name>score-main.cpp</name>
|
||||
<type>1</type>
|
||||
<locationURI>PARENT-3-PROJECT_LOC/phrase-extract/score-main.cpp</locationURI>
|
||||
</link>
|
||||
<link>
|
||||
<name>tables-core.cpp</name>
|
||||
<type>1</type>
|
||||
<locationURI>PARENT-3-PROJECT_LOC/phrase-extract/tables-core.cpp</locationURI>
|
||||
</link>
|
||||
<link>
|
||||
<name>tables-core.h</name>
|
||||
<type>1</type>
|
||||
<locationURI>PARENT-3-PROJECT_LOC/phrase-extract/tables-core.h</locationURI>
|
||||
</link>
|
||||
</linkedResources>
|
||||
</projectDescription>
|
62
contrib/picaro/README
Normal file
62
contrib/picaro/README
Normal file
@ -0,0 +1,62 @@
|
||||
README - 16 Jan 2011b
|
||||
Author: Jason Riesa <jason.riesa@gmail.com>
|
||||
|
||||
Picaro [v1.0]: A simple command-line alignment visualization tool.
|
||||
Visualize alignments in grid-format.
|
||||
|
||||
This brief README is organized as follows:
|
||||
I. REQUIREMENTS
|
||||
II. USAGE
|
||||
III. INPUT FORMAT
|
||||
IV. EXAMPLE USAGE
|
||||
V. NOTES
|
||||
|
||||
I. REQUIREMENTS
|
||||
===============
|
||||
Python v2.5 or higher is required.
|
||||
|
||||
II. USAGE
|
||||
=========
|
||||
Picaro takes as input 3 mandatory arguments and up to 2 optional arguments:
|
||||
Mandatory arguments:
|
||||
1. -a1 <alignment1> where alignment1 is a path to an alignment file
|
||||
2. -e <e> where e is a path to a file of English sentences
|
||||
3. -f <f> where f is a path to a file of French sentences
|
||||
Optional arguments:
|
||||
1. -a2 <a2> path to alignment2 file in f-e format
|
||||
2. -maxlen <len> for each sentence pair, render only when each
|
||||
sentence has length in words <= len
|
||||
|
||||
For historical reasons we use the labels e, f, English, and French,
|
||||
but any language pair will do.
|
||||
|
||||
III. INPUT FORMAT
|
||||
=================
|
||||
- Files e and f must be sentence-aligned
|
||||
- Alignment files must be in f-e format
|
||||
See included sample files in zh/ and es/.
|
||||
|
||||
IV. EXAMPLE USAGE
|
||||
=================
|
||||
WITH A SINGLE ALIGNMENT:
|
||||
$ picaro.py -e zh/sample.e -f zh/sample.f -a1 zh/sample.aln
|
||||
|
||||
COMPARING TWO ALIGNMENTS:
|
||||
$ picaro.py -e zh/sample.e -f zh/sample.f -a1 zh/alternate.aln -a2 zh/sample.aln
|
||||
|
||||
When visualizing two alignments at once, refer to the following color scheme:
|
||||
Green blocks: alignments a1 and a2 agree
|
||||
Blue blocks: alignment a1 only
|
||||
Gold blocks: alignment a2 only
|
||||
|
||||
V. NOTES
|
||||
========
|
||||
RIGHT-TO-LEFT TEXT:
|
||||
If you are using right-to-left text, e.g. Arabic, transliterate your text first.
|
||||
Terminals generally render unexpectedly with mixed left-to-right and right-to-left text.
|
||||
For Arabic, in particular, we use the Buckwalter translitation scheme [1] when using this tool.
|
||||
The following Perl module implements Buckwalter transliteration:
|
||||
http://search.cpan.org/~smrz/Encode-Arabic-1.8/lib/Encode/Arabic.pm
|
||||
|
||||
[1] http://www.ldc.upenn.edu/myl/morph/buckwalter.html
|
||||
|
4
contrib/picaro/es/README
Normal file
4
contrib/picaro/es/README
Normal file
@ -0,0 +1,4 @@
|
||||
Spanish-English sample
|
||||
sample.f Spanish text
|
||||
sample.e English text
|
||||
sample.a Alignment file with links in f-e format
|
1
contrib/picaro/es/sample.aln
Normal file
1
contrib/picaro/es/sample.aln
Normal file
@ -0,0 +1 @@
|
||||
0-0 0-1 1-2 1-3 2-4 3-5 4-6 5-7
|
1
contrib/picaro/es/sample.e
Normal file
1
contrib/picaro/es/sample.e
Normal file
@ -0,0 +1 @@
|
||||
i want to go to spain tomorrow .
|
1
contrib/picaro/es/sample.f
Normal file
1
contrib/picaro/es/sample.f
Normal file
@ -0,0 +1 @@
|
||||
quiero ir a españa mañana .
|
250
contrib/picaro/picaro.py
Executable file
250
contrib/picaro/picaro.py
Executable file
@ -0,0 +1,250 @@
|
||||
#!/usr/bin/env python
|
||||
#
|
||||
# Picaro: An simple command-line alignment visualization tool.
|
||||
#
|
||||
# picaro.py
|
||||
# Visualize alignments between sentences in a grid format.
|
||||
#
|
||||
# Jason Riesa <riesa@isi.edu>
|
||||
# version: 01-16-2010
|
||||
#
|
||||
# Copyright (C) 2013 Jason Riesa
|
||||
#
|
||||
# This library is free software; you can redistribute it and/or
|
||||
# modify it under the terms of the GNU Lesser General Public
|
||||
# License as published by the Free Software Foundation; either
|
||||
# version 2.1 of the License, or (at your option) any later version.
|
||||
#
|
||||
# This library is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
# Lesser General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU Lesser General Public
|
||||
# License along with this library; if not, write to the Free Software
|
||||
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
||||
|
||||
import sys, os, commands
|
||||
from collections import defaultdict
|
||||
|
||||
#TC_BIN = "tc/tc.linux32"
|
||||
|
||||
a1_file_str = ""
|
||||
a2_file_str = ""
|
||||
f_file_str = ""
|
||||
e_file_str = ""
|
||||
SHOW_TC_A1 = 0
|
||||
SHOW_TC_A2 = 0
|
||||
maxlen = float('inf')
|
||||
|
||||
# Process command line options
|
||||
try:
|
||||
while len(sys.argv) > 1:
|
||||
option = sys.argv[1]; del sys.argv[1]
|
||||
if option == '-a1':
|
||||
a1_file_str = sys.argv[1]; del sys.argv[1]
|
||||
elif option == '-a2':
|
||||
a2_file_str = sys.argv[1]; del sys.argv[1]
|
||||
elif option == '-f':
|
||||
f_file_str = sys.argv[1]; del sys.argv[1]
|
||||
elif option == '-e':
|
||||
e_file_str = sys.argv[1]; del sys.argv[1]
|
||||
elif option == '-maxlen':
|
||||
maxlen = int(sys.argv[1]); del sys.argv[1]
|
||||
else:
|
||||
sys.stderr.write("Invalid option: %s\n" % (option))
|
||||
sys.exit(1)
|
||||
'''
|
||||
elif option == '-tc':
|
||||
if sys.argv[1] == '1':
|
||||
SHOW_TC_A1 = 1; del sys.argv[1]
|
||||
elif sys.argv[1] == '2':
|
||||
SHOW_TC_A2 = 2; del sys.argv[1]
|
||||
else:
|
||||
raise Exception, "Invalid argument to option -tc"
|
||||
'''
|
||||
|
||||
if a1_file_str == "" or f_file_str == "" or e_file_str == "":
|
||||
raise Exception, "Not all options properly specified."
|
||||
# Make sure transitive closure binary exists if user has enabled this option
|
||||
if SHOW_TC_A1 or SHOW_TC_A2:
|
||||
if not os.path.exists(TC_BIN):
|
||||
raise Exception, "Transitive closure binary "+TC_BIN+" not found."
|
||||
except Exception, msg:
|
||||
sys.stderr.write("%s: %s\n" % (sys.argv[0], msg))
|
||||
sys.stderr.write("Usage: %s: -a1 <alignment1> -f <f> -e <e> [-a2 <alignment2>]\n" % (sys.argv[0]))
|
||||
sys.stderr.write("Mandatory arguments:\n")
|
||||
sys.stderr.write(" -a1 <a1>\t path to alignment 1 file in f-e format\n")
|
||||
sys.stderr.write(" -f <f>\t\t path to source text f\n")
|
||||
sys.stderr.write(" -e <e>\t\t path to target text e\n")
|
||||
sys.stderr.write("Optional arguments:\n")
|
||||
sys.stderr.write(" -a2 <a2>\t path to alignment 2 file in f-e format\n")
|
||||
sys.stderr.write(" -maxlen <len>\t display alignment only when e and f have length <= len\n")
|
||||
sys.exit(1)
|
||||
|
||||
|
||||
a_file = open(a1_file_str, 'r')
|
||||
f_file = open(f_file_str, 'r')
|
||||
e_file = open(e_file_str, 'r')
|
||||
if a2_file_str != "":
|
||||
a2_file = open(a2_file_str, 'r')
|
||||
|
||||
sentenceNumber = 0
|
||||
nextRequested = 1
|
||||
for aline in a_file:
|
||||
eline = e_file.readline()
|
||||
fline = f_file.readline()
|
||||
if a2_file_str != "":
|
||||
a2line = a2_file.readline()
|
||||
|
||||
links = aline.split()
|
||||
e_words = eline.split()
|
||||
f_words = fline.split()
|
||||
if a2_file_str != "":
|
||||
links2 = a2line.split()
|
||||
|
||||
# Get transitive closure of links and links2
|
||||
if SHOW_TC_A1:
|
||||
cmd = 'echo "' + ' '.join(links) + '" | ' + TC_BIN
|
||||
failure1, output1 = commands.getstatusoutput(cmd)
|
||||
tc1 = output1.split()
|
||||
if SHOW_TC_A2:
|
||||
cmd = 'echo "' + ' '.join(links2) + '" | ' + TC_BIN
|
||||
failure2, output2 = commands.getstatusoutput(cmd)
|
||||
tc2 = output2.split()
|
||||
|
||||
# Update tracking counts
|
||||
sentenceNumber += 1
|
||||
if sentenceNumber < nextRequested:
|
||||
continue
|
||||
|
||||
# Don't generate alignment grids for very large sentences
|
||||
if len(e_words) > maxlen or len(f_words) > maxlen:
|
||||
continue
|
||||
|
||||
|
||||
print "== SENTENCE ",sentenceNumber," =="
|
||||
|
||||
# Initialize alignment objects
|
||||
# a holds alignments of user-specified -a1 <file>
|
||||
# a2 holds alignments of user-specified -a2 <file>
|
||||
a = defaultdict(lambda: defaultdict(int))
|
||||
a2 = defaultdict(lambda: defaultdict(int))
|
||||
|
||||
# Print e_words on the columns
|
||||
# First, find the length of the longest word
|
||||
longestEWordSize = 0
|
||||
longestEWord = 0
|
||||
for w in e_words:
|
||||
if len(w) > longestEWordSize:
|
||||
longestEWordSize = len(w)
|
||||
longestEWord = w
|
||||
|
||||
# Now, print the e-words
|
||||
for i in range(longestEWordSize, 0, -1):
|
||||
for w in e_words:
|
||||
if len(w) < i:
|
||||
print " ",
|
||||
else:
|
||||
print w[(i*-1)],
|
||||
print
|
||||
|
||||
|
||||
# Fill in alignment matrix 1
|
||||
for link in links:
|
||||
i, j = map(int, link.split('-'))
|
||||
a[int(i)][int(j)] = 1
|
||||
# Fill in extra links added by transitive closure
|
||||
if SHOW_TC_A1:
|
||||
for link in tc1:
|
||||
i, j = map(int, link.split('-'))
|
||||
if(a[i][j] != 1):
|
||||
a[i][j] = 2
|
||||
|
||||
# Fill in alignment matrix 2
|
||||
if(a2_file_str != ""):
|
||||
for link in links2:
|
||||
i, j = map(int, link.split('-'))
|
||||
a2[i][j] = 1
|
||||
# Fill in extra links added by transitive closure
|
||||
if SHOW_TC_A2:
|
||||
for link in tc2:
|
||||
i, j = map(int, link.split('-'))
|
||||
if(a2[i][j] != 1):
|
||||
a2[i][j] = 2
|
||||
|
||||
# Print filled-in alignment matrix
|
||||
if a2_file_str == "":
|
||||
for i, _ in enumerate(f_words):
|
||||
for j, _ in enumerate(e_words):
|
||||
val1 = a[i][j]
|
||||
if val1 == 0:
|
||||
# No link
|
||||
print ':',
|
||||
elif val1 == 1:
|
||||
# Regular link
|
||||
print u'\u001b[44m\u0020\u001b[0m',
|
||||
elif val1 == 2:
|
||||
# Link due to transitive closure
|
||||
# Render as gray-shaded square
|
||||
print 'O',
|
||||
print f_words[i]
|
||||
print
|
||||
else:
|
||||
for i, _ in enumerate(f_words):
|
||||
for j, _ in enumerate(e_words):
|
||||
val1 = a[i][j]
|
||||
val2 = a2[i][j]
|
||||
|
||||
if val1 == 0 and val2 == 0:
|
||||
# Link not in a nor a2
|
||||
# Empty grid box
|
||||
print ':',
|
||||
# Link in both a and a2
|
||||
elif val1 > 0 and val2 > 0:
|
||||
# Green box
|
||||
if val1 == 1:
|
||||
if val2 == 1:
|
||||
print u'\u001b[42m\u001b[1m\u0020\u001b[0m',
|
||||
elif val2 == 2:
|
||||
print u'\u001b[42m\u001b[30m2\u001b[0m',
|
||||
elif val1 == 2:
|
||||
if val2 == 1:
|
||||
print u'\u001b[42m\u0020\u001b[0m',
|
||||
elif val2 == 2:
|
||||
print u'\u001b[42m\u001b[30m3\u001b[0m',
|
||||
# Link in a2, but not a
|
||||
elif val1 == 0 and val2 > 0:
|
||||
if val2 == 1:
|
||||
# Yellow box
|
||||
print u'\u001b[1m\u001b[43m\u0020\u001b[0m',
|
||||
elif val2 == 2:
|
||||
# Artificial link by transitive closure
|
||||
print u'\u001b[43m\u001b[30m2\u001b[0m',
|
||||
|
||||
# Link in a, but not a2
|
||||
elif val1 > 0 and val2 == 0:
|
||||
if val1 == 1:
|
||||
# Blue box
|
||||
print u'\u001b[1m\u001b[44m\u0020\u001b[0m',
|
||||
elif val1 == 2:
|
||||
print u'\u001b[44m\u001b[37m1\u001b[0m',
|
||||
print f_words[i]
|
||||
nextDefault = sentenceNumber + 1
|
||||
sys.stdout.write("Enter next alignment number or 'q' to quit [%d]: " %(nextDefault))
|
||||
user_input = sys.stdin.readline().strip()
|
||||
if user_input == "":
|
||||
nextRequested = nextDefault
|
||||
elif user_input[0] == "q" or user_input == "quit":
|
||||
sys.exit(1)
|
||||
else:
|
||||
try:
|
||||
nextRequested = int(user_input)
|
||||
except:
|
||||
nextRequested = sentenceNumber + 1
|
||||
sys.stdout.write("Unknown alignment id: %s\nContinuing with %d.\n" %(user_input, nextRequested))
|
||||
|
||||
a_file.close()
|
||||
e_file.close()
|
||||
f_file.close()
|
||||
|
4
contrib/picaro/zh/README
Normal file
4
contrib/picaro/zh/README
Normal file
@ -0,0 +1,4 @@
|
||||
Chinese-English sample
|
||||
sample.f Chinese text
|
||||
sample.e English text
|
||||
sample.a Alignment file with links in f-e format
|
1
contrib/picaro/zh/alternate.aln
Normal file
1
contrib/picaro/zh/alternate.aln
Normal file
@ -0,0 +1 @@
|
||||
0-0 1-1 2-6 3-2 3-3 4-4 4-5 5-7
|
1
contrib/picaro/zh/sample.aln
Normal file
1
contrib/picaro/zh/sample.aln
Normal file
@ -0,0 +1 @@
|
||||
0-0 1-1 2-6 3-2 3-3 3-4 4-5 5-7
|
1
contrib/picaro/zh/sample.e
Normal file
1
contrib/picaro/zh/sample.e
Normal file
@ -0,0 +1 @@
|
||||
i want to go to china tomorrow .
|
1
contrib/picaro/zh/sample.f
Normal file
1
contrib/picaro/zh/sample.f
Normal file
@ -0,0 +1 @@
|
||||
我 想 明天 去 中国 .
|
@ -51,6 +51,7 @@ POSSIBILITY OF SUCH DAMAGE.
|
||||
#include "Manager.h"
|
||||
#include "StaticData.h"
|
||||
|
||||
#include "util/exception.hh"
|
||||
|
||||
using namespace std;
|
||||
using namespace Moses;
|
||||
@ -68,7 +69,7 @@ public:
|
||||
/** Add a parameter with key, command line argument, and default value */
|
||||
void addParam(gridkey key, const string& arg, float defaultValue) {
|
||||
m_args[arg] = key;
|
||||
CHECK(m_grid.find(key) == m_grid.end());
|
||||
UTIL_THROW_IF2(m_grid.find(key) != m_grid.end(), "Duplicate parameter " << arg);
|
||||
m_grid[key].push_back(defaultValue);
|
||||
}
|
||||
|
||||
|
13
contrib/server/client_multimodel.py
Normal file → Executable file
13
contrib/server/client_multimodel.py
Normal file → Executable file
@ -16,12 +16,21 @@ else:
|
||||
import xmlrpc.client as xmlrpclib
|
||||
|
||||
|
||||
def translate(input_object, server, weights=None):
|
||||
def translate(input_object, server, weights=None, model_name=None):
|
||||
"""translate each sentence in an input_object (list, file-like object or other object that iterates over sentences)
|
||||
server is a xmlrpclib.ServerProxy
|
||||
model_name is the name of the PhraseDictionaryMultiModel(Counts) feature function that the weights should be applied to. It is defined in the moses.ini
|
||||
weights is a list of floats (one float per model, or one float per model per feature)
|
||||
"""
|
||||
|
||||
for line in input_object:
|
||||
params = {}
|
||||
params['text'] = line
|
||||
if weights:
|
||||
if not model_name:
|
||||
sys.stderr.write("Error: if you define weights, you need to specify the feature to which the weights are to be applied (e.g. PhraseDictionaryMultiModel0)\n")
|
||||
sys.exit(1)
|
||||
params['model_name'] = model_name
|
||||
params['lambda'] = weights
|
||||
|
||||
print server.translate(params)
|
||||
@ -77,4 +86,4 @@ if __name__ == '__main__':
|
||||
phrase_pairs = read_phrase_pairs(gzip.open('/path/to/moses-regression-tests/models/multimodel/extract.sorted.gz'))
|
||||
weights = optimize(phrase_pairs, server, 'PhraseDictionaryMultiModelCounts0')
|
||||
|
||||
translate(sys.stdin, server, weights)
|
||||
translate(sys.stdin, server, weights, 'PhraseDictionaryMultiModelCounts0')
|
@ -1,4 +1,3 @@
|
||||
#include "util/check.hh"
|
||||
#include <stdexcept>
|
||||
#include <iostream>
|
||||
#include <vector>
|
||||
@ -42,7 +41,7 @@ public:
|
||||
xmlrpc_c::value * const retvalP) {
|
||||
const params_t params = paramList.getStruct(0);
|
||||
breakOutParams(params);
|
||||
const PhraseDictionary* pdf = StaticData::Instance().GetPhraseDictionaries()[0];
|
||||
const PhraseDictionary* pdf = PhraseDictionary::GetColl()[0];
|
||||
PhraseDictionaryDynSuffixArray* pdsa = (PhraseDictionaryDynSuffixArray*) pdf;
|
||||
cerr << "Inserting into address " << pdsa << endl;
|
||||
pdsa->insertSnt(source_, target_, alignment_);
|
||||
@ -237,17 +236,19 @@ public:
|
||||
}
|
||||
}
|
||||
|
||||
si = params.find("model_name");
|
||||
if (si != params.end() && multiModelWeights.size() > 0) {
|
||||
const string model_name = xmlrpc_c::value_string(si->second);
|
||||
PhraseDictionaryMultiModel* pdmm = (PhraseDictionaryMultiModel*) FindPhraseDictionary(model_name);
|
||||
pdmm->SetTemporaryMultiModelWeightsVector(multiModelWeights);
|
||||
}
|
||||
|
||||
const StaticData &staticData = StaticData::Instance();
|
||||
|
||||
if (addGraphInfo) {
|
||||
(const_cast<StaticData&>(staticData)).SetOutputSearchGraph(true);
|
||||
}
|
||||
|
||||
if (multiModelWeights.size() > 0) {
|
||||
PhraseDictionaryMultiModel* pdmm = (PhraseDictionaryMultiModel*) staticData.GetPhraseDictionaries()[0]; //TODO: only works if multimodel is first phrase table
|
||||
pdmm->SetTemporaryMultiModelWeightsVector(multiModelWeights);
|
||||
}
|
||||
|
||||
stringstream out, graphInfo, transCollOpts;
|
||||
map<string, xmlrpc_c::value> retData;
|
||||
|
||||
@ -286,7 +287,7 @@ public:
|
||||
insertTranslationOptions(manager,retData);
|
||||
}
|
||||
if (nbest_size>0) {
|
||||
outputNBest(manager, retData, nbest_size, nbest_distinct, reportAllFactors);
|
||||
outputNBest(manager, retData, nbest_size, nbest_distinct, reportAllFactors, addAlignInfo);
|
||||
}
|
||||
}
|
||||
pair<string, xmlrpc_c::value>
|
||||
@ -325,7 +326,7 @@ public:
|
||||
|
||||
void outputChartHypo(ostream& out, const ChartHypothesis* hypo) {
|
||||
Phrase outPhrase(20);
|
||||
hypo->CreateOutputPhrase(outPhrase);
|
||||
hypo->GetOutputPhrase(outPhrase);
|
||||
|
||||
// delete 1st & last
|
||||
assert(outPhrase.GetSize() >= 2);
|
||||
@ -376,7 +377,8 @@ public:
|
||||
map<string, xmlrpc_c::value>& retData,
|
||||
const int n=100,
|
||||
const bool distinct=false,
|
||||
const bool reportAllFactors=false)
|
||||
const bool reportAllFactors=false,
|
||||
const bool addAlignmentInfo=false)
|
||||
{
|
||||
TrellisPathList nBestList;
|
||||
manager.CalcNBest(n, nBestList, distinct);
|
||||
@ -390,6 +392,7 @@ public:
|
||||
|
||||
// output surface
|
||||
ostringstream out;
|
||||
vector<xmlrpc_c::value> alignInfo;
|
||||
for (int currEdge = (int)edges.size() - 1 ; currEdge >= 0 ; currEdge--) {
|
||||
const Hypothesis &edge = *edges[currEdge];
|
||||
const Phrase& phrase = edge.GetCurrTargetPhrase();
|
||||
@ -401,9 +404,20 @@ public:
|
||||
out << *factor << " ";
|
||||
}
|
||||
}
|
||||
|
||||
if (addAlignmentInfo && currEdge != (int)edges.size() - 1) {
|
||||
map<string, xmlrpc_c::value> phraseAlignInfo;
|
||||
phraseAlignInfo["tgt-start"] = xmlrpc_c::value_int(edge.GetCurrTargetWordsRange().GetStartPos());
|
||||
phraseAlignInfo["src-start"] = xmlrpc_c::value_int(edge.GetCurrSourceWordsRange().GetStartPos());
|
||||
phraseAlignInfo["src-end"] = xmlrpc_c::value_int(edge.GetCurrSourceWordsRange().GetEndPos());
|
||||
alignInfo.push_back(xmlrpc_c::value_struct(phraseAlignInfo));
|
||||
}
|
||||
}
|
||||
nBestXMLItem["hyp"] = xmlrpc_c::value_string(out.str());
|
||||
|
||||
if (addAlignmentInfo)
|
||||
nBestXMLItem["align"] = xmlrpc_c::value_array(alignInfo);
|
||||
|
||||
// weighted score
|
||||
nBestXMLItem["totalScore"] = xmlrpc_c::value_double(path.GetTotalScore());
|
||||
nBestXml.push_back(xmlrpc_c::value_struct(nBestXMLItem));
|
||||
@ -414,8 +428,8 @@ public:
|
||||
void insertTranslationOptions(Manager& manager, map<string, xmlrpc_c::value>& retData) {
|
||||
const TranslationOptionCollection* toptsColl = manager.getSntTranslationOptions();
|
||||
vector<xmlrpc_c::value> toptsXml;
|
||||
for (size_t startPos = 0 ; startPos < toptsColl->GetSize() ; ++startPos) {
|
||||
size_t maxSize = toptsColl->GetSize() - startPos;
|
||||
for (size_t startPos = 0 ; startPos < toptsColl->GetSource().GetSize() ; ++startPos) {
|
||||
size_t maxSize = toptsColl->GetSource().GetSize() - startPos;
|
||||
size_t maxSizePhrase = StaticData::Instance().GetMaxPhraseLength();
|
||||
maxSize = std::min(maxSize, maxSizePhrase);
|
||||
|
||||
@ -521,7 +535,6 @@ int main(int argc, char** argv)
|
||||
} else {
|
||||
myAbyssServer.run();
|
||||
}
|
||||
// xmlrpc_c::serverAbyss.run() never returns
|
||||
CHECK(false);
|
||||
return 0;
|
||||
std::cerr << "xmlrpc_c::serverAbyss.run() returned but should not." << std::endl;
|
||||
return 1;
|
||||
}
|
||||
|
@ -393,7 +393,11 @@ class Moses():
|
||||
origin_features = b' '.join([b'%.4f' %(f) for f in origin_features]) + ' '
|
||||
else:
|
||||
origin_features = b''
|
||||
line = b"%s ||| %s ||| %s 2.718 %s||| %s%s||| %s\n" %(src,target,features,origin_features,alignment,extra_space,comments)
|
||||
if flags['write_phrase_penalty']:
|
||||
phrase_penalty = b' 2.718'
|
||||
else:
|
||||
phrase_penalty = b''
|
||||
line = b"%s ||| %s ||| %s%s %s||| %s%s||| %s\n" %(src,target,features,origin_features,phrase_penalty,alignment,extra_space,comments)
|
||||
return line
|
||||
|
||||
|
||||
@ -1307,6 +1311,7 @@ class Combine_TMs():
|
||||
'normalize_s_given_t':None,
|
||||
'normalize-lexical_weights':True,
|
||||
'add_origin_features':False,
|
||||
'write_phrase_penalty':False,
|
||||
'lowmem': False,
|
||||
'i_e2f':0,
|
||||
'i_e2f_lex':1,
|
||||
@ -1916,6 +1921,9 @@ def parse_command_line():
|
||||
|
||||
group2.add_argument('--normalized', action="store_true",
|
||||
help=('for each phrase pair x,y: ignore models with p(y)=0, and distribute probability mass among models with p(y)>0. (default: missing entries (x,y) are always interpreted as p(x|y)=0). Only relevant in mode "interpolate".'))
|
||||
|
||||
group2.add_argument('--write-phrase-penalty', action="store_true",
|
||||
help=("Include phrase penalty in phrase table"))
|
||||
|
||||
group2.add_argument('--recompute_lexweights', action="store_true",
|
||||
help=('don\'t directly interpolate lexical weights, but interpolate word translation probabilities instead and recompute the lexical weights. Only relevant in mode "interpolate".'))
|
||||
@ -1947,7 +1955,8 @@ if __name__ == "__main__":
|
||||
i_e2f=args.i_e2f,
|
||||
i_e2f_lex=args.i_e2f_lex,
|
||||
i_f2e=args.i_f2e,
|
||||
i_f2e_lex=args.i_f2e_lex)
|
||||
i_f2e_lex=args.i_f2e_lex,
|
||||
write_phrase_penalty=args.write_phrase_penalty)
|
||||
# execute right method
|
||||
f_string = "combiner."+args.action+'()'
|
||||
exec(f_string)
|
||||
|
623
jam-files/engine/boehm_gc/AmigaOS.c
Normal file
623
jam-files/engine/boehm_gc/AmigaOS.c
Normal file
@ -0,0 +1,623 @@
|
||||
|
||||
|
||||
/******************************************************************
|
||||
|
||||
AmigaOS-spesific routines for GC.
|
||||
This file is normally included from os_dep.c
|
||||
|
||||
******************************************************************/
|
||||
|
||||
|
||||
#if !defined(GC_AMIGA_DEF) && !defined(GC_AMIGA_SB) && !defined(GC_AMIGA_DS) && !defined(GC_AMIGA_AM)
|
||||
# include "gc_priv.h"
|
||||
# include <stdio.h>
|
||||
# include <signal.h>
|
||||
# define GC_AMIGA_DEF
|
||||
# define GC_AMIGA_SB
|
||||
# define GC_AMIGA_DS
|
||||
# define GC_AMIGA_AM
|
||||
#endif
|
||||
|
||||
|
||||
#ifdef GC_AMIGA_DEF
|
||||
|
||||
# ifndef __GNUC__
|
||||
# include <exec/exec.h>
|
||||
# endif
|
||||
# include <proto/exec.h>
|
||||
# include <proto/dos.h>
|
||||
# include <dos/dosextens.h>
|
||||
# include <workbench/startup.h>
|
||||
|
||||
#endif
|
||||
|
||||
|
||||
|
||||
|
||||
#ifdef GC_AMIGA_SB
|
||||
|
||||
/******************************************************************
|
||||
Find the base of the stack.
|
||||
******************************************************************/
|
||||
|
||||
ptr_t GC_get_main_stack_base()
|
||||
{
|
||||
struct Process *proc = (struct Process*)SysBase->ThisTask;
|
||||
|
||||
/* Reference: Amiga Guru Book Pages: 42,567,574 */
|
||||
if (proc->pr_Task.tc_Node.ln_Type==NT_PROCESS
|
||||
&& proc->pr_CLI != NULL) {
|
||||
/* first ULONG is StackSize */
|
||||
/*longPtr = proc->pr_ReturnAddr;
|
||||
size = longPtr[0];*/
|
||||
|
||||
return (char *)proc->pr_ReturnAddr + sizeof(ULONG);
|
||||
} else {
|
||||
return (char *)proc->pr_Task.tc_SPUpper;
|
||||
}
|
||||
}
|
||||
|
||||
#if 0 /* old version */
|
||||
ptr_t GC_get_stack_base()
|
||||
{
|
||||
extern struct WBStartup *_WBenchMsg;
|
||||
extern long __base;
|
||||
extern long __stack;
|
||||
struct Task *task;
|
||||
struct Process *proc;
|
||||
struct CommandLineInterface *cli;
|
||||
long size;
|
||||
|
||||
if ((task = FindTask(0)) == 0) {
|
||||
GC_err_puts("Cannot find own task structure\n");
|
||||
ABORT("task missing");
|
||||
}
|
||||
proc = (struct Process *)task;
|
||||
cli = BADDR(proc->pr_CLI);
|
||||
|
||||
if (_WBenchMsg != 0 || cli == 0) {
|
||||
size = (char *)task->tc_SPUpper - (char *)task->tc_SPLower;
|
||||
} else {
|
||||
size = cli->cli_DefaultStack * 4;
|
||||
}
|
||||
return (ptr_t)(__base + GC_max(size, __stack));
|
||||
}
|
||||
#endif
|
||||
|
||||
|
||||
#endif
|
||||
|
||||
|
||||
#ifdef GC_AMIGA_DS
|
||||
/******************************************************************
|
||||
Register data segments.
|
||||
******************************************************************/
|
||||
|
||||
void GC_register_data_segments()
|
||||
{
|
||||
struct Process *proc;
|
||||
struct CommandLineInterface *cli;
|
||||
BPTR myseglist;
|
||||
ULONG *data;
|
||||
|
||||
int num;
|
||||
|
||||
|
||||
# ifdef __GNUC__
|
||||
ULONG dataSegSize;
|
||||
GC_bool found_segment = FALSE;
|
||||
extern char __data_size[];
|
||||
|
||||
dataSegSize=__data_size+8;
|
||||
/* Can`t find the Location of __data_size, because
|
||||
it`s possible that is it, inside the segment. */
|
||||
|
||||
# endif
|
||||
|
||||
proc= (struct Process*)SysBase->ThisTask;
|
||||
|
||||
/* Reference: Amiga Guru Book Pages: 538ff,565,573
|
||||
and XOper.asm */
|
||||
if (proc->pr_Task.tc_Node.ln_Type==NT_PROCESS) {
|
||||
if (proc->pr_CLI == NULL) {
|
||||
myseglist = proc->pr_SegList;
|
||||
} else {
|
||||
/* ProcLoaded 'Loaded as a command: '*/
|
||||
cli = BADDR(proc->pr_CLI);
|
||||
myseglist = cli->cli_Module;
|
||||
}
|
||||
} else {
|
||||
ABORT("Not a Process.");
|
||||
}
|
||||
|
||||
if (myseglist == NULL) {
|
||||
ABORT("Arrrgh.. can't find segments, aborting");
|
||||
}
|
||||
|
||||
/* xoper hunks Shell Process */
|
||||
|
||||
num=0;
|
||||
for (data = (ULONG *)BADDR(myseglist); data != NULL;
|
||||
data = (ULONG *)BADDR(data[0])) {
|
||||
if (((ULONG) GC_register_data_segments < (ULONG) &data[1]) ||
|
||||
((ULONG) GC_register_data_segments > (ULONG) &data[1] + data[-1])) {
|
||||
# ifdef __GNUC__
|
||||
if (dataSegSize == data[-1]) {
|
||||
found_segment = TRUE;
|
||||
}
|
||||
# endif
|
||||
GC_add_roots_inner((char *)&data[1],
|
||||
((char *)&data[1]) + data[-1], FALSE);
|
||||
}
|
||||
++num;
|
||||
} /* for */
|
||||
# ifdef __GNUC__
|
||||
if (!found_segment) {
|
||||
ABORT("Can`t find correct Segments.\nSolution: Use an newer version of ixemul.library");
|
||||
}
|
||||
# endif
|
||||
}
|
||||
|
||||
#if 0 /* old version */
|
||||
void GC_register_data_segments()
|
||||
{
|
||||
extern struct WBStartup *_WBenchMsg;
|
||||
struct Process *proc;
|
||||
struct CommandLineInterface *cli;
|
||||
BPTR myseglist;
|
||||
ULONG *data;
|
||||
|
||||
if ( _WBenchMsg != 0 ) {
|
||||
if ((myseglist = _WBenchMsg->sm_Segment) == 0) {
|
||||
GC_err_puts("No seglist from workbench\n");
|
||||
return;
|
||||
}
|
||||
} else {
|
||||
if ((proc = (struct Process *)FindTask(0)) == 0) {
|
||||
GC_err_puts("Cannot find process structure\n");
|
||||
return;
|
||||
}
|
||||
if ((cli = BADDR(proc->pr_CLI)) == 0) {
|
||||
GC_err_puts("No CLI\n");
|
||||
return;
|
||||
}
|
||||
if ((myseglist = cli->cli_Module) == 0) {
|
||||
GC_err_puts("No seglist from CLI\n");
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
for (data = (ULONG *)BADDR(myseglist); data != 0;
|
||||
data = (ULONG *)BADDR(data[0])) {
|
||||
# ifdef AMIGA_SKIP_SEG
|
||||
if (((ULONG) GC_register_data_segments < (ULONG) &data[1]) ||
|
||||
((ULONG) GC_register_data_segments > (ULONG) &data[1] + data[-1])) {
|
||||
# else
|
||||
{
|
||||
# endif /* AMIGA_SKIP_SEG */
|
||||
GC_add_roots_inner((char *)&data[1],
|
||||
((char *)&data[1]) + data[-1], FALSE);
|
||||
}
|
||||
}
|
||||
}
|
||||
#endif /* old version */
|
||||
|
||||
|
||||
#endif
|
||||
|
||||
|
||||
|
||||
#ifdef GC_AMIGA_AM
|
||||
|
||||
#ifndef GC_AMIGA_FASTALLOC
|
||||
|
||||
void *GC_amiga_allocwrapper(size_t size,void *(*AllocFunction)(size_t size2)){
|
||||
return (*AllocFunction)(size);
|
||||
}
|
||||
|
||||
void *(*GC_amiga_allocwrapper_do)(size_t size,void *(*AllocFunction)(size_t size2))
|
||||
=GC_amiga_allocwrapper;
|
||||
|
||||
#else
|
||||
|
||||
|
||||
|
||||
|
||||
void *GC_amiga_allocwrapper_firsttime(size_t size,void *(*AllocFunction)(size_t size2));
|
||||
|
||||
void *(*GC_amiga_allocwrapper_do)(size_t size,void *(*AllocFunction)(size_t size2))
|
||||
=GC_amiga_allocwrapper_firsttime;
|
||||
|
||||
|
||||
/******************************************************************
|
||||
Amiga-spesific routines to obtain memory, and force GC to give
|
||||
back fast-mem whenever possible.
|
||||
These hacks makes gc-programs go many times faster when
|
||||
the amiga is low on memory, and are therefore strictly necesarry.
|
||||
|
||||
-Kjetil S. Matheussen, 2000.
|
||||
******************************************************************/
|
||||
|
||||
|
||||
|
||||
/* List-header for all allocated memory. */
|
||||
|
||||
struct GC_Amiga_AllocedMemoryHeader{
|
||||
ULONG size;
|
||||
struct GC_Amiga_AllocedMemoryHeader *next;
|
||||
};
|
||||
struct GC_Amiga_AllocedMemoryHeader *GC_AMIGAMEM=(struct GC_Amiga_AllocedMemoryHeader *)(int)~(NULL);
|
||||
|
||||
|
||||
|
||||
/* Type of memory. Once in the execution of a program, this might change to MEMF_ANY|MEMF_CLEAR */
|
||||
|
||||
ULONG GC_AMIGA_MEMF = MEMF_FAST | MEMF_CLEAR;
|
||||
|
||||
|
||||
/* Prevents GC_amiga_get_mem from allocating memory if this one is TRUE. */
|
||||
#ifndef GC_AMIGA_ONLYFAST
|
||||
BOOL GC_amiga_dontalloc=FALSE;
|
||||
#endif
|
||||
|
||||
#ifdef GC_AMIGA_PRINTSTATS
|
||||
int succ=0,succ2=0;
|
||||
int nsucc=0,nsucc2=0;
|
||||
int nullretries=0;
|
||||
int numcollects=0;
|
||||
int chipa=0;
|
||||
int allochip=0;
|
||||
int allocfast=0;
|
||||
int cur0=0;
|
||||
int cur1=0;
|
||||
int cur10=0;
|
||||
int cur50=0;
|
||||
int cur150=0;
|
||||
int cur151=0;
|
||||
int ncur0=0;
|
||||
int ncur1=0;
|
||||
int ncur10=0;
|
||||
int ncur50=0;
|
||||
int ncur150=0;
|
||||
int ncur151=0;
|
||||
#endif
|
||||
|
||||
/* Free everything at program-end. */
|
||||
|
||||
void GC_amiga_free_all_mem(void){
|
||||
struct GC_Amiga_AllocedMemoryHeader *gc_am=(struct GC_Amiga_AllocedMemoryHeader *)(~(int)(GC_AMIGAMEM));
|
||||
struct GC_Amiga_AllocedMemoryHeader *temp;
|
||||
|
||||
#ifdef GC_AMIGA_PRINTSTATS
|
||||
printf("\n\n"
|
||||
"%d bytes of chip-mem, and %d bytes of fast-mem where allocated from the OS.\n",
|
||||
allochip,allocfast
|
||||
);
|
||||
printf(
|
||||
"%d bytes of chip-mem were returned from the GC_AMIGA_FASTALLOC supported allocating functions.\n",
|
||||
chipa
|
||||
);
|
||||
printf("\n");
|
||||
printf("GC_gcollect was called %d times to avoid returning NULL or start allocating with the MEMF_ANY flag.\n",numcollects);
|
||||
printf("%d of them was a success. (the others had to use allocation from the OS.)\n",nullretries);
|
||||
printf("\n");
|
||||
printf("Succeded forcing %d gc-allocations (%d bytes) of chip-mem to be fast-mem.\n",succ,succ2);
|
||||
printf("Failed forcing %d gc-allocations (%d bytes) of chip-mem to be fast-mem.\n",nsucc,nsucc2);
|
||||
printf("\n");
|
||||
printf(
|
||||
"Number of retries before succeding a chip->fast force:\n"
|
||||
"0: %d, 1: %d, 2-9: %d, 10-49: %d, 50-149: %d, >150: %d\n",
|
||||
cur0,cur1,cur10,cur50,cur150,cur151
|
||||
);
|
||||
printf(
|
||||
"Number of retries before giving up a chip->fast force:\n"
|
||||
"0: %d, 1: %d, 2-9: %d, 10-49: %d, 50-149: %d, >150: %d\n",
|
||||
ncur0,ncur1,ncur10,ncur50,ncur150,ncur151
|
||||
);
|
||||
#endif
|
||||
|
||||
while(gc_am!=NULL){
|
||||
temp=gc_am->next;
|
||||
FreeMem(gc_am,gc_am->size);
|
||||
gc_am=(struct GC_Amiga_AllocedMemoryHeader *)(~(int)(temp));
|
||||
}
|
||||
}
|
||||
|
||||
#ifndef GC_AMIGA_ONLYFAST
|
||||
|
||||
/* All memory with address lower than this one is chip-mem. */
|
||||
|
||||
char *chipmax;
|
||||
|
||||
|
||||
/*
|
||||
* Allways set to the last size of memory tried to be allocated.
|
||||
* Needed to ensure allocation when the size is bigger than 100000.
|
||||
*
|
||||
*/
|
||||
size_t latestsize;
|
||||
|
||||
#endif
|
||||
|
||||
|
||||
/*
|
||||
* The actual function that is called with the GET_MEM macro.
|
||||
*
|
||||
*/
|
||||
|
||||
void *GC_amiga_get_mem(size_t size){
|
||||
struct GC_Amiga_AllocedMemoryHeader *gc_am;
|
||||
|
||||
#ifndef GC_AMIGA_ONLYFAST
|
||||
if(GC_amiga_dontalloc==TRUE){
|
||||
// printf("rejected, size: %d, latestsize: %d\n",size,latestsize);
|
||||
return NULL;
|
||||
}
|
||||
|
||||
// We really don't want to use chip-mem, but if we must, then as little as possible.
|
||||
if(GC_AMIGA_MEMF==(MEMF_ANY|MEMF_CLEAR) && size>100000 && latestsize<50000) return NULL;
|
||||
#endif
|
||||
|
||||
gc_am=AllocMem((ULONG)(size + sizeof(struct GC_Amiga_AllocedMemoryHeader)),GC_AMIGA_MEMF);
|
||||
if(gc_am==NULL) return NULL;
|
||||
|
||||
gc_am->next=GC_AMIGAMEM;
|
||||
gc_am->size=size + sizeof(struct GC_Amiga_AllocedMemoryHeader);
|
||||
GC_AMIGAMEM=(struct GC_Amiga_AllocedMemoryHeader *)(~(int)(gc_am));
|
||||
|
||||
// printf("Allocated %d (%d) bytes at address: %x. Latest: %d\n",size,tot,gc_am,latestsize);
|
||||
|
||||
#ifdef GC_AMIGA_PRINTSTATS
|
||||
if((char *)gc_am<chipmax){
|
||||
allochip+=size;
|
||||
}else{
|
||||
allocfast+=size;
|
||||
}
|
||||
#endif
|
||||
|
||||
return gc_am+1;
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
#ifndef GC_AMIGA_ONLYFAST
|
||||
|
||||
/* Tries very hard to force GC to find fast-mem to return. Done recursively
|
||||
* to hold the rejected memory-pointers reachable from the collector in an
|
||||
* easy way.
|
||||
*
|
||||
*/
|
||||
#ifdef GC_AMIGA_RETRY
|
||||
void *GC_amiga_rec_alloc(size_t size,void *(*AllocFunction)(size_t size2),const int rec){
|
||||
void *ret;
|
||||
|
||||
ret=(*AllocFunction)(size);
|
||||
|
||||
#ifdef GC_AMIGA_PRINTSTATS
|
||||
if((char *)ret>chipmax || ret==NULL){
|
||||
if(ret==NULL){
|
||||
nsucc++;
|
||||
nsucc2+=size;
|
||||
if(rec==0) ncur0++;
|
||||
if(rec==1) ncur1++;
|
||||
if(rec>1 && rec<10) ncur10++;
|
||||
if(rec>=10 && rec<50) ncur50++;
|
||||
if(rec>=50 && rec<150) ncur150++;
|
||||
if(rec>=150) ncur151++;
|
||||
}else{
|
||||
succ++;
|
||||
succ2+=size;
|
||||
if(rec==0) cur0++;
|
||||
if(rec==1) cur1++;
|
||||
if(rec>1 && rec<10) cur10++;
|
||||
if(rec>=10 && rec<50) cur50++;
|
||||
if(rec>=50 && rec<150) cur150++;
|
||||
if(rec>=150) cur151++;
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
if (((char *)ret)<=chipmax && ret!=NULL && (rec<(size>500000?9:size/5000))){
|
||||
ret=GC_amiga_rec_alloc(size,AllocFunction,rec+1);
|
||||
// GC_free(ret2);
|
||||
}
|
||||
|
||||
return ret;
|
||||
}
|
||||
#endif
|
||||
|
||||
|
||||
/* The allocating-functions defined inside the amiga-blocks in gc.h is called
|
||||
* via these functions.
|
||||
*/
|
||||
|
||||
|
||||
void *GC_amiga_allocwrapper_any(size_t size,void *(*AllocFunction)(size_t size2)){
|
||||
void *ret,*ret2;
|
||||
|
||||
GC_amiga_dontalloc=TRUE; // Pretty tough thing to do, but its indeed necesarry.
|
||||
latestsize=size;
|
||||
|
||||
ret=(*AllocFunction)(size);
|
||||
|
||||
if(((char *)ret) <= chipmax){
|
||||
if(ret==NULL){
|
||||
//Give GC access to allocate memory.
|
||||
#ifdef GC_AMIGA_GC
|
||||
if(!GC_dont_gc){
|
||||
GC_gcollect();
|
||||
#ifdef GC_AMIGA_PRINTSTATS
|
||||
numcollects++;
|
||||
#endif
|
||||
ret=(*AllocFunction)(size);
|
||||
}
|
||||
#endif
|
||||
if(ret==NULL){
|
||||
GC_amiga_dontalloc=FALSE;
|
||||
ret=(*AllocFunction)(size);
|
||||
if(ret==NULL){
|
||||
WARN("Out of Memory! Returning NIL!\n", 0);
|
||||
}
|
||||
}
|
||||
#ifdef GC_AMIGA_PRINTSTATS
|
||||
else{
|
||||
nullretries++;
|
||||
}
|
||||
if(ret!=NULL && (char *)ret<=chipmax) chipa+=size;
|
||||
#endif
|
||||
}
|
||||
#ifdef GC_AMIGA_RETRY
|
||||
else{
|
||||
/* We got chip-mem. Better try again and again and again etc., we might get fast-mem sooner or later... */
|
||||
/* Using gctest to check the effectiviness of doing this, does seldom give a very good result. */
|
||||
/* However, real programs doesn't normally rapidly allocate and deallocate. */
|
||||
// printf("trying to force... %d bytes... ",size);
|
||||
if(
|
||||
AllocFunction!=GC_malloc_uncollectable
|
||||
#ifdef ATOMIC_UNCOLLECTABLE
|
||||
&& AllocFunction!=GC_malloc_atomic_uncollectable
|
||||
#endif
|
||||
){
|
||||
ret2=GC_amiga_rec_alloc(size,AllocFunction,0);
|
||||
}else{
|
||||
ret2=(*AllocFunction)(size);
|
||||
#ifdef GC_AMIGA_PRINTSTATS
|
||||
if((char *)ret2<chipmax || ret2==NULL){
|
||||
nsucc++;
|
||||
nsucc2+=size;
|
||||
ncur0++;
|
||||
}else{
|
||||
succ++;
|
||||
succ2+=size;
|
||||
cur0++;
|
||||
}
|
||||
#endif
|
||||
}
|
||||
if(((char *)ret2)>chipmax){
|
||||
// printf("Succeeded.\n");
|
||||
GC_free(ret);
|
||||
ret=ret2;
|
||||
}else{
|
||||
GC_free(ret2);
|
||||
// printf("But did not succeed.\n");
|
||||
}
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
||||
GC_amiga_dontalloc=FALSE;
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
||||
|
||||
|
||||
void (*GC_amiga_toany)(void)=NULL;
|
||||
|
||||
void GC_amiga_set_toany(void (*func)(void)){
|
||||
GC_amiga_toany=func;
|
||||
}
|
||||
|
||||
#endif // !GC_AMIGA_ONLYFAST
|
||||
|
||||
|
||||
void *GC_amiga_allocwrapper_fast(size_t size,void *(*AllocFunction)(size_t size2)){
|
||||
void *ret;
|
||||
|
||||
ret=(*AllocFunction)(size);
|
||||
|
||||
if(ret==NULL){
|
||||
// Enable chip-mem allocation.
|
||||
// printf("ret==NULL\n");
|
||||
#ifdef GC_AMIGA_GC
|
||||
if(!GC_dont_gc){
|
||||
GC_gcollect();
|
||||
#ifdef GC_AMIGA_PRINTSTATS
|
||||
numcollects++;
|
||||
#endif
|
||||
ret=(*AllocFunction)(size);
|
||||
}
|
||||
#endif
|
||||
if(ret==NULL){
|
||||
#ifndef GC_AMIGA_ONLYFAST
|
||||
GC_AMIGA_MEMF=MEMF_ANY | MEMF_CLEAR;
|
||||
if(GC_amiga_toany!=NULL) (*GC_amiga_toany)();
|
||||
GC_amiga_allocwrapper_do=GC_amiga_allocwrapper_any;
|
||||
return GC_amiga_allocwrapper_any(size,AllocFunction);
|
||||
#endif
|
||||
}
|
||||
#ifdef GC_AMIGA_PRINTSTATS
|
||||
else{
|
||||
nullretries++;
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
||||
void *GC_amiga_allocwrapper_firsttime(size_t size,void *(*AllocFunction)(size_t size2)){
|
||||
atexit(&GC_amiga_free_all_mem);
|
||||
chipmax=(char *)SysBase->MaxLocMem; // For people still having SysBase in chip-mem, this might speed up a bit.
|
||||
GC_amiga_allocwrapper_do=GC_amiga_allocwrapper_fast;
|
||||
return GC_amiga_allocwrapper_fast(size,AllocFunction);
|
||||
}
|
||||
|
||||
|
||||
#endif //GC_AMIGA_FASTALLOC
|
||||
|
||||
|
||||
|
||||
/*
|
||||
* The wrapped realloc function.
|
||||
*
|
||||
*/
|
||||
void *GC_amiga_realloc(void *old_object,size_t new_size_in_bytes){
|
||||
#ifndef GC_AMIGA_FASTALLOC
|
||||
return GC_realloc(old_object,new_size_in_bytes);
|
||||
#else
|
||||
void *ret;
|
||||
latestsize=new_size_in_bytes;
|
||||
ret=GC_realloc(old_object,new_size_in_bytes);
|
||||
if(ret==NULL && GC_AMIGA_MEMF==(MEMF_FAST | MEMF_CLEAR)){
|
||||
/* Out of fast-mem. */
|
||||
#ifdef GC_AMIGA_GC
|
||||
if(!GC_dont_gc){
|
||||
GC_gcollect();
|
||||
#ifdef GC_AMIGA_PRINTSTATS
|
||||
numcollects++;
|
||||
#endif
|
||||
ret=GC_realloc(old_object,new_size_in_bytes);
|
||||
}
|
||||
#endif
|
||||
if(ret==NULL){
|
||||
#ifndef GC_AMIGA_ONLYFAST
|
||||
GC_AMIGA_MEMF=MEMF_ANY | MEMF_CLEAR;
|
||||
if(GC_amiga_toany!=NULL) (*GC_amiga_toany)();
|
||||
GC_amiga_allocwrapper_do=GC_amiga_allocwrapper_any;
|
||||
ret=GC_realloc(old_object,new_size_in_bytes);
|
||||
#endif
|
||||
}
|
||||
#ifdef GC_AMIGA_PRINTSTATS
|
||||
else{
|
||||
nullretries++;
|
||||
}
|
||||
#endif
|
||||
}
|
||||
if(ret==NULL){
|
||||
WARN("Out of Memory! Returning NIL!\n", 0);
|
||||
}
|
||||
#ifdef GC_AMIGA_PRINTSTATS
|
||||
if(((char *)ret)<chipmax && ret!=NULL){
|
||||
chipa+=new_size_in_bytes;
|
||||
}
|
||||
#endif
|
||||
return ret;
|
||||
#endif
|
||||
}
|
||||
|
||||
#endif //GC_AMIGA_AM
|
||||
|
||||
|
87
jam-files/engine/boehm_gc/BCC_MAKEFILE
Normal file
87
jam-files/engine/boehm_gc/BCC_MAKEFILE
Normal file
@ -0,0 +1,87 @@
|
||||
# Makefile for Borland C++ 5.5 on NT
|
||||
# If you have the Borland assembler, remove "-DUSE_GENERIC"
|
||||
#
|
||||
bc= c:\Borland\BCC55
|
||||
bcbin= $(bc)\bin
|
||||
bclib= $(bc)\lib
|
||||
bcinclude= $(bc)\include
|
||||
|
||||
gcinclude1 = $(bc)\gc6.2\include
|
||||
gcinclude2 = $(bc)\gc6.2\cord
|
||||
|
||||
cc= $(bcbin)\bcc32
|
||||
rc= $(bcbin)\brc32
|
||||
lib= $(bcbin)\tlib
|
||||
link= $(bcbin)\ilink32
|
||||
cflags= -O2 -R -v- -vi -H -H=gc.csm -I$(bcinclude);$(gcinclude1);$(gcinclude2) -L$(bclib) \
|
||||
-w-pro -w-aus -w-par -w-ccc -w-rch -a4 -D__STDC__=0
|
||||
defines= -DALL_INTERIOR_POINTERS -DUSE_GENERIC -DNO_GETENV -DJAVA_FINALIZATION -DGC_OPERATOR_NEW_ARRAY
|
||||
|
||||
.c.obj:
|
||||
$(cc) @&&|
|
||||
$(cdebug) $(cflags) $(cvars) $(defines) -o$* -c $*.c
|
||||
|
|
||||
|
||||
.cpp.obj:
|
||||
$(cc) @&&|
|
||||
$(cdebug) $(cflags) $(cvars) $(defines) -o$* -c $*.cpp
|
||||
|
|
||||
|
||||
.rc.res:
|
||||
$(rc) -i$(bcinclude) -r -fo$* $*.rc
|
||||
|
||||
XXXOBJS= XXXalloc.obj XXXreclaim.obj XXXallchblk.obj XXXmisc.obj \
|
||||
XXXmach_dep.obj XXXos_dep.obj XXXmark_rts.obj XXXheaders.obj XXXmark.obj \
|
||||
XXXobj_map.obj XXXblacklst.obj XXXfinalize.obj XXXnew_hblk.obj \
|
||||
XXXdbg_mlc.obj XXXmalloc.obj XXXstubborn.obj XXXdyn_load.obj \
|
||||
XXXtypd_mlc.obj XXXptr_chck.obj XXXgc_cpp.obj XXXmallocx.obj
|
||||
|
||||
OBJS= $(XXXOBJS:XXX=)
|
||||
|
||||
all: gctest.exe cord\de.exe test_cpp.exe
|
||||
|
||||
$(OBJS) test.obj: include\private\gc_priv.h include\private\gc_hdrs.h include\gc.h include\private\gcconfig.h MAKEFILE
|
||||
|
||||
gc.lib: $(OBJS)
|
||||
del gc.lib
|
||||
$(lib) $* @&&|
|
||||
$(XXXOBJS:XXX=+)
|
||||
|
|
||||
|
||||
gctest.exe: tests\test.obj gc.lib
|
||||
$(cc) @&&|
|
||||
$(cflags) -W -e$* tests\test.obj gc.lib
|
||||
|
|
||||
|
||||
cord\de.obj cord\de_win.obj: include\cord.h include\private\cord_pos.h cord\de_win.h \
|
||||
cord\de_cmds.h
|
||||
|
||||
cord\de.exe: cord\cordbscs.obj cord\cordxtra.obj cord\de.obj cord\de_win.obj \
|
||||
cord\de_win.res gc.lib
|
||||
$(cc) @&&|
|
||||
$(cflags) -W -e$* cord\cordbscs.obj cord\cordxtra.obj \
|
||||
cord\de.obj cord\de_win.obj gc.lib
|
||||
|
|
||||
$(rc) cord\de_win.res cord\de.exe
|
||||
|
||||
gc_cpp.obj: include\gc_cpp.h include\gc.h
|
||||
|
||||
gc_cpp.cpp: gc_cpp.cc
|
||||
copy gc_cpp.cc gc_cpp.cpp
|
||||
|
||||
test_cpp.cpp: tests\test_cpp.cc
|
||||
copy tests\test_cpp.cc test_cpp.cpp
|
||||
|
||||
test_cpp.exe: test_cpp.obj include\gc_cpp.h include\gc.h gc.lib
|
||||
$(cc) @&&|
|
||||
$(cflags) -W -e$* test_cpp.obj gc.lib
|
||||
|
|
||||
|
||||
scratch:
|
||||
-del *.obj *.res *.exe *.csm cord\*.obj cord\*.res cord\*.exe cord\*.csm
|
||||
|
||||
clean:
|
||||
del gc.lib
|
||||
del *.obj
|
||||
del tests\test.obj
|
||||
|
363
jam-files/engine/boehm_gc/ChangeLog
Normal file
363
jam-files/engine/boehm_gc/ChangeLog
Normal file
@ -0,0 +1,363 @@
|
||||
2007-07-02 Hans Boehm <Hans.Boehm@hp.com>
|
||||
|
||||
* gc_config_macros.h: Also check for IA64 when setting
|
||||
GC_HPUX_THREADS.
|
||||
* mallocx.c: Change my_bytes_allocd to signed_word.
|
||||
* include/pthread_redirects.h: Remove obsolete Solaris threads
|
||||
(as opposed to pthreads) support.
|
||||
|
||||
2007-07-02 Hans Boehm <Hans.Boehm@hp.com>
|
||||
|
||||
* mach_dep.c (GC_with_callee_saves_pushed): Don't use getcontext()
|
||||
on ARM/Linux. Check getcontext() return value.
|
||||
|
||||
2007-06-29 Hans Boehm <Hans.Boehm@hp.com>
|
||||
|
||||
* backgraph.c (per_object_func): Make argument types consistent.
|
||||
(GC_traverse_back_graph): Mark GC_deepest_obj.
|
||||
|
||||
2007-06-29 Hans Boehm <Hans.Boehm@hp.com>
|
||||
|
||||
* finalize.c (GC_finalize): Change dl_size and fo_size to size_t.
|
||||
* os_dep.c (GC_win32_get_mem): Add GC_mem_top_down option.
|
||||
|
||||
2007-06-28 Hans Boehm <Hans.Boehm@hp.com>
|
||||
|
||||
* doc/README.win32, doc/README, README.QUICK: Fix some of the worst
|
||||
anachronisms.
|
||||
* dyn_load.c: Partially support cygwin, but don't enable it yet.
|
||||
|
||||
2007-06-28 Hans Boehm <Hans.Boehm@hp.com>
|
||||
|
||||
* Makefile.am: Use -no-undefined for libgc.
|
||||
* Makefile.in: Regenerate.
|
||||
* Makefile.direct: Document USE_PROC_FOR_LIBRARIES.
|
||||
* dyn_load.c (GC_register_map_entries): Rename prot_buf to prot
|
||||
consistently.
|
||||
* misc.c: Fix some WARN calls. Move GC_is_initialized setting and
|
||||
GC_thr_init() call.
|
||||
* os_dep.c: Consistently use WARN where appropriate.
|
||||
* thread_local_alloc.c: Revert change to GC_WIN32_THREADS test. Instead
|
||||
remove inappropriate pthread.h include.
|
||||
* doc/README.linux: Remove some anachronisms.
|
||||
|
||||
2007-06-23 Hans Boehm <Hans.Boehm@hp.com>
|
||||
|
||||
* alloc.c: Also use GC_check_tls on non-Linux systems.
|
||||
* mallocx.c (GC_reclaim_generic): Remove bogus declaration.
|
||||
* include/private/gc_priv.h (GC_reclaim_generic): Declare correctly
|
||||
with prototype.
|
||||
|
||||
2007-06-19 Hans Boehm <Hans.Boehm@hp.com>
|
||||
|
||||
* alloc.c (GC_adj_bytes_allocd): Avoid (long) casts, fix comment.
|
||||
(GC_print_heap_sects): Use size_t instead of unsigned long.
|
||||
* thread_local_alloc.c (GC_lookup_thread): Define in the correct
|
||||
context.
|
||||
* win32_threads.c, include/gc_config_macros.h: The last of Romano
|
||||
Paolo Tenca's patch. Move stdint.h include to gc_config_macros.h.
|
||||
* include/gc_inline.h: Avoid gc_priv.h dependencies.
|
||||
* tests/test.c (check_heap_stats): Replace unsigned long with size_t.
|
||||
|
||||
2007-06-12 Hans Boehm <Hans.Boehm@hp.com>
|
||||
|
||||
* aclocal.m4: Regenerate to update date.
|
||||
|
||||
2007-06-10 Hans Boehm <Hans.Boehm@hp.com>
|
||||
|
||||
* NT_X64_STATIC_THREADS_MAKEFILE: Replace obsolete -debugtype:cv.
|
||||
* mark_rts.c (GC_push_roots): Fix kind type.
|
||||
|
||||
2007-06-06 Hans Boehm <Hans.Boehm@hp.com>
|
||||
|
||||
* doc/README.win64: New file.
|
||||
* doc/doc.am, Makefile.direct: Add README.win64.
|
||||
* Makefile.in: Regenerate.
|
||||
|
||||
2007-06-06 Hans Boehm <Hans.Boehm@hp.com>
|
||||
|
||||
* Makefile.am, Makefile.direct: Add NT_X64_STATIC_THREADS_MAKEFILE.
|
||||
* Makefile.in: Regenerate.
|
||||
* NT_X64_STATIC_THREADS_MAKEFILE: Fix warning flags.
|
||||
* allochblk.c, alloc.c, blacklst.c, dbg_malc.c, dyn_load.c,
|
||||
finalize.c, headers.c, mach_dep.c, malloc.c, mark.c, misc.c,
|
||||
obj_map.c, os_dep.c, ptr_chck.c, reclaim.c, typd_mlc.c,
|
||||
win32_threads.c, cord/de_win.c, include/gc_mark.h,
|
||||
include/private/gc_hdrs.h, include/private/gc_pmark.h,
|
||||
include/private/gc_priv.h, tests/test_cpp.cc:
|
||||
Replace old style function declarations. Clean up integral types.
|
||||
Remove register declarations. The change in malloc.c and the
|
||||
"int descr" declaration in mark.c are the most likely to have
|
||||
been real bugs outside of win64.
|
||||
* msvc_dbg.c: Disable on win64.
|
||||
* win32_threads.c: Add AMD64 support.
|
||||
* include/gc.h: no backtrace on AMD64 for now.
|
||||
|
||||
2007-06-06 Hans Boehm <Hans.Boehm@hp.com>
|
||||
|
||||
* msvc_dbg.c(GetModuleBase): Replace strcat with strcat_s.
|
||||
|
||||
2007-06-06 Hans Boehm <Hans.Boehm@hp.com>
|
||||
|
||||
* include/gc.h: (GC_word, GC_signed_word): Fix win64 definitions.
|
||||
Don't include windows.h in an extern "C" context.
|
||||
* include/private/gcconfig.h: Fix win64/X86_64 configuration.
|
||||
* tests/test.c: Eliminate more old style function definitions.
|
||||
Cleanup pointer and integer casts for win64.
|
||||
* tests/test_cpp.cc: Don't include gc_priv.h.
|
||||
* NT_STATIC_THREADS_MAKEFILE: Restrict suffixes for VC++ 2005.
|
||||
* NT_X64_STATIC_THREADS_MAKEFILE: New.
|
||||
|
||||
2007-06-06 Hans Boehm <Hans.Boehm@hp.com> (Really mostly Romano Paolo Tenca)
|
||||
|
||||
* win32_threads.c: Separate out DEBUG_WIN32_PTHREADS_STACK. Ignore
|
||||
FINISHED threads for suspension. (GC_pthread_join): Add
|
||||
pthread_self() cast. (GC_pthread_start_inner): Execute cleanup
|
||||
handler when popping it.
|
||||
* include/private/gc_locks.h: Inline THREAD_EQUAL for
|
||||
GC_WIN32_PTHREADS. Define USE_PTHREAD_LOCKS only if we have
|
||||
pthreads.
|
||||
|
||||
2007-05-23 Hans Boehm <Hans.Boehm@hp.com> (Really mostly Romano Paolo Tenca)
|
||||
|
||||
* gc_dlopen.c, thread_local_alloc.c, threadlibs.c, win32_threads.c,
|
||||
tests/test.c: Accomodate GC_WIN32_PTHREADS.
|
||||
* include/gc.h: Don't include windows.h for GC_WIN32_PTHREADS.
|
||||
* include/gc_config_macros.h: Define both PTHREADS and
|
||||
GC_WIN32_THREADS.
|
||||
* include/private/gc_locks.h: Nonstandard definitions of
|
||||
NUMERIC_THREAD_ID for GC_WIN32_PTHREADS.
|
||||
* doc/README.win32, Makefile.direct: Include documentation
|
||||
for GC_WIN32_PTHREADS.
|
||||
* Makefile.direct: Remove some anachronisms in the documentation.
|
||||
|
||||
2007-05-23 Hans Boehm <Hans.Boehm@hp.com>
|
||||
|
||||
* Makefile.am: Move includes to bottom. Add better library
|
||||
dependencies. Increment library version. Remove "SUBDIRS += .".
|
||||
* cord/cord.am, tests/tests.am: Add better library dependencies.
|
||||
Remove now unnecessary dependencies.
|
||||
* Makefile.in: Regenerate.
|
||||
* include/gc.h (GC_begin_thread_ex, GC_endthreadex, GC_ExitThread):
|
||||
Move to define on all Windows platforms. (_beginthread): define
|
||||
to generate error if used.
|
||||
|
||||
2007-05-22 Hans Boehm <Hans.Boehm@hp.com>
|
||||
|
||||
* include/private/gc_locks.h: Format to 80 columns.
|
||||
|
||||
2007-05-22 Hans Boehm <Hans.Boehm@hp.com>
|
||||
|
||||
* malloc.c(GC_free): Ignore bad frees on MSWIN32 with REDIRECT_MALLOC.
|
||||
* NT_MAKEFILE: msvc_dbg.h is in include/private. Don't use cvars
|
||||
rc.
|
||||
* misc.c (WIN32 GC_write): Define GC_need_to_lock in single-threaded
|
||||
case.
|
||||
* win32_threads.c: Test for __MINGW32__ in addition to _MINGW_VER.
|
||||
(GC_CreateThread, GC_beginthreadex): Deallocate args even if we fail.
|
||||
* include/gc.h: Add GC_reachable_here(). (GC_WinMain): Add GC_API.
|
||||
(GC_beginthreadex, GC_endthreadex, GC_ExitThread): Declare.
|
||||
* tests/test.c: Add GC_reachable_here() call.
|
||||
|
||||
2007-05-21 Hans Boehm <Hans.Boehm@hp.com>
|
||||
|
||||
* alloc.c (GC_try_to_collect): Call GC_init if necessary.
|
||||
* tests/thread_leak_test.c: Don't unconditionally define
|
||||
GC_LINUX_THREADS.
|
||||
|
||||
2007-05-21 Andreas Tobler <a.tobler@schweiz.org>
|
||||
|
||||
* Makefile.am: Remove extra_ldflags_libgc definition.
|
||||
* Makefile.in: Regenerate.
|
||||
|
||||
2007-05-17 Hans Boehm <Hans.Boehm@hp.com>
|
||||
|
||||
* include/private/gc_priv.h: Define AO_REQUIRE_CAS.
|
||||
|
||||
2007-05-16 Hans Boehm <Hans.Boehm@hp.com>
|
||||
|
||||
* finalize.c (GC_unreachable_finalize_mark_proc): Don't return void
|
||||
value.
|
||||
|
||||
2007-05-15 Hans Boehm <Hans.Boehm@hp.com>
|
||||
|
||||
* configure.ac, version.h, doc/README: Change version to 7.0alpha10.
|
||||
* configure: Regenerate.
|
||||
|
||||
[7.0alpha9 release]
|
||||
|
||||
2007-05-15 Hans Boehm <Hans.Boehm@hp.com>
|
||||
|
||||
* configure.ac, version.h, doc/README: Change version to 7.0alpha9.
|
||||
* configure: Regenerate.
|
||||
|
||||
2007-05-15 Hans Boehm <Hans.Boehm@hp.com>
|
||||
|
||||
* Makefile.am: Include NT_STSTIC_THREADS_MAKEFILE in dist.
|
||||
* Makefile.in: Regenerate.
|
||||
* include/private/gc_locks.h: GC_compare_and_exchange, GC_atomic_add:
|
||||
remove. NUMERIC_THREAD_ID, THREAD_EQUAL: New. GC_lock_holder: now
|
||||
unsigned long. I_DONT_HOLD_LOCK, I_HOLD_LOCK: Update.
|
||||
* pthread_stop_world.c, pthread_support.c, win32_threads.c: Use
|
||||
NUMERIC_THREAD_ID, THREAD_EQUAL.
|
||||
* include/private/gcconfig.h: GENERIC_COMPARE_AND_SWAP: Remove.
|
||||
* include/private/thread_local_alloc.h: Don't USE_COMPILER_TLS on
|
||||
ARM.
|
||||
|
||||
2007-05-11 Hans Boehm <Hans.Boehm@hp.com>
|
||||
|
||||
* dbg_mlc.c, include/gc.h, finalize.c: Merge Alexandre Oliva's
|
||||
GC_debug_register_finalizer_unreachable() patch from gcc tree.
|
||||
* thread_local_alloc.c (GC_malloc, GC_malloc_atomic): Add assertions
|
||||
to check GC has been initialized.
|
||||
|
||||
2007-05-10 Hans Boehm <Hans.Boehm@hp.com>
|
||||
|
||||
* include/gc_cpp.h: Documentation updates.
|
||||
* include/gc_config_macros.h: Don't check for __ppc__ to set
|
||||
DARWIN_THREADS.
|
||||
* Makefile.am: Include configure_atomic_ops.sh in dist.
|
||||
* Makefile.in: Regenerate.
|
||||
|
||||
2007-05-08 Hans Boehm <Hans.Boehm@hp.com>
|
||||
|
||||
* Makefile.am: Dont distribute copied atomic_ops files. Include
|
||||
libatomic_ops with "make dist".
|
||||
* Makefile.in: Regenerate.
|
||||
* configure: Regenerate.
|
||||
* configure.ac: Enable THREAD_LOCAL_ALLOC for Cygwin with threads.
|
||||
* win32_threads.c: Report error for Cygwin + GC_DLL.
|
||||
|
||||
2007-05-08 Hans Boehm <Hans.Boehm@hp.com>
|
||||
|
||||
* Makefile.direct: Update THREAD_LOCAL_ALLOC documentation.
|
||||
* cord/de_win.c: Rename and move AboutBox. Call GC_INIT. Remove
|
||||
MakeProcInstance anachronism.
|
||||
* doc/README.macros: Officially remove elif prohibition.
|
||||
Remove documentation for defunct SRC_M3 support.
|
||||
* include/gc.h: Remove more SRC_M3 references.
|
||||
* include/private/gcconfig.h: Remove still more SRC_M3 references.
|
||||
GC_SOLARIS_THREADS no longer needs to be checked separately.
|
||||
|
||||
2007-05-08 Hans Boehm <Hans.Boehm@hp.com>
|
||||
|
||||
* thread_local_alloc.c, include/private/thread_local_alloc.h:
|
||||
Spell __declspec correctly.
|
||||
* NT_STATIC_THREADS_MAKEFILE: Enable thread-local allocation.
|
||||
|
||||
2007-05-07 Hans Boehm <Hans.Boehm@hp.com>
|
||||
|
||||
* doc/README.win32: Adjust GC_win32_dll_threads rules again.
|
||||
|
||||
2007-05-07 Hans Boehm <Hans.Boehm@hp.com>
|
||||
|
||||
* mark.c (GC_mark_some wrapper): Restructure for readability, handle
|
||||
GC_started_thread_while_stopped.
|
||||
* misc.c (Win32 GC_write): Lock GC_write_cs only if needed.
|
||||
* win32_threads.c: (client_has_run): remove,
|
||||
GC_started_thread_while_stopped, GC_attached_thread: add.
|
||||
(GC_push_all_stacks): Add verbose output.
|
||||
(DllMain): Avoid initializing collector or the like.
|
||||
Never update both thread tables.
|
||||
* doc/README.win32: Adjust GC_win32_dll_threads rules.
|
||||
|
||||
2007-05-07 Hans Boehm <Hans.Boehm@hp.com>
|
||||
|
||||
* pthread_stop_world.c (GC_push_all_stacks): Print thread count with
|
||||
GC_PRINT_VERBOSE_STATS.
|
||||
|
||||
2007-05-01 Hans Boehm <Hans.Boehm@hp.com>
|
||||
(and Manuel Serrano, Craig McDaniel)
|
||||
|
||||
* configure.ac: Comment out redundant
|
||||
AC_DEFINE(NO_EXECUTE_PERMISSION).
|
||||
* configure: Regenerate.
|
||||
* sparc_mach_dep.S: Remove single quote in comment.
|
||||
* include/private/gcconfig.h: Fix DATAEND for NONSTOP.
|
||||
* win32_threads.c: Include stdint.h for Mingw. Add GC_API for DllMain.
|
||||
(GC_use_DllMain): Fix assertion.
|
||||
|
||||
2007-02-14 Andreas Tobler <a.tobler@schweiz.org>
|
||||
|
||||
* configure.ac: Introduce extra_ldflags_libgc. Use it for Darwin.
|
||||
* configure: Regenerate.
|
||||
* Makefile.am (libgc_la_LDFLAGS): Use extra_ldflags_libgc.
|
||||
* Makefile.in: Regenerate.
|
||||
* include/private/gcconfig.h: Enable MPROTECT_VDB for all Darwin
|
||||
targets. Remove comments.
|
||||
Prepare ppc64 support for Darwin.
|
||||
|
||||
2007-01-29 Andreas Tobler <a.tobler@schweiz.org>
|
||||
|
||||
* darwin_stop_world.c: Clean up and reformat code.
|
||||
|
||||
2007-01-28 Andreas Tobler <a.tobler@schweiz.org>
|
||||
|
||||
* darwin_stop_world.c (GC_push_all_stacks): Fix compiler warnings.
|
||||
Make i unsigned.
|
||||
(GC_stop_world): Likewise. Remove unused GC_thread p.
|
||||
(GC_start_world): Likewise.
|
||||
|
||||
* os_dep.c: Define GC_darwin_register_mach_handler_thread extern.
|
||||
Remove double SIG_HNDLR_PTR definition.
|
||||
(GC_forward_exception): Fix compiler warnings, make i unsigned.
|
||||
Initialize thread_state to NULL.
|
||||
(catch_exception_raise): Fix compiler warnings, make i unsigned.
|
||||
|
||||
2007-01-25 Petr Salinger and Hans Boehm <Hans.Boehm@hp.com>
|
||||
|
||||
* include/private/gc_priv.h (NEED_FIND_LIMIT, FREEBSD variant):
|
||||
also define for X86_64.
|
||||
* configure.ac: Move generic gnu (Hurd) case to below kfreebsd case.
|
||||
* configure: Regenerate.
|
||||
* README.changes: Point to ChangeLog.
|
||||
|
||||
2007-01-25 Andreas Tobler <a.tobler@schweiz.org>
|
||||
|
||||
* darwin_stop_world.c: Move THREAD_FLD defines to ...
|
||||
* include/private/gc_priv.h: ... here.
|
||||
Fix THREAD_STATE definitions for ppc64.
|
||||
* os_dep.c (catch_exception_raise): Use THREAD_FLD for exc_state member
|
||||
access.
|
||||
|
||||
2007-01-18 Andreas Tobler <a.tobler@schweiz.org>
|
||||
|
||||
* os_dep.c (if defined(MPROTECT_VDB) && defined(DARWIN)): Clean up and
|
||||
reformat code.
|
||||
Correct email reference.
|
||||
|
||||
2007-01-11 Andreas Tobler <a.tobler@schweiz.org>
|
||||
|
||||
* configure.ac (i?86*-*-darwin*): Replaced HAS_I386_THREAD_STATE_* with
|
||||
HAS_X86_THREAD_STATE32_*.
|
||||
(x86_64-*-darwin*): Extended the above check for x86_64-*-darwin* with
|
||||
HAS_X86_THREAD_STATE64_*.
|
||||
Added value 1 in the above AC_DEFINE's. Important for the upcoming
|
||||
Leopard.
|
||||
* configure: Regenerated.
|
||||
* include/private/gcconfig.h: Modified X86_64 define for Darwin.
|
||||
Removed __x86_64__ check in POWERPC section. Added base definitions
|
||||
for the X86_64 Darwin port.
|
||||
* include/private/gc_priv.h: Added GC_MACH_HEADER and GC_MACH_SECTION
|
||||
to distinguish between 32 and 64-bit applications. Added definitions
|
||||
for X86_64 Darwin.
|
||||
* darwin_stop_world.c: Added HAS_X86_THREAD_STATE64___RAX. And
|
||||
replaced HAS_I386_THREAD_STATE___EAX with HAS_X86_THREAD_STATE32___EAX.
|
||||
(GC_push_all_stacks): Added code for X86_64 Darwin. Even for the
|
||||
!DARWIN_DONT_PARSE_STACK. Maybe obsolete.
|
||||
* dyn_load.c (GC_dyld_name_for_hdr): Use GC_MACH_HEADER.
|
||||
(GC_dyld_image_add): Use GC_MACH_HEADER and GC_MACH_SECTION.
|
||||
Distinguish between getsectbynamefromheader_64 and
|
||||
getsectbynamefromheader.
|
||||
* os_dep.c (catch_exception_raise): Introduce exception definition for
|
||||
X86_64 Darwin. Replaced old i386_EXCEPTION_STATE_* definition with
|
||||
x86_EXCEPTION_STATE32_*. Add X86_64 for exc_state.faultvaddr.
|
||||
|
||||
2007-01-09 Andreas Tobler <a.tobler@schweiz.org>
|
||||
|
||||
* libtool.m4: Update to version from libtool-1.5.22.
|
||||
* ltmain.sh: Likewise.
|
||||
* ChangeLog: Created.
|
||||
|
||||
See doc/README.changes for earlier changes.
|
||||
|
140
jam-files/engine/boehm_gc/EMX_MAKEFILE
Normal file
140
jam-files/engine/boehm_gc/EMX_MAKEFILE
Normal file
@ -0,0 +1,140 @@
|
||||
#
|
||||
# OS/2 specific Makefile for the EMX environment
|
||||
#
|
||||
# You need GNU Make 3.71, gcc 2.5.7, emx 0.8h and GNU fileutils 3.9
|
||||
# or similar tools. C++ interface and de.exe weren't tested.
|
||||
#
|
||||
# Rename this file "Makefile".
|
||||
#
|
||||
|
||||
# Primary targets:
|
||||
# gc.a - builds basic library
|
||||
# c++ - adds C++ interface to library and include directory
|
||||
# cords - adds cords (heavyweight strings) to library and include directory
|
||||
# test - prints porting information, then builds basic version of gc.a, and runs
|
||||
# some tests of collector and cords. Does not add cords or c++ interface to gc.a
|
||||
# cord/de.exe - builds dumb editor based on cords.
|
||||
CC= gcc
|
||||
CXX=g++
|
||||
# Needed only for "make c++", which adds the c++ interface
|
||||
|
||||
CFLAGS= -O -DALL_INTERIOR_POINTERS
|
||||
# Setjmp_test may yield overly optimistic results when compiled
|
||||
# without optimization.
|
||||
# -DCHECKSUMS reports on erroneously clear dirty bits, and unexpectedly
|
||||
# altered stubborn objects, at substantial performance cost.
|
||||
# -DFIND_LEAK causes the collector to assume that all inaccessible
|
||||
# objects should have been explicitly deallocated, and reports exceptions
|
||||
# -DSOLARIS_THREADS enables support for Solaris (thr_) threads.
|
||||
# (Clients should also define SOLARIS_THREADS and then include
|
||||
# gc.h before performing thr_ or GC_ operations.)
|
||||
# -DALL_INTERIOR_POINTERS allows all pointers to the interior
|
||||
# of objects to be recognized. (See gc_private.h for consequences.)
|
||||
# -DSMALL_CONFIG tries to tune the collector for small heap sizes,
|
||||
# usually causing it to use less space in such situations.
|
||||
# Incremental collection no longer works in this case.
|
||||
# -DDONT_ADD_BYTE_AT_END is meaningful only with
|
||||
# -DALL_INTERIOR_POINTERS. Normally -DALL_INTERIOR_POINTERS
|
||||
# causes all objects to be padded so that pointers just past the end of
|
||||
# an object can be recognized. This can be expensive. (The padding
|
||||
# is normally more than one byte due to alignment constraints.)
|
||||
# -DDONT_ADD_BYTE_AT_END disables the padding.
|
||||
|
||||
AR= ar
|
||||
RANLIB= ar s
|
||||
|
||||
# Redefining srcdir allows object code for the nonPCR version of the collector
|
||||
# to be generated in different directories
|
||||
srcdir = .
|
||||
VPATH = $(srcdir)
|
||||
|
||||
OBJS= alloc.o reclaim.o allchblk.o misc.o mach_dep.o os_dep.o mark_rts.o headers.o mark.o obj_map.o blacklst.o finalize.o new_hblk.o dyn_load.o dbg_mlc.o malloc.o stubborn.o checksums.o typd_mlc.o ptr_chck.o mallocx.o
|
||||
|
||||
CORD_OBJS= cord/cordbscs.o cord/cordxtra.o cord/cordprnt.o
|
||||
|
||||
CORD_INCLUDE_FILES= $(srcdir)/gc.h $(srcdir)/cord/cord.h $(srcdir)/cord/ec.h \
|
||||
$(srcdir)/cord/cord_pos.h
|
||||
|
||||
# Libraries needed for curses applications. Only needed for de.
|
||||
CURSES= -lcurses -ltermlib
|
||||
|
||||
# The following is irrelevant on most systems. But a few
|
||||
# versions of make otherwise fork the shell specified in
|
||||
# the SHELL environment variable.
|
||||
SHELL= bash
|
||||
|
||||
SPECIALCFLAGS =
|
||||
# Alternative flags to the C compiler for mach_dep.c.
|
||||
# Mach_dep.c often doesn't like optimization, and it's
|
||||
# not time-critical anyway.
|
||||
|
||||
all: gc.a gctest.exe
|
||||
|
||||
$(OBJS) test.o: $(srcdir)/gc_priv.h $(srcdir)/gc_hdrs.h $(srcdir)/gc.h \
|
||||
$(srcdir)/gcconfig.h $(srcdir)/gc_typed.h
|
||||
# The dependency on Makefile is needed. Changing
|
||||
# options affects the size of GC_arrays,
|
||||
# invalidating all .o files that rely on gc_priv.h
|
||||
|
||||
mark.o typd_mlc.o finalize.o: $(srcdir)/include/gc_mark.h $(srcdir)/include/private/gc_pmark.h
|
||||
|
||||
gc.a: $(OBJS)
|
||||
$(AR) ru gc.a $(OBJS)
|
||||
$(RANLIB) gc.a
|
||||
|
||||
cords: $(CORD_OBJS) cord/cordtest.exe
|
||||
$(AR) ru gc.a $(CORD_OBJS)
|
||||
$(RANLIB) gc.a
|
||||
cp $(srcdir)/cord/cord.h include/cord.h
|
||||
cp $(srcdir)/cord/ec.h include/ec.h
|
||||
cp $(srcdir)/cord/cord_pos.h include/cord_pos.h
|
||||
|
||||
gc_cpp.o: $(srcdir)/gc_cpp.cc $(srcdir)/gc_cpp.h
|
||||
$(CXX) -c -O $(srcdir)/gc_cpp.cc
|
||||
|
||||
c++: gc_cpp.o $(srcdir)/gc_cpp.h
|
||||
$(AR) ru gc.a gc_cpp.o
|
||||
$(RANLIB) gc.a
|
||||
cp $(srcdir)/gc_cpp.h include/gc_cpp.h
|
||||
|
||||
mach_dep.o: $(srcdir)/mach_dep.c
|
||||
$(CC) -o mach_dep.o -c $(SPECIALCFLAGS) $(srcdir)/mach_dep.c
|
||||
|
||||
mark_rts.o: $(srcdir)/mark_rts.c
|
||||
$(CC) -o mark_rts.o -c $(CFLAGS) $(srcdir)/mark_rts.c
|
||||
|
||||
cord/cordbscs.o: $(srcdir)/cord/cordbscs.c $(CORD_INCLUDE_FILES)
|
||||
$(CC) $(CFLAGS) -c $(srcdir)/cord/cordbscs.c -o cord/cordbscs.o
|
||||
|
||||
cord/cordxtra.o: $(srcdir)/cord/cordxtra.c $(CORD_INCLUDE_FILES)
|
||||
$(CC) $(CFLAGS) -c $(srcdir)/cord/cordxtra.c -o cord/cordxtra.o
|
||||
|
||||
cord/cordprnt.o: $(srcdir)/cord/cordprnt.c $(CORD_INCLUDE_FILES)
|
||||
$(CC) $(CFLAGS) -c $(srcdir)/cord/cordprnt.c -o cord/cordprnt.o
|
||||
|
||||
cord/cordtest.exe: $(srcdir)/cord/cordtest.c $(CORD_OBJS) gc.a
|
||||
$(CC) $(CFLAGS) -o cord/cordtest.exe $(srcdir)/cord/cordtest.c $(CORD_OBJS) gc.a
|
||||
|
||||
cord/de.exe: $(srcdir)/cord/de.c $(srcdir)/cord/cordbscs.o $(srcdir)/cord/cordxtra.o gc.a
|
||||
$(CC) $(CFLAGS) -o cord/de.exe $(srcdir)/cord/de.c $(srcdir)/cord/cordbscs.o $(srcdir)/cord/cordxtra.o gc.a $(CURSES)
|
||||
|
||||
clean:
|
||||
rm -f gc.a tests/test.o gctest.exe output-local output-diff $(OBJS) \
|
||||
setjmp_test mon.out gmon.out a.out core \
|
||||
$(CORD_OBJS) cord/cordtest.exe cord/de.exe
|
||||
-rm -f *~
|
||||
|
||||
gctest.exe: tests/test.o gc.a
|
||||
$(CC) $(CFLAGS) -o gctest.exe tests/test.o gc.a
|
||||
|
||||
# If an optimized setjmp_test generates a segmentation fault,
|
||||
# odds are your compiler is broken. Gctest may still work.
|
||||
# Try compiling setjmp_t.c unoptimized.
|
||||
setjmp_test.exe: $(srcdir)/setjmp_t.c $(srcdir)/gc.h
|
||||
$(CC) $(CFLAGS) -o setjmp_test.exe $(srcdir)/setjmp_t.c
|
||||
|
||||
test: setjmp_test.exe gctest.exe
|
||||
./setjmp_test
|
||||
./gctest
|
||||
make cord/cordtest.exe
|
||||
cord/cordtest
|
156
jam-files/engine/boehm_gc/MacOS.c
Normal file
156
jam-files/engine/boehm_gc/MacOS.c
Normal file
@ -0,0 +1,156 @@
|
||||
/*
|
||||
MacOS.c
|
||||
|
||||
Some routines for the Macintosh OS port of the Hans-J. Boehm, Alan J. Demers
|
||||
garbage collector.
|
||||
|
||||
<Revision History>
|
||||
|
||||
11/22/94 pcb StripAddress the temporary memory handle for 24-bit mode.
|
||||
11/30/94 pcb Tracking all memory usage so we can deallocate it all at once.
|
||||
02/10/96 pcb Added routine to perform a final collection when
|
||||
unloading shared library.
|
||||
|
||||
by Patrick C. Beard.
|
||||
*/
|
||||
/* Boehm, February 15, 1996 2:55 pm PST */
|
||||
|
||||
#include <Resources.h>
|
||||
#include <Memory.h>
|
||||
#include <LowMem.h>
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
|
||||
#include "gc.h"
|
||||
#include "gc_priv.h"
|
||||
|
||||
// use 'CODE' resource 0 to get exact location of the beginning of global space.
|
||||
|
||||
typedef struct {
|
||||
unsigned long aboveA5;
|
||||
unsigned long belowA5;
|
||||
unsigned long JTSize;
|
||||
unsigned long JTOffset;
|
||||
} *CodeZeroPtr, **CodeZeroHandle;
|
||||
|
||||
void* GC_MacGetDataStart()
|
||||
{
|
||||
CodeZeroHandle code0 = (CodeZeroHandle)GetResource('CODE', 0);
|
||||
if (code0) {
|
||||
long belowA5Size = (**code0).belowA5;
|
||||
ReleaseResource((Handle)code0);
|
||||
return (LMGetCurrentA5() - belowA5Size);
|
||||
}
|
||||
fprintf(stderr, "Couldn't load the jump table.");
|
||||
exit(-1);
|
||||
return 0;
|
||||
}
|
||||
|
||||
/* track the use of temporary memory so it can be freed all at once. */
|
||||
|
||||
typedef struct TemporaryMemoryBlock TemporaryMemoryBlock, **TemporaryMemoryHandle;
|
||||
|
||||
struct TemporaryMemoryBlock {
|
||||
TemporaryMemoryHandle nextBlock;
|
||||
char data[];
|
||||
};
|
||||
|
||||
static TemporaryMemoryHandle theTemporaryMemory = NULL;
|
||||
static Boolean firstTime = true;
|
||||
|
||||
void GC_MacFreeTemporaryMemory(void);
|
||||
|
||||
Ptr GC_MacTemporaryNewPtr(size_t size, Boolean clearMemory)
|
||||
{
|
||||
static Boolean firstTime = true;
|
||||
OSErr result;
|
||||
TemporaryMemoryHandle tempMemBlock;
|
||||
Ptr tempPtr = nil;
|
||||
|
||||
tempMemBlock = (TemporaryMemoryHandle)TempNewHandle(size + sizeof(TemporaryMemoryBlock), &result);
|
||||
if (tempMemBlock && result == noErr) {
|
||||
HLockHi((Handle)tempMemBlock);
|
||||
tempPtr = (**tempMemBlock).data;
|
||||
if (clearMemory) memset(tempPtr, 0, size);
|
||||
tempPtr = StripAddress(tempPtr);
|
||||
|
||||
// keep track of the allocated blocks.
|
||||
(**tempMemBlock).nextBlock = theTemporaryMemory;
|
||||
theTemporaryMemory = tempMemBlock;
|
||||
}
|
||||
|
||||
# if !defined(SHARED_LIBRARY_BUILD)
|
||||
// install an exit routine to clean up the memory used at the end.
|
||||
if (firstTime) {
|
||||
atexit(&GC_MacFreeTemporaryMemory);
|
||||
firstTime = false;
|
||||
}
|
||||
# endif
|
||||
|
||||
return tempPtr;
|
||||
}
|
||||
|
||||
extern word GC_fo_entries;
|
||||
|
||||
static void perform_final_collection()
|
||||
{
|
||||
unsigned i;
|
||||
word last_fo_entries = 0;
|
||||
|
||||
/* adjust the stack bottom, because CFM calls us from another stack
|
||||
location. */
|
||||
GC_stackbottom = (ptr_t)&i;
|
||||
|
||||
/* try to collect and finalize everything in sight */
|
||||
for (i = 0; i < 2 || GC_fo_entries < last_fo_entries; i++) {
|
||||
last_fo_entries = GC_fo_entries;
|
||||
GC_gcollect();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
void GC_MacFreeTemporaryMemory()
|
||||
{
|
||||
# if defined(SHARED_LIBRARY_BUILD)
|
||||
/* if possible, collect all memory, and invoke all finalizers. */
|
||||
perform_final_collection();
|
||||
# endif
|
||||
|
||||
if (theTemporaryMemory != NULL) {
|
||||
long totalMemoryUsed = 0;
|
||||
TemporaryMemoryHandle tempMemBlock = theTemporaryMemory;
|
||||
while (tempMemBlock != NULL) {
|
||||
TemporaryMemoryHandle nextBlock = (**tempMemBlock).nextBlock;
|
||||
totalMemoryUsed += GetHandleSize((Handle)tempMemBlock);
|
||||
DisposeHandle((Handle)tempMemBlock);
|
||||
tempMemBlock = nextBlock;
|
||||
}
|
||||
theTemporaryMemory = NULL;
|
||||
|
||||
# if !defined(SHARED_LIBRARY_BUILD)
|
||||
if (GC_print_stats) {
|
||||
fprintf(stdout, "[total memory used: %ld bytes.]\n",
|
||||
totalMemoryUsed);
|
||||
fprintf(stdout, "[total collections: %ld.]\n", GC_gc_no);
|
||||
}
|
||||
# endif
|
||||
}
|
||||
}
|
||||
|
||||
#if __option(far_data)
|
||||
|
||||
void* GC_MacGetDataEnd()
|
||||
{
|
||||
CodeZeroHandle code0 = (CodeZeroHandle)GetResource('CODE', 0);
|
||||
if (code0) {
|
||||
long aboveA5Size = (**code0).aboveA5;
|
||||
ReleaseResource((Handle)code0);
|
||||
return (LMGetCurrentA5() + aboveA5Size);
|
||||
}
|
||||
fprintf(stderr, "Couldn't load the jump table.");
|
||||
exit(-1);
|
||||
return 0;
|
||||
}
|
||||
|
||||
#endif /* __option(far_data) */
|
886
jam-files/engine/boehm_gc/MacProjects.sit.hqx
Normal file
886
jam-files/engine/boehm_gc/MacProjects.sit.hqx
Normal file
@ -0,0 +1,886 @@
|
||||
(This file must be converted with BinHex 4.0)
|
||||
|
||||
:$deKBe"bEfTPBh4c,R0TG!"6594%8dP8)3#3"&)e!!!"4UiT8dP8)3!(!!"50A*
|
||||
|
||||
-BA8#ZJ#3!aB"#3d0#'GM,MBi5bkjBf038%-ZZ3#3%)Zi!*!8"@`!N!6rN!4069"
|
||||
|
||||
568e$3`%!UbqAD+X`19S!!!Ba!!!,*J!!!F%!!!-PfTmj1`#3"PET)d31)LTH6H4
|
||||
|
||||
#*AqG5b5HI*)QjY$IIb00%ReTJSi6rG$jG(bZ,"Rc,9Umf[IRj)6FZ-j`GfGR)#!
|
||||
|
||||
m-#qLqB#cj'G%46qffB3q8AppLXKc+P&*il4FMJMq3N32r[U,(PlSNdrQm-J(4!p
|
||||
|
||||
jK)NHmKJSHY!,&chS$4)pk%8mL3I)B0'$AU6S3'q)k%%[5[5J&ffa#68)0ZM&#T!
|
||||
|
||||
!*fHC-2dFZ3i83[Vr[4Xh'+DNQrm'J)rrpq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HaBfk`-2I,5(G,jrpK(H5aSfpB%(pqQkANlrj[4mV#G
|
||||
|
||||
EHm2$CN01V`9H%R"aqMR+bhpj`iDqe%&p8bAIR!qTj%[4$kpFY(MK'lcmYcPXk&Z
|
||||
|
||||
H1lcmlTi0lIT[mPVbJIFUL!elGjRM4BM8c8"+#$@"@kr%qK5GrJGH8d5JeDSp%6Z
|
||||
|
||||
S`aY94TZmpLQ+$H(Nh"cl%r`RK-KrL#Vr!3#3!aq$!!!"!*!$!43!N!-8!*!$-Tr
|
||||
|
||||
lRLe!rr#`!,K[$#eZd!6rm2rdd"lm`FAKdkSV8FY+$deKBe"bEfTPBh4c,R0TG!)
|
||||
|
||||
!N!06594%8dP8)3#3"P0*9%46593K!*!BUc!jI3!!8M8!!!&'"1"2l'mDG@6JrHc
|
||||
|
||||
K@5U#NI*HN@GK!Z"2kQ`FG&2UN!"S!!,L@5[48(adA`CdC!EJ6qj[8hJS!!EJEHl
|
||||
|
||||
LEe5!)D$!FJC1ANl!*IrX51FI-#D`jL63G!*&0K!+1Li!&Ri!)VX-S"lbUKQJ(Z`
|
||||
|
||||
3!+SDI!$!#3ZT8,aIE!!!Q$!'8!6"aG!!N!-3!#X!"3%B!J#3"`-!N!-"!*!$!43
|
||||
|
||||
!N!-8!*!$-J$j(l!@#J#3!a`!-J!!8f9dC`#3!`S!!2rr!*!&q@G%'@B:
|
||||
|
91
jam-files/engine/boehm_gc/Mac_files/MacOS_Test_config.h
Normal file
91
jam-files/engine/boehm_gc/Mac_files/MacOS_Test_config.h
Normal file
@ -0,0 +1,91 @@
|
||||
/*
|
||||
MacOS_Test_config.h
|
||||
|
||||
Configuration flags for Macintosh development systems.
|
||||
|
||||
Test version.
|
||||
|
||||
<Revision History>
|
||||
|
||||
11/16/95 pcb Updated compilation flags to reflect latest 4.6 Makefile.
|
||||
|
||||
by Patrick C. Beard.
|
||||
*/
|
||||
/* Boehm, November 17, 1995 12:05 pm PST */
|
||||
|
||||
#ifdef __MWERKS__
|
||||
|
||||
// for CodeWarrior Pro with Metrowerks Standard Library (MSL).
|
||||
// #define MSL_USE_PRECOMPILED_HEADERS 0
|
||||
#include <ansi_prefix.mac.h>
|
||||
#ifndef __STDC__
|
||||
#define __STDC__ 0
|
||||
#endif
|
||||
|
||||
#endif
|
||||
|
||||
// these are defined again in gc_priv.h.
|
||||
#undef TRUE
|
||||
#undef FALSE
|
||||
|
||||
#define ALL_INTERIOR_POINTERS // follows interior pointers.
|
||||
//#define SILENT // want collection messages.
|
||||
//#define DONT_ADD_BYTE_AT_END // no padding.
|
||||
//#define SMALL_CONFIG // whether to a smaller heap.
|
||||
#define NO_SIGNALS // signals aren't real on the Macintosh.
|
||||
#define USE_TEMPORARY_MEMORY // use Macintosh temporary memory.
|
||||
|
||||
// CFLAGS= -O -DNO_SIGNALS -DALL_INTERIOR_POINTERS -DSILENT
|
||||
//
|
||||
//LIBGC_CFLAGS= -O -DNO_SIGNALS -DSILENT \
|
||||
// -DREDIRECT_MALLOC=GC_malloc_uncollectable \
|
||||
// -DDONT_ADD_BYTE_AT_END -DALL_INTERIOR_POINTERS
|
||||
// Flags for building libgc.a -- the last two are required.
|
||||
//
|
||||
// Setjmp_test may yield overly optimistic results when compiled
|
||||
// without optimization.
|
||||
// -DSILENT disables statistics printing, and improves performance.
|
||||
// -DCHECKSUMS reports on erroneously clear dirty bits, and unexpectedly
|
||||
// altered stubborn objects, at substantial performance cost.
|
||||
// Use only for incremental collector debugging.
|
||||
// -DFIND_LEAK causes the collector to assume that all inaccessible
|
||||
// objects should have been explicitly deallocated, and reports exceptions.
|
||||
// Finalization and the test program are not usable in this mode.
|
||||
// -DSOLARIS_THREADS enables support for Solaris (thr_) threads.
|
||||
// (Clients should also define SOLARIS_THREADS and then include
|
||||
// gc.h before performing thr_ or GC_ operations.)
|
||||
// This is broken on nonSPARC machines.
|
||||
// -DALL_INTERIOR_POINTERS allows all pointers to the interior
|
||||
// of objects to be recognized. (See gc_priv.h for consequences.)
|
||||
// -DSMALL_CONFIG tries to tune the collector for small heap sizes,
|
||||
// usually causing it to use less space in such situations.
|
||||
// Incremental collection no longer works in this case.
|
||||
// -DLARGE_CONFIG tunes the collector for unusually large heaps.
|
||||
// Necessary for heaps larger than about 500 MB on most machines.
|
||||
// Recommended for heaps larger than about 64 MB.
|
||||
// -DDONT_ADD_BYTE_AT_END is meaningful only with
|
||||
// -DALL_INTERIOR_POINTERS. Normally -DALL_INTERIOR_POINTERS
|
||||
// causes all objects to be padded so that pointers just past the end of
|
||||
// an object can be recognized. This can be expensive. (The padding
|
||||
// is normally more than one byte due to alignment constraints.)
|
||||
// -DDONT_ADD_BYTE_AT_END disables the padding.
|
||||
// -DNO_SIGNALS does not disable signals during critical parts of
|
||||
// the GC process. This is no less correct than many malloc
|
||||
// implementations, and it sometimes has a significant performance
|
||||
// impact. However, it is dangerous for many not-quite-ANSI C
|
||||
// programs that call things like printf in asynchronous signal handlers.
|
||||
// -DGC_OPERATOR_NEW_ARRAY declares that the C++ compiler supports the
|
||||
// new syntax "operator new[]" for allocating and deleting arrays.
|
||||
// See gc_cpp.h for details. No effect on the C part of the collector.
|
||||
// This is defined implicitly in a few environments.
|
||||
// -DREDIRECT_MALLOC=X causes malloc, realloc, and free to be defined
|
||||
// as aliases for X, GC_realloc, and GC_free, respectively.
|
||||
// Calloc is redefined in terms of the new malloc. X should
|
||||
// be either GC_malloc or GC_malloc_uncollectable.
|
||||
// The former is occasionally useful for working around leaks in code
|
||||
// you don't want to (or can't) look at. It may not work for
|
||||
// existing code, but it often does. Neither works on all platforms,
|
||||
// since some ports use malloc or calloc to obtain system memory.
|
||||
// (Probably works for UNIX, and win32.)
|
||||
// -DNO_DEBUG removes GC_dump and the debugging routines it calls.
|
||||
// Reduces code size slightly at the expense of debuggability.
|
89
jam-files/engine/boehm_gc/Mac_files/MacOS_config.h
Normal file
89
jam-files/engine/boehm_gc/Mac_files/MacOS_config.h
Normal file
@ -0,0 +1,89 @@
|
||||
/*
|
||||
MacOS_config.h
|
||||
|
||||
Configuration flags for Macintosh development systems.
|
||||
|
||||
<Revision History>
|
||||
|
||||
11/16/95 pcb Updated compilation flags to reflect latest 4.6 Makefile.
|
||||
|
||||
by Patrick C. Beard.
|
||||
*/
|
||||
/* Boehm, November 17, 1995 12:10 pm PST */
|
||||
|
||||
#ifdef __MWERKS__
|
||||
|
||||
// for CodeWarrior Pro with Metrowerks Standard Library (MSL).
|
||||
// #define MSL_USE_PRECOMPILED_HEADERS 0
|
||||
#include <ansi_prefix.mac.h>
|
||||
#ifndef __STDC__
|
||||
#define __STDC__ 0
|
||||
#endif
|
||||
|
||||
#endif /* __MWERKS__ */
|
||||
|
||||
// these are defined again in gc_priv.h.
|
||||
#undef TRUE
|
||||
#undef FALSE
|
||||
|
||||
#define ALL_INTERIOR_POINTERS // follows interior pointers.
|
||||
#define SILENT // no collection messages.
|
||||
//#define DONT_ADD_BYTE_AT_END // no padding.
|
||||
//#define SMALL_CONFIG // whether to use a smaller heap.
|
||||
#define NO_SIGNALS // signals aren't real on the Macintosh.
|
||||
#define USE_TEMPORARY_MEMORY // use Macintosh temporary memory.
|
||||
|
||||
// CFLAGS= -O -DNO_SIGNALS -DSILENT -DALL_INTERIOR_POINTERS
|
||||
//
|
||||
//LIBGC_CFLAGS= -O -DNO_SIGNALS -DSILENT \
|
||||
// -DREDIRECT_MALLOC=GC_malloc_uncollectable \
|
||||
// -DDONT_ADD_BYTE_AT_END -DALL_INTERIOR_POINTERS
|
||||
// Flags for building libgc.a -- the last two are required.
|
||||
//
|
||||
// Setjmp_test may yield overly optimistic results when compiled
|
||||
// without optimization.
|
||||
// -DSILENT disables statistics printing, and improves performance.
|
||||
// -DCHECKSUMS reports on erroneously clear dirty bits, and unexpectedly
|
||||
// altered stubborn objects, at substantial performance cost.
|
||||
// Use only for incremental collector debugging.
|
||||
// -DFIND_LEAK causes the collector to assume that all inaccessible
|
||||
// objects should have been explicitly deallocated, and reports exceptions.
|
||||
// Finalization and the test program are not usable in this mode.
|
||||
// -DSOLARIS_THREADS enables support for Solaris (thr_) threads.
|
||||
// (Clients should also define SOLARIS_THREADS and then include
|
||||
// gc.h before performing thr_ or GC_ operations.)
|
||||
// This is broken on nonSPARC machines.
|
||||
// -DALL_INTERIOR_POINTERS allows all pointers to the interior
|
||||
// of objects to be recognized. (See gc_priv.h for consequences.)
|
||||
// -DSMALL_CONFIG tries to tune the collector for small heap sizes,
|
||||
// usually causing it to use less space in such situations.
|
||||
// Incremental collection no longer works in this case.
|
||||
// -DLARGE_CONFIG tunes the collector for unusually large heaps.
|
||||
// Necessary for heaps larger than about 500 MB on most machines.
|
||||
// Recommended for heaps larger than about 64 MB.
|
||||
// -DDONT_ADD_BYTE_AT_END is meaningful only with
|
||||
// -DALL_INTERIOR_POINTERS. Normally -DALL_INTERIOR_POINTERS
|
||||
// causes all objects to be padded so that pointers just past the end of
|
||||
// an object can be recognized. This can be expensive. (The padding
|
||||
// is normally more than one byte due to alignment constraints.)
|
||||
// -DDONT_ADD_BYTE_AT_END disables the padding.
|
||||
// -DNO_SIGNALS does not disable signals during critical parts of
|
||||
// the GC process. This is no less correct than many malloc
|
||||
// implementations, and it sometimes has a significant performance
|
||||
// impact. However, it is dangerous for many not-quite-ANSI C
|
||||
// programs that call things like printf in asynchronous signal handlers.
|
||||
// -DGC_OPERATOR_NEW_ARRAY declares that the C++ compiler supports the
|
||||
// new syntax "operator new[]" for allocating and deleting arrays.
|
||||
// See gc_cpp.h for details. No effect on the C part of the collector.
|
||||
// This is defined implicitly in a few environments.
|
||||
// -DREDIRECT_MALLOC=X causes malloc, realloc, and free to be defined
|
||||
// as aliases for X, GC_realloc, and GC_free, respectively.
|
||||
// Calloc is redefined in terms of the new malloc. X should
|
||||
// be either GC_malloc or GC_malloc_uncollectable.
|
||||
// The former is occasionally useful for working around leaks in code
|
||||
// you don't want to (or can't) look at. It may not work for
|
||||
// existing code, but it often does. Neither works on all platforms,
|
||||
// since some ports use malloc or calloc to obtain system memory.
|
||||
// (Probably works for UNIX, and win32.)
|
||||
// -DNO_DEBUG removes GC_dump and the debugging routines it calls.
|
||||
// Reduces code size slightly at the expense of debuggability.
|
9
jam-files/engine/boehm_gc/Mac_files/dataend.c
Normal file
9
jam-files/engine/boehm_gc/Mac_files/dataend.c
Normal file
@ -0,0 +1,9 @@
|
||||
/*
|
||||
dataend.c
|
||||
|
||||
A hack to get the extent of global data for the Macintosh.
|
||||
|
||||
by Patrick C. Beard.
|
||||
*/
|
||||
|
||||
long __dataend;
|
9
jam-files/engine/boehm_gc/Mac_files/datastart.c
Normal file
9
jam-files/engine/boehm_gc/Mac_files/datastart.c
Normal file
@ -0,0 +1,9 @@
|
||||
/*
|
||||
datastart.c
|
||||
|
||||
A hack to get the extent of global data for the Macintosh.
|
||||
|
||||
by Patrick C. Beard.
|
||||
*/
|
||||
|
||||
long __datastart;
|
107
jam-files/engine/boehm_gc/Makefile.DLLs
Normal file
107
jam-files/engine/boehm_gc/Makefile.DLLs
Normal file
@ -0,0 +1,107 @@
|
||||
#-----------------------------------------------------------------------------#
|
||||
|
||||
# Makefile.DLLs, version 0.4.
|
||||
|
||||
# Contributed by Fergus Henderson.
|
||||
|
||||
# This Makefile contains rules for creating DLLs on Windows using gnu-win32.
|
||||
|
||||
#-----------------------------------------------------------------------------#
|
||||
|
||||
# This rule creates a `.def' file, which lists the symbols that are exported
|
||||
# from the DLL. We use `nm' to get a list of all the exported text (`T')
|
||||
# symbols and data symbols -- including uninitialized data (`B'),
|
||||
# initialized data (`D'), read-only data (`R'), and common blocks (`C').
|
||||
%.def: %.a
|
||||
echo EXPORTS > $@
|
||||
nm $< | grep '^........ [BCDRT] _' | sed 's/[^_]*_//' >> $@
|
||||
|
||||
# We need to use macros to access global data:
|
||||
# the user of the DLL must refer to `foo' as `(*__imp_foo)'.
|
||||
# This rule creates a `_globals.h' file, which contains macros
|
||||
# for doing this.
|
||||
|
||||
SYM_PREFIX = $(firstword $(SYM_PREFIX-$*) $*)
|
||||
DLL_MACRO = $(SYM_PREFIX)_USE_DLL
|
||||
IMP_MACRO = $(SYM_PREFIX)_IMP
|
||||
GLOBAL_MACRO = $(SYM_PREFIX)_GLOBAL
|
||||
|
||||
%_globals.h: %.a
|
||||
echo "/* automatically generated by Makefile.DLLs */" > $@
|
||||
echo "#if defined(__GNUC__) && defined(_WIN32) \\" >> $@
|
||||
echo " && defined($(DLL_MACRO))" >> $@
|
||||
echo "# define $(IMP_MACRO)(name) __imp_##name" >> $@
|
||||
echo "# define $(GLOBAL_MACRO)(name) (*$(IMP_MACRO)(name))" >> $@
|
||||
echo "#else" >> $@
|
||||
echo "# define $(GLOBAL_MACRO)(name) name" >> $@
|
||||
echo "#endif" >> $@
|
||||
echo "" >> $@
|
||||
for sym in `nm $< | grep '^........ [BCDR] _' | sed 's/[^_]*_//'`; do \
|
||||
echo "#define $$sym $(GLOBAL_MACRO)($$sym)" >> $@; \
|
||||
done
|
||||
|
||||
# This rule creates the export object file (`foo.exp') which contains the
|
||||
# jump table array; this export object file becomes part of the DLL.
|
||||
# This rule also creates the import library (`foo_dll.a') which contains small
|
||||
# stubs for all the functions exported by the DLL which jump to them via the
|
||||
# jump table. Executables that will use the DLL must be linked against this
|
||||
# stub library.
|
||||
%.exp %_dll.a : %.def
|
||||
dlltool $(DLLTOOLFLAGS) $(DLLTOOLFLAGS-$*) \
|
||||
--def $< \
|
||||
--dllname $*.dll \
|
||||
--output-exp $*.exp \
|
||||
--output-lib $*_dll.a
|
||||
|
||||
# The `sed' commands below are to convert DOS-style `C:\foo\bar'
|
||||
# pathnames into Unix-style `//c/foo/bar' pathnames.
|
||||
CYGWIN32_LIBS = $(shell echo \
|
||||
-L`dirname \`gcc -print-file-name=libgcc.a | \
|
||||
sed -e 's@^\\\\([A-Za-z]\\\\):@//\\\\1@g' -e 's@\\\\\\\\@/@g' \` ` \
|
||||
-L`dirname \`gcc -print-file-name=libcygwin.a | \
|
||||
sed -e 's@^\\\\([A-Za-z]\\\\):@//\\\\1@g' -e 's@\\\\\\\\@/@g' \` ` \
|
||||
-L`dirname \`gcc -print-file-name=libkernel32.a | \
|
||||
sed -e 's@^\\\\([A-Za-z]\\\\):@//\\\\1@g' -e 's@\\\\\\\\@/@g' \` ` \
|
||||
-lgcc -lcygwin -lkernel32 -lgcc)
|
||||
|
||||
RELOCATABLE=yes
|
||||
|
||||
ifeq "$(strip $(RELOCATABLE))" "yes"
|
||||
|
||||
# to create relocatable DLLs, we need to do two passes
|
||||
%.dll: %.exp %.a dll_fixup.o dll_init.o
|
||||
$(LD) $(LDFLAGS) $(LDFLAGS-$*) --dll -o $*.base \
|
||||
-e _dll_entry@12 dll_init.o \
|
||||
dll_fixup.o $*.exp $*.a \
|
||||
$(LDLIBS) $(LDLIBS-$*) \
|
||||
$(CYGWIN32_LIBS)
|
||||
$(LD) $(LDFLAGS) $(LDFLAGS-$*) --dll --base-file $*.base -o $@ \
|
||||
-e _dll_entry@12 dll_init.o \
|
||||
dll_fixup.o $*.exp $*.a \
|
||||
$(LDLIBS) $(LDLIBS-$*) \
|
||||
$(CYGWIN32_LIBS)
|
||||
rm -f $*.base
|
||||
else
|
||||
|
||||
%.dll: %.exp %.a dll_fixup.o dll_init.o
|
||||
$(LD) $(LDFLAGS) $(LDFLAGS-$*) --dll -o $@ \
|
||||
-e _dll_entry@12 dll_init.o \
|
||||
dll_fixup.o $*.exp $*.a \
|
||||
$(LDLIBS) $(LDLIBS-$*) \
|
||||
$(CYGWIN32_LIBS)
|
||||
|
||||
endif
|
||||
|
||||
# This black magic piece of assembler needs to be linked in in order to
|
||||
# properly terminate the list of imported DLLs.
|
||||
dll_fixup.s:
|
||||
echo '.section .idata$$3' > dll_fixup.s
|
||||
echo '.long 0,0,0,0, 0,0,0,0' >> dll_fixup.s
|
||||
|
||||
# This bit is necessary to provide an initialization function for the DLL.
|
||||
dll_init.c:
|
||||
echo '__attribute__((stdcall))' > dll_init.c
|
||||
echo 'int dll_entry(int handle, int reason, void *ptr)' >> dll_init.c
|
||||
echo '{return 1; }' >> dll_init.c
|
||||
|
||||
dont_throw_away: dll_fixup.o dll_init.o
|
206
jam-files/engine/boehm_gc/Makefile.am
Normal file
206
jam-files/engine/boehm_gc/Makefile.am
Normal file
@ -0,0 +1,206 @@
|
||||
# Copyright (c) 1999-2001 by Red Hat, Inc. All rights reserved.
|
||||
#
|
||||
# THIS MATERIAL IS PROVIDED AS IS, WITH ABSOLUTELY NO WARRANTY EXPRESSED
|
||||
# OR IMPLIED. ANY USE IS AT YOUR OWN RISK.
|
||||
#
|
||||
# Permission is hereby granted to use or copy this program
|
||||
# for any purpose, provided the above notices are retained on all copies.
|
||||
# Permission to modify the code and to distribute modified code is granted,
|
||||
# provided the above notices are retained, and a notice that the code was
|
||||
# modified is included with the above copyright notice.
|
||||
#
|
||||
# Original author: Tom Tromey
|
||||
# Severely truncated by Hans-J. Boehm
|
||||
# Modified by: Grzegorz Jakacki <jakacki at acm dot org>
|
||||
# Modified by: Petter Urkedal <petter.urkedal@nordita.dk> (2005-04)
|
||||
|
||||
## Process this file with automake to produce Makefile.in.
|
||||
|
||||
## FIXME: `make distcheck' in this directory will not currently work.
|
||||
## This is most likely to the explicit flags passed to submakes.
|
||||
|
||||
# We currently use the source files directly from libatomic_ops, if we
|
||||
# use the internal version. This is done since libatomic_ops doesn't
|
||||
# use libtool, since it has no real use for it. But that seems to make
|
||||
# it hard to use either the resulting object files or libraries.
|
||||
# Thus there seems too be no real reason to recusively build in the
|
||||
# libatomic_ops directory.
|
||||
# if USE_INTERNAL_LIBATOMICS_OPS
|
||||
# SUBDIRS = @maybe_libatomic_ops@
|
||||
# else
|
||||
# SUBDIRS =
|
||||
# endif
|
||||
SUBDIRS =
|
||||
|
||||
# Initialize variables so that we can declare files locally.
|
||||
EXTRA_DIST =
|
||||
lib_LTLIBRARIES =
|
||||
include_HEADERS =
|
||||
pkginclude_HEADERS =
|
||||
dist_noinst_HEADERS =
|
||||
check_PROGRAMS =
|
||||
TESTS =
|
||||
|
||||
pkgconfigdir = $(libdir)/pkgconfig
|
||||
dist_pkgconfig_DATA = bdw-gc.pc
|
||||
|
||||
# C Library
|
||||
# ---------
|
||||
|
||||
lib_LTLIBRARIES += libgc.la
|
||||
libgc_la_SOURCES = \
|
||||
allchblk.c alloc.c blacklst.c checksums.c dbg_mlc.c \
|
||||
dyn_load.c finalize.c gc_dlopen.c gcj_mlc.c headers.c \
|
||||
malloc.c mallocx.c mark.c mark_rts.c misc.c new_hblk.c \
|
||||
obj_map.c os_dep.c pcr_interface.c ptr_chck.c real_malloc.c reclaim.c \
|
||||
specific.c stubborn.c typd_mlc.c \
|
||||
backgraph.c thread_local_alloc.c
|
||||
|
||||
# C Library: Architecture Dependent
|
||||
# ---------------------------------
|
||||
|
||||
if PTHREADS
|
||||
libgc_la_SOURCES += pthread_support.c pthread_stop_world.c
|
||||
endif
|
||||
|
||||
if DARWIN_THREADS
|
||||
libgc_la_SOURCES += darwin_stop_world.c
|
||||
endif
|
||||
|
||||
if WIN32_THREADS
|
||||
libgc_la_SOURCES += win32_threads.c
|
||||
endif
|
||||
|
||||
if USE_INTERNAL_LIBATOMIC_OPS
|
||||
nodist_libgc_la_SOURCES = atomic_ops.c
|
||||
endif
|
||||
|
||||
if NEED_ATOMIC_OPS_ASM
|
||||
nodist_libgc_la_SOURCES = atomic_ops_sysdeps.S
|
||||
endif
|
||||
|
||||
# Include THREADDLLIBS here to ensure that the correct versions of
|
||||
# linuxthread semaphore functions get linked:
|
||||
libgc_la_LIBADD = @addobjs@ $(THREADDLLIBS) $(UNWINDLIBS)
|
||||
libgc_la_DEPENDENCIES = @addobjs@
|
||||
libgc_la_LDFLAGS = $(extra_ldflags_libgc) -version-info 1:3:0 -no-undefined
|
||||
|
||||
EXTRA_libgc_la_SOURCES = alpha_mach_dep.S \
|
||||
mips_sgi_mach_dep.s mips_ultrix_mach_dep.s \
|
||||
rs6000_mach_dep.s sparc_mach_dep.S sparc_netbsd_mach_dep.s \
|
||||
sparc_sunos4_mach_dep.s ia64_save_regs_in_stack.s
|
||||
|
||||
|
||||
# C++ Interface
|
||||
# -------------
|
||||
|
||||
if CPLUSPLUS
|
||||
lib_LTLIBRARIES += libgccpp.la
|
||||
pkginclude_HEADERS += include/gc_cpp.h include/gc_allocator.h
|
||||
libgccpp_la_SOURCES = gc_cpp.cc
|
||||
libgccpp_la_LIBADD = $(top_builddir)/libgc.la
|
||||
libgccpp_la_LDFLAGS = -version-info 1:3:0 -no-undefined
|
||||
endif
|
||||
|
||||
# FIXME: If Visual C++ users use Makefile.am, this should go into
|
||||
# pkginclude_HEADERS with proper AM_CONDITIONALization. Otherwise
|
||||
# delete this comment.
|
||||
EXTRA_DIST += gc_cpp.cpp
|
||||
|
||||
|
||||
# Misc
|
||||
# ----
|
||||
|
||||
AM_CXXFLAGS = @GC_CFLAGS@
|
||||
AM_CFLAGS = @GC_CFLAGS@
|
||||
|
||||
## FIXME: relies on internal code generated by automake.
|
||||
## FIXME: ./configure --enable-dependency-tracking should be used
|
||||
#all_objs = @addobjs@ $(libgc_la_OBJECTS)
|
||||
#$(all_objs) : include/private/gcconfig.h include/private/gc_priv.h \
|
||||
#include/private/gc_hdrs.h include/gc.h include/gc_gcj.h \
|
||||
#include/gc_pthread_redirects.h include/gc_config_macros.h \
|
||||
#include/private/thread_local_alloc.h include/private_support.h \
|
||||
#include/private/pthread_stop_world.h \
|
||||
#include/gc_mark.h @addincludes@
|
||||
|
||||
## FIXME: we shouldn't have to do this, but automake forces us to.
|
||||
## We use -Wp,-P to strip #line directives. Irix `as' chokes on
|
||||
## these.
|
||||
if COMPILER_XLC
|
||||
## XLC neither requires nor tolerates the unnecessary assembler goop
|
||||
ASM_CPP_OPTIONS =
|
||||
else
|
||||
## We use -Wp,-P to strip #line directives. Irix `as' chokes on
|
||||
## these.
|
||||
ASM_CPP_OPTIONS = -Wp,-P -x assembler-with-cpp
|
||||
endif
|
||||
.s.lo:
|
||||
$(LTCOMPILE) $(ASM_CPP_OPTIONS) -c $<
|
||||
|
||||
.S.lo:
|
||||
$(LTCOMPILE) $(ASM_CPP_OPTIONS) -c $<
|
||||
|
||||
## We need to add DEFS to assembler flags
|
||||
## :FIXME: what if assembler does not accept -D... ?
|
||||
## (use Autoconf to prepare ASDEFS ???)
|
||||
|
||||
CCASFLAGS += $(DEFS)
|
||||
|
||||
dist_noinst_SCRIPTS = callprocs configure.host
|
||||
## callprocs --- used by Makefile.{dj,direct}
|
||||
## configure.host --- used by Makefile.{am,dj,direct}
|
||||
|
||||
# headers which are not installed
|
||||
# (see include/include.am for more)
|
||||
#
|
||||
dist_noinst_HEADERS += version.h
|
||||
|
||||
# documentation which is not installed
|
||||
#
|
||||
EXTRA_DIST += README.QUICK
|
||||
|
||||
# other makefiles
|
||||
# :GOTCHA: deliberately we do not include 'Makefile'
|
||||
EXTRA_DIST += BCC_MAKEFILE NT_MAKEFILE NT_THREADS_MAKEFILE \
|
||||
OS2_MAKEFILE PCR-Makefile digimars.mak EMX_MAKEFILE \
|
||||
Makefile.direct Makefile.dj Makefile.DLLs SMakefile.amiga \
|
||||
WCC_MAKEFILE configure_atomic_ops.sh \
|
||||
NT_STATIC_THREADS_MAKEFILE NT_X64_STATIC_THREADS_MAKEFILE
|
||||
|
||||
# files used by makefiles other than Makefile.am
|
||||
#
|
||||
EXTRA_DIST += add_gc_prefix.c gcname.c if_mach.c if_not_there.c \
|
||||
hpux_test_and_clear.s gc.mak MacOS.c \
|
||||
MacProjects.sit.hqx mach_dep.c setjmp_t.c \
|
||||
threadlibs.c AmigaOS.c \
|
||||
Mac_files/datastart.c Mac_files/dataend.c \
|
||||
Mac_files/MacOS_config.h Mac_files/MacOS_Test_config.h \
|
||||
include/private/msvc_dbg.h msvc_dbg.c
|
||||
|
||||
# The libatomic_ops library. This is not ideal, since we pick up junk from
|
||||
# there. The hard-coded version number should also go.
|
||||
EXTRA_DIST += libatomic_ops-1.2
|
||||
|
||||
# this is an auxiliary shell file used by Makefile and Makefile.direct
|
||||
#
|
||||
CONFIG_STATUS_DEPENDENCIES = $(srcdir)/configure.host
|
||||
|
||||
# :FIXME: why do we distribute this one???
|
||||
#
|
||||
EXTRA_DIST += libtool.m4
|
||||
|
||||
#
|
||||
# :GOTCHA: GNU make rule for making .s out of .S is flawed,
|
||||
# it will not remove dest if building fails
|
||||
.S.s:
|
||||
if $(CPP) $< >$@ ; then :; else rm -f $@; fi
|
||||
|
||||
include include/include.am
|
||||
include cord/cord.am
|
||||
include tests/tests.am
|
||||
include doc/doc.am
|
||||
# Putting these at the top causes cord to be built first, and not find libgc.a
|
||||
# on HP/UX. There may be a better fix.
|
||||
|
||||
|
737
jam-files/engine/boehm_gc/Makefile.direct
Normal file
737
jam-files/engine/boehm_gc/Makefile.direct
Normal file
@ -0,0 +1,737 @@
|
||||
# This is the original manually generated Makefile. It may still be used
|
||||
# to build the collector.
|
||||
#
|
||||
# Primary targets:
|
||||
# gc.a - builds basic library
|
||||
# c++ - adds C++ interface to library
|
||||
# cords - adds cords (heavyweight strings) to library
|
||||
# test - prints porting information, then builds basic version of gc.a,
|
||||
# and runs some tests of collector and cords. Does not add cords or
|
||||
# c++ interface to gc.a
|
||||
# cord/de - builds dumb editor based on cords.
|
||||
ABI_FLAG=
|
||||
# ABI_FLAG should be the cc flag that specifies the ABI. On most
|
||||
# platforms this will be the empty string. Possible values:
|
||||
# +DD64 for 64-bit executable on HP/UX.
|
||||
# -n32, -n64, -o32 for SGI/MIPS ABIs.
|
||||
|
||||
AS_ABI_FLAG=$(ABI_FLAG)
|
||||
# ABI flag for assembler. On HP/UX this is +A64 for 64 bit
|
||||
# executables.
|
||||
|
||||
CC=cc $(ABI_FLAG)
|
||||
CXX=g++ $(ABI_FLAG)
|
||||
AS=as $(AS_ABI_FLAG)
|
||||
# The above doesn't work with gas, which doesn't run cpp.
|
||||
# Define AS as `gcc -c -x assembler-with-cpp' instead.
|
||||
|
||||
# Redefining srcdir allows object code for the nonPCR version of the collector
|
||||
# to be generated in different directories.
|
||||
srcdir= .
|
||||
VPATH= $(srcdir)
|
||||
|
||||
# Atomic_ops installation directory. If this doesn't exist, we create
|
||||
# it from the included libatomic_ops distribution.
|
||||
AO_VERSION=1.2
|
||||
AO_SRC_DIR=$(srcdir)/libatomic_ops-$(AO_VERSION)
|
||||
AO_INSTALL_DIR=$(srcdir)/libatomic_ops-install
|
||||
|
||||
CFLAGS= -O -I$(srcdir)/include -I$(AO_INSTALL_DIR)/include -DATOMIC_UNCOLLECTABLE -DNO_EXECUTE_PERMISSION -DALL_INTERIOR_POINTERS
|
||||
|
||||
# To build the parallel collector on Linux, add to the above:
|
||||
# -DGC_LINUX_THREADS -DPARALLEL_MARK -DTHREAD_LOCAL_ALLOC
|
||||
# To build the thread-capable preload library that intercepts
|
||||
# malloc, add -DGC_USE_DLOPEN_WRAP -DREDIRECT_MALLOC=GC_malloc -fpic
|
||||
# To build the parallel collector in a static library on HP/UX,
|
||||
# add to the above:
|
||||
# -DGC_HPUX_THREADS -DTHREAD_LOCAL_ALLOC -D_POSIX_C_SOURCE=199506L -mt
|
||||
# FIXME: PARALLEL_MARK currently broken on HP/UX.
|
||||
# To build the thread-safe collector on Tru64, add to the above:
|
||||
# -pthread -DGC_OSF1_THREADS
|
||||
|
||||
# HOSTCC and HOSTCFLAGS are used to build executables that will be run as
|
||||
# part of the build process, i.e. on the build machine. These will usually
|
||||
# be the same as CC and CFLAGS, except in a cross-compilation environment.
|
||||
# Note that HOSTCFLAGS should include any -D flags that affect thread support.
|
||||
HOSTCC=$(CC)
|
||||
HOSTCFLAGS=$(CFLAGS)
|
||||
|
||||
# For dynamic library builds, it may be necessary to add flags to generate
|
||||
# PIC code, e.g. -fPIC on Linux.
|
||||
|
||||
# Setjmp_test may yield overly optimistic results when compiled
|
||||
# without optimization.
|
||||
|
||||
# These define arguments influence the collector configuration:
|
||||
# -DFIND_LEAK causes GC_find_leak to be initially set.
|
||||
# This causes the collector to assume that all inaccessible
|
||||
# objects should have been explicitly deallocated, and reports exceptions.
|
||||
# Finalization and the test program are not usable in this mode.
|
||||
#
|
||||
# IMPORTANT: Any of the _THREADS options must normally also be defined in
|
||||
# the client before including gc.h. This redefines thread primitives to
|
||||
# invoke the GC_ versions instead. Alternatively, linker-based symbol
|
||||
# interception can be used on a few platforms.
|
||||
# -DGC_THREADS should set the appropriate one of the below macros,
|
||||
# except -DGC_WIN32_PTHREADS, which must be set explicitly.
|
||||
# -DGC_SOLARIS_PTHREADS enables support for Solaris pthreads.
|
||||
# (Clients should also define GC_SOLARIS_THREADS and then include
|
||||
# gc.h before performing thr_ or dl* or GC_ operations.)
|
||||
# Must also define -D_REENTRANT.
|
||||
# -DGC_IRIX_THREADS enables support for Irix pthreads. See README.irix.
|
||||
# -DGC_HPUX_THREADS enables support for HP/UX 11 pthreads.
|
||||
# Also requires -D_REENTRANT or -D_POSIX_C_SOURCE=199506L. See README.hp.
|
||||
# -DGC_LINUX_THREADS enables support for Xavier Leroy's Linux threads
|
||||
# or NPTL threads. See README.linux. -D_REENTRANT may also be required.
|
||||
# -DGC_OSF1_THREADS enables support for Tru64 pthreads.
|
||||
# -DGC_FREEBSD_THREADS enables support for FreeBSD pthreads.
|
||||
# Appeared to run into some underlying thread problems.
|
||||
# -DGC_DARWIN_THREADS enables support for Mac OS X pthreads.
|
||||
# -DGC_AIX_THREADS enables support for IBM AIX threads.
|
||||
# -DGC_DGUX386_THREADS enables support for DB/UX on I386 threads.
|
||||
# See README.DGUX386. (Probably has not been tested recently.)
|
||||
# -DGC_WIN32_THREADS enables support for win32 threads. That makes sense
|
||||
# for this Makefile only under Cygwin.
|
||||
# -DGC_WIN32_PTHREADS enables support for Ming32 pthreads. This cannot be
|
||||
# enabled automatically by GC_THREADS, which would assume Win32 native
|
||||
# threads.
|
||||
# -DPTW32_STATIC_LIB causes the static version of the Mingw pthreads library
|
||||
# to be used. Requires -DGC_WIN32_PTHREADS.
|
||||
#
|
||||
# -DALL_INTERIOR_POINTERS allows all pointers to the interior
|
||||
# of objects to be recognized. (See gc_priv.h for consequences.)
|
||||
# Alternatively, GC_all_interior_pointers can be set at process
|
||||
# initialization time.
|
||||
# -DSMALL_CONFIG tries to tune the collector for small heap sizes,
|
||||
# usually causing it to use less space in such situations.
|
||||
# Incremental collection no longer works in this case.
|
||||
# -DLARGE_CONFIG tunes the collector for unusually large heaps.
|
||||
# Necessary for heaps larger than about 500 MB on most machines.
|
||||
# Recommended for heaps larger than about 64 MB.
|
||||
# -DDONT_ADD_BYTE_AT_END is meaningful only with -DALL_INTERIOR_POINTERS or
|
||||
# GC_all_interior_pointers = 1. Normally -DALL_INTERIOR_POINTERS
|
||||
# causes all objects to be padded so that pointers just past the end of
|
||||
# an object can be recognized. This can be expensive. (The padding
|
||||
# is normally more than one byte due to alignment constraints.)
|
||||
# -DDONT_ADD_BYTE_AT_END disables the padding.
|
||||
# -DNO_EXECUTE_PERMISSION may cause some or all of the heap to not
|
||||
# have execute permission, i.e. it may be impossible to execute
|
||||
# code from the heap. Currently this only affects the incremental
|
||||
# collector on UNIX machines. It may greatly improve its performance,
|
||||
# since this may avoid some expensive cache synchronization.
|
||||
# -DGC_NO_OPERATOR_NEW_ARRAY declares that the C++ compiler does not support
|
||||
# the new syntax "operator new[]" for allocating and deleting arrays.
|
||||
# See gc_cpp.h for details. No effect on the C part of the collector.
|
||||
# This is defined implicitly in a few environments. Must also be defined
|
||||
# by clients that use gc_cpp.h.
|
||||
# -DREDIRECT_MALLOC=X causes malloc to be defined as alias for X.
|
||||
# Unless the following macros are defined, realloc is also redirected
|
||||
# to GC_realloc, and free is redirected to GC_free.
|
||||
# Calloc and strdup are redefined in terms of the new malloc. X should
|
||||
# be either GC_malloc or GC_malloc_uncollectable, or
|
||||
# GC_debug_malloc_replacement. (The latter invokes GC_debug_malloc
|
||||
# with dummy source location information, but still results in
|
||||
# properly remembered call stacks on Linux/X86 and Solaris/SPARC.
|
||||
# It requires that the following two macros also be used.)
|
||||
# The former is occasionally useful for working around leaks in code
|
||||
# you don't want to (or can't) look at. It may not work for
|
||||
# existing code, but it often does. Neither works on all platforms,
|
||||
# since some ports use malloc or calloc to obtain system memory.
|
||||
# (Probably works for UNIX, and win32.) If you build with DBG_HDRS_ALL,
|
||||
# you should only use GC_debug_malloc_replacement as a malloc
|
||||
# replacement.
|
||||
# -DREDIRECT_REALLOC=X causes GC_realloc to be redirected to X.
|
||||
# The canonical use is -DREDIRECT_REALLOC=GC_debug_realloc_replacement,
|
||||
# together with -DREDIRECT_MALLOC=GC_debug_malloc_replacement to
|
||||
# generate leak reports with call stacks for both malloc and realloc.
|
||||
# This also requires the following:
|
||||
# -DREDIRECT_FREE=X causes free to be redirected to X. The
|
||||
# canonical use is -DREDIRECT_FREE=GC_debug_free.
|
||||
# -DIGNORE_FREE turns calls to free into a noop. Only useful with
|
||||
# -DREDIRECT_MALLOC.
|
||||
# -DNO_DEBUGGING removes GC_dump and the debugging routines it calls.
|
||||
# Reduces code size slightly at the expense of debuggability.
|
||||
# -DJAVA_FINALIZATION makes it somewhat safer to finalize objects out of
|
||||
# order by specifying a nonstandard finalization mark procedure (see
|
||||
# finalize.c). Objects reachable from finalizable objects will be marked
|
||||
# in a separate postpass, and hence their memory won't be reclaimed.
|
||||
# Not recommended unless you are implementing a language that specifies
|
||||
# these semantics. Since 5.0, determines only the initial value
|
||||
# of GC_java_finalization variable.
|
||||
# -DFINALIZE_ON_DEMAND causes finalizers to be run only in response
|
||||
# to explicit GC_invoke_finalizers() calls.
|
||||
# In 5.0 this became runtime adjustable, and this only determines the
|
||||
# initial value of GC_finalize_on_demand.
|
||||
# -DATOMIC_UNCOLLECTABLE includes code for GC_malloc_atomic_uncollectable.
|
||||
# This is useful if either the vendor malloc implementation is poor,
|
||||
# or if REDIRECT_MALLOC is used.
|
||||
# -DMARK_BIT_PER_GRANULE requests that a mark bit (or often byte)
|
||||
# be allocated for each allocation granule, as opposed to each object.
|
||||
# This often improves speed, possibly at some cost in space and/or
|
||||
# cache footprint. Normally it is best to let this decision be
|
||||
# made automatically depending on platform.
|
||||
# -DMARK_BIT_PER_OBJ requests that a mark bit be allocated for each
|
||||
# object instead of allocation granule. The opposiet of
|
||||
# MARK_BIT_PER_GRANULE.
|
||||
# -DHBLKSIZE=ddd, where ddd is a power of 2 between 512 and 16384, explicitly
|
||||
# sets the heap block size. Each heap block is devoted to a single size and
|
||||
# kind of object. For the incremental collector it makes sense to match
|
||||
# the most likely page size. Otherwise large values result in more
|
||||
# fragmentation, but generally better performance for large heaps.
|
||||
# -DUSE_MMAP use MMAP instead of sbrk to get new memory.
|
||||
# Works for Solaris and Irix.
|
||||
# -DUSE_MUNMAP causes memory to be returned to the OS under the right
|
||||
# circumstances. This currently disables VM-based incremental collection.
|
||||
# This is currently experimental, and works only under some Unix,
|
||||
# Linux and Windows versions.
|
||||
# -DMMAP_STACKS (for Solaris threads) Use mmap from /dev/zero rather than
|
||||
# GC_scratch_alloc() to get stack memory.
|
||||
# -DPRINT_BLACK_LIST Whenever a black list entry is added, i.e. whenever
|
||||
# the garbage collector detects a value that looks almost, but not quite,
|
||||
# like a pointer, print both the address containing the value, and the
|
||||
# value of the near-bogus-pointer. Can be used to identifiy regions of
|
||||
# memory that are likely to contribute misidentified pointers.
|
||||
# -DKEEP_BACK_PTRS Add code to save back pointers in debugging headers
|
||||
# for objects allocated with the debugging allocator. If all objects
|
||||
# through GC_MALLOC with GC_DEBUG defined, this allows the client
|
||||
# to determine how particular or randomly chosen objects are reachable
|
||||
# for debugging/profiling purposes. The gc_backptr.h interface is
|
||||
# implemented only if this is defined.
|
||||
# -DGC_ASSERTIONS Enable some internal GC assertion checking. Currently
|
||||
# this facility is only used in a few places. It is intended primarily
|
||||
# for debugging of the garbage collector itself, but could also
|
||||
# -DDBG_HDRS_ALL Make sure that all objects have debug headers. Increases
|
||||
# the reliability (from 99.9999% to 100% mod. bugs) of some of the debugging
|
||||
# code (especially KEEP_BACK_PTRS). Makes -DSHORT_DBG_HDRS possible.
|
||||
# Assumes that all client allocation is done through debugging
|
||||
# allocators.
|
||||
# -DSHORT_DBG_HDRS Assume that all objects have debug headers. Shorten
|
||||
# the headers to minimize object size, at the expense of checking for
|
||||
# writes past the end of an object. This is intended for environments
|
||||
# in which most client code is written in a "safe" language, such as
|
||||
# Scheme or Java. Assumes that all client allocation is done using
|
||||
# the GC_debug_ functions, or through the macros that expand to these,
|
||||
# or by redirecting malloc to GC_debug_malloc_replacement.
|
||||
# (Also eliminates the field for the requested object size.)
|
||||
# occasionally be useful for debugging of client code. Slows down the
|
||||
# collector somewhat, but not drastically.
|
||||
# -DSAVE_CALL_COUNT=<n> Set the number of call frames saved with objects
|
||||
# allocated through the debugging interface. Affects the amount of
|
||||
# information generated in leak reports. Only matters on platforms
|
||||
# on which we can quickly generate call stacks, currently Linux/(X86 & SPARC)
|
||||
# and Solaris/SPARC and platforms that provide execinfo.h.
|
||||
# Default is zero. On X86, client
|
||||
# code should NOT be compiled with -fomit-frame-pointer.
|
||||
# -DSAVE_CALL_NARGS=<n> Set the number of functions arguments to be
|
||||
# saved with each call frame. Default is zero. Ignored if we
|
||||
# don't know how to retrieve arguments on the platform.
|
||||
# -DCHECKSUMS reports on erroneously clear dirty bits, and unexpectedly
|
||||
# altered stubborn objects, at substantial performance cost.
|
||||
# Use only for debugging of the incremental collector.
|
||||
# -DGC_GCJ_SUPPORT includes support for gcj (and possibly other systems
|
||||
# that include a pointer to a type descriptor in each allocated object).
|
||||
# Building this way requires an ANSI C compiler.
|
||||
# -DUSE_I686_PREFETCH causes the collector to issue Pentium III style
|
||||
# prefetch instructions. No effect except on X86 Linux platforms.
|
||||
# Assumes a very recent gcc-compatible compiler and assembler.
|
||||
# (Gas prefetcht0 support was added around May 1999.)
|
||||
# Empirically the code appears to still run correctly on Pentium II
|
||||
# processors, though with no performance benefit. May not run on other
|
||||
# X86 processors? In some cases this improves performance by
|
||||
# 15% or so.
|
||||
# -DUSE_3DNOW_PREFETCH causes the collector to issue AMD 3DNow style
|
||||
# prefetch instructions. Same restrictions as USE_I686_PREFETCH.
|
||||
# Minimally tested. Didn't appear to be an obvious win on a K6-2/500.
|
||||
# -DUSE_PPC_PREFETCH causes the collector to issue PowerPC style
|
||||
# prefetch instructions. No effect except on PowerPC OS X platforms.
|
||||
# Performance impact untested.
|
||||
# -DGC_USE_LD_WRAP in combination with the old flags listed in README.linux
|
||||
# causes the collector some system and pthread calls in a more transparent
|
||||
# fashion than the usual macro-based approach. Requires GNU ld, and
|
||||
# currently probably works only with Linux.
|
||||
# -DGC_USE_DLOPEN_WRAP causes the collector to redefine malloc and intercepted
|
||||
# pthread routines with their real names, and causes it to use dlopen
|
||||
# and dlsym to refer to the original versions. This makes it possible to
|
||||
# build an LD_PRELOADable malloc replacement library.
|
||||
# -DTHREAD_LOCAL_ALLOC defines GC_malloc(), GC_malloc_atomic()
|
||||
# and GC_gcj_malloc() to use a per-thread set of free-lists.
|
||||
# These then allocate in a way that usually does not involve
|
||||
# acquisition of a global lock. Currently supported only on platforms
|
||||
# such as Linux that use pthread_support.c. Recommended for multiprocessors.
|
||||
# Requires explicit GC_INIT() call, unless REDIRECT_MALLOC is
|
||||
# defined and GC_malloc is used first.
|
||||
# -DUSE_COMPILER_TLS causes thread local allocation to use compiler-supported
|
||||
# "__thread" thread-local variables. This is the default in HP/UX. It
|
||||
# may help performance on recent Linux installations. (It failed for
|
||||
# me on RedHat 8, but appears to work on RedHat 9.)
|
||||
# -DPARALLEL_MARK allows the marker to run in multiple threads. Recommended
|
||||
# for multiprocessors. Currently requires Linux on X86 or IA64, though
|
||||
# support for other Posix platforms should be fairly easy to add,
|
||||
# if the thread implementation is otherwise supported.
|
||||
# -DNO_GETENV prevents the collector from looking at environment variables.
|
||||
# These may otherwise alter its configuration, or turn off GC altogether.
|
||||
# I don't know of a reason to disable this, except possibly if the
|
||||
# resulting process runs as a privileged user?
|
||||
# -DUSE_GLOBAL_ALLOC. Win32 only. Use GlobalAlloc instead of
|
||||
# VirtualAlloc to allocate the heap. May be needed to work around
|
||||
# a Windows NT/2000 issue. Incompatible with USE_MUNMAP.
|
||||
# See README.win32 for details.
|
||||
# -DMAKE_BACK_GRAPH. Enable GC_PRINT_BACK_HEIGHT environment variable.
|
||||
# See README.environment for details. Experimental. Limited platform
|
||||
# support. Implies DBG_HDRS_ALL. All allocation should be done using
|
||||
# the debug interface.
|
||||
# -DSTUBBORN_ALLOC allows allocation of "hard to change" objects, and thus
|
||||
# makes incremental collection easier. Was enabled by default until 6.0.
|
||||
# Rarely used, to my knowledge.
|
||||
# -DHANDLE_FORK attempts to make GC_malloc() work in a child process fork()ed
|
||||
# from a multithreaded parent. Currently only supported by pthread_support.c.
|
||||
# (Similar code should work on Solaris or Irix, but it hasn't been tried.)
|
||||
# -DTEST_WITH_SYSTEM_MALLOC causes gctest to allocate (and leak) large chunks
|
||||
# of memory with the standard system malloc. This will cause the root
|
||||
# set and collected heap to grow significantly if malloced memory is
|
||||
# somehow getting traced by the collector. This has no impact on the
|
||||
# generated library; it only affects the test.
|
||||
# -DNO_INCREMENTAL cases the gctest program to not invoke the incremental
|
||||
# collector. This has no impact on the generated library, only on the
|
||||
# test program. (This is often useful for debugging failures unrelated
|
||||
# to incremental GC.)
|
||||
# -DPOINTER_MASK=0x... causes candidate pointers to be ANDed with the
|
||||
# given mask before being considered. If either this or the following
|
||||
# macro is defined, it will be assumed that all pointers stored in
|
||||
# the heap need to be processed this way. Stack and register pointers
|
||||
# will be considered both with and without processing.
|
||||
# These macros are normally needed only to support systems that use
|
||||
# high-order pointer tags. EXPERIMENTAL.
|
||||
# -DPOINTER_SHIFT=n causes the collector to left shift candidate pointers
|
||||
# by the indicated amount before trying to interpret them. Applied
|
||||
# after POINTER_MASK. EXPERIMENTAL. See also the preceding macro.
|
||||
# -DENABLE_TRACE enables the GC_TRACE=addr environment setting to do its
|
||||
# job. By default this is not supported in order to keep the marker as fast
|
||||
# as possible.
|
||||
# -DDARWIN_DONT_PARSE_STACK Causes the Darwin port to discover thread
|
||||
# stack bounds in the same way as other pthread ports, without trying to
|
||||
# walk the frames onthe stack. This is recommended only as a fallback
|
||||
# for applications that don't support proper stack unwinding.
|
||||
# -DUSE_PROC_FOR_LIBRARIES Causes the Linux collector to treat writable
|
||||
# memory mappings (as reported by /proc) as roots, if it doesn't have
|
||||
# otherinformation about them. It no longer traverses dynamic loader
|
||||
# data structures to find dynamic library static data. This may be
|
||||
# required for applications that store pointers in mmapped segments without
|
||||
# informaing the collector. But it typically performs poorly, especially
|
||||
# since it will scan inactive but cached NPTL thread stacks completely.
|
||||
#
|
||||
|
||||
CXXFLAGS= $(CFLAGS)
|
||||
AR= ar
|
||||
RANLIB= ranlib
|
||||
|
||||
|
||||
OBJS= alloc.o reclaim.o allchblk.o misc.o mach_dep.o os_dep.o mark_rts.o \
|
||||
headers.o mark.o obj_map.o blacklst.o finalize.o new_hblk.o dbg_mlc.o \
|
||||
malloc.o stubborn.o checksums.o pthread_support.o pthread_stop_world.o \
|
||||
darwin_stop_world.o typd_mlc.o ptr_chck.o mallocx.o gcj_mlc.o specific.o \
|
||||
gc_dlopen.o backgraph.o win32_threads.o thread_local_alloc.o
|
||||
|
||||
CSRCS= reclaim.c allchblk.c misc.c alloc.c mach_dep.c os_dep.c mark_rts.c \
|
||||
headers.c mark.c obj_map.c pcr_interface.c blacklst.c finalize.c \
|
||||
new_hblk.c real_malloc.c dyn_load.c dbg_mlc.c malloc.c stubborn.c \
|
||||
checksums.c pthread_support.c pthread_stop_world.c darwin_stop_world.c \
|
||||
typd_mlc.c ptr_chck.c mallocx.c gcj_mlc.c specific.c gc_dlopen.c \
|
||||
backgraph.c win32_threads.c thread_local_alloc.c
|
||||
|
||||
CORD_SRCS= cord/cordbscs.c cord/cordxtra.c cord/cordprnt.c cord/de.c cord/cordtest.c include/cord.h include/ec.h include/private/cord_pos.h cord/de_win.c cord/de_win.h cord/de_cmds.h cord/de_win.ICO cord/de_win.RC
|
||||
|
||||
CORD_OBJS= cord/cordbscs.o cord/cordxtra.o cord/cordprnt.o
|
||||
|
||||
SRCS= $(CSRCS) mips_sgi_mach_dep.s rs6000_mach_dep.s alpha_mach_dep.S \
|
||||
sparc_mach_dep.S include/gc.h include/gc_typed.h include/gc_tiny_fl.h \
|
||||
include/private/gc_hdrs.h include/private/gc_priv.h \
|
||||
include/private/gcconfig.h include/private/gc_pmark.h \
|
||||
include/gc_inline.h include/gc_mark.h \
|
||||
threadlibs.c if_mach.c if_not_there.c gc_cpp.cc include/gc_cpp.h \
|
||||
gcname.c include/weakpointer.h include/private/gc_locks.h \
|
||||
mips_ultrix_mach_dep.s \
|
||||
include/new_gc_alloc.h include/gc_allocator.h \
|
||||
include/javaxfc.h sparc_sunos4_mach_dep.s sparc_netbsd_mach_dep.s \
|
||||
include/gc_backptr.h \
|
||||
hpux_test_and_clear.s include/gc_gcj.h \
|
||||
include/private/dbg_mlc.h \
|
||||
include/private/specific.h \
|
||||
include/leak_detector.h include/gc_amiga_redirects.h \
|
||||
include/gc_pthread_redirects.h ia64_save_regs_in_stack.s \
|
||||
include/gc_config_macros.h include/private/pthread_support.h \
|
||||
include/private/pthread_stop_world.h include/private/darwin_semaphore.h \
|
||||
include/private/darwin_stop_world.h include/private/thread_local_alloc.h \
|
||||
$(CORD_SRCS)
|
||||
|
||||
DOC_FILES= README.QUICK doc/README.Mac doc/README.MacOSX doc/README.OS2 \
|
||||
doc/README.amiga doc/README.cords doc/debugging.html \
|
||||
doc/porting.html doc/overview.html \
|
||||
doc/README.dj doc/README.hp doc/README.linux doc/README.rs6000 \
|
||||
doc/README.sgi doc/README.solaris2 doc/README.uts \
|
||||
doc/README.win32 doc/barrett_diagram doc/README \
|
||||
doc/README.contributors doc/README.changes doc/gc.man \
|
||||
doc/README.environment doc/tree.html doc/gcdescr.html \
|
||||
doc/README.autoconf doc/README.macros doc/README.ews4800 \
|
||||
doc/README.DGUX386 doc/README.arm.cross doc/leak.html \
|
||||
doc/scale.html doc/gcinterface.html doc/README.darwin \
|
||||
doc/simple_example.html doc/README.win64
|
||||
|
||||
TESTS= tests/test.c tests/test_cpp.cc tests/trace_test.c \
|
||||
tests/leak_test.c tests/thread_leak_test.c tests/middle.c
|
||||
|
||||
GNU_BUILD_FILES= configure.ac Makefile.am configure acinclude.m4 \
|
||||
libtool.m4 install-sh configure.host Makefile.in \
|
||||
aclocal.m4 config.sub config.guess \
|
||||
include/include.am doc/doc.am \
|
||||
ltmain.sh mkinstalldirs depcomp missing \
|
||||
cord/cord.am tests/tests.am autogen.sh \
|
||||
bdw-gc.pc.in compile
|
||||
|
||||
OTHER_MAKEFILES= OS2_MAKEFILE NT_MAKEFILE NT_THREADS_MAKEFILE gc.mak \
|
||||
BCC_MAKEFILE EMX_MAKEFILE WCC_MAKEFILE Makefile.dj \
|
||||
PCR-Makefile SMakefile.amiga Makefile.DLLs \
|
||||
digimars.mak Makefile.direct NT_STATIC_THREADS_MAKEFILE \
|
||||
NT_X64_STATIC_THREADS_MAKEFILE configure_atomic_ops.sh
|
||||
# Makefile and Makefile.direct are copies of each other.
|
||||
|
||||
OTHER_FILES= Makefile setjmp_t.c callprocs \
|
||||
MacProjects.sit.hqx MacOS.c \
|
||||
Mac_files/datastart.c Mac_files/dataend.c \
|
||||
Mac_files/MacOS_config.h Mac_files/MacOS_Test_config.h \
|
||||
add_gc_prefix.c gc_cpp.cpp \
|
||||
version.h AmigaOS.c mscvc_dbg.c include/private/msvc_dbg.h \
|
||||
$(TESTS) $(GNU_BUILD_FILES) $(OTHER_MAKEFILES)
|
||||
|
||||
CORD_INCLUDE_FILES= $(srcdir)/include/gc.h $(srcdir)/include/cord.h \
|
||||
$(srcdir)/include/ec.h $(srcdir)/include/private/cord_pos.h
|
||||
|
||||
UTILS= if_mach if_not_there threadlibs
|
||||
|
||||
# Libraries needed for curses applications. Only needed for de.
|
||||
CURSES= -lcurses -ltermlib
|
||||
|
||||
# The following is irrelevant on most systems. But a few
|
||||
# versions of make otherwise fork the shell specified in
|
||||
# the SHELL environment variable.
|
||||
SHELL= /bin/sh
|
||||
|
||||
SPECIALCFLAGS = -I$(srcdir)/include -I$(AO_INSTALL_DIR)/include
|
||||
# Alternative flags to the C compiler for mach_dep.c.
|
||||
# Mach_dep.c often doesn't like optimization, and it's
|
||||
# not time-critical anyway.
|
||||
# Set SPECIALCFLAGS to -q nodirect_code on Encore.
|
||||
|
||||
all: gc.a gctest
|
||||
|
||||
# if AO_INSTALL_DIR doesn't exist, we assume that it is pointing to
|
||||
# the default location, and we need to build
|
||||
$(AO_INSTALL_DIR):
|
||||
CC=$(CC) $(srcdir)/configure_atomic_ops.sh
|
||||
cd $(AO_SRC_DIR); make CC=$(CC) install
|
||||
|
||||
LEAKFLAGS=$(CFLAGS) -DFIND_LEAK
|
||||
|
||||
BSD-pkg-all: bsd-libgc.a bsd-libleak.a
|
||||
|
||||
bsd-libgc.a:
|
||||
$(MAKE) CFLAGS="$(CFLAGS)" clean c++-t
|
||||
mv gc.a bsd-libgc.a
|
||||
|
||||
bsd-libleak.a:
|
||||
$(MAKE) -f Makefile.direct CFLAGS="$(LEAKFLAGS)" clean c++-nt
|
||||
mv gc.a bsd-libleak.a
|
||||
|
||||
BSD-pkg-install: BSD-pkg-all
|
||||
${CP} bsd-libgc.a libgc.a
|
||||
${INSTALL_DATA} libgc.a ${PREFIX}/lib
|
||||
${INSTALL_DATA} gc.h gc_cpp.h ${PREFIX}/include
|
||||
${INSTALL_MAN} doc/gc.man ${PREFIX}/man/man3/gc.3
|
||||
|
||||
pcr: PCR-Makefile include/private/gc_private.h include/private/gc_hdrs.h \
|
||||
include/private/gc_locks.h include/gc.h include/private/gcconfig.h \
|
||||
mach_dep.o $(SRCS)
|
||||
$(MAKE) -f PCR-Makefile depend
|
||||
$(MAKE) -f PCR-Makefile
|
||||
|
||||
$(OBJS) tests/test.o dyn_load.o dyn_load_sunos53.o: \
|
||||
$(srcdir)/include/private/gc_priv.h \
|
||||
$(srcdir)/include/private/gc_hdrs.h $(srcdir)/include/private/gc_locks.h \
|
||||
$(srcdir)/include/gc.h $(srcdir)/include/gc_pthread_redirects.h \
|
||||
$(srcdir)/include/private/gcconfig.h $(srcdir)/include/gc_typed.h \
|
||||
$(srcdir)/include/gc_config_macros.h Makefile $(AO_INSTALL_DIR)
|
||||
# The dependency on Makefile is needed. Changing
|
||||
# options affects the size of GC_arrays,
|
||||
# invalidating all .o files that rely on gc_priv.h
|
||||
|
||||
mark.o typd_mlc.o finalize.o ptr_chck.o: $(srcdir)/include/gc_mark.h \
|
||||
$(srcdir)/include/private/gc_pmark.h
|
||||
|
||||
specific.o pthread_support.o thread_local_alloc.o win32_threads.o: \
|
||||
$(srcdir)/include/private/specific.h $(srcdir)/include/gc_inline.h \
|
||||
$(srcdir)/include/private/thread_local_alloc.h
|
||||
|
||||
dbg_mlc.o gcj_mlc.o: $(srcdir)/include/private/dbg_mlc.h
|
||||
|
||||
tests/test.o: tests $(srcdir)/tests/test.c
|
||||
$(CC) $(CFLAGS) -c $(srcdir)/tests/test.c
|
||||
mv test.o tests/test.o
|
||||
|
||||
tests:
|
||||
mkdir tests
|
||||
|
||||
base_lib gc.a: $(OBJS) dyn_load.o $(UTILS)
|
||||
echo > base_lib
|
||||
rm -f dont_ar_1
|
||||
cp $(AO_INSTALL_DIR)/lib/libatomic_ops.a gc.a
|
||||
./if_mach SPARC SOLARIS touch dont_ar_1
|
||||
./if_mach SPARC SOLARIS $(AR) rus gc.a $(OBJS) dyn_load.o
|
||||
./if_mach M68K AMIGA touch dont_ar_1
|
||||
./if_mach M68K AMIGA $(AR) -vrus gc.a $(OBJS) dyn_load.o
|
||||
./if_not_there dont_ar_1 $(AR) ru gc.a $(OBJS) dyn_load.o
|
||||
./if_not_there dont_ar_1 $(RANLIB) gc.a || cat /dev/null
|
||||
# ignore ranlib failure; that usually means it doesn't exist, and isn't needed
|
||||
|
||||
cords: $(CORD_OBJS) cord/cordtest $(UTILS)
|
||||
rm -f dont_ar_3
|
||||
./if_mach SPARC SOLARIS touch dont_ar_3
|
||||
./if_mach SPARC SOLARIS $(AR) rus gc.a $(CORD_OBJS)
|
||||
./if_mach M68K AMIGA touch dont_ar_3
|
||||
./if_mach M68K AMIGA $(AR) -vrus gc.a $(CORD_OBJS)
|
||||
./if_not_there dont_ar_3 $(AR) ru gc.a $(CORD_OBJS)
|
||||
./if_not_there dont_ar_3 $(RANLIB) gc.a || cat /dev/null
|
||||
|
||||
gc_cpp.o: $(srcdir)/gc_cpp.cc $(srcdir)/include/gc_cpp.h $(srcdir)/include/gc.h Makefile
|
||||
$(CXX) -c $(CXXFLAGS) $(srcdir)/gc_cpp.cc
|
||||
|
||||
test_cpp: $(srcdir)/tests/test_cpp.cc $(srcdir)/include/gc_cpp.h gc_cpp.o $(srcdir)/include/gc.h \
|
||||
base_lib $(UTILS)
|
||||
rm -f test_cpp
|
||||
./if_mach HP_PA HPUX $(CXX) $(CXXFLAGS) -o test_cpp $(srcdir)/tests/test_cpp.cc gc_cpp.o gc.a -ldld `./threadlibs`
|
||||
./if_not_there test_cpp $(CXX) $(CXXFLAGS) -o test_cpp $(srcdir)/tests/test_cpp.cc gc_cpp.o gc.a `./threadlibs`
|
||||
|
||||
c++-t: c++
|
||||
./test_cpp 1
|
||||
|
||||
c++-nt: c++
|
||||
@echo "Use ./test_cpp 1 to test the leak library"
|
||||
|
||||
c++: gc_cpp.o $(srcdir)/include/gc_cpp.h test_cpp
|
||||
rm -f dont_ar_4
|
||||
./if_mach SPARC SOLARIS touch dont_ar_4
|
||||
./if_mach SPARC SOLARIS $(AR) rus gc.a gc_cpp.o
|
||||
./if_mach M68K AMIGA touch dont_ar_4
|
||||
./if_mach M68K AMIGA $(AR) -vrus gc.a gc_cpp.o
|
||||
./if_not_there dont_ar_4 $(AR) ru gc.a gc_cpp.o
|
||||
./if_not_there dont_ar_4 $(RANLIB) gc.a || cat /dev/null
|
||||
./test_cpp 1
|
||||
echo > c++
|
||||
|
||||
dyn_load_sunos53.o: dyn_load.c
|
||||
$(CC) $(CFLAGS) -DSUNOS53_SHARED_LIB -c $(srcdir)/dyn_load.c -o $@
|
||||
|
||||
# SunOS5 shared library version of the collector
|
||||
sunos5gc.so: $(OBJS) dyn_load_sunos53.o
|
||||
$(CC) -G -o sunos5gc.so $(OBJS) dyn_load_sunos53.o $(AO_INSTALL_DIR)/lib/libatomic_ops.a -ldl
|
||||
ln sunos5gc.so libgc.so
|
||||
|
||||
# Alpha/OSF shared library version of the collector
|
||||
libalphagc.so: $(OBJS)
|
||||
ld -shared -o libalphagc.so $(OBJS) dyn_load.o -lc
|
||||
ln libalphagc.so libgc.so
|
||||
|
||||
# IRIX shared library version of the collector
|
||||
libirixgc.so: $(OBJS) dyn_load.o
|
||||
ld -shared $(ABI_FLAG) -o libirixgc.so $(OBJS) dyn_load.o -lc
|
||||
ln libirixgc.so libgc.so
|
||||
|
||||
# Linux shared library version of the collector
|
||||
liblinuxgc.so: $(OBJS) dyn_load.o
|
||||
gcc -shared -o liblinuxgc.so $(OBJS) dyn_load.o
|
||||
ln liblinuxgc.so libgc.so
|
||||
|
||||
# Build gctest with dynamic library
|
||||
dyn_test:
|
||||
$(CC) $(CFLAGS) -o gctest tests/test.c libgc.so `./threadlibs`
|
||||
./gctest
|
||||
|
||||
# Alternative Linux rule. This is preferable, but is likely to break the
|
||||
# Makefile for some non-linux platforms.
|
||||
# LIBOBJS= $(patsubst %.o, %.lo, $(OBJS))
|
||||
#
|
||||
#.SUFFIXES: .lo $(SUFFIXES)
|
||||
#
|
||||
#.c.lo:
|
||||
# $(CC) $(CFLAGS) $(CPPFLAGS) -fPIC -c $< -o $@
|
||||
#
|
||||
# liblinuxgc.so: $(LIBOBJS) dyn_load.lo
|
||||
# gcc -shared -Wl,-soname=libgc.so.0 -o libgc.so.0 $(LIBOBJS) dyn_load.lo
|
||||
# touch liblinuxgc.so
|
||||
|
||||
mach_dep.o: $(srcdir)/mach_dep.c $(srcdir)/mips_sgi_mach_dep.s \
|
||||
$(srcdir)/mips_ultrix_mach_dep.s \
|
||||
$(srcdir)/rs6000_mach_dep.s \
|
||||
$(srcdir)/sparc_mach_dep.S $(srcdir)/sparc_sunos4_mach_dep.s \
|
||||
$(srcdir)/ia64_save_regs_in_stack.s \
|
||||
$(srcdir)/sparc_netbsd_mach_dep.s $(UTILS)
|
||||
rm -f mach_dep.o
|
||||
./if_mach SPARC SOLARIS $(CC) -c -o mach_dep2.o $(srcdir)/sparc_mach_dep.S
|
||||
./if_mach SPARC OPENBSD $(AS) -o mach_dep2.o $(srcdir)/sparc_sunos4_mach_dep.s
|
||||
./if_mach SPARC NETBSD $(AS) -o mach_dep2.o $(srcdir)/sparc_netbsd_mach_dep.s
|
||||
./if_mach SPARC "" $(CC) -c -o mach_dep1.o $(SPECIALCFLAGS) $(srcdir)/mach_dep.c
|
||||
./if_mach SPARC "" ld -r -o mach_dep.o mach_dep1.o mach_dep2.o
|
||||
./if_mach IA64 "" as $(AS_ABI_FLAG) -o ia64_save_regs_in_stack.o $(srcdir)/ia64_save_regs_in_stack.s
|
||||
./if_mach IA64 "" $(CC) -c -o mach_dep1.o $(SPECIALCFLAGS) $(srcdir)/mach_dep.c
|
||||
./if_mach IA64 "" ld -r -o mach_dep.o mach_dep1.o ia64_save_regs_in_stack.o
|
||||
./if_not_there mach_dep.o $(CC) -c $(SPECIALCFLAGS) $(srcdir)/mach_dep.c
|
||||
|
||||
mark_rts.o: $(srcdir)/mark_rts.c $(UTILS)
|
||||
rm -f mark_rts.o
|
||||
-./if_mach ALPHA OSF1 $(CC) -c $(CFLAGS) -Wo,-notail $(srcdir)/mark_rts.c
|
||||
./if_not_there mark_rts.o $(CC) -c $(CFLAGS) $(srcdir)/mark_rts.c
|
||||
# Work-around for DEC optimizer tail recursion elimination bug.
|
||||
# The ALPHA-specific line should be removed if gcc is used.
|
||||
|
||||
alloc.o: version.h
|
||||
|
||||
cord:
|
||||
mkdir cord
|
||||
|
||||
cord/cordbscs.o: cord $(srcdir)/cord/cordbscs.c $(CORD_INCLUDE_FILES)
|
||||
$(CC) $(CFLAGS) -c -I$(srcdir) $(srcdir)/cord/cordbscs.c
|
||||
mv cordbscs.o cord/cordbscs.o
|
||||
# not all compilers understand -o filename
|
||||
|
||||
cord/cordxtra.o: cord $(srcdir)/cord/cordxtra.c $(CORD_INCLUDE_FILES)
|
||||
$(CC) $(CFLAGS) -c -I$(srcdir) $(srcdir)/cord/cordxtra.c
|
||||
mv cordxtra.o cord/cordxtra.o
|
||||
|
||||
cord/cordprnt.o: cord $(srcdir)/cord/cordprnt.c $(CORD_INCLUDE_FILES)
|
||||
$(CC) $(CFLAGS) -c -I$(srcdir) $(srcdir)/cord/cordprnt.c
|
||||
mv cordprnt.o cord/cordprnt.o
|
||||
|
||||
cord/cordtest: $(srcdir)/cord/cordtest.c $(CORD_OBJS) gc.a $(UTILS)
|
||||
rm -f cord/cordtest
|
||||
./if_mach SPARC DRSNX $(CC) $(CFLAGS) -o cord/cordtest $(srcdir)/cord/cordtest.c $(CORD_OBJS) gc.a -lucb
|
||||
./if_mach HP_PA HPUX $(CC) $(CFLAGS) -o cord/cordtest $(srcdir)/cord/cordtest.c $(CORD_OBJS) gc.a -ldld `./threadlibs`
|
||||
./if_mach M68K AMIGA $(CC) $(CFLAGS) -UGC_AMIGA_MAKINGLIB -o cord/cordtest $(srcdir)/cord/cordtest.c $(CORD_OBJS) gc.a `./threadlibs`
|
||||
./if_not_there cord/cordtest $(CC) $(CFLAGS) -o cord/cordtest $(srcdir)/cord/cordtest.c $(CORD_OBJS) gc.a `./threadlibs`
|
||||
|
||||
cord/de: $(srcdir)/cord/de.c cord/cordbscs.o cord/cordxtra.o gc.a $(UTILS)
|
||||
rm -f cord/de
|
||||
./if_mach SPARC DRSNX $(CC) $(CFLAGS) -o cord/de $(srcdir)/cord/de.c cord/cordbscs.o cord/cordxtra.o gc.a $(CURSES) -lucb `./threadlibs`
|
||||
./if_mach HP_PA HPUX $(CC) $(CFLAGS) -o cord/de $(srcdir)/cord/de.c cord/cordbscs.o cord/cordxtra.o gc.a $(CURSES) -ldld `./threadlibs`
|
||||
./if_mach POWERPC AIX $(CC) $(CFLAGS) -o cord/de $(srcdir)/cord/de.c cord/cordbscs.o cord/cordxtra.o gc.a -lcurses
|
||||
./if_mach POWERPC DARWIN $(CC) $(CFLAGS) -o cord/de $(srcdir)/cord/de.c cord/cordbscs.o cord/cordxtra.o gc.a
|
||||
./if_mach I386 LINUX $(CC) $(CFLAGS) -o cord/de $(srcdir)/cord/de.c cord/cordbscs.o cord/cordxtra.o gc.a -lcurses `./threadlibs`
|
||||
./if_mach ALPHA LINUX $(CC) $(CFLAGS) -o cord/de $(srcdir)/cord/de.c cord/cordbscs.o cord/cordxtra.o gc.a -lcurses `./threadlibs`
|
||||
./if_mach IA64 LINUX $(CC) $(CFLAGS) -o cord/de $(srcdir)/cord/de.c cord/cordbscs.o cord/cordxtra.o gc.a -lcurses `./threadlibs`
|
||||
./if_mach M68K AMIGA $(CC) $(CFLAGS) -UGC_AMIGA_MAKINGLIB -o cord/de $(srcdir)/cord/de.c cord/cordbscs.o cord/cordxtra.o gc.a -lcurses
|
||||
./if_not_there cord/de $(CC) $(CFLAGS) -o cord/de $(srcdir)/cord/de.c cord/cordbscs.o cord/cordxtra.o gc.a $(CURSES) `./threadlibs`
|
||||
|
||||
if_mach: $(srcdir)/if_mach.c $(srcdir)/include/private/gcconfig.h
|
||||
$(HOSTCC) $(HOSTCFLAGS) -o if_mach $(srcdir)/if_mach.c
|
||||
|
||||
threadlibs: $(srcdir)/threadlibs.c $(srcdir)/include/private/gcconfig.h Makefile
|
||||
$(HOSTCC) $(HOSTCFLAGS) -o threadlibs $(srcdir)/threadlibs.c
|
||||
|
||||
if_not_there: $(srcdir)/if_not_there.c
|
||||
$(HOSTCC) $(HOSTCFLAGS) -o if_not_there $(srcdir)/if_not_there.c
|
||||
|
||||
clean:
|
||||
rm -f gc.a *.o *.exe tests/*.o gctest gctest_dyn_link test_cpp \
|
||||
setjmp_test mon.out gmon.out a.out core if_not_there if_mach \
|
||||
threadlibs $(CORD_OBJS) cord/cordtest cord/de
|
||||
-rm -f *~
|
||||
|
||||
gctest: tests/test.o gc.a $(UTILS)
|
||||
rm -f gctest
|
||||
./if_mach SPARC DRSNX $(CC) $(CFLAGS) -o gctest tests/test.o gc.a -lucb
|
||||
./if_mach HP_PA HPUX $(CC) $(CFLAGS) -o gctest tests/test.o gc.a -ldld `./threadlibs`
|
||||
./if_mach M68K AMIGA $(CC) $(CFLAGS) -UGC_AMIGA_MAKINGLIB -o gctest tests/test.o gc.a `./threadlibs`
|
||||
./if_not_there gctest $(CC) $(CFLAGS) -o gctest tests/test.o gc.a `./threadlibs`
|
||||
|
||||
# If an optimized setjmp_test generates a segmentation fault,
|
||||
# odds are your compiler is broken. Gctest may still work.
|
||||
# Try compiling setjmp_t.c unoptimized.
|
||||
setjmp_test: $(srcdir)/setjmp_t.c $(srcdir)/include/gc.h $(UTILS) $(AO_INSTALL_DIR)
|
||||
$(CC) $(CFLAGS) -o setjmp_test $(srcdir)/setjmp_t.c
|
||||
|
||||
test: KandRtest cord/cordtest
|
||||
cord/cordtest
|
||||
|
||||
# Those tests that work even with a K&R C compiler:
|
||||
KandRtest: setjmp_test gctest
|
||||
./setjmp_test
|
||||
./gctest
|
||||
|
||||
add_gc_prefix: $(srcdir)/add_gc_prefix.c $(srcdir)/version.h
|
||||
$(CC) -o add_gc_prefix $(srcdir)/add_gc_prefix.c
|
||||
|
||||
gcname: $(srcdir)/gcname.c $(srcdir)/version.h
|
||||
$(CC) -o gcname $(srcdir)/gcname.c
|
||||
|
||||
#We assume this is being done from source directory.
|
||||
dist gc.tar: $(SRCS) $(DOC_FILES) $(OTHER_FILES) add_gc_prefix gcname
|
||||
cp Makefile Makefile.old
|
||||
cp Makefile.direct Makefile
|
||||
CC=$(CC) ./configure_atomic_ops.sh
|
||||
cd $(AO_SRC_DIR); make dist
|
||||
if test $(srcdir)/libatomic_ops-$(AO_VERSION) = $(AO_SRC_DIR); \
|
||||
then \
|
||||
mv $(AO_SRC_DIR) $(AO_SRC_DIR).bak ; \
|
||||
tar xvfz $(AO_SRC_DIR).bak/libatomic_ops-$(AO_VERSION).tar.gz ; \
|
||||
else \
|
||||
tar xvfz $(AO_SRC_DIR)/libatomic_ops-$(AO_VERSION).tar.gz ; \
|
||||
fi
|
||||
rm -f `./gcname`
|
||||
ln -s . `./gcname`
|
||||
./add_gc_prefix $(SRCS) $(DOC_FILES) $(OTHER_FILES) libatomic_ops-$(AO_VERSION) > /tmp/gc.tar-files
|
||||
tar cvfh gc.tar `cat /tmp/gc.tar-files`
|
||||
cp gc.tar `./gcname`.tar
|
||||
gzip `./gcname`.tar
|
||||
rm `./gcname`
|
||||
|
||||
gc.tar.Z: gc.tar
|
||||
compress gc.tar
|
||||
|
||||
gc.tar.gz: gc.tar
|
||||
gzip gc.tar
|
||||
|
||||
lint: $(CSRCS) tests/test.c
|
||||
lint -DLINT $(CSRCS) tests/test.c | egrep -v "possible pointer alignment problem|abort|exit|sbrk|mprotect|syscall|change in ANSI|improper alignment"
|
||||
|
||||
# BTL: added to test shared library version of collector.
|
||||
# Currently works only under SunOS5. Requires GC_INIT call from statically
|
||||
# loaded client code.
|
||||
ABSDIR = `pwd`
|
||||
gctest_dyn_link: tests/test.o libgc.so
|
||||
$(CC) -L$(ABSDIR) -R$(ABSDIR) -o gctest_dyn_link tests/test.o -lgc -ldl -lthread
|
||||
|
||||
gctest_irix_dyn_link: tests/test.o libirixgc.so
|
||||
$(CC) -L$(ABSDIR) -o gctest_irix_dyn_link tests/test.o -lirixgc
|
||||
|
||||
# The following appear to be dead, especially since libgc_globals.h
|
||||
# is apparently lost.
|
||||
test_dll.o: tests/test.c libgc_globals.h
|
||||
$(CC) $(CFLAGS) -DGC_USE_DLL -c tests/test.c -o test_dll.o
|
||||
|
||||
test_dll: test_dll.o libgc_dll.a libgc.dll
|
||||
$(CC) test_dll.o -L$(ABSDIR) -lgc_dll -o test_dll
|
||||
|
||||
SYM_PREFIX-libgc=GC
|
||||
|
||||
# Uncomment the following line to build a GNU win32 DLL
|
||||
# include Makefile.DLLs
|
||||
|
||||
reserved_namespace: $(SRCS)
|
||||
for file in $(SRCS) tests/test.c tests/test_cpp.cc; do \
|
||||
sed s/GC_/_GC_/g < $$file > tmp; \
|
||||
cp tmp $$file; \
|
||||
done
|
||||
|
||||
user_namespace: $(SRCS)
|
||||
for file in $(SRCS) tests/test.c tests/test_cpp.cc; do \
|
||||
sed s/_GC_/GC_/g < $$file > tmp; \
|
||||
cp tmp $$file; \
|
||||
done
|
428
jam-files/engine/boehm_gc/Makefile.dj
Normal file
428
jam-files/engine/boehm_gc/Makefile.dj
Normal file
@ -0,0 +1,428 @@
|
||||
# This Makefile is intended only for DJGPP use.
|
||||
# It is mainly a copy of the main Makefile, but tends to get out of sync
|
||||
# with it. A merge would probably be appropriate.
|
||||
|
||||
# Primary targets:
|
||||
# gc.a - builds basic library
|
||||
# libgc.a - builds library for use with g++ "-fgc-keyword" extension
|
||||
# -fgc-keyword was never really available. Historical
|
||||
# interest only.
|
||||
# c++ - adds C++ interface to library
|
||||
# cords - adds cords (heavyweight strings) to library
|
||||
# test - prints porting information, then builds basic version of gc.a,
|
||||
# and runs some tests of collector and cords. Does not add cords or
|
||||
# c++ interface to gc.a
|
||||
# cord/de$(EXE_SUFFIX) - builds dumb editor based on cords.
|
||||
ABI_FLAG=
|
||||
CC=gcc $(ABI_FLAG)
|
||||
CXX=gxx $(ABI_FLAG)
|
||||
AS=gcc -c -x assembler-with-cpp $(ABI_FLAG)
|
||||
# The above doesn't work with gas, which doesn't run cpp.
|
||||
# Define AS as `gcc -c -x assembler-with-cpp' instead.
|
||||
# Under Irix 6, you will have to specify the ABI (-o32, -n32, or -64)
|
||||
# if you use something other than the default ABI on your machine.
|
||||
|
||||
# special defines for DJGPP
|
||||
CXXLD=gxx $(ABI_FLAG)
|
||||
EXE_SUFFIX=.exe
|
||||
|
||||
srcdir= .
|
||||
VPATH= $(srcdir)
|
||||
|
||||
CFLAGS= -gstabs+ -O2 -I$(srcdir)/include -DATOMIC_UNCOLLECTABLE -DALL_INTERIOR_POINTERS -DNO_EXECUTE_PERMISSION
|
||||
|
||||
# Setjmp_test may yield overly optimistic results when compiled
|
||||
# without optimization.
|
||||
# -DFIND_LEAK causes GC_find_leak to be initially set.
|
||||
# This causes the collector to assume that all inaccessible
|
||||
# objects should have been explicitly deallocated, and reports exceptions.
|
||||
# Finalization and the test program are not usable in this mode.
|
||||
# -DALL_INTERIOR_POINTERS allows all pointers to the interior
|
||||
# of objects to be recognized. (See gc_priv.h for consequences.)
|
||||
# -DSMALL_CONFIG tries to tune the collector for small heap sizes,
|
||||
# usually causing it to use less space in such situations.
|
||||
# Incremental collection no longer works in this case.
|
||||
# -DLARGE_CONFIG tunes the collector for unusually large heaps.
|
||||
# Necessary for heaps larger than about 500 MB on most machines.
|
||||
# Recommended for heaps larger than about 64 MB.
|
||||
# -DDONT_ADD_BYTE_AT_END is meaningful only with
|
||||
# -DALL_INTERIOR_POINTERS. Normally -DALL_INTERIOR_POINTERS
|
||||
# causes all objects to be padded so that pointers just past the end of
|
||||
# an object can be recognized. This can be expensive. (The padding
|
||||
# is normally more than one byte due to alignment constraints.)
|
||||
# -DDONT_ADD_BYTE_AT_END disables the padding.
|
||||
# -DNO_SIGNALS does not disable signals during critical parts of
|
||||
# the GC process. This is no less correct than many malloc
|
||||
# implementations, and it sometimes has a significant performance
|
||||
# impact. However, it is dangerous for many not-quite-ANSI C
|
||||
# programs that call things like printf in asynchronous signal handlers.
|
||||
# This is on by default. Turning it off has not been extensively tested with
|
||||
# compilers that reorder stores. It should have been.
|
||||
# -DNO_EXECUTE_PERMISSION may cause some or all of the heap to not
|
||||
# have execute permission, i.e. it may be impossible to execute
|
||||
# code from the heap. Currently this only affects the incremental
|
||||
# collector on UNIX machines. It may greatly improve its performance,
|
||||
# since this may avoid some expensive cache synchronization.
|
||||
# -DGC_NO_OPERATOR_NEW_ARRAY declares that the C++ compiler does not support
|
||||
# the new syntax "operator new[]" for allocating and deleting arrays.
|
||||
# See gc_cpp.h for details. No effect on the C part of the collector.
|
||||
# This is defined implicitly in a few environments. Must also be defined
|
||||
# by clients that use gc_cpp.h.
|
||||
# -DREDIRECT_MALLOC=X causes malloc, realloc, and free to be defined
|
||||
# as aliases for X, GC_realloc, and GC_free, respectively.
|
||||
# Calloc is redefined in terms of the new malloc. X should
|
||||
# be either GC_malloc or GC_malloc_uncollectable.
|
||||
# The former is occasionally useful for working around leaks in code
|
||||
# you don't want to (or can't) look at. It may not work for
|
||||
# existing code, but it often does. Neither works on all platforms,
|
||||
# since some ports use malloc or calloc to obtain system memory.
|
||||
# (Probably works for UNIX, and win32.)
|
||||
# -DIGNORE_FREE turns calls to free into a noop. Only useful with
|
||||
# -DREDIRECT_MALLOC.
|
||||
# -DNO_DEBUGGING removes GC_dump and the debugging routines it calls.
|
||||
# Reduces code size slightly at the expense of debuggability.
|
||||
# -DJAVA_FINALIZATION makes it somewhat safer to finalize objects out of
|
||||
# order by specifying a nonstandard finalization mark procedure (see
|
||||
# finalize.c). Objects reachable from finalizable objects will be marked
|
||||
# in a sepearte postpass, and hence their memory won't be reclaimed.
|
||||
# Not recommended unless you are implementing a language that specifies
|
||||
# these semantics. Since 5.0, determines only only the initial value
|
||||
# of GC_java_finalization variable.
|
||||
# -DFINALIZE_ON_DEMAND causes finalizers to be run only in response
|
||||
# to explicit GC_invoke_finalizers() calls.
|
||||
# In 5.0 this became runtime adjustable, and this only determines the
|
||||
# initial value of GC_finalize_on_demand.
|
||||
# -DATOMIC_UNCOLLECTABLE includes code for GC_malloc_atomic_uncollectable.
|
||||
# This is useful if either the vendor malloc implementation is poor,
|
||||
# or if REDIRECT_MALLOC is used.
|
||||
# -DHBLKSIZE=ddd, where ddd is a power of 2 between 512 and 16384, explicitly
|
||||
# sets the heap block size. Each heap block is devoted to a single size and
|
||||
# kind of object. For the incremental collector it makes sense to match
|
||||
# the most likely page size. Otherwise large values result in more
|
||||
# fragmentation, but generally better performance for large heaps.
|
||||
# -DPRINT_BLACK_LIST Whenever a black list entry is added, i.e. whenever
|
||||
# the garbage collector detects a value that looks almost, but not quite,
|
||||
# like a pointer, print both the address containing the value, and the
|
||||
# value of the near-bogus-pointer. Can be used to identifiy regions of
|
||||
# memory that are likely to contribute misidentified pointers.
|
||||
# -DKEEP_BACK_PTRS Add code to save back pointers in debugging headers
|
||||
# for objects allocated with the debugging allocator. If all objects
|
||||
# through GC_MALLOC with GC_DEBUG defined, this allows the client
|
||||
# to determine how particular or randomly chosen objects are reachable
|
||||
# for debugging/profiling purposes. The gc_backptr.h interface is
|
||||
# implemented only if this is defined.
|
||||
# -DGC_ASSERTIONS Enable some internal GC assertion checking. Currently
|
||||
# this facility is only used in a few places. It is intended primarily
|
||||
# for debugging of the garbage collector itself, but could also
|
||||
# -DDBG_HDRS_ALL Make sure that all objects have debug headers. Increases
|
||||
# the reliability (from 99.9999% to 100%) of some of the debugging
|
||||
# code (especially KEEP_BACK_PTRS). Makes -DSHORT_DBG_HDRS possible.
|
||||
# Assumes that all client allocation is done through debugging
|
||||
# allocators.
|
||||
# -DSHORT_DBG_HDRS Assume that all objects have debug headers. Shorten
|
||||
# the headers to minimize object size, at the expense of checking for
|
||||
# writes past the end of an object. This is intended for environments
|
||||
# in which most client code is written in a "safe" language, such as
|
||||
# Scheme or Java. Assumes that all client allocation is done using
|
||||
# the GC_debug_ functions (or through the macros that expand to these.
|
||||
# (Also eliminates the field for the requested object size.)
|
||||
# occasionally be useful for debugging of client code. Slows down the
|
||||
# collector somewhat, but not drastically.
|
||||
# -DCHECKSUMS reports on erroneously clear dirty bits, and unexpectedly
|
||||
# altered stubborn objects, at substantial performance cost.
|
||||
# Use only for debugging of the incremental collector.
|
||||
# -DGC_GCJ_SUPPORT includes support for gcj (and possibly other systems
|
||||
# that include a pointer to a type descriptor in each allocated object).
|
||||
# Building this way requires an ANSI C compiler.
|
||||
# -DUSE_I686_PREFETCH causes the collector to issue Pentium III style
|
||||
# prefetch instructions. No effect except on X86 Linux platforms.
|
||||
# Assumes a very recent gcc-compatible compiler and assembler.
|
||||
# (Gas prefetcht0 support was added around May 1999.)
|
||||
# Empirically the code appears to still run correctly on Pentium II
|
||||
# processors, though with no performance benefit. May not run on other
|
||||
# X86 processors? In some cases this improves performance by
|
||||
# 15% or so.
|
||||
# -DUSE_3DNOW_PREFETCH causes the collector to issue AMD 3DNow style
|
||||
# prefetch instructions. Same restrictions as USE_I686_PREFETCH.
|
||||
# UNTESTED!!
|
||||
# -DGC_USE_LD_WRAP in combination with the gld flags listed in README.linux
|
||||
# causes the collector some system and pthread calls in a more transparent
|
||||
# fashion than the usual macro-based approach. Requires GNU ld, and
|
||||
# currently probably works only with Linux.
|
||||
|
||||
|
||||
CXXFLAGS= $(CFLAGS) -DGC_OPERATOR_NEW_ARRAY
|
||||
AR= ar
|
||||
RANLIB= ranlib
|
||||
|
||||
|
||||
OBJS= alloc.o reclaim.o allchblk.o misc.o mach_dep.o os_dep.o mark_rts.o headers.o mark.o obj_map.o blacklst.o finalize.o new_hblk.o dbg_mlc.o malloc.o stubborn.o checksums.o solaris_threads.o typd_mlc.o ptr_chck.o mallocx.o solaris_pthreads.o gcj_mlc.o specific.o
|
||||
|
||||
CSRCS= reclaim.c allchblk.c misc.c alloc.c mach_dep.c os_dep.c mark_rts.c headers.c mark.c obj_map.c pcr_interface.c blacklst.c finalize.c new_hblk.c real_malloc.c dyn_load.c dbg_mlc.c malloc.c stubborn.c checksums.c solaris_threads.c typd_mlc.c ptr_chck.c mallocx.c solaris_pthreads.c gcj_mlc.c specific.c
|
||||
|
||||
CORD_SRCS= cord/cordbscs.c cord/cordxtra.c cord/cordprnt.c cord/de.c cord/cordtest.c include/cord.h include/ec.h include/private/cord_pos.h cord/de_win.c cord/de_win.h cord/de_cmds.h cord/de_win.ICO cord/de_win.RC cord/SCOPTIONS.amiga cord/SMakefile.amiga
|
||||
|
||||
CORD_OBJS= cord/cordbscs.o cord/cordxtra.o cord/cordprnt.o
|
||||
|
||||
SRCS= $(CSRCS) mips_sgi_mach_dep.S rs6000_mach_dep.s alpha_mach_dep.S \
|
||||
sparc_mach_dep.S include/gc.h include/gc_typed.h \
|
||||
include/private/gc_hdrs.h include/private/gc_priv.h \
|
||||
include/private/gcconfig.h include/private/gc_mark.h \
|
||||
include/gc_inline.h gc.man \
|
||||
threadlibs.c if_mach.c if_not_there.c gc_cpp.cc include/gc_cpp.h \
|
||||
include/weakpointer.h include/private/gc_locks.h \
|
||||
gcc_support.c mips_ultrix_mach_dep.s include/gc_alloc.h \
|
||||
include/new_gc_alloc.h include/javaxfc.h sparc_sunos4_mach_dep.s \
|
||||
include/private/solaris_threads.h include/gc_backptr.h \
|
||||
hpux_test_and_clear.s include/gc_gcj.h \
|
||||
include/gc_local_alloc.h include/private/dbg_mlc.h \
|
||||
include/private/specific.h \
|
||||
include/leak_detector.h $(CORD_SRCS)
|
||||
|
||||
OTHER_FILES= Makefile PCR-Makefile OS2_MAKEFILE NT_MAKEFILE BCC_MAKEFILE \
|
||||
README tests/test.c test_cpp.cc setjmp_t.c SMakefile.amiga \
|
||||
SCoptions.amiga README.amiga README.win32 cord/README \
|
||||
README.rs6000 README.QUICK callprocs pc_excludes \
|
||||
barrett_diagram README.OS2 README.Mac MacProjects.sit.hqx \
|
||||
MacOS.c EMX_MAKEFILE README.debugging \
|
||||
Mac_files/datastart.c Mac_files/dataend.c \
|
||||
Mac_files/MacOS_config.h Mac_files/MacOS_Test_config.h \
|
||||
add_gc_prefix.c README.solaris2 README.sgi README.hp README.uts \
|
||||
win32_threads.c NT_THREADS_MAKEFILE gc.mak README.dj Makefile.dj \
|
||||
README.alpha README.linux README.MacOSX version.h Makefile.DLLs \
|
||||
WCC_MAKEFILE nursery.c include/gc_nursery.h include/gc_copy_descr.h
|
||||
|
||||
CORD_INCLUDE_FILES= $(srcdir)/include/gc.h $(srcdir)/include/cord.h \
|
||||
$(srcdir)/include/ec.h $(srcdir)/include/private/cord_pos.h
|
||||
|
||||
UTILS= if_mach$(EXE_SUFFIX) if_not_there$(EXE_SUFFIX)
|
||||
|
||||
# Libraries needed for curses applications. Only needed for de.
|
||||
CURSES= -lcurses -ltermlib
|
||||
|
||||
# The following is irrelevant on most systems. But a few
|
||||
# versions of make otherwise fork the shell specified in
|
||||
# the SHELL environment variable.
|
||||
SHELL= /bin/sh
|
||||
|
||||
SPECIALCFLAGS = -I$(srcdir)/include
|
||||
# Alternative flags to the C compiler for mach_dep.c.
|
||||
# Mach_dep.c often doesn't like optimization, and it's
|
||||
# not time-critical anyway.
|
||||
# Set SPECIALCFLAGS to -q nodirect_code on Encore.
|
||||
|
||||
all: gc.a gctest$(EXE_SUFFIX)
|
||||
|
||||
$(OBJS) test.o dyn_load.o dyn_load_sunos53.o: \
|
||||
$(srcdir)/include/private/gc_priv.h \
|
||||
$(srcdir)/include/private/gc_hdrs.h $(srcdir)/include/private/gc_locks.h \
|
||||
$(srcdir)/include/gc.h \
|
||||
$(srcdir)/include/private/gcconfig.h $(srcdir)/include/gc_typed.h \
|
||||
Makefile
|
||||
# The dependency on Makefile is needed. Changing
|
||||
# options affects the size of GC_arrays,
|
||||
# invalidating all .o files that rely on gc_priv.h
|
||||
|
||||
mark.o typd_mlc.o finalize.o: $(srcdir)/include/gc_mark.h
|
||||
|
||||
base_lib gc.a: $(OBJS) dyn_load.o $(UTILS)
|
||||
echo > base_lib
|
||||
rm -f on_sparc_sunos5_1
|
||||
./if_mach SPARC SOLARIS touch on_sparc_sunos5_1
|
||||
./if_mach SPARC SOLARIS $(AR) rus gc.a $(OBJS) dyn_load.o
|
||||
./if_not_there on_sparc_sunos5_1 $(AR) ru gc.a $(OBJS) dyn_load.o
|
||||
-./if_not_there on_sparc_sunos5_1 $(RANLIB) gc.a
|
||||
# ignore ranlib failure; that usually means it doesn't exist, and isn't needed
|
||||
|
||||
cords: $(CORD_OBJS) cord/cordtest$(EXE_SUFFIX) $(UTILS)
|
||||
rm -f on_sparc_sunos5_3
|
||||
./if_mach SPARC SOLARIS touch on_sparc_sunos5_3
|
||||
./if_mach SPARC SOLARIS $(AR) rus gc.a $(CORD_OBJS)
|
||||
./if_not_there on_sparc_sunos5_3 $(AR) ru gc.a $(CORD_OBJS)
|
||||
-./if_not_there on_sparc_sunos5_3 $(RANLIB) gc.a
|
||||
|
||||
gc_cpp.o: $(srcdir)/gc_cpp.cc $(srcdir)/include/gc_cpp.h $(srcdir)/include/gc.h Makefile
|
||||
$(CXX) -c $(CXXFLAGS) $(srcdir)/gc_cpp.cc
|
||||
|
||||
test_cpp$(EXE_SUFFIX): $(srcdir)/test_cpp.cc $(srcdir)/include/gc_cpp.h gc_cpp.o $(srcdir)/include/gc.h \
|
||||
base_lib $(UTILS)
|
||||
rm -f test_cpp test_cpp$(EXE_SUFFIX)
|
||||
./if_mach HP_PA "" $(CXX) $(CXXFLAGS) -o test_cpp $(srcdir)/test_cpp.cc gc_cpp.o gc.a -ldld
|
||||
./if_not_there test_cpp$(EXE_SUFFIX) $(CXXLD) $(CXXFLAGS) -o test_cpp$(EXE_SUFFIX) $(srcdir)/test_cpp.cc gc_cpp.o gc.a
|
||||
rm -f test_cpp
|
||||
|
||||
c++: gc_cpp.o $(srcdir)/include/gc_cpp.h test_cpp$(EXE_SUFFIX)
|
||||
rm -f on_sparc_sunos5_4
|
||||
./if_mach SPARC SOLARIS touch on_sparc_sunos5_4
|
||||
./if_mach SPARC SOLARIS $(AR) rus gc.a gc_cpp.o
|
||||
./if_not_there on_sparc_sunos5_4 $(AR) ru gc.a gc_cpp.o
|
||||
-./if_not_there on_sparc_sunos5_4 $(RANLIB) gc.a
|
||||
./test_cpp$(EXE_SUFFIX) 1
|
||||
echo > c++
|
||||
|
||||
dyn_load_sunos53.o: dyn_load.c
|
||||
$(CC) $(CFLAGS) -DSUNOS53_SHARED_LIB -c $(srcdir)/dyn_load.c -o $@
|
||||
|
||||
# SunOS5 shared library version of the collector
|
||||
sunos5gc.so: $(OBJS) dyn_load_sunos53.o
|
||||
$(CC) -G -o sunos5gc.so $(OBJS) dyn_load_sunos53.o -ldl
|
||||
ln sunos5gc.so libgc.so
|
||||
|
||||
# Alpha/OSF shared library version of the collector
|
||||
libalphagc.so: $(OBJS)
|
||||
ld -shared -o libalphagc.so $(OBJS) dyn_load.o -lc
|
||||
ln libalphagc.so libgc.so
|
||||
|
||||
# IRIX shared library version of the collector
|
||||
libirixgc.so: $(OBJS) dyn_load.o
|
||||
ld -shared $(ABI_FLAG) -o libirixgc.so $(OBJS) dyn_load.o -lc
|
||||
ln libirixgc.so libgc.so
|
||||
|
||||
# Linux shared library version of the collector
|
||||
liblinuxgc.so: $(OBJS) dyn_load.o
|
||||
gcc -shared -o liblinuxgc.so $(OBJS) dyn_load.o -lo
|
||||
ln liblinuxgc.so libgc.so
|
||||
|
||||
mach_dep.o: $(srcdir)/mach_dep.c $(srcdir)/mips_sgi_mach_dep.S $(srcdir)/mips_ultrix_mach_dep.s \
|
||||
$(srcdir)/rs6000_mach_dep.s $(UTILS)
|
||||
rm -f mach_dep.o
|
||||
./if_mach MIPS IRIX5 $(AS) -o mach_dep.o $(srcdir)/mips_sgi_mach_dep.S
|
||||
./if_mach MIPS RISCOS $(AS) -o mach_dep.o $(srcdir)/mips_ultrix_mach_dep.s
|
||||
./if_mach MIPS ULTRIX $(AS) -o mach_dep.o $(srcdir)/mips_ultrix_mach_dep.s
|
||||
./if_mach POWERPC AIX $(AS) -o mach_dep.o $(srcdir)/rs6000_mach_dep.s
|
||||
./if_mach ALPHA "" $(AS) -o mach_dep.o $(srcdir)/alpha_mach_dep.S
|
||||
./if_mach SPARC SOLARIS $(AS) -o mach_dep.o $(srcdir)/sparc_mach_dep.S
|
||||
./if_mach SPARC SUNOS4 $(AS) -o mach_dep.o $(srcdir)/sparc_sunos4_mach_dep.s
|
||||
./if_not_there mach_dep.o $(CC) -c $(SPECIALCFLAGS) $(srcdir)/mach_dep.c
|
||||
|
||||
mark_rts.o: $(srcdir)/mark_rts.c if_mach if_not_there $(UTILS)
|
||||
rm -f mark_rts.o
|
||||
-./if_mach ALPHA OSF1 $(CC) -c $(CFLAGS) -Wo,-notail $(srcdir)/mark_rts.c
|
||||
./if_not_there mark_rts.o $(CC) -c $(CFLAGS) $(srcdir)/mark_rts.c
|
||||
# Work-around for DEC optimizer tail recursion elimination bug.
|
||||
# The ALPHA-specific line should be removed if gcc is used.
|
||||
|
||||
alloc.o: version.h
|
||||
|
||||
cord/cordbscs.o: $(srcdir)/cord/cordbscs.c $(CORD_INCLUDE_FILES)
|
||||
$(CC) $(CFLAGS) -c -I$(srcdir) $(srcdir)/cord/cordbscs.c
|
||||
mv cordbscs.o cord/cordbscs.o
|
||||
# not all compilers understand -o filename
|
||||
|
||||
cord/cordxtra.o: $(srcdir)/cord/cordxtra.c $(CORD_INCLUDE_FILES)
|
||||
$(CC) $(CFLAGS) -c -I$(srcdir) $(srcdir)/cord/cordxtra.c
|
||||
mv cordxtra.o cord/cordxtra.o
|
||||
|
||||
cord/cordprnt.o: $(srcdir)/cord/cordprnt.c $(CORD_INCLUDE_FILES)
|
||||
$(CC) $(CFLAGS) -c -I$(srcdir) $(srcdir)/cord/cordprnt.c
|
||||
mv cordprnt.o cord/cordprnt.o
|
||||
|
||||
cord/cordtest$(EXE_SUFFIX): $(srcdir)/cord/cordtest.c $(CORD_OBJS) gc.a $(UTILS) /tmp
|
||||
rm -f cord/cordtest$(EXE_SUFFIX)
|
||||
./if_mach SPARC DRSNX $(CC) $(CFLAGS) -o cord/cordtest$(EXE_SUFFIX) $(srcdir)/cord/cordtest.c $(CORD_OBJS) gc.a -lucb
|
||||
./if_mach HP_PA "" $(CC) $(CFLAGS) -o cord/cordtest$(EXE_SUFFIX) $(srcdir)/cord/cordtest.c $(CORD_OBJS) gc.a -ldld
|
||||
./if_not_there cord/cordtest$(EXE_SUFFIX) $(CC) $(CFLAGS) -o cord/cordtest $(srcdir)/cord/cordtest.c $(CORD_OBJS) gc.a
|
||||
rm -f cord/cordtest cordtest
|
||||
-mv cordtest$(EXE_SUFFIX) cord/
|
||||
|
||||
/tmp: $(UTILS)
|
||||
./if_not_there /tmp mkdir /tmp
|
||||
|
||||
cord/de$(EXE_SUFFIX): $(srcdir)/cord/de.c cord/cordbscs.o cord/cordxtra.o gc.a $(UTILS)
|
||||
rm -f cord/de cord/de$(EXE_SUFFIX)
|
||||
./if_mach SPARC DRSNX $(CC) $(CFLAGS) -o cord/de $(srcdir)/cord/de.c cord/cordbscs.o cord/cordxtra.o gc.a $(CURSES) -lucb `./threadlibs`
|
||||
./if_mach HP_PA "" $(CC) $(CFLAGS) -o cord/de $(srcdir)/cord/de.c cord/cordbscs.o cord/cordxtra.o gc.a $(CURSES) -ldld
|
||||
./if_mach RS6000 "" $(CC) $(CFLAGS) -o cord/de $(srcdir)/cord/de.c cord/cordbscs.o cord/cordxtra.o gc.a -lcurses
|
||||
./if_mach I386 LINUX $(CC) $(CFLAGS) -o cord/de $(srcdir)/cord/de.c cord/cordbscs.o cord/cordxtra.o gc.a -lcurses `./threadlibs`
|
||||
./if_mach ALPHA LINUX $(CC) $(CFLAGS) -o cord/de $(srcdir)/cord/de.c cord/cordbscs.o cord/cordxtra.o gc.a -lcurses
|
||||
./if_not_there cord/de$(EXE_SUFFIX) $(CC) $(CFLAGS) -o cord/de$(EXE_SUFFIX) $(srcdir)/cord/de.c cord/cordbscs.o cord/cordxtra.o gc.a $(CURSES)
|
||||
|
||||
if_mach$(EXE_SUFFIX): $(srcdir)/if_mach.c $(srcdir)/include/private/gcconfig.h
|
||||
rm -f if_mach if_mach$(EXE_SUFFIX)
|
||||
$(CC) $(CFLAGS) -o if_mach $(srcdir)/if_mach.c
|
||||
|
||||
threadlibs$(EXE_SUFFIX): $(srcdir)/threadlibs.c $(srcdir)include/private/gcconfig.h Makefile
|
||||
rm -f threadlibs threadlibs$(EXE_SUFFIX)
|
||||
$(CC) $(CFLAGS) -o threadlibs $(srcdir)/threadlibs.c
|
||||
|
||||
if_not_there$(EXE_SUFFIX): $(srcdir)/if_not_there.c
|
||||
rm -f if_not_there if_not_there$(EXE_SUFFIX)
|
||||
$(CC) $(CFLAGS) -o if_not_there $(srcdir)/if_not_there.c
|
||||
|
||||
# Clean removes *.o several times,
|
||||
# because as the first one doesn't seem to get them all!
|
||||
clean:
|
||||
rm -f gc.a *.o
|
||||
rm -f *.o
|
||||
rm -f *.o
|
||||
rm -f cord/*.o
|
||||
rm -f gctest gctest_dyn_link test_cpp
|
||||
rm -f setjmp_test mon.out gmon.out a.out core if_not_there if_mach
|
||||
rm -f threadlibs $(CORD_OBJS) cordtest cord/cordtest de cord/de
|
||||
rm -f gctest$(EXE_SUFFIX) gctest_dyn_link$(EXE_SUFFIX) test_cpp$(EXE_SUFFIX)
|
||||
rm -f setjmp_test$(EXE_SUFFIX) if_not_there$(EXE_SUFFIX) if_mach$(EXE_SUFFIX)
|
||||
rm -f threadlibs$(EXE_SUFFIX) cord/cordtest$(EXE_SUFFIX)
|
||||
-rm -f *~
|
||||
|
||||
gctest$(EXE_SUFFIX): tests/test.o gc.a if_mach$(EXE_SUFFIX) if_not_there$(EXE_SUFFIX)
|
||||
rm -f gctest gctest$(EXE_SUFFIX)
|
||||
./if_mach SPARC DRSNX $(CC) $(CFLAGS) -o gctest tests/test.o gc.a -lucb
|
||||
./if_mach HP_PA "" $(CC) $(CFLAGS) -o gctest tests/test.o gc.a -ldld
|
||||
./if_not_there gctest$(EXE_SUFFIX) $(CC) $(CFLAGS) -o gctest$(EXE_SUFFIX) tests/test.o gc.a
|
||||
rm -f gctest
|
||||
|
||||
# If an optimized setjmp_test generates a segmentation fault,
|
||||
# odds are your compiler is broken. Gctest may still work.
|
||||
# Try compiling setjmp_t.c unoptimized.
|
||||
setjmp_test$(EXE_SUFFIX): $(srcdir)/setjmp_t.c $(srcdir)/include/gc.h \
|
||||
if_mach$(EXE_SUFFIX) if_not_there$(EXE_SUFFIX)
|
||||
rm -f setjmp_test$(EXE_SUFFIX)
|
||||
$(CC) $(CFLAGS) -o setjmp_test $(srcdir)/setjmp_t.c
|
||||
rm -f setjmp_test
|
||||
|
||||
test: KandRtest cord/cordtest$(EXE_SUFFIX)
|
||||
./cord/cordtest$(EXE_SUFFIX)
|
||||
|
||||
# Those tests that work even with a K&R C compiler:
|
||||
KandRtest: setjmp_test$(EXE_SUFFIX) gctest$(EXE_SUFFIX)
|
||||
./setjmp_test$(EXE_SUFFIX)
|
||||
./gctest$(EXE_SUFFIX)
|
||||
|
||||
add_gc_prefix$(EXE_SUFFIX): add_gc_prefix.c
|
||||
$(CC) -o add_gc_prefix$(EXE_SUFFIX) $(srcdir)/add_gc_prefix.c
|
||||
rm -f add_gc_prefix
|
||||
|
||||
gc.tar: $(SRCS) $(OTHER_FILES) add_gc_prefix
|
||||
./add_gc_prefix$(EXE_SUFFIX) $(SRCS) $(OTHER_FILES) > /tmp/gc.tar-files
|
||||
(cd $(srcdir)/.. ; tar cvfh - `cat /tmp/gc.tar-files`) > gc.tar
|
||||
|
||||
pc_gc.tar: $(SRCS) $(OTHER_FILES)
|
||||
tar cvfX pc_gc.tar pc_excludes $(SRCS) $(OTHER_FILES)
|
||||
|
||||
gc.tar.Z: gc.tar
|
||||
compress gc.tar
|
||||
|
||||
gc.tar.gz: gc.tar
|
||||
gzip gc.tar
|
||||
|
||||
lint: $(CSRCS) tests/test.c
|
||||
lint -DLINT $(CSRCS) tests/test.c | egrep -v "possible pointer alignment problem|abort|exit|sbrk|mprotect|syscall"
|
||||
|
||||
# BTL: added to test shared library version of collector.
|
||||
# Currently works only under SunOS5. Requires GC_INIT call from statically
|
||||
# loaded client code.
|
||||
ABSDIR = `pwd`
|
||||
gctest_dyn_link: test.o libgc.so
|
||||
$(CC) -L$(ABSDIR) -R$(ABSDIR) -o gctest_dyn_link test.o -lgc -ldl -lthread
|
||||
|
||||
test_dll.o: tests/test.c libgc_globals.h
|
||||
$(CC) $(CFLAGS) -DGC_USE_DLL -c tests/test.c -o test_dll.o
|
||||
|
||||
test_dll: test_dll.o libgc_dll.a libgc.dll
|
||||
$(CC) test_dll.o -L$(ABSDIR) -lgc_dll -o test_dll
|
||||
|
||||
SYM_PREFIX-libgc=GC
|
||||
|
||||
# Uncomment the following line to build a GNU win32 DLL
|
||||
# include Makefile.DLLs
|
||||
|
1405
jam-files/engine/boehm_gc/Makefile.in
Normal file
1405
jam-files/engine/boehm_gc/Makefile.in
Normal file
File diff suppressed because it is too large
Load Diff
60
jam-files/engine/boehm_gc/NT_MAKEFILE
Executable file
60
jam-files/engine/boehm_gc/NT_MAKEFILE
Executable file
@ -0,0 +1,60 @@
|
||||
# Makefile for Windows NT. Assumes Microsoft compiler, and a single thread.
|
||||
# DLLs are included in the root set under NT, but not under win32S.
|
||||
# Use "nmake nodebug=1 all" for optimized versions of library, gctest and editor.
|
||||
|
||||
MY_CPU=X86
|
||||
CPU=$(MY_CPU)
|
||||
!include <ntwin32.mak>
|
||||
|
||||
OBJS= alloc.obj reclaim.obj allchblk.obj misc.obj mach_dep.obj os_dep.obj mark_rts.obj headers.obj mark.obj obj_map.obj blacklst.obj finalize.obj new_hblk.obj dbg_mlc.obj malloc.obj stubborn.obj dyn_load.obj typd_mlc.obj ptr_chck.obj gc_cpp.obj mallocx.obj msvc_dbg.obj
|
||||
|
||||
all: gctest.exe cord\de.exe test_cpp.exe
|
||||
|
||||
.c.obj:
|
||||
$(cc) $(cdebug) $(cflags) $(cvars) -Iinclude -DALL_INTERIOR_POINTERS -D__STDC__ -DGC_NOT_DLL -DGC_BUILD $*.c /Fo$*.obj
|
||||
|
||||
.cpp.obj:
|
||||
$(cc) $(cdebug) $(cflags) $(cvars) -Iinclude -DALL_INTERIOR_POINTERS -DGC_NOT_DLL -DGC_BUILD $*.CPP /Fo$*.obj
|
||||
|
||||
$(OBJS) tests\test.obj: include\private\gc_priv.h include\private\gc_hdrs.h include\gc.h include\private\gcconfig.h include\private\gc_locks.h include\private\gc_pmark.h include\gc_mark.h include\private\msvc_dbg.h
|
||||
|
||||
gc.lib: $(OBJS)
|
||||
lib /MACHINE:i386 /out:gc.lib $(OBJS)
|
||||
# The original NT SDK used lib32 instead of lib
|
||||
|
||||
gctest.exe: tests\test.obj gc.lib
|
||||
# The following works for win32 debugging. For win32s debugging use debugtype:coff
|
||||
# and add mapsympe line.
|
||||
# This produces a "GUI" applications that opens no windows and writes to the log file
|
||||
# "gc.log". This is done to make the result runnable under win32s.
|
||||
$(link) -debug:full -debugtype:cv $(guiflags) -stack:131072 -out:$*.exe tests\test.obj $(guilibs) gc.lib
|
||||
# mapsympe -n -o gctest.sym gctest.exe
|
||||
|
||||
cord\de_win.rbj: cord\de_win.res
|
||||
cvtres /MACHINE:$(MY_CPU) /OUT:cord\de_win.rbj cord\de_win.res
|
||||
|
||||
cord\de.obj cord\de_win.obj: include\cord.h include\private\cord_pos.h cord\de_win.h cord\de_cmds.h
|
||||
|
||||
cord\de_win.res: cord\de_win.rc cord\de_win.h cord\de_cmds.h
|
||||
$(rc) $(rcvars) -r -fo cord\de_win.res cord\de_win.rc
|
||||
|
||||
# Cord/de is a real win32 gui application.
|
||||
cord\de.exe: cord\cordbscs.obj cord\cordxtra.obj cord\de.obj cord\de_win.obj cord\de_win.rbj gc.lib
|
||||
$(link) -debug:full -debugtype:cv $(guiflags) -stack:16384 -out:cord\de.exe cord\cordbscs.obj cord\cordxtra.obj cord\de.obj cord\de_win.obj cord\de_win.rbj gc.lib $(guilibs)
|
||||
|
||||
gc_cpp.obj: include\gc_cpp.h include\gc.h
|
||||
|
||||
gc_cpp.cpp: gc_cpp.cc
|
||||
copy gc_cpp.cc gc_cpp.cpp
|
||||
|
||||
test_cpp.cpp: tests\test_cpp.cc
|
||||
copy tests\test_cpp.cc test_cpp.cpp
|
||||
|
||||
# This generates the C++ test executable. The executable expects
|
||||
# a single numeric argument, which is the number of iterations.
|
||||
# The output appears in the file "gc.log".
|
||||
test_cpp.exe: test_cpp.obj include\gc_cpp.h include\gc.h gc.lib
|
||||
$(link) -debug:full -debugtype:cv $(guiflags) -stack:16384 -out:test_cpp.exe test_cpp.obj gc.lib $(guilibs)
|
||||
|
||||
|
||||
|
74
jam-files/engine/boehm_gc/NT_STATIC_THREADS_MAKEFILE
Normal file
74
jam-files/engine/boehm_gc/NT_STATIC_THREADS_MAKEFILE
Normal file
@ -0,0 +1,74 @@
|
||||
# Makefile for Windows NT. Assumes Microsoft compiler.
|
||||
# DLLs are included in the root set under NT, but not under win32S.
|
||||
# Use "nmake nodebug=1 all" for optimized versions of library, gctest and editor.
|
||||
|
||||
MY_CPU=X86
|
||||
CPU=$(MY_CPU)
|
||||
!include <ntwin32.mak>
|
||||
|
||||
# Make sure that .cc is not viewed as a suffix. It is for VC++2005, but
|
||||
# not earlier versions. We can deal with either, but not inconsistency.
|
||||
.SUFFIXES:
|
||||
.SUFFIXES: .obj .cpp .c
|
||||
|
||||
# Atomic_ops installation directory. For win32, the source directory
|
||||
# should do, since we only need the headers.
|
||||
# We assume this was manually unpacked, since I'm not sure there is
|
||||
# a Windows standard command line tool to do this.
|
||||
AO_VERSION=1.2
|
||||
AO_SRC_DIR=libatomic_ops-$(AO_VERSION)/src
|
||||
AO_INCLUDE_DIR=$(AO_SRC_DIR)
|
||||
|
||||
OBJS= alloc.obj reclaim.obj allchblk.obj misc.obj mach_dep.obj os_dep.obj mark_rts.obj headers.obj mark.obj obj_map.obj blacklst.obj finalize.obj new_hblk.obj dbg_mlc.obj malloc.obj stubborn.obj dyn_load.obj typd_mlc.obj ptr_chck.obj gc_cpp.obj mallocx.obj win32_threads.obj msvc_dbg.obj thread_local_alloc.obj
|
||||
|
||||
all: gctest.exe cord\de.exe test_cpp.exe
|
||||
|
||||
.c.obj:
|
||||
$(cc) $(cdebug) $(cflags) $(cvarsmt) -Iinclude -I$(AO_INCLUDE_DIR) -DALL_INTERIOR_POINTERS -D__STDC__ -DGC_NOT_DLL -DGC_WIN32_THREADS -DTHREAD_LOCAL_ALLOC $*.c /Fo$*.obj
|
||||
|
||||
.cpp.obj:
|
||||
$(cc) $(cdebug) $(cflags) $(cvarsmt) -Iinclude -I$(AO_INCLUDE_DIR) -DALL_INTERIOR_POINTERS -DGC_NOT_DLL $*.CPP -DGC_WIN32_THREADS -DTHREAD_LOCAL_ALLOC /Fo$*.obj
|
||||
|
||||
$(OBJS) tests\test.obj: include\private\gc_priv.h include\private\gc_hdrs.h include\gc.h include\private\gcconfig.h include\private\gc_locks.h include\private\gc_pmark.h include\gc_mark.h include\private\msvc_dbg.h
|
||||
|
||||
gc.lib: $(OBJS)
|
||||
lib /MACHINE:i386 /out:gc.lib $(OBJS)
|
||||
# The original NT SDK used lib32 instead of lib
|
||||
|
||||
gctest.exe: tests\test.obj gc.lib
|
||||
# The following works for win32 debugging. For win32s debugging use debugtype:coff
|
||||
# and add mapsympe line.
|
||||
# This produces a "GUI" applications that opens no windows and writes to the log file
|
||||
# "gc.log". This is done to make the result runnable under win32s.
|
||||
$(link) -debug:full -debugtype:cv $(guiflags) -stack:131072 -out:$*.exe tests\test.obj $(guilibs) gc.lib
|
||||
# mapsympe -n -o gctest.sym gctest.exe
|
||||
|
||||
cord\de_win.rbj: cord\de_win.res
|
||||
cvtres /MACHINE:$(MY_CPU) /OUT:cord\de_win.rbj cord\de_win.res
|
||||
|
||||
cord\de.obj cord\de_win.obj: include\cord.h include\private\cord_pos.h cord\de_win.h cord\de_cmds.h
|
||||
|
||||
cord\de_win.res: cord\de_win.rc cord\de_win.h cord\de_cmds.h
|
||||
$(rc) $(rcvars) -r -fo cord\de_win.res cord\de_win.rc
|
||||
|
||||
# Cord/de is a real win32 gui application.
|
||||
cord\de.exe: cord\cordbscs.obj cord\cordxtra.obj cord\de.obj cord\de_win.obj cord\de_win.rbj gc.lib
|
||||
$(link) -debug:full -debugtype:cv $(guiflags) -stack:16384 -out:cord\de.exe cord\cordbscs.obj cord\cordxtra.obj cord\de.obj cord\de_win.obj cord\de_win.rbj gc.lib $(guilibs)
|
||||
|
||||
gc_cpp.obj: include\gc_cpp.h include\gc.h
|
||||
|
||||
gc_cpp.cpp: gc_cpp.cc
|
||||
copy gc_cpp.cc gc_cpp.cpp
|
||||
|
||||
test_cpp.cpp: tests\test_cpp.cc
|
||||
copy tests\test_cpp.cc test_cpp.cpp
|
||||
|
||||
# This generates the C++ test executable. The executable expects
|
||||
# a single numeric argument, which is the number of iterations.
|
||||
# The output appears in the file "gc.log".
|
||||
test_cpp.exe: test_cpp.obj include\gc_cpp.h include\gc.h gc.lib
|
||||
$(link) -debug:full -debugtype:cv $(guiflags) -stack:16384 -out:test_cpp.exe test_cpp.obj gc.lib $(guilibs)
|
||||
|
||||
AO_SCR_DIR:
|
||||
tar xvfz $(AO_SRC_DIR).tar.gz;
|
||||
|
2220
jam-files/engine/boehm_gc/NT_THREADS_MAKEFILE
Normal file
2220
jam-files/engine/boehm_gc/NT_THREADS_MAKEFILE
Normal file
File diff suppressed because it is too large
Load Diff
74
jam-files/engine/boehm_gc/NT_X64_STATIC_THREADS_MAKEFILE
Normal file
74
jam-files/engine/boehm_gc/NT_X64_STATIC_THREADS_MAKEFILE
Normal file
@ -0,0 +1,74 @@
|
||||
# Makefile for Windows NT. Assumes Microsoft compiler.
|
||||
# DLLs are included in the root set under NT, but not under win32S.
|
||||
# Use "nmake nodebug=1 all" for optimized versions of library, gctest and editor.
|
||||
|
||||
MY_CPU=AMD64
|
||||
CPU=$(MY_CPU)
|
||||
!include <ntwin32.mak>
|
||||
|
||||
# Make sure that .cc is not viewed as a suffix. It is for VC++2005, but
|
||||
# not earlier versions. We can deal with either, but not inconsistency.
|
||||
.SUFFIXES:
|
||||
.SUFFIXES: .obj .cpp .c
|
||||
|
||||
# Atomic_ops installation directory. For win32, the source directory
|
||||
# should do, since we only need the headers.
|
||||
# We assume this was manually unpacked, since I'm not sure there is
|
||||
# a Windows standard command line tool to do this.
|
||||
AO_VERSION=1.2
|
||||
AO_SRC_DIR=libatomic_ops-$(AO_VERSION)/src
|
||||
AO_INCLUDE_DIR=$(AO_SRC_DIR)
|
||||
|
||||
OBJS= alloc.obj reclaim.obj allchblk.obj misc.obj mach_dep.obj os_dep.obj mark_rts.obj headers.obj mark.obj obj_map.obj blacklst.obj finalize.obj new_hblk.obj dbg_mlc.obj malloc.obj stubborn.obj dyn_load.obj typd_mlc.obj ptr_chck.obj gc_cpp.obj mallocx.obj win32_threads.obj msvc_dbg.obj thread_local_alloc.obj
|
||||
|
||||
all: gctest.exe cord\de.exe test_cpp.exe
|
||||
|
||||
.c.obj:
|
||||
$(cc) $(cdebug) $(cflags) $(cvarsmt) -Iinclude -I$(AO_INCLUDE_DIR) -DALL_INTERIOR_POINTERS -D__STDC__ -DGC_NOT_DLL -DGC_WIN32_THREADS -DTHREAD_LOCAL_ALLOC $*.c /Fo$*.obj /wd4701 -D_CRT_SECURE_NO_DEPRECATE
|
||||
# Disable "may not be initialized" warnings. They're too approximate.
|
||||
# Disable crt security warnings, since unfortunately they warn about all sorts
|
||||
# of safe uses of strncpy. It would be nice to leave the rest enabled.
|
||||
|
||||
.cpp.obj:
|
||||
$(cc) $(cdebug) $(cflags) $(cvarsmt) -Iinclude -I$(AO_INCLUDE_DIR) -DALL_INTERIOR_POINTERS -DGC_NOT_DLL $*.CPP -DGC_WIN32_THREADS -DTHREAD_LOCAL_ALLOC /Fo$*.obj -D_CRT_SECURE_NO_DEPRECATE
|
||||
|
||||
$(OBJS) tests\test.obj: include\private\gc_priv.h include\private\gc_hdrs.h include\gc.h include\private\gcconfig.h include\private\gc_locks.h include\private\gc_pmark.h include\gc_mark.h include\private\msvc_dbg.h
|
||||
|
||||
gc.lib: $(OBJS)
|
||||
lib /MACHINE:X64 /out:gc.lib $(OBJS)
|
||||
|
||||
gctest.exe: tests\test.obj gc.lib
|
||||
# This produces a "GUI" applications that opens no windows and writes to the log file
|
||||
# "gc.log". This was done to make the result runnable under win32s and
|
||||
# should be fixed.
|
||||
$(link) $(ldebug) $(guiflags) -stack:131072 -out:$*.exe tests\test.obj $(guilibs) gc.lib
|
||||
|
||||
cord\de_win.rbj: cord\de_win.res
|
||||
cvtres /MACHINE:$(MY_CPU) /OUT:cord\de_win.rbj cord\de_win.res
|
||||
|
||||
cord\de.obj cord\de_win.obj: include\cord.h include\private\cord_pos.h cord\de_win.h cord\de_cmds.h
|
||||
|
||||
cord\de_win.res: cord\de_win.rc cord\de_win.h cord\de_cmds.h
|
||||
$(rc) $(rcvars) -r -fo cord\de_win.res cord\de_win.rc
|
||||
|
||||
# Cord/de is a real win32 gui application.
|
||||
cord\de.exe: cord\cordbscs.obj cord\cordxtra.obj cord\de.obj cord\de_win.obj cord\de_win.rbj gc.lib
|
||||
$(link) $(ldebug) $(guiflags) -stack:16384 -out:cord\de.exe cord\cordbscs.obj cord\cordxtra.obj cord\de.obj cord\de_win.obj cord\de_win.rbj gc.lib $(guilibs)
|
||||
|
||||
gc_cpp.obj: include\gc_cpp.h include\gc.h
|
||||
|
||||
gc_cpp.cpp: gc_cpp.cc
|
||||
copy gc_cpp.cc gc_cpp.cpp
|
||||
|
||||
test_cpp.cpp: tests\test_cpp.cc
|
||||
copy tests\test_cpp.cc test_cpp.cpp
|
||||
|
||||
# This generates the C++ test executable. The executable expects
|
||||
# a single numeric argument, which is the number of iterations.
|
||||
# The output appears in the file "gc.log".
|
||||
test_cpp.exe: test_cpp.obj include\gc_cpp.h include\gc.h gc.lib
|
||||
$(link) $(ldebug) $(guiflags) -stack:16384 -out:test_cpp.exe test_cpp.obj gc.lib $(guilibs)
|
||||
|
||||
AO_SCR_DIR:
|
||||
tar xvfz $(AO_SRC_DIR).tar.gz;
|
||||
|
45
jam-files/engine/boehm_gc/OS2_MAKEFILE
Normal file
45
jam-files/engine/boehm_gc/OS2_MAKEFILE
Normal file
@ -0,0 +1,45 @@
|
||||
# Makefile for OS/2. Assumes IBM's compiler, static linking, and a single thread.
|
||||
# Adding dynamic linking support seems easy, but takes a little bit of work.
|
||||
# Adding thread support may be nontrivial, since we haven't yet figured out how to
|
||||
# look at another thread's registers.
|
||||
|
||||
# Significantly revised for GC version 4.4 by Mark Boulter (Jan 1994).
|
||||
|
||||
OBJS= alloc.obj reclaim.obj allchblk.obj misc.obj mach_dep.obj os_dep.obj mark_rts.obj headers.obj mark.obj obj_map.obj blacklst.obj finalize.obj new_hblk.obj dbg_mlc.obj malloc.obj stubborn.obj typd_mlc.obj ptr_chck.obj mallocx.obj
|
||||
|
||||
CORDOBJS= cord\cordbscs.obj cord\cordxtra.obj cord\cordprnt.obj
|
||||
|
||||
CC= icc
|
||||
CFLAGS= /O /Q /DSMALL_CONFIG /DALL_INTERIOR_POINTERS
|
||||
# Use /Ti instead of /O for debugging
|
||||
# Setjmp_test may yield overly optimistic results when compiled
|
||||
# without optimization.
|
||||
|
||||
all: $(OBJS) gctest.exe cord\cordtest.exe
|
||||
|
||||
$(OBJS) test.obj: include\private\gc_priv.h include\private\gc_hdrs.h include\gc.h include\private\gcconfig.h
|
||||
|
||||
## ERASE THE LIB FIRST - if it is already there then this command will fail
|
||||
## (make sure its there or erase will fail!)
|
||||
gc.lib: $(OBJS)
|
||||
echo . > gc.lib
|
||||
erase gc.lib
|
||||
LIB gc.lib $(OBJS), gc.lst
|
||||
|
||||
mach_dep.obj: mach_dep.c
|
||||
$(CC) $(CFLAGS) /C mach_dep.c
|
||||
|
||||
gctest.exe: test.obj gc.lib
|
||||
$(CC) $(CFLAGS) /B"/STACK:524288" /Fegctest test.obj gc.lib
|
||||
|
||||
cord\cordbscs.obj: cord\cordbscs.c include\cord.h include\private\cord_pos.h
|
||||
$(CC) $(CFLAGS) /C /Focord\cordbscs cord\cordbscs.c
|
||||
|
||||
cord\cordxtra.obj: cord\cordxtra.c include\cord.h include\private\cord_pos.h include\ec.h
|
||||
$(CC) $(CFLAGS) /C /Focord\cordxtra cord\cordxtra.c
|
||||
|
||||
cord\cordprnt.obj: cord\cordprnt.c include\cord.h include\private\cord_pos.h include\ec.h
|
||||
$(CC) $(CFLAGS) /C /Focord\cordprnt cord\cordprnt.c
|
||||
|
||||
cord\cordtest.exe: cord\cordtest.c include\cord.h include\private\cord_pos.h include\ec.h $(CORDOBJS) gc.lib
|
||||
$(CC) $(CFLAGS) /B"/STACK:65536" /Fecord\cordtest cord\cordtest.c gc.lib $(CORDOBJS)
|
68
jam-files/engine/boehm_gc/PCR-Makefile
Normal file
68
jam-files/engine/boehm_gc/PCR-Makefile
Normal file
@ -0,0 +1,68 @@
|
||||
#
|
||||
# Default target
|
||||
#
|
||||
|
||||
default: gc.o
|
||||
|
||||
include ../config/common.mk
|
||||
|
||||
#
|
||||
# compilation flags, etc.
|
||||
#
|
||||
|
||||
|
||||
CPPFLAGS = $(INCLUDE) $(CONFIG_CPPFLAGS) \
|
||||
-DPCR_NO_RENAME -DPCR_NO_HOSTDEP_ERR
|
||||
#CFLAGS = -DPCR $(CONFIG_CFLAGS)
|
||||
CFLAGS = -DPCR $(CONFIG_CFLAGS)
|
||||
SPECIALCFLAGS = # For code involving asm's
|
||||
|
||||
ASPPFLAGS = $(INCLUDE) $(CONFIG_ASPPFLAGS) \
|
||||
-DPCR_NO_RENAME -DPCR_NO_HOSTDEP_ERR -DASM
|
||||
|
||||
ASFLAGS = $(CONFIG_ASFLAGS)
|
||||
|
||||
LDRFLAGS = $(CONFIG_LDRFLAGS)
|
||||
|
||||
LDFLAGS = $(CONFIG_LDFLAGS)
|
||||
|
||||
#
|
||||
#
|
||||
#
|
||||
#
|
||||
# BEGIN PACKAGE-SPECIFIC PART
|
||||
#
|
||||
#
|
||||
#
|
||||
#
|
||||
|
||||
# Fix to point to local pcr installation directory.
|
||||
PCRDIR= ..
|
||||
|
||||
COBJ= alloc.o reclaim.o allchblk.o misc.o os_dep.o mark_rts.o headers.o mark.o obj_map.o pcr_interface.o blacklst.o finalize.o new_hblk.o real_malloc.o dyn_load.o dbg_mlc.o malloc.o stubborn.o checksums.o solaris_threads.o typd_mlc.o ptr_chck.o mallocx.o
|
||||
|
||||
CSRC= reclaim.c allchblk.c misc.c alloc.c mach_dep.c os_dep.c mark_rts.c headers.c mark.c obj_map.c pcr_interface.c blacklst.c finalize.c new_hblk.c real_malloc.c dyn_load.c dbg_mlc.c malloc.c stubborn.c checksums.c solaris_threads.c typd_mlc.c ptr_chck.c mallocx.c
|
||||
|
||||
SHELL= /bin/sh
|
||||
|
||||
default: gc.o
|
||||
|
||||
gc.o: $(COBJ) mach_dep.o
|
||||
$(LDR) $(CONFIG_LDRFLAGS) -o gc.o $(COBJ) mach_dep.o
|
||||
|
||||
|
||||
mach_dep.o: mach_dep.c mips_mach_dep.s rs6000_mach_dep.s if_mach if_not_there
|
||||
rm -f mach_dep.o
|
||||
./if_mach MIPS "" as -o mach_dep.o mips_mach_dep.s
|
||||
./if_mach POWERPC AIX as -o mach_dep.o rs6000_mach_dep.s
|
||||
./if_mach ALPHA "" as -o mach_dep.o alpha_mach_dep.s
|
||||
./if_mach SPARC SOLARIS as -o mach_dep.o sparc_mach_dep.s
|
||||
./if_not_there mach_dep.o $(CC) -c $(SPECIALCFLAGS) mach_dep.c
|
||||
|
||||
if_mach: if_mach.c gcconfig.h
|
||||
$(CC) $(CFLAGS) -o if_mach if_mach.c
|
||||
|
||||
if_not_there: if_not_there.c
|
||||
$(CC) $(CFLAGS) -o if_not_there if_not_there.c
|
||||
|
||||
|
88
jam-files/engine/boehm_gc/README.QUICK
Normal file
88
jam-files/engine/boehm_gc/README.QUICK
Normal file
@ -0,0 +1,88 @@
|
||||
Copyright 1988, 1989 Hans-J. Boehm, Alan J. Demers
|
||||
Copyright (c) 1991-1995 by Xerox Corporation. All rights reserved.
|
||||
Copyright (c) 1996-1999 by Silicon Graphics. All rights reserved.
|
||||
Copyright (c) 1999-2001 by Hewlett-Packard. All rights reserved.
|
||||
|
||||
THIS MATERIAL IS PROVIDED AS IS, WITH ABSOLUTELY NO WARRANTY EXPRESSED
|
||||
OR IMPLIED. ANY USE IS AT YOUR OWN RISK.
|
||||
|
||||
Permission is hereby granted to use or copy this program
|
||||
for any purpose, provided the above notices are retained on all copies.
|
||||
Permission to modify the code and to distribute modified code is granted,
|
||||
provided the above notices are retained, and a notice that the code was
|
||||
modified is included with the above copyright notice.
|
||||
|
||||
A few files have other copyright holders. A few of the files needed
|
||||
to use the GNU-style build procedure come with a modified GPL license
|
||||
that appears not to significantly restrict use of the collector, though
|
||||
use of those files for a purpose other than building the collector may
|
||||
require the resulting code to be covered by the GPL.
|
||||
|
||||
For more details and the names of other contributors, see the
|
||||
doc/README* files and include/gc.h. This file describes typical use of
|
||||
the collector on a machine that is already supported.
|
||||
|
||||
For the version number, see doc/README or version.h.
|
||||
|
||||
INSTALLATION:
|
||||
Under UN*X, Linux:
|
||||
Alternative 1 (the old way): type "make test" in this directory.
|
||||
Link against gc.a. With the most recent GC distributions
|
||||
you may have to copy Makefile.direct to Makefile first.
|
||||
|
||||
Alternative 2 (the new way): type
|
||||
"./configure --prefix=<dir>; make; make check; make install".
|
||||
Link against <dir>/lib/libgc.a or <dir>/lib/libgc.so.
|
||||
See README.autoconf for details
|
||||
|
||||
Under Windows 95, 98, Me, NT, or 2000:
|
||||
copy the appropriate makefile to MAKEFILE, read it, and type "nmake test".
|
||||
(Under Windows, this assumes you have Microsoft command-line tools
|
||||
installed, and suitably configured.)
|
||||
Read the machine specific README in the doc directory if one exists.
|
||||
|
||||
If you need thread support, you will need to follow the special
|
||||
platform-dependent instructions (win32), or define GC_THREADS
|
||||
as described in Makefile (Makefile.direct), or possibly use
|
||||
--enable-threads=posix when running the configure script.
|
||||
|
||||
If you wish to use the cord (structured string) library with the stand-alone
|
||||
Makefile.direct, type "make cords", after copying to "Makefile".
|
||||
(This requires an ANSI C compiler. You may
|
||||
need to redefine CC in the Makefile. The CORD_printf implementation in
|
||||
cordprnt.c is known to be less than perfectly portable. The rest of the
|
||||
package should still work.)
|
||||
|
||||
If you wish to use the collector from C++, type "make c++", or use
|
||||
--enable-cplusplus with the configure script. With Makefile.direct,
|
||||
hese add further files to gc.a and to the include subdirectory. With the
|
||||
alternat build process,this generates libgccpp.
|
||||
See cord/cord.h and include/gc_cpp.h.
|
||||
|
||||
TYPICAL USE:
|
||||
Include "gc.h" from the include subdirectory. Link against the
|
||||
appropriate library ("gc.a" under UN*X). Replace calls to malloc
|
||||
by calls to GC_MALLOC, and calls to realloc by calls to GC_REALLOC.
|
||||
If the object is known to never contain pointers, use GC_MALLOC_ATOMIC
|
||||
instead of GC_MALLOC.
|
||||
|
||||
Define GC_DEBUG before including gc.h for additional checking.
|
||||
|
||||
More documentation on the collector interface can be found at
|
||||
http://www.hpl.hp.com/personal/Hans_Boehm/gc/gcinterface.html,
|
||||
in doc/README and other files in the doc directory, and in include/gc.h .
|
||||
|
||||
WARNINGS:
|
||||
|
||||
Do not store the only pointer to an object in memory allocated
|
||||
with system malloc, since the collector usually does not scan
|
||||
memory allocated in this way.
|
||||
|
||||
Use with threads may be supported on your system, but requires the
|
||||
collector to be built with thread support. See Makefile. The collector
|
||||
does not guarantee to scan thread-local storage (e.g. of the kind
|
||||
accessed with pthread_getspecific()). The collector does scan
|
||||
thread stacks though, so generally the best solution is to ensure that
|
||||
any pointers stored in thread-local storage are also stored on the
|
||||
thread's stack for the duration of their lifetime.
|
||||
|
177
jam-files/engine/boehm_gc/SMakefile.amiga
Normal file
177
jam-files/engine/boehm_gc/SMakefile.amiga
Normal file
@ -0,0 +1,177 @@
|
||||
|
||||
# Rewritten smakefile for amiga / sas/c. -Kjetil M.
|
||||
# Dont use the cord-package if you define parm=both or parm=reg.
|
||||
|
||||
|
||||
#----------------TOOLS--------------------------------
|
||||
CC=sc
|
||||
LINKER=slink
|
||||
LIBER=oml
|
||||
|
||||
#----------------CPU OPTIONS--------------------------
|
||||
|
||||
CPU=68060
|
||||
|
||||
#----------------FPU OPTIONS--------------------------
|
||||
|
||||
MATH=8
|
||||
MATHLIB=LIB:scm881.lib
|
||||
|
||||
#----------------COMPILER OPTIONS---------------------
|
||||
|
||||
IGNORE= IGNORE=85 IGNORE=154 IGNORE=161 IGNORE=100
|
||||
|
||||
OPTIMIZE=optimize optimizetime optglobal optimizerdepth=100 optimizerpeephole optloop OPTSCHED optimizerinlocal optimizerrecurdepth=100
|
||||
# optimizerinline optimizercomplexity=100
|
||||
|
||||
OPT= $(OPTIMIZE) CPU=$(CPU) math=$(MATH) NOSTACKCHECK VERBOSE \
|
||||
MAPHUNK NOVERSION NOICONS nodebug \
|
||||
parm=reg \
|
||||
DEFINE __USE_SYSBASE
|
||||
|
||||
|
||||
SOPT= $(OPT) $(IGNORE) \
|
||||
DEFINE AMIGA_SKIP_SEG \
|
||||
DEFINE ATOMIC_UNCOLLECTABLE \
|
||||
DEFINE GC_AMIGA_FASTALLOC \
|
||||
DEFINE GC_AMIGA_RETRY \
|
||||
DEFINE GC_AMIGA_PRINTSTATS \
|
||||
DEFINE GC_AMIGA_GC
|
||||
|
||||
|
||||
#DEFINE ALL_INTERIOR_POINTERS \
|
||||
|
||||
|
||||
SCOPT= $(SOPT) define GC_AMIGA_MAKINGLIB
|
||||
|
||||
CSCOPT= $(OPT) DEFINE AMIGA IGNORE=100 IGNORE=161
|
||||
|
||||
#------------------LINKING----------------------------
|
||||
|
||||
|
||||
all: gctest setjmp_t cord/cordtest
|
||||
|
||||
clean:
|
||||
delete *.lib gctest setjmp_t *.o *.lnk cord/*.o cord/*.lib cord/*.lnk cord/cordtest
|
||||
smake
|
||||
|
||||
test: setjmp_t gctest cord/cordtest
|
||||
setjmp_t
|
||||
gctest
|
||||
cord/cordtest
|
||||
|
||||
gctest: gc$(CPU).lib GCAmigaOS$(CPU).lib test.o
|
||||
$(LINKER) LIB:c.o test.o TO gctest LIB gc$(CPU).lib LIB:sc.lib $(MATHLIB)
|
||||
|
||||
setjmp_t: setjmp_t.o gc.h
|
||||
$(LINKER) LIB:c.o setjmp_t.o to setjmp_t lib LIB:sc.lib
|
||||
|
||||
cord/cordtest: cord/cordtest.o cord/cord$(CPU).lib gc$(CPU).lib
|
||||
slink LIB:c.o cord/cordtest.o LIB $(MATHLIB) gc$(CPU).lib cord/cord$(CPU).lib LIB:sc.lib TO cord/cordtest
|
||||
|
||||
|
||||
#------------------LIBBING----------------------------
|
||||
|
||||
OBJS= alloc.o reclaim.o allchblk.o misc.o mach_dep.o os_dep.o mark_rts.o headers.o mark.o obj_map.o blacklst.o finalize.o new_hblk.o real_malloc.o dyn_load.o dbg_mlc.o malloc.o stubborn.o checksums.o typd_mlc.o ptr_chck.o mallocx.o
|
||||
|
||||
gc$(CPU).lib: $(OBJS)
|
||||
$(LIBER) gc$(CPU).lib r $(OBJS)
|
||||
|
||||
|
||||
COBJS = cord/cordbscs.o cord/cordprnt.o cord/cordxtra.o
|
||||
|
||||
cord/cord$(CPU).lib: $(COBJS)
|
||||
oml cord/cord$(CPU).lib r $(COBJS)
|
||||
|
||||
#------------------COMPILING--------------------------
|
||||
|
||||
INC= gc_private.h gc_hdrs.h gc.h gcconfig.h
|
||||
|
||||
alloc.o : alloc.c $(INC)
|
||||
$(CC) alloc.c $(SCOPT) ignore=7
|
||||
|
||||
reclaim.o : reclaim.c $(INC)
|
||||
$(CC) reclaim.c $(SCOPT)
|
||||
|
||||
allchblk.o : allchblk.c $(INC)
|
||||
$(CC) allchblk.c $(SCOPT)
|
||||
|
||||
misc.o : misc.c $(INC)
|
||||
$(CC) misc.c $(SCOPT)
|
||||
|
||||
os_dep.o : os_dep.c $(INC) AmigaOS.c
|
||||
$(CC) os_dep.c $(SCOPT)
|
||||
|
||||
mark_rts.o : mark_rts.c $(INC)
|
||||
$(CC) mark_rts.c $(SCOPT)
|
||||
|
||||
headers.o : headers.c $(INC)
|
||||
$(CC) headers.c $(SCOPT)
|
||||
|
||||
mark.o : mark.c $(INC)
|
||||
$(CC) mark.c $(SCOPT)
|
||||
|
||||
obj_map.o : obj_map.c $(INC)
|
||||
$(CC) obj_map.c $(SCOPT)
|
||||
|
||||
blacklst.o : blacklst.c $(INC)
|
||||
$(CC) blacklst.c $(SCOPT)
|
||||
|
||||
finalize.o : finalize.c $(INC)
|
||||
$(CC) finalize.c $(SCOPT) noopt #Could sas/c still have problems with this one? Gctest sometimes fails to finalize all.
|
||||
|
||||
new_hblk.o : new_hblk.c $(INC)
|
||||
$(CC) new_hblk.c $(SCOPT)
|
||||
|
||||
real_malloc.o : real_malloc.c $(INC)
|
||||
$(CC) real_malloc.c $(SCOPT)
|
||||
|
||||
dyn_load.o : dyn_load.c $(INC)
|
||||
$(CC) dyn_load.c $(SCOPT)
|
||||
|
||||
dbg_mlc.o : dbg_mlc.c $(INC)
|
||||
$(CC) dbg_mlc.c $(SCOPT)
|
||||
|
||||
malloc.o : malloc.c $(INC)
|
||||
$(CC) malloc.c $(SCOPT)
|
||||
|
||||
mallocx.o : mallocx.c $(INC)
|
||||
$(CC) mallocx.c $(SCOPT)
|
||||
|
||||
stubborn.o : stubborn.c $(INC)
|
||||
$(CC) stubborn.c $(SCOPT)
|
||||
|
||||
checksums.o : checksums.c $(INC)
|
||||
$(CC) checksums.c $(SCOPT)
|
||||
|
||||
typd_mlc.o: typd_mlc.c $(INC)
|
||||
$(CC) typd_mlc.c $(SCOPT)
|
||||
|
||||
mach_dep.o : mach_dep.c $(INC)
|
||||
$(CC) mach_dep.c $(SCOPT)
|
||||
|
||||
ptr_chck.o: ptr_chck.c $(INC)
|
||||
$(CC) ptr_chck.c $(SCOPT)
|
||||
|
||||
test.o : test.c $(INC)
|
||||
$(CC) test.c $(SOPT)
|
||||
|
||||
setjmp_t: setjmp_t.c gc.h
|
||||
$(CC) setjmp_t.c $(SOPT)
|
||||
|
||||
|
||||
# cords:
|
||||
|
||||
cord/cordbscs.o: cord/cordbscs.c
|
||||
sc cord/cordbscs.c $(CSCOPT)
|
||||
|
||||
cord/cordprnt.o: cord/cordprnt.c
|
||||
sc cord/cordprnt.c $(CSCOPT)
|
||||
|
||||
cord/cordxtra.o: cord/cordxtra.c
|
||||
sc cord/cordxtra.c $(CSCOPT)
|
||||
|
||||
cord/cordtest.o: cord/cordtest.c
|
||||
sc cord/cordtest.c $(CSCOPT)
|
||||
|
||||
|
196
jam-files/engine/boehm_gc/WCC_MAKEFILE
Normal file
196
jam-files/engine/boehm_gc/WCC_MAKEFILE
Normal file
@ -0,0 +1,196 @@
|
||||
# Makefile for Watcom C/C++ 10.5, 10.6, 11.0 on NT, OS2 and DOS4GW.
|
||||
# May work with Watcom 10.0.
|
||||
|
||||
# Uncoment one of the lines below for cross compilation.
|
||||
SYSTEM=MSWIN32
|
||||
#SYSTEM=DOS4GW
|
||||
#SYSTEM=OS2
|
||||
|
||||
# The collector can be built either as dynamic or as static library.
|
||||
# Select the library type you need.
|
||||
#MAKE_AS_DLL=1
|
||||
MAKE_AS_LIB=1
|
||||
|
||||
# Select calling conventions.
|
||||
# Possible choices are r and s.
|
||||
CALLING=s
|
||||
|
||||
# Select target CPU.
|
||||
# Possible choices are 3, 4, 5, and 6.
|
||||
# The last choice available only since version 11.0.
|
||||
CPU=5
|
||||
|
||||
# Set optimization options.
|
||||
# Watcom before 11.0 does not support option "-oh".
|
||||
OPTIM=-oneatx -s
|
||||
#OPTIM=-ohneatx -s
|
||||
|
||||
DEFS=-DALL_INTERIOR_POINTERS #-DSMALL_CONFIG #-DGC_DEBUG
|
||||
|
||||
|
||||
#####
|
||||
|
||||
!ifndef SYSTEM
|
||||
!ifdef __MSDOS__
|
||||
SYSTEM=DOS4GW
|
||||
!else ifdef __NT__
|
||||
SYSTEM=MSWIN32
|
||||
!else ifdef __OS2__
|
||||
SYSTEM=OS2
|
||||
!else
|
||||
SYSTEM=Unknown
|
||||
!endif
|
||||
!endif
|
||||
|
||||
!define $(SYSTEM)
|
||||
|
||||
!ifdef DOS4GW
|
||||
SYSFLAG=-DDOS4GW -bt=dos
|
||||
!else ifdef MSWIN32
|
||||
SYSFLAG=-DMSWIN32 -bt=nt
|
||||
!else ifdef OS2
|
||||
SYSFLAG=-DOS2 -bt=os2
|
||||
!else
|
||||
!error undefined or unsupported target platform: $(SYSTEM)
|
||||
!endif
|
||||
!ifdef MAKE_AS_DLL
|
||||
DLLFLAG=-bd -DGC_DLL
|
||||
TEST_DLLFLAG=-DGC_DLL
|
||||
!else ifdef MAKE_AS_LIB
|
||||
DLLFLAG=
|
||||
TEST_DLLFLAG=
|
||||
!else
|
||||
!error Either MAKE_AS_LIB or MAKE_AS_DLL should be defined
|
||||
!endif
|
||||
|
||||
CC=wcc386
|
||||
CXX=wpp386
|
||||
|
||||
# -DUSE_GENERIC is required !
|
||||
CFLAGS=-$(CPU)$(CALLING) $(OPTIM) -zp4 -zc $(SYSFLAG) $(DLLFLAG) -DGC_BUILD -DUSE_GENERIC $(DEFS)
|
||||
CXXFLAGS= $(CFLAGS)
|
||||
TEST_CFLAGS=-$(CPU)$(CALLING) $(OPTIM) -zp4 -zc $(SYSFLAG) $(TEST_DLLFLAG) $(DEFS)
|
||||
TEST_CXXFLAGS= $(TEST_CFLAGS)
|
||||
|
||||
OBJS= alloc.obj reclaim.obj allchblk.obj misc.obj &
|
||||
mach_dep.obj os_dep.obj mark_rts.obj headers.obj mark.obj &
|
||||
obj_map.obj blacklst.obj finalize.obj new_hblk.obj &
|
||||
dbg_mlc.obj malloc.obj stubborn.obj dyn_load.obj &
|
||||
typd_mlc.obj ptr_chck.obj mallocx.obj
|
||||
|
||||
all: gc.lib gctest.exe test_cpp.exe
|
||||
|
||||
!ifdef MAKE_AS_DLL
|
||||
|
||||
gc.lib: gc.dll gc_cpp.obj
|
||||
*wlib -b -c -n -p=512 $@ +gc.dll +gc_cpp.obj
|
||||
|
||||
gc.dll: $(OBJS) .AUTODEPEND
|
||||
@%create $*.lnk
|
||||
!ifdef DOS4GW
|
||||
@%append $*.lnk sys os2v2_dll
|
||||
!else ifdef MSWIN32
|
||||
@%append $*.lnk sys nt_dll
|
||||
!else ifdef OS2
|
||||
@%append $*.lnk sys os2v2_dll
|
||||
!endif
|
||||
@%append $*.lnk name $*
|
||||
@for %i in ($(OBJS)) do @%append $*.lnk file '%i'
|
||||
!ifeq CALLING s
|
||||
@%append $*.lnk export GC_is_marked
|
||||
@%append $*.lnk export GC_incr_bytes_allocd
|
||||
@%append $*.lnk export GC_incr_bytes_freed
|
||||
@%append $*.lnk export GC_generic_malloc_words_small
|
||||
!else
|
||||
@%append $*.lnk export GC_is_marked_
|
||||
@%append $*.lnk export GC_incr_bytes_allocd_
|
||||
@%append $*.lnk export GC_incr_bytes_freed_
|
||||
@%append $*.lnk export GC_generic_malloc_words_small_
|
||||
!endif
|
||||
*wlink @$*.lnk
|
||||
!else
|
||||
gc.lib: $(OBJS) gc_cpp.obj
|
||||
@%create $*.lb1
|
||||
@for %i in ($(OBJS)) do @%append $*.lb1 +'%i'
|
||||
@%append $*.lb1 +'gc_cpp.obj'
|
||||
*wlib -b -c -n -p=512 $@ @$*.lb1
|
||||
|
||||
!endif
|
||||
|
||||
|
||||
gctest.exe: test.obj gc.lib
|
||||
%create $*.lnk
|
||||
!ifdef DOS4GW
|
||||
@%append $*.lnk sys dos4g
|
||||
!else ifdef MSWIN32
|
||||
@%append $*.lnk sys nt
|
||||
!else ifdef OS2
|
||||
@%append $*.lnk sys os2v2
|
||||
!endif
|
||||
@%append $*.lnk op case
|
||||
@%append $*.lnk op stack=256K
|
||||
@%append $*.lnk name $*
|
||||
@%append $*.lnk file test.obj
|
||||
@%append $*.lnk library gc.lib
|
||||
!ifdef MAKE_AS_DLL
|
||||
!ifeq CALLING s
|
||||
@%append $*.lnk import GC_is_marked gc
|
||||
!else
|
||||
@%append $*.lnk import GC_is_marked_ gc
|
||||
!endif
|
||||
!endif
|
||||
*wlink @$*.lnk
|
||||
test_cpp.exe: test_cpp.obj gc.lib
|
||||
%create $*.lnk
|
||||
!ifdef DOS4GW
|
||||
@%append $*.lnk sys dos4g
|
||||
!else ifdef MSWIN32
|
||||
@%append $*.lnk sys nt
|
||||
!else ifdef OS2
|
||||
@%append $*.lnk sys os2v2
|
||||
!endif
|
||||
@%append $*.lnk op case
|
||||
@%append $*.lnk op stack=256K
|
||||
@%append $*.lnk name $*
|
||||
@%append $*.lnk file test_cpp.obj
|
||||
@%append $*.lnk library gc.lib
|
||||
!ifdef MAKE_AS_DLL
|
||||
!ifeq CALLING s
|
||||
@%append $*.lnk import GC_incr_bytes_allocd gc
|
||||
@%append $*.lnk import GC_incr_bytes_freed gc
|
||||
@%append $*.lnk import GC_generic_malloc_words_small gc
|
||||
!else
|
||||
@%append $*.lnk import GC_incr_bytes_allocd_ gc
|
||||
@%append $*.lnk import GC_incr_bytes_freed_ gc
|
||||
@%append $*.lnk import GC_generic_malloc_words_small_ gc
|
||||
!endif
|
||||
!endif
|
||||
*wlink @$*.lnk
|
||||
|
||||
gc_cpp.obj: gc_cpp.cc .AUTODEPEND
|
||||
$(CXX) $(TEST_CXXFLAGS) -iinclude $*.cc
|
||||
test.obj: tests\test.c .AUTODEPEND
|
||||
$(CC) $(TEST_CFLAGS) $*.c
|
||||
test_cpp.obj: tests\test_cpp.cc .AUTODEPEND
|
||||
$(CXX) $(TEST_CXXFLAGS) -iinclude $*.cc
|
||||
|
||||
|
||||
.c.obj: .AUTODEPEND
|
||||
$(CC) $(CFLAGS) $*.c
|
||||
|
||||
.cc.obj: .AUTODEPEND
|
||||
$(CXX) $(CXXFLAGS) $*.cc
|
||||
|
||||
clean : .SYMBOLIC
|
||||
@if exist *.obj del *.obj
|
||||
@if exist *.map del *.map
|
||||
@if exist *.lnk del *.lnk
|
||||
@if exist *.lb1 del *.lb1
|
||||
@if exist *.sym del *.sym
|
||||
@if exist *.err del *.err
|
||||
@if exist *.tmp del *.tmp
|
||||
@if exist *.lst del *.lst
|
||||
@if exist *.exe del *.exe
|
||||
@if exist *.log del *.log
|
||||
@if exist *.lib del *.lib
|
||||
@if exist *.dll del *.dll
|
49
jam-files/engine/boehm_gc/acinclude.m4
Normal file
49
jam-files/engine/boehm_gc/acinclude.m4
Normal file
@ -0,0 +1,49 @@
|
||||
#
|
||||
#
|
||||
# THIS MATERIAL IS PROVIDED AS IS, WITH ABSOLUTELY NO WARRANTY EXPRESSED
|
||||
# OR IMPLIED. ANY USE IS AT YOUR OWN RISK.
|
||||
#
|
||||
# Permission is hereby granted to use or copy this program
|
||||
# for any purpose, provided the above notices are retained on all copies.
|
||||
# Permission to modify the code and to distribute modified code is granted,
|
||||
# provided the above notices are retained, and a notice that the code was
|
||||
# modified is included with the above copyright notice.
|
||||
#
|
||||
# Modified by: Grzegorz Jakacki <jakacki at acm dot org>
|
||||
|
||||
# GC_SET_VERSION
|
||||
# sets and AC_DEFINEs GC_VERSION_MAJOR, GC_VERSION_MINOR and GC_ALPHA_VERSION
|
||||
# based on the contents of PACKAGE_VERSION; PACKAGE_VERSION must conform to
|
||||
# [0-9]+[.][0-9]+(alpha[0.9]+)?
|
||||
# in lex syntax; if there is no alpha number, GC_ALPHA_VERSION is empty
|
||||
#
|
||||
AC_DEFUN(GC_SET_VERSION, [
|
||||
AC_MSG_CHECKING(GC version numbers)
|
||||
GC_VERSION_MAJOR=`echo $PACKAGE_VERSION | sed 's/^\([[0-9]][[0-9]]*\)[[.]].*$/\1/g'`
|
||||
GC_VERSION_MINOR=`echo $PACKAGE_VERSION | sed 's/^[[^.]]*[[.]]\([[0-9]][[0-9]]*\).*$/\1/g'`
|
||||
GC_ALPHA_VERSION=`echo $PACKAGE_VERSION | sed 's/^[[^.]]*[[.]][[0-9]]*//'`
|
||||
|
||||
case "$GC_ALPHA_VERSION" in
|
||||
alpha*)
|
||||
GC_ALPHA_VERSION=`echo $GC_ALPHA_VERSION \
|
||||
| sed 's/alpha\([[0-9]][[0-9]]*\)/\1/'` ;;
|
||||
*) GC_ALPHA_MAJOR='' ;;
|
||||
esac
|
||||
|
||||
if test :$GC_VERSION_MAJOR: = :: \
|
||||
-o :$GC_VERSION_MINOR: = :: ;
|
||||
then
|
||||
AC_MSG_RESULT(invalid)
|
||||
AC_MSG_ERROR([nonconforming PACKAGE_VERSION='$PACKAGE_VERSION'])
|
||||
fi
|
||||
|
||||
AC_DEFINE_UNQUOTED(GC_VERSION_MAJOR, $GC_VERSION_MAJOR)
|
||||
AC_DEFINE_UNQUOTED(GC_VERSION_MINOR, $GC_VERSION_MINOR)
|
||||
if test :$GC_ALPHA_VERSION: != :: ; then
|
||||
AC_DEFINE_UNQUOTED(GC_ALPHA_VERSION, $GC_ALPHA_VERSION)
|
||||
fi
|
||||
AC_MSG_RESULT(major=$GC_VERSION_MAJOR minor=$GC_VERSION_MINOR \
|
||||
${GC_ALPHA_VERSION:+alpha=}$GC_ALPHA_VERSION)
|
||||
])
|
||||
|
||||
sinclude(libtool.m4)
|
929
jam-files/engine/boehm_gc/aclocal.m4
vendored
Normal file
929
jam-files/engine/boehm_gc/aclocal.m4
vendored
Normal file
@ -0,0 +1,929 @@
|
||||
# generated automatically by aclocal 1.9.6 -*- Autoconf -*-
|
||||
|
||||
# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004,
|
||||
# 2005 Free Software Foundation, Inc.
|
||||
# This file is free software; the Free Software Foundation
|
||||
# gives unlimited permission to copy and/or distribute it,
|
||||
# with or without modifications, as long as this notice is preserved.
|
||||
|
||||
# This program is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
|
||||
# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
|
||||
# PARTICULAR PURPOSE.
|
||||
|
||||
# Copyright (C) 2002, 2003, 2005 Free Software Foundation, Inc.
|
||||
#
|
||||
# This file is free software; the Free Software Foundation
|
||||
# gives unlimited permission to copy and/or distribute it,
|
||||
# with or without modifications, as long as this notice is preserved.
|
||||
|
||||
# AM_AUTOMAKE_VERSION(VERSION)
|
||||
# ----------------------------
|
||||
# Automake X.Y traces this macro to ensure aclocal.m4 has been
|
||||
# generated from the m4 files accompanying Automake X.Y.
|
||||
AC_DEFUN([AM_AUTOMAKE_VERSION], [am__api_version="1.9"])
|
||||
|
||||
# AM_SET_CURRENT_AUTOMAKE_VERSION
|
||||
# -------------------------------
|
||||
# Call AM_AUTOMAKE_VERSION so it can be traced.
|
||||
# This function is AC_REQUIREd by AC_INIT_AUTOMAKE.
|
||||
AC_DEFUN([AM_SET_CURRENT_AUTOMAKE_VERSION],
|
||||
[AM_AUTOMAKE_VERSION([1.9.6])])
|
||||
|
||||
# Figure out how to run the assembler. -*- Autoconf -*-
|
||||
|
||||
# Copyright (C) 2001, 2003, 2004, 2005 Free Software Foundation, Inc.
|
||||
#
|
||||
# This file is free software; the Free Software Foundation
|
||||
# gives unlimited permission to copy and/or distribute it,
|
||||
# with or without modifications, as long as this notice is preserved.
|
||||
|
||||
# serial 4
|
||||
|
||||
# AM_PROG_AS
|
||||
# ----------
|
||||
AC_DEFUN([AM_PROG_AS],
|
||||
[# By default we simply use the C compiler to build assembly code.
|
||||
AC_REQUIRE([AC_PROG_CC])
|
||||
test "${CCAS+set}" = set || CCAS=$CC
|
||||
test "${CCASFLAGS+set}" = set || CCASFLAGS=$CFLAGS
|
||||
AC_ARG_VAR([CCAS], [assembler compiler command (defaults to CC)])
|
||||
AC_ARG_VAR([CCASFLAGS], [assembler compiler flags (defaults to CFLAGS)])
|
||||
])
|
||||
|
||||
# AM_AUX_DIR_EXPAND -*- Autoconf -*-
|
||||
|
||||
# Copyright (C) 2001, 2003, 2005 Free Software Foundation, Inc.
|
||||
#
|
||||
# This file is free software; the Free Software Foundation
|
||||
# gives unlimited permission to copy and/or distribute it,
|
||||
# with or without modifications, as long as this notice is preserved.
|
||||
|
||||
# For projects using AC_CONFIG_AUX_DIR([foo]), Autoconf sets
|
||||
# $ac_aux_dir to `$srcdir/foo'. In other projects, it is set to
|
||||
# `$srcdir', `$srcdir/..', or `$srcdir/../..'.
|
||||
#
|
||||
# Of course, Automake must honor this variable whenever it calls a
|
||||
# tool from the auxiliary directory. The problem is that $srcdir (and
|
||||
# therefore $ac_aux_dir as well) can be either absolute or relative,
|
||||
# depending on how configure is run. This is pretty annoying, since
|
||||
# it makes $ac_aux_dir quite unusable in subdirectories: in the top
|
||||
# source directory, any form will work fine, but in subdirectories a
|
||||
# relative path needs to be adjusted first.
|
||||
#
|
||||
# $ac_aux_dir/missing
|
||||
# fails when called from a subdirectory if $ac_aux_dir is relative
|
||||
# $top_srcdir/$ac_aux_dir/missing
|
||||
# fails if $ac_aux_dir is absolute,
|
||||
# fails when called from a subdirectory in a VPATH build with
|
||||
# a relative $ac_aux_dir
|
||||
#
|
||||
# The reason of the latter failure is that $top_srcdir and $ac_aux_dir
|
||||
# are both prefixed by $srcdir. In an in-source build this is usually
|
||||
# harmless because $srcdir is `.', but things will broke when you
|
||||
# start a VPATH build or use an absolute $srcdir.
|
||||
#
|
||||
# So we could use something similar to $top_srcdir/$ac_aux_dir/missing,
|
||||
# iff we strip the leading $srcdir from $ac_aux_dir. That would be:
|
||||
# am_aux_dir='\$(top_srcdir)/'`expr "$ac_aux_dir" : "$srcdir//*\(.*\)"`
|
||||
# and then we would define $MISSING as
|
||||
# MISSING="\${SHELL} $am_aux_dir/missing"
|
||||
# This will work as long as MISSING is not called from configure, because
|
||||
# unfortunately $(top_srcdir) has no meaning in configure.
|
||||
# However there are other variables, like CC, which are often used in
|
||||
# configure, and could therefore not use this "fixed" $ac_aux_dir.
|
||||
#
|
||||
# Another solution, used here, is to always expand $ac_aux_dir to an
|
||||
# absolute PATH. The drawback is that using absolute paths prevent a
|
||||
# configured tree to be moved without reconfiguration.
|
||||
|
||||
AC_DEFUN([AM_AUX_DIR_EXPAND],
|
||||
[dnl Rely on autoconf to set up CDPATH properly.
|
||||
AC_PREREQ([2.50])dnl
|
||||
# expand $ac_aux_dir to an absolute path
|
||||
am_aux_dir=`cd $ac_aux_dir && pwd`
|
||||
])
|
||||
|
||||
# AM_CONDITIONAL -*- Autoconf -*-
|
||||
|
||||
# Copyright (C) 1997, 2000, 2001, 2003, 2004, 2005
|
||||
# Free Software Foundation, Inc.
|
||||
#
|
||||
# This file is free software; the Free Software Foundation
|
||||
# gives unlimited permission to copy and/or distribute it,
|
||||
# with or without modifications, as long as this notice is preserved.
|
||||
|
||||
# serial 7
|
||||
|
||||
# AM_CONDITIONAL(NAME, SHELL-CONDITION)
|
||||
# -------------------------------------
|
||||
# Define a conditional.
|
||||
AC_DEFUN([AM_CONDITIONAL],
|
||||
[AC_PREREQ(2.52)dnl
|
||||
ifelse([$1], [TRUE], [AC_FATAL([$0: invalid condition: $1])],
|
||||
[$1], [FALSE], [AC_FATAL([$0: invalid condition: $1])])dnl
|
||||
AC_SUBST([$1_TRUE])
|
||||
AC_SUBST([$1_FALSE])
|
||||
if $2; then
|
||||
$1_TRUE=
|
||||
$1_FALSE='#'
|
||||
else
|
||||
$1_TRUE='#'
|
||||
$1_FALSE=
|
||||
fi
|
||||
AC_CONFIG_COMMANDS_PRE(
|
||||
[if test -z "${$1_TRUE}" && test -z "${$1_FALSE}"; then
|
||||
AC_MSG_ERROR([[conditional "$1" was never defined.
|
||||
Usually this means the macro was only invoked conditionally.]])
|
||||
fi])])
|
||||
|
||||
|
||||
# Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005
|
||||
# Free Software Foundation, Inc.
|
||||
#
|
||||
# This file is free software; the Free Software Foundation
|
||||
# gives unlimited permission to copy and/or distribute it,
|
||||
# with or without modifications, as long as this notice is preserved.
|
||||
|
||||
# serial 8
|
||||
|
||||
# There are a few dirty hacks below to avoid letting `AC_PROG_CC' be
|
||||
# written in clear, in which case automake, when reading aclocal.m4,
|
||||
# will think it sees a *use*, and therefore will trigger all it's
|
||||
# C support machinery. Also note that it means that autoscan, seeing
|
||||
# CC etc. in the Makefile, will ask for an AC_PROG_CC use...
|
||||
|
||||
|
||||
# _AM_DEPENDENCIES(NAME)
|
||||
# ----------------------
|
||||
# See how the compiler implements dependency checking.
|
||||
# NAME is "CC", "CXX", "GCJ", or "OBJC".
|
||||
# We try a few techniques and use that to set a single cache variable.
|
||||
#
|
||||
# We don't AC_REQUIRE the corresponding AC_PROG_CC since the latter was
|
||||
# modified to invoke _AM_DEPENDENCIES(CC); we would have a circular
|
||||
# dependency, and given that the user is not expected to run this macro,
|
||||
# just rely on AC_PROG_CC.
|
||||
AC_DEFUN([_AM_DEPENDENCIES],
|
||||
[AC_REQUIRE([AM_SET_DEPDIR])dnl
|
||||
AC_REQUIRE([AM_OUTPUT_DEPENDENCY_COMMANDS])dnl
|
||||
AC_REQUIRE([AM_MAKE_INCLUDE])dnl
|
||||
AC_REQUIRE([AM_DEP_TRACK])dnl
|
||||
|
||||
ifelse([$1], CC, [depcc="$CC" am_compiler_list=],
|
||||
[$1], CXX, [depcc="$CXX" am_compiler_list=],
|
||||
[$1], OBJC, [depcc="$OBJC" am_compiler_list='gcc3 gcc'],
|
||||
[$1], GCJ, [depcc="$GCJ" am_compiler_list='gcc3 gcc'],
|
||||
[depcc="$$1" am_compiler_list=])
|
||||
|
||||
AC_CACHE_CHECK([dependency style of $depcc],
|
||||
[am_cv_$1_dependencies_compiler_type],
|
||||
[if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then
|
||||
# We make a subdir and do the tests there. Otherwise we can end up
|
||||
# making bogus files that we don't know about and never remove. For
|
||||
# instance it was reported that on HP-UX the gcc test will end up
|
||||
# making a dummy file named `D' -- because `-MD' means `put the output
|
||||
# in D'.
|
||||
mkdir conftest.dir
|
||||
# Copy depcomp to subdir because otherwise we won't find it if we're
|
||||
# using a relative directory.
|
||||
cp "$am_depcomp" conftest.dir
|
||||
cd conftest.dir
|
||||
# We will build objects and dependencies in a subdirectory because
|
||||
# it helps to detect inapplicable dependency modes. For instance
|
||||
# both Tru64's cc and ICC support -MD to output dependencies as a
|
||||
# side effect of compilation, but ICC will put the dependencies in
|
||||
# the current directory while Tru64 will put them in the object
|
||||
# directory.
|
||||
mkdir sub
|
||||
|
||||
am_cv_$1_dependencies_compiler_type=none
|
||||
if test "$am_compiler_list" = ""; then
|
||||
am_compiler_list=`sed -n ['s/^#*\([a-zA-Z0-9]*\))$/\1/p'] < ./depcomp`
|
||||
fi
|
||||
for depmode in $am_compiler_list; do
|
||||
# Setup a source with many dependencies, because some compilers
|
||||
# like to wrap large dependency lists on column 80 (with \), and
|
||||
# we should not choose a depcomp mode which is confused by this.
|
||||
#
|
||||
# We need to recreate these files for each test, as the compiler may
|
||||
# overwrite some of them when testing with obscure command lines.
|
||||
# This happens at least with the AIX C compiler.
|
||||
: > sub/conftest.c
|
||||
for i in 1 2 3 4 5 6; do
|
||||
echo '#include "conftst'$i'.h"' >> sub/conftest.c
|
||||
# Using `: > sub/conftst$i.h' creates only sub/conftst1.h with
|
||||
# Solaris 8's {/usr,}/bin/sh.
|
||||
touch sub/conftst$i.h
|
||||
done
|
||||
echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf
|
||||
|
||||
case $depmode in
|
||||
nosideeffect)
|
||||
# after this tag, mechanisms are not by side-effect, so they'll
|
||||
# only be used when explicitly requested
|
||||
if test "x$enable_dependency_tracking" = xyes; then
|
||||
continue
|
||||
else
|
||||
break
|
||||
fi
|
||||
;;
|
||||
none) break ;;
|
||||
esac
|
||||
# We check with `-c' and `-o' for the sake of the "dashmstdout"
|
||||
# mode. It turns out that the SunPro C++ compiler does not properly
|
||||
# handle `-M -o', and we need to detect this.
|
||||
if depmode=$depmode \
|
||||
source=sub/conftest.c object=sub/conftest.${OBJEXT-o} \
|
||||
depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \
|
||||
$SHELL ./depcomp $depcc -c -o sub/conftest.${OBJEXT-o} sub/conftest.c \
|
||||
>/dev/null 2>conftest.err &&
|
||||
grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 &&
|
||||
grep sub/conftest.${OBJEXT-o} sub/conftest.Po > /dev/null 2>&1 &&
|
||||
${MAKE-make} -s -f confmf > /dev/null 2>&1; then
|
||||
# icc doesn't choke on unknown options, it will just issue warnings
|
||||
# or remarks (even with -Werror). So we grep stderr for any message
|
||||
# that says an option was ignored or not supported.
|
||||
# When given -MP, icc 7.0 and 7.1 complain thusly:
|
||||
# icc: Command line warning: ignoring option '-M'; no argument required
|
||||
# The diagnosis changed in icc 8.0:
|
||||
# icc: Command line remark: option '-MP' not supported
|
||||
if (grep 'ignoring option' conftest.err ||
|
||||
grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else
|
||||
am_cv_$1_dependencies_compiler_type=$depmode
|
||||
break
|
||||
fi
|
||||
fi
|
||||
done
|
||||
|
||||
cd ..
|
||||
rm -rf conftest.dir
|
||||
else
|
||||
am_cv_$1_dependencies_compiler_type=none
|
||||
fi
|
||||
])
|
||||
AC_SUBST([$1DEPMODE], [depmode=$am_cv_$1_dependencies_compiler_type])
|
||||
AM_CONDITIONAL([am__fastdep$1], [
|
||||
test "x$enable_dependency_tracking" != xno \
|
||||
&& test "$am_cv_$1_dependencies_compiler_type" = gcc3])
|
||||
])
|
||||
|
||||
|
||||
# AM_SET_DEPDIR
|
||||
# -------------
|
||||
# Choose a directory name for dependency files.
|
||||
# This macro is AC_REQUIREd in _AM_DEPENDENCIES
|
||||
AC_DEFUN([AM_SET_DEPDIR],
|
||||
[AC_REQUIRE([AM_SET_LEADING_DOT])dnl
|
||||
AC_SUBST([DEPDIR], ["${am__leading_dot}deps"])dnl
|
||||
])
|
||||
|
||||
|
||||
# AM_DEP_TRACK
|
||||
# ------------
|
||||
AC_DEFUN([AM_DEP_TRACK],
|
||||
[AC_ARG_ENABLE(dependency-tracking,
|
||||
[ --disable-dependency-tracking speeds up one-time build
|
||||
--enable-dependency-tracking do not reject slow dependency extractors])
|
||||
if test "x$enable_dependency_tracking" != xno; then
|
||||
am_depcomp="$ac_aux_dir/depcomp"
|
||||
AMDEPBACKSLASH='\'
|
||||
fi
|
||||
AM_CONDITIONAL([AMDEP], [test "x$enable_dependency_tracking" != xno])
|
||||
AC_SUBST([AMDEPBACKSLASH])
|
||||
])
|
||||
|
||||
# Generate code to set up dependency tracking. -*- Autoconf -*-
|
||||
|
||||
# Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005
|
||||
# Free Software Foundation, Inc.
|
||||
#
|
||||
# This file is free software; the Free Software Foundation
|
||||
# gives unlimited permission to copy and/or distribute it,
|
||||
# with or without modifications, as long as this notice is preserved.
|
||||
|
||||
#serial 3
|
||||
|
||||
# _AM_OUTPUT_DEPENDENCY_COMMANDS
|
||||
# ------------------------------
|
||||
AC_DEFUN([_AM_OUTPUT_DEPENDENCY_COMMANDS],
|
||||
[for mf in $CONFIG_FILES; do
|
||||
# Strip MF so we end up with the name of the file.
|
||||
mf=`echo "$mf" | sed -e 's/:.*$//'`
|
||||
# Check whether this is an Automake generated Makefile or not.
|
||||
# We used to match only the files named `Makefile.in', but
|
||||
# some people rename them; so instead we look at the file content.
|
||||
# Grep'ing the first line is not enough: some people post-process
|
||||
# each Makefile.in and add a new line on top of each file to say so.
|
||||
# So let's grep whole file.
|
||||
if grep '^#.*generated by automake' $mf > /dev/null 2>&1; then
|
||||
dirpart=`AS_DIRNAME("$mf")`
|
||||
else
|
||||
continue
|
||||
fi
|
||||
# Extract the definition of DEPDIR, am__include, and am__quote
|
||||
# from the Makefile without running `make'.
|
||||
DEPDIR=`sed -n 's/^DEPDIR = //p' < "$mf"`
|
||||
test -z "$DEPDIR" && continue
|
||||
am__include=`sed -n 's/^am__include = //p' < "$mf"`
|
||||
test -z "am__include" && continue
|
||||
am__quote=`sed -n 's/^am__quote = //p' < "$mf"`
|
||||
# When using ansi2knr, U may be empty or an underscore; expand it
|
||||
U=`sed -n 's/^U = //p' < "$mf"`
|
||||
# Find all dependency output files, they are included files with
|
||||
# $(DEPDIR) in their names. We invoke sed twice because it is the
|
||||
# simplest approach to changing $(DEPDIR) to its actual value in the
|
||||
# expansion.
|
||||
for file in `sed -n "
|
||||
s/^$am__include $am__quote\(.*(DEPDIR).*\)$am__quote"'$/\1/p' <"$mf" | \
|
||||
sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g' -e 's/\$U/'"$U"'/g'`; do
|
||||
# Make sure the directory exists.
|
||||
test -f "$dirpart/$file" && continue
|
||||
fdir=`AS_DIRNAME(["$file"])`
|
||||
AS_MKDIR_P([$dirpart/$fdir])
|
||||
# echo "creating $dirpart/$file"
|
||||
echo '# dummy' > "$dirpart/$file"
|
||||
done
|
||||
done
|
||||
])# _AM_OUTPUT_DEPENDENCY_COMMANDS
|
||||
|
||||
|
||||
# AM_OUTPUT_DEPENDENCY_COMMANDS
|
||||
# -----------------------------
|
||||
# This macro should only be invoked once -- use via AC_REQUIRE.
|
||||
#
|
||||
# This code is only required when automatic dependency tracking
|
||||
# is enabled. FIXME. This creates each `.P' file that we will
|
||||
# need in order to bootstrap the dependency handling code.
|
||||
AC_DEFUN([AM_OUTPUT_DEPENDENCY_COMMANDS],
|
||||
[AC_CONFIG_COMMANDS([depfiles],
|
||||
[test x"$AMDEP_TRUE" != x"" || _AM_OUTPUT_DEPENDENCY_COMMANDS],
|
||||
[AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir"])
|
||||
])
|
||||
|
||||
# Do all the work for Automake. -*- Autoconf -*-
|
||||
|
||||
# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005
|
||||
# Free Software Foundation, Inc.
|
||||
#
|
||||
# This file is free software; the Free Software Foundation
|
||||
# gives unlimited permission to copy and/or distribute it,
|
||||
# with or without modifications, as long as this notice is preserved.
|
||||
|
||||
# serial 12
|
||||
|
||||
# This macro actually does too much. Some checks are only needed if
|
||||
# your package does certain things. But this isn't really a big deal.
|
||||
|
||||
# AM_INIT_AUTOMAKE(PACKAGE, VERSION, [NO-DEFINE])
|
||||
# AM_INIT_AUTOMAKE([OPTIONS])
|
||||
# -----------------------------------------------
|
||||
# The call with PACKAGE and VERSION arguments is the old style
|
||||
# call (pre autoconf-2.50), which is being phased out. PACKAGE
|
||||
# and VERSION should now be passed to AC_INIT and removed from
|
||||
# the call to AM_INIT_AUTOMAKE.
|
||||
# We support both call styles for the transition. After
|
||||
# the next Automake release, Autoconf can make the AC_INIT
|
||||
# arguments mandatory, and then we can depend on a new Autoconf
|
||||
# release and drop the old call support.
|
||||
AC_DEFUN([AM_INIT_AUTOMAKE],
|
||||
[AC_PREREQ([2.58])dnl
|
||||
dnl Autoconf wants to disallow AM_ names. We explicitly allow
|
||||
dnl the ones we care about.
|
||||
m4_pattern_allow([^AM_[A-Z]+FLAGS$])dnl
|
||||
AC_REQUIRE([AM_SET_CURRENT_AUTOMAKE_VERSION])dnl
|
||||
AC_REQUIRE([AC_PROG_INSTALL])dnl
|
||||
# test to see if srcdir already configured
|
||||
if test "`cd $srcdir && pwd`" != "`pwd`" &&
|
||||
test -f $srcdir/config.status; then
|
||||
AC_MSG_ERROR([source directory already configured; run "make distclean" there first])
|
||||
fi
|
||||
|
||||
# test whether we have cygpath
|
||||
if test -z "$CYGPATH_W"; then
|
||||
if (cygpath --version) >/dev/null 2>/dev/null; then
|
||||
CYGPATH_W='cygpath -w'
|
||||
else
|
||||
CYGPATH_W=echo
|
||||
fi
|
||||
fi
|
||||
AC_SUBST([CYGPATH_W])
|
||||
|
||||
# Define the identity of the package.
|
||||
dnl Distinguish between old-style and new-style calls.
|
||||
m4_ifval([$2],
|
||||
[m4_ifval([$3], [_AM_SET_OPTION([no-define])])dnl
|
||||
AC_SUBST([PACKAGE], [$1])dnl
|
||||
AC_SUBST([VERSION], [$2])],
|
||||
[_AM_SET_OPTIONS([$1])dnl
|
||||
AC_SUBST([PACKAGE], ['AC_PACKAGE_TARNAME'])dnl
|
||||
AC_SUBST([VERSION], ['AC_PACKAGE_VERSION'])])dnl
|
||||
|
||||
_AM_IF_OPTION([no-define],,
|
||||
[AC_DEFINE_UNQUOTED(PACKAGE, "$PACKAGE", [Name of package])
|
||||
AC_DEFINE_UNQUOTED(VERSION, "$VERSION", [Version number of package])])dnl
|
||||
|
||||
# Some tools Automake needs.
|
||||
AC_REQUIRE([AM_SANITY_CHECK])dnl
|
||||
AC_REQUIRE([AC_ARG_PROGRAM])dnl
|
||||
AM_MISSING_PROG(ACLOCAL, aclocal-${am__api_version})
|
||||
AM_MISSING_PROG(AUTOCONF, autoconf)
|
||||
AM_MISSING_PROG(AUTOMAKE, automake-${am__api_version})
|
||||
AM_MISSING_PROG(AUTOHEADER, autoheader)
|
||||
AM_MISSING_PROG(MAKEINFO, makeinfo)
|
||||
AM_PROG_INSTALL_SH
|
||||
AM_PROG_INSTALL_STRIP
|
||||
AC_REQUIRE([AM_PROG_MKDIR_P])dnl
|
||||
# We need awk for the "check" target. The system "awk" is bad on
|
||||
# some platforms.
|
||||
AC_REQUIRE([AC_PROG_AWK])dnl
|
||||
AC_REQUIRE([AC_PROG_MAKE_SET])dnl
|
||||
AC_REQUIRE([AM_SET_LEADING_DOT])dnl
|
||||
_AM_IF_OPTION([tar-ustar], [_AM_PROG_TAR([ustar])],
|
||||
[_AM_IF_OPTION([tar-pax], [_AM_PROG_TAR([pax])],
|
||||
[_AM_PROG_TAR([v7])])])
|
||||
_AM_IF_OPTION([no-dependencies],,
|
||||
[AC_PROVIDE_IFELSE([AC_PROG_CC],
|
||||
[_AM_DEPENDENCIES(CC)],
|
||||
[define([AC_PROG_CC],
|
||||
defn([AC_PROG_CC])[_AM_DEPENDENCIES(CC)])])dnl
|
||||
AC_PROVIDE_IFELSE([AC_PROG_CXX],
|
||||
[_AM_DEPENDENCIES(CXX)],
|
||||
[define([AC_PROG_CXX],
|
||||
defn([AC_PROG_CXX])[_AM_DEPENDENCIES(CXX)])])dnl
|
||||
])
|
||||
])
|
||||
|
||||
|
||||
# When config.status generates a header, we must update the stamp-h file.
|
||||
# This file resides in the same directory as the config header
|
||||
# that is generated. The stamp files are numbered to have different names.
|
||||
|
||||
# Autoconf calls _AC_AM_CONFIG_HEADER_HOOK (when defined) in the
|
||||
# loop where config.status creates the headers, so we can generate
|
||||
# our stamp files there.
|
||||
AC_DEFUN([_AC_AM_CONFIG_HEADER_HOOK],
|
||||
[# Compute $1's index in $config_headers.
|
||||
_am_stamp_count=1
|
||||
for _am_header in $config_headers :; do
|
||||
case $_am_header in
|
||||
$1 | $1:* )
|
||||
break ;;
|
||||
* )
|
||||
_am_stamp_count=`expr $_am_stamp_count + 1` ;;
|
||||
esac
|
||||
done
|
||||
echo "timestamp for $1" >`AS_DIRNAME([$1])`/stamp-h[]$_am_stamp_count])
|
||||
|
||||
# Copyright (C) 2001, 2003, 2005 Free Software Foundation, Inc.
|
||||
#
|
||||
# This file is free software; the Free Software Foundation
|
||||
# gives unlimited permission to copy and/or distribute it,
|
||||
# with or without modifications, as long as this notice is preserved.
|
||||
|
||||
# AM_PROG_INSTALL_SH
|
||||
# ------------------
|
||||
# Define $install_sh.
|
||||
AC_DEFUN([AM_PROG_INSTALL_SH],
|
||||
[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
|
||||
install_sh=${install_sh-"$am_aux_dir/install-sh"}
|
||||
AC_SUBST(install_sh)])
|
||||
|
||||
# Copyright (C) 2003, 2005 Free Software Foundation, Inc.
|
||||
#
|
||||
# This file is free software; the Free Software Foundation
|
||||
# gives unlimited permission to copy and/or distribute it,
|
||||
# with or without modifications, as long as this notice is preserved.
|
||||
|
||||
# serial 2
|
||||
|
||||
# Check whether the underlying file-system supports filenames
|
||||
# with a leading dot. For instance MS-DOS doesn't.
|
||||
AC_DEFUN([AM_SET_LEADING_DOT],
|
||||
[rm -rf .tst 2>/dev/null
|
||||
mkdir .tst 2>/dev/null
|
||||
if test -d .tst; then
|
||||
am__leading_dot=.
|
||||
else
|
||||
am__leading_dot=_
|
||||
fi
|
||||
rmdir .tst 2>/dev/null
|
||||
AC_SUBST([am__leading_dot])])
|
||||
|
||||
# Add --enable-maintainer-mode option to configure. -*- Autoconf -*-
|
||||
# From Jim Meyering
|
||||
|
||||
# Copyright (C) 1996, 1998, 2000, 2001, 2002, 2003, 2004, 2005
|
||||
# Free Software Foundation, Inc.
|
||||
#
|
||||
# This file is free software; the Free Software Foundation
|
||||
# gives unlimited permission to copy and/or distribute it,
|
||||
# with or without modifications, as long as this notice is preserved.
|
||||
|
||||
# serial 4
|
||||
|
||||
AC_DEFUN([AM_MAINTAINER_MODE],
|
||||
[AC_MSG_CHECKING([whether to enable maintainer-specific portions of Makefiles])
|
||||
dnl maintainer-mode is disabled by default
|
||||
AC_ARG_ENABLE(maintainer-mode,
|
||||
[ --enable-maintainer-mode enable make rules and dependencies not useful
|
||||
(and sometimes confusing) to the casual installer],
|
||||
USE_MAINTAINER_MODE=$enableval,
|
||||
USE_MAINTAINER_MODE=no)
|
||||
AC_MSG_RESULT([$USE_MAINTAINER_MODE])
|
||||
AM_CONDITIONAL(MAINTAINER_MODE, [test $USE_MAINTAINER_MODE = yes])
|
||||
MAINT=$MAINTAINER_MODE_TRUE
|
||||
AC_SUBST(MAINT)dnl
|
||||
]
|
||||
)
|
||||
|
||||
AU_DEFUN([jm_MAINTAINER_MODE], [AM_MAINTAINER_MODE])
|
||||
|
||||
# Check to see how 'make' treats includes. -*- Autoconf -*-
|
||||
|
||||
# Copyright (C) 2001, 2002, 2003, 2005 Free Software Foundation, Inc.
|
||||
#
|
||||
# This file is free software; the Free Software Foundation
|
||||
# gives unlimited permission to copy and/or distribute it,
|
||||
# with or without modifications, as long as this notice is preserved.
|
||||
|
||||
# serial 3
|
||||
|
||||
# AM_MAKE_INCLUDE()
|
||||
# -----------------
|
||||
# Check to see how make treats includes.
|
||||
AC_DEFUN([AM_MAKE_INCLUDE],
|
||||
[am_make=${MAKE-make}
|
||||
cat > confinc << 'END'
|
||||
am__doit:
|
||||
@echo done
|
||||
.PHONY: am__doit
|
||||
END
|
||||
# If we don't find an include directive, just comment out the code.
|
||||
AC_MSG_CHECKING([for style of include used by $am_make])
|
||||
am__include="#"
|
||||
am__quote=
|
||||
_am_result=none
|
||||
# First try GNU make style include.
|
||||
echo "include confinc" > confmf
|
||||
# We grep out `Entering directory' and `Leaving directory'
|
||||
# messages which can occur if `w' ends up in MAKEFLAGS.
|
||||
# In particular we don't look at `^make:' because GNU make might
|
||||
# be invoked under some other name (usually "gmake"), in which
|
||||
# case it prints its new name instead of `make'.
|
||||
if test "`$am_make -s -f confmf 2> /dev/null | grep -v 'ing directory'`" = "done"; then
|
||||
am__include=include
|
||||
am__quote=
|
||||
_am_result=GNU
|
||||
fi
|
||||
# Now try BSD make style include.
|
||||
if test "$am__include" = "#"; then
|
||||
echo '.include "confinc"' > confmf
|
||||
if test "`$am_make -s -f confmf 2> /dev/null`" = "done"; then
|
||||
am__include=.include
|
||||
am__quote="\""
|
||||
_am_result=BSD
|
||||
fi
|
||||
fi
|
||||
AC_SUBST([am__include])
|
||||
AC_SUBST([am__quote])
|
||||
AC_MSG_RESULT([$_am_result])
|
||||
rm -f confinc confmf
|
||||
])
|
||||
|
||||
# Copyright (C) 1999, 2000, 2001, 2003, 2005 Free Software Foundation, Inc.
|
||||
#
|
||||
# This file is free software; the Free Software Foundation
|
||||
# gives unlimited permission to copy and/or distribute it,
|
||||
# with or without modifications, as long as this notice is preserved.
|
||||
|
||||
# serial 3
|
||||
|
||||
# AM_PROG_CC_C_O
|
||||
# --------------
|
||||
# Like AC_PROG_CC_C_O, but changed for automake.
|
||||
AC_DEFUN([AM_PROG_CC_C_O],
|
||||
[AC_REQUIRE([AC_PROG_CC_C_O])dnl
|
||||
AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
|
||||
# FIXME: we rely on the cache variable name because
|
||||
# there is no other way.
|
||||
set dummy $CC
|
||||
ac_cc=`echo $[2] | sed ['s/[^a-zA-Z0-9_]/_/g;s/^[0-9]/_/']`
|
||||
if eval "test \"`echo '$ac_cv_prog_cc_'${ac_cc}_c_o`\" != yes"; then
|
||||
# Losing compiler, so override with the script.
|
||||
# FIXME: It is wrong to rewrite CC.
|
||||
# But if we don't then we get into trouble of one sort or another.
|
||||
# A longer-term fix would be to have automake use am__CC in this case,
|
||||
# and then we could set am__CC="\$(top_srcdir)/compile \$(CC)"
|
||||
CC="$am_aux_dir/compile $CC"
|
||||
fi
|
||||
])
|
||||
|
||||
# Fake the existence of programs that GNU maintainers use. -*- Autoconf -*-
|
||||
|
||||
# Copyright (C) 1997, 1999, 2000, 2001, 2003, 2005
|
||||
# Free Software Foundation, Inc.
|
||||
#
|
||||
# This file is free software; the Free Software Foundation
|
||||
# gives unlimited permission to copy and/or distribute it,
|
||||
# with or without modifications, as long as this notice is preserved.
|
||||
|
||||
# serial 4
|
||||
|
||||
# AM_MISSING_PROG(NAME, PROGRAM)
|
||||
# ------------------------------
|
||||
AC_DEFUN([AM_MISSING_PROG],
|
||||
[AC_REQUIRE([AM_MISSING_HAS_RUN])
|
||||
$1=${$1-"${am_missing_run}$2"}
|
||||
AC_SUBST($1)])
|
||||
|
||||
|
||||
# AM_MISSING_HAS_RUN
|
||||
# ------------------
|
||||
# Define MISSING if not defined so far and test if it supports --run.
|
||||
# If it does, set am_missing_run to use it, otherwise, to nothing.
|
||||
AC_DEFUN([AM_MISSING_HAS_RUN],
|
||||
[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
|
||||
test x"${MISSING+set}" = xset || MISSING="\${SHELL} $am_aux_dir/missing"
|
||||
# Use eval to expand $SHELL
|
||||
if eval "$MISSING --run true"; then
|
||||
am_missing_run="$MISSING --run "
|
||||
else
|
||||
am_missing_run=
|
||||
AC_MSG_WARN([`missing' script is too old or missing])
|
||||
fi
|
||||
])
|
||||
|
||||
# Copyright (C) 2003, 2004, 2005 Free Software Foundation, Inc.
|
||||
#
|
||||
# This file is free software; the Free Software Foundation
|
||||
# gives unlimited permission to copy and/or distribute it,
|
||||
# with or without modifications, as long as this notice is preserved.
|
||||
|
||||
# AM_PROG_MKDIR_P
|
||||
# ---------------
|
||||
# Check whether `mkdir -p' is supported, fallback to mkinstalldirs otherwise.
|
||||
#
|
||||
# Automake 1.8 used `mkdir -m 0755 -p --' to ensure that directories
|
||||
# created by `make install' are always world readable, even if the
|
||||
# installer happens to have an overly restrictive umask (e.g. 077).
|
||||
# This was a mistake. There are at least two reasons why we must not
|
||||
# use `-m 0755':
|
||||
# - it causes special bits like SGID to be ignored,
|
||||
# - it may be too restrictive (some setups expect 775 directories).
|
||||
#
|
||||
# Do not use -m 0755 and let people choose whatever they expect by
|
||||
# setting umask.
|
||||
#
|
||||
# We cannot accept any implementation of `mkdir' that recognizes `-p'.
|
||||
# Some implementations (such as Solaris 8's) are not thread-safe: if a
|
||||
# parallel make tries to run `mkdir -p a/b' and `mkdir -p a/c'
|
||||
# concurrently, both version can detect that a/ is missing, but only
|
||||
# one can create it and the other will error out. Consequently we
|
||||
# restrict ourselves to GNU make (using the --version option ensures
|
||||
# this.)
|
||||
AC_DEFUN([AM_PROG_MKDIR_P],
|
||||
[if mkdir -p --version . >/dev/null 2>&1 && test ! -d ./--version; then
|
||||
# We used to keeping the `.' as first argument, in order to
|
||||
# allow $(mkdir_p) to be used without argument. As in
|
||||
# $(mkdir_p) $(somedir)
|
||||
# where $(somedir) is conditionally defined. However this is wrong
|
||||
# for two reasons:
|
||||
# 1. if the package is installed by a user who cannot write `.'
|
||||
# make install will fail,
|
||||
# 2. the above comment should most certainly read
|
||||
# $(mkdir_p) $(DESTDIR)$(somedir)
|
||||
# so it does not work when $(somedir) is undefined and
|
||||
# $(DESTDIR) is not.
|
||||
# To support the latter case, we have to write
|
||||
# test -z "$(somedir)" || $(mkdir_p) $(DESTDIR)$(somedir),
|
||||
# so the `.' trick is pointless.
|
||||
mkdir_p='mkdir -p --'
|
||||
else
|
||||
# On NextStep and OpenStep, the `mkdir' command does not
|
||||
# recognize any option. It will interpret all options as
|
||||
# directories to create, and then abort because `.' already
|
||||
# exists.
|
||||
for d in ./-p ./--version;
|
||||
do
|
||||
test -d $d && rmdir $d
|
||||
done
|
||||
# $(mkinstalldirs) is defined by Automake if mkinstalldirs exists.
|
||||
if test -f "$ac_aux_dir/mkinstalldirs"; then
|
||||
mkdir_p='$(mkinstalldirs)'
|
||||
else
|
||||
mkdir_p='$(install_sh) -d'
|
||||
fi
|
||||
fi
|
||||
AC_SUBST([mkdir_p])])
|
||||
|
||||
# Helper functions for option handling. -*- Autoconf -*-
|
||||
|
||||
# Copyright (C) 2001, 2002, 2003, 2005 Free Software Foundation, Inc.
|
||||
#
|
||||
# This file is free software; the Free Software Foundation
|
||||
# gives unlimited permission to copy and/or distribute it,
|
||||
# with or without modifications, as long as this notice is preserved.
|
||||
|
||||
# serial 3
|
||||
|
||||
# _AM_MANGLE_OPTION(NAME)
|
||||
# -----------------------
|
||||
AC_DEFUN([_AM_MANGLE_OPTION],
|
||||
[[_AM_OPTION_]m4_bpatsubst($1, [[^a-zA-Z0-9_]], [_])])
|
||||
|
||||
# _AM_SET_OPTION(NAME)
|
||||
# ------------------------------
|
||||
# Set option NAME. Presently that only means defining a flag for this option.
|
||||
AC_DEFUN([_AM_SET_OPTION],
|
||||
[m4_define(_AM_MANGLE_OPTION([$1]), 1)])
|
||||
|
||||
# _AM_SET_OPTIONS(OPTIONS)
|
||||
# ----------------------------------
|
||||
# OPTIONS is a space-separated list of Automake options.
|
||||
AC_DEFUN([_AM_SET_OPTIONS],
|
||||
[AC_FOREACH([_AM_Option], [$1], [_AM_SET_OPTION(_AM_Option)])])
|
||||
|
||||
# _AM_IF_OPTION(OPTION, IF-SET, [IF-NOT-SET])
|
||||
# -------------------------------------------
|
||||
# Execute IF-SET if OPTION is set, IF-NOT-SET otherwise.
|
||||
AC_DEFUN([_AM_IF_OPTION],
|
||||
[m4_ifset(_AM_MANGLE_OPTION([$1]), [$2], [$3])])
|
||||
|
||||
# Check to make sure that the build environment is sane. -*- Autoconf -*-
|
||||
|
||||
# Copyright (C) 1996, 1997, 2000, 2001, 2003, 2005
|
||||
# Free Software Foundation, Inc.
|
||||
#
|
||||
# This file is free software; the Free Software Foundation
|
||||
# gives unlimited permission to copy and/or distribute it,
|
||||
# with or without modifications, as long as this notice is preserved.
|
||||
|
||||
# serial 4
|
||||
|
||||
# AM_SANITY_CHECK
|
||||
# ---------------
|
||||
AC_DEFUN([AM_SANITY_CHECK],
|
||||
[AC_MSG_CHECKING([whether build environment is sane])
|
||||
# Just in case
|
||||
sleep 1
|
||||
echo timestamp > conftest.file
|
||||
# Do `set' in a subshell so we don't clobber the current shell's
|
||||
# arguments. Must try -L first in case configure is actually a
|
||||
# symlink; some systems play weird games with the mod time of symlinks
|
||||
# (eg FreeBSD returns the mod time of the symlink's containing
|
||||
# directory).
|
||||
if (
|
||||
set X `ls -Lt $srcdir/configure conftest.file 2> /dev/null`
|
||||
if test "$[*]" = "X"; then
|
||||
# -L didn't work.
|
||||
set X `ls -t $srcdir/configure conftest.file`
|
||||
fi
|
||||
rm -f conftest.file
|
||||
if test "$[*]" != "X $srcdir/configure conftest.file" \
|
||||
&& test "$[*]" != "X conftest.file $srcdir/configure"; then
|
||||
|
||||
# If neither matched, then we have a broken ls. This can happen
|
||||
# if, for instance, CONFIG_SHELL is bash and it inherits a
|
||||
# broken ls alias from the environment. This has actually
|
||||
# happened. Such a system could not be considered "sane".
|
||||
AC_MSG_ERROR([ls -t appears to fail. Make sure there is not a broken
|
||||
alias in your environment])
|
||||
fi
|
||||
|
||||
test "$[2]" = conftest.file
|
||||
)
|
||||
then
|
||||
# Ok.
|
||||
:
|
||||
else
|
||||
AC_MSG_ERROR([newly created file is older than distributed files!
|
||||
Check your system clock])
|
||||
fi
|
||||
AC_MSG_RESULT(yes)])
|
||||
|
||||
# Copyright (C) 2001, 2003, 2005 Free Software Foundation, Inc.
|
||||
#
|
||||
# This file is free software; the Free Software Foundation
|
||||
# gives unlimited permission to copy and/or distribute it,
|
||||
# with or without modifications, as long as this notice is preserved.
|
||||
|
||||
# AM_PROG_INSTALL_STRIP
|
||||
# ---------------------
|
||||
# One issue with vendor `install' (even GNU) is that you can't
|
||||
# specify the program used to strip binaries. This is especially
|
||||
# annoying in cross-compiling environments, where the build's strip
|
||||
# is unlikely to handle the host's binaries.
|
||||
# Fortunately install-sh will honor a STRIPPROG variable, so we
|
||||
# always use install-sh in `make install-strip', and initialize
|
||||
# STRIPPROG with the value of the STRIP variable (set by the user).
|
||||
AC_DEFUN([AM_PROG_INSTALL_STRIP],
|
||||
[AC_REQUIRE([AM_PROG_INSTALL_SH])dnl
|
||||
# Installed binaries are usually stripped using `strip' when the user
|
||||
# run `make install-strip'. However `strip' might not be the right
|
||||
# tool to use in cross-compilation environments, therefore Automake
|
||||
# will honor the `STRIP' environment variable to overrule this program.
|
||||
dnl Don't test for $cross_compiling = yes, because it might be `maybe'.
|
||||
if test "$cross_compiling" != no; then
|
||||
AC_CHECK_TOOL([STRIP], [strip], :)
|
||||
fi
|
||||
INSTALL_STRIP_PROGRAM="\${SHELL} \$(install_sh) -c -s"
|
||||
AC_SUBST([INSTALL_STRIP_PROGRAM])])
|
||||
|
||||
# Check how to create a tarball. -*- Autoconf -*-
|
||||
|
||||
# Copyright (C) 2004, 2005 Free Software Foundation, Inc.
|
||||
#
|
||||
# This file is free software; the Free Software Foundation
|
||||
# gives unlimited permission to copy and/or distribute it,
|
||||
# with or without modifications, as long as this notice is preserved.
|
||||
|
||||
# serial 2
|
||||
|
||||
# _AM_PROG_TAR(FORMAT)
|
||||
# --------------------
|
||||
# Check how to create a tarball in format FORMAT.
|
||||
# FORMAT should be one of `v7', `ustar', or `pax'.
|
||||
#
|
||||
# Substitute a variable $(am__tar) that is a command
|
||||
# writing to stdout a FORMAT-tarball containing the directory
|
||||
# $tardir.
|
||||
# tardir=directory && $(am__tar) > result.tar
|
||||
#
|
||||
# Substitute a variable $(am__untar) that extract such
|
||||
# a tarball read from stdin.
|
||||
# $(am__untar) < result.tar
|
||||
AC_DEFUN([_AM_PROG_TAR],
|
||||
[# Always define AMTAR for backward compatibility.
|
||||
AM_MISSING_PROG([AMTAR], [tar])
|
||||
m4_if([$1], [v7],
|
||||
[am__tar='${AMTAR} chof - "$$tardir"'; am__untar='${AMTAR} xf -'],
|
||||
[m4_case([$1], [ustar],, [pax],,
|
||||
[m4_fatal([Unknown tar format])])
|
||||
AC_MSG_CHECKING([how to create a $1 tar archive])
|
||||
# Loop over all known methods to create a tar archive until one works.
|
||||
_am_tools='gnutar m4_if([$1], [ustar], [plaintar]) pax cpio none'
|
||||
_am_tools=${am_cv_prog_tar_$1-$_am_tools}
|
||||
# Do not fold the above two line into one, because Tru64 sh and
|
||||
# Solaris sh will not grok spaces in the rhs of `-'.
|
||||
for _am_tool in $_am_tools
|
||||
do
|
||||
case $_am_tool in
|
||||
gnutar)
|
||||
for _am_tar in tar gnutar gtar;
|
||||
do
|
||||
AM_RUN_LOG([$_am_tar --version]) && break
|
||||
done
|
||||
am__tar="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$$tardir"'
|
||||
am__tar_="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$tardir"'
|
||||
am__untar="$_am_tar -xf -"
|
||||
;;
|
||||
plaintar)
|
||||
# Must skip GNU tar: if it does not support --format= it doesn't create
|
||||
# ustar tarball either.
|
||||
(tar --version) >/dev/null 2>&1 && continue
|
||||
am__tar='tar chf - "$$tardir"'
|
||||
am__tar_='tar chf - "$tardir"'
|
||||
am__untar='tar xf -'
|
||||
;;
|
||||
pax)
|
||||
am__tar='pax -L -x $1 -w "$$tardir"'
|
||||
am__tar_='pax -L -x $1 -w "$tardir"'
|
||||
am__untar='pax -r'
|
||||
;;
|
||||
cpio)
|
||||
am__tar='find "$$tardir" -print | cpio -o -H $1 -L'
|
||||
am__tar_='find "$tardir" -print | cpio -o -H $1 -L'
|
||||
am__untar='cpio -i -H $1 -d'
|
||||
;;
|
||||
none)
|
||||
am__tar=false
|
||||
am__tar_=false
|
||||
am__untar=false
|
||||
;;
|
||||
esac
|
||||
|
||||
# If the value was cached, stop now. We just wanted to have am__tar
|
||||
# and am__untar set.
|
||||
test -n "${am_cv_prog_tar_$1}" && break
|
||||
|
||||
# tar/untar a dummy directory, and stop if the command works
|
||||
rm -rf conftest.dir
|
||||
mkdir conftest.dir
|
||||
echo GrepMe > conftest.dir/file
|
||||
AM_RUN_LOG([tardir=conftest.dir && eval $am__tar_ >conftest.tar])
|
||||
rm -rf conftest.dir
|
||||
if test -s conftest.tar; then
|
||||
AM_RUN_LOG([$am__untar <conftest.tar])
|
||||
grep GrepMe conftest.dir/file >/dev/null 2>&1 && break
|
||||
fi
|
||||
done
|
||||
rm -rf conftest.dir
|
||||
|
||||
AC_CACHE_VAL([am_cv_prog_tar_$1], [am_cv_prog_tar_$1=$_am_tool])
|
||||
AC_MSG_RESULT([$am_cv_prog_tar_$1])])
|
||||
AC_SUBST([am__tar])
|
||||
AC_SUBST([am__untar])
|
||||
]) # _AM_PROG_TAR
|
||||
|
||||
m4_include([acinclude.m4])
|
20
jam-files/engine/boehm_gc/add_gc_prefix.c
Normal file
20
jam-files/engine/boehm_gc/add_gc_prefix.c
Normal file
@ -0,0 +1,20 @@
|
||||
# include <stdio.h>
|
||||
# include "version.h"
|
||||
|
||||
int main(argc, argv, envp)
|
||||
int argc;
|
||||
char ** argv;
|
||||
char ** envp;
|
||||
{
|
||||
int i;
|
||||
|
||||
for (i = 1; i < argc; i++) {
|
||||
if (GC_ALPHA_VERSION == GC_NOT_ALPHA) {
|
||||
printf("gc%d.%d/%s ", GC_VERSION_MAJOR, GC_VERSION_MINOR, argv[i]);
|
||||
} else {
|
||||
printf("gc%d.%dalpha%d/%s ", GC_VERSION_MAJOR,
|
||||
GC_VERSION_MINOR, GC_ALPHA_VERSION, argv[i]);
|
||||
}
|
||||
}
|
||||
return(0);
|
||||
}
|
850
jam-files/engine/boehm_gc/allchblk.c
Normal file
850
jam-files/engine/boehm_gc/allchblk.c
Normal file
@ -0,0 +1,850 @@
|
||||
/*
|
||||
* Copyright 1988, 1989 Hans-J. Boehm, Alan J. Demers
|
||||
* Copyright (c) 1991-1994 by Xerox Corporation. All rights reserved.
|
||||
* Copyright (c) 1998-1999 by Silicon Graphics. All rights reserved.
|
||||
* Copyright (c) 1999 by Hewlett-Packard Company. All rights reserved.
|
||||
*
|
||||
* THIS MATERIAL IS PROVIDED AS IS, WITH ABSOLUTELY NO WARRANTY EXPRESSED
|
||||
* OR IMPLIED. ANY USE IS AT YOUR OWN RISK.
|
||||
*
|
||||
* Permission is hereby granted to use or copy this program
|
||||
* for any purpose, provided the above notices are retained on all copies.
|
||||
* Permission to modify the code and to distribute modified code is granted,
|
||||
* provided the above notices are retained, and a notice that the code was
|
||||
* modified is included with the above copyright notice.
|
||||
*/
|
||||
|
||||
/* #define DEBUG */
|
||||
#include <stdio.h>
|
||||
#include "private/gc_priv.h"
|
||||
|
||||
GC_bool GC_use_entire_heap = 0;
|
||||
|
||||
/*
|
||||
* Free heap blocks are kept on one of several free lists,
|
||||
* depending on the size of the block. Each free list is doubly linked.
|
||||
* Adjacent free blocks are coalesced.
|
||||
*/
|
||||
|
||||
|
||||
# define MAX_BLACK_LIST_ALLOC (2*HBLKSIZE)
|
||||
/* largest block we will allocate starting on a black */
|
||||
/* listed block. Must be >= HBLKSIZE. */
|
||||
|
||||
|
||||
# define UNIQUE_THRESHOLD 32
|
||||
/* Sizes up to this many HBLKs each have their own free list */
|
||||
# define HUGE_THRESHOLD 256
|
||||
/* Sizes of at least this many heap blocks are mapped to a */
|
||||
/* single free list. */
|
||||
# define FL_COMPRESSION 8
|
||||
/* In between sizes map this many distinct sizes to a single */
|
||||
/* bin. */
|
||||
|
||||
# define N_HBLK_FLS (HUGE_THRESHOLD - UNIQUE_THRESHOLD)/FL_COMPRESSION \
|
||||
+ UNIQUE_THRESHOLD
|
||||
|
||||
struct hblk * GC_hblkfreelist[N_HBLK_FLS+1] = { 0 };
|
||||
|
||||
#ifndef USE_MUNMAP
|
||||
|
||||
word GC_free_bytes[N_HBLK_FLS+1] = { 0 };
|
||||
/* Number of free bytes on each list. */
|
||||
|
||||
/* Is bytes + the number of free bytes on lists n .. N_HBLK_FLS */
|
||||
/* > GC_max_large_allocd_bytes? */
|
||||
# ifdef __GNUC__
|
||||
__inline__
|
||||
# endif
|
||||
static GC_bool GC_enough_large_bytes_left(word bytes, int n)
|
||||
{
|
||||
int i;
|
||||
for (i = N_HBLK_FLS; i >= n; --i) {
|
||||
bytes += GC_free_bytes[i];
|
||||
if (bytes > GC_max_large_allocd_bytes) return TRUE;
|
||||
}
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
# define INCR_FREE_BYTES(n, b) GC_free_bytes[n] += (b);
|
||||
|
||||
# define FREE_ASSERT(e) GC_ASSERT(e)
|
||||
|
||||
#else /* USE_MUNMAP */
|
||||
|
||||
# define INCR_FREE_BYTES(n, b)
|
||||
# define FREE_ASSERT(e)
|
||||
|
||||
#endif /* USE_MUNMAP */
|
||||
|
||||
/* Map a number of blocks to the appropriate large block free list index. */
|
||||
int GC_hblk_fl_from_blocks(word blocks_needed)
|
||||
{
|
||||
if (blocks_needed <= UNIQUE_THRESHOLD) return (int)blocks_needed;
|
||||
if (blocks_needed >= HUGE_THRESHOLD) return N_HBLK_FLS;
|
||||
return (int)(blocks_needed - UNIQUE_THRESHOLD)/FL_COMPRESSION
|
||||
+ UNIQUE_THRESHOLD;
|
||||
|
||||
}
|
||||
|
||||
# define PHDR(hhdr) HDR(hhdr -> hb_prev)
|
||||
# define NHDR(hhdr) HDR(hhdr -> hb_next)
|
||||
|
||||
# ifdef USE_MUNMAP
|
||||
# define IS_MAPPED(hhdr) (((hhdr) -> hb_flags & WAS_UNMAPPED) == 0)
|
||||
# else /* !USE_MMAP */
|
||||
# define IS_MAPPED(hhdr) 1
|
||||
# endif /* USE_MUNMAP */
|
||||
|
||||
# if !defined(NO_DEBUGGING)
|
||||
void GC_print_hblkfreelist()
|
||||
{
|
||||
struct hblk * h;
|
||||
word total_free = 0;
|
||||
hdr * hhdr;
|
||||
word sz;
|
||||
unsigned i;
|
||||
|
||||
for (i = 0; i <= N_HBLK_FLS; ++i) {
|
||||
h = GC_hblkfreelist[i];
|
||||
# ifdef USE_MUNMAP
|
||||
if (0 != h) GC_printf("Free list %ld:\n",
|
||||
(unsigned long)i);
|
||||
# else
|
||||
if (0 != h) GC_printf("Free list %lu (Total size %lu):\n",
|
||||
i, (unsigned long)GC_free_bytes[i]);
|
||||
# endif
|
||||
while (h != 0) {
|
||||
hhdr = HDR(h);
|
||||
sz = hhdr -> hb_sz;
|
||||
GC_printf("\t%p size %lu ", h, (unsigned long)sz);
|
||||
total_free += sz;
|
||||
if (GC_is_black_listed(h, HBLKSIZE) != 0) {
|
||||
GC_printf("start black listed\n");
|
||||
} else if (GC_is_black_listed(h, hhdr -> hb_sz) != 0) {
|
||||
GC_printf("partially black listed\n");
|
||||
} else {
|
||||
GC_printf("not black listed\n");
|
||||
}
|
||||
h = hhdr -> hb_next;
|
||||
}
|
||||
}
|
||||
# ifndef USE_MUNMAP
|
||||
if (total_free != GC_large_free_bytes) {
|
||||
GC_printf("GC_large_free_bytes = %lu (INCONSISTENT!!)\n",
|
||||
(unsigned long) GC_large_free_bytes);
|
||||
}
|
||||
# endif
|
||||
GC_printf("Total of %lu bytes on free list\n", (unsigned long)total_free);
|
||||
}
|
||||
|
||||
/* Return the free list index on which the block described by the header */
|
||||
/* appears, or -1 if it appears nowhere. */
|
||||
int free_list_index_of(hdr *wanted)
|
||||
{
|
||||
struct hblk * h;
|
||||
hdr * hhdr;
|
||||
int i;
|
||||
|
||||
for (i = 0; i <= N_HBLK_FLS; ++i) {
|
||||
h = GC_hblkfreelist[i];
|
||||
while (h != 0) {
|
||||
hhdr = HDR(h);
|
||||
if (hhdr == wanted) return i;
|
||||
h = hhdr -> hb_next;
|
||||
}
|
||||
}
|
||||
return -1;
|
||||
}
|
||||
|
||||
void GC_dump_regions()
|
||||
{
|
||||
unsigned i;
|
||||
ptr_t start, end;
|
||||
ptr_t p;
|
||||
size_t bytes;
|
||||
hdr *hhdr;
|
||||
for (i = 0; i < GC_n_heap_sects; ++i) {
|
||||
start = GC_heap_sects[i].hs_start;
|
||||
bytes = GC_heap_sects[i].hs_bytes;
|
||||
end = start + bytes;
|
||||
/* Merge in contiguous sections. */
|
||||
while (i+1 < GC_n_heap_sects && GC_heap_sects[i+1].hs_start == end) {
|
||||
++i;
|
||||
end = GC_heap_sects[i].hs_start + GC_heap_sects[i].hs_bytes;
|
||||
}
|
||||
GC_printf("***Section from %p to %p\n", start, end);
|
||||
for (p = start; p < end;) {
|
||||
hhdr = HDR(p);
|
||||
GC_printf("\t%p ", p);
|
||||
if (IS_FORWARDING_ADDR_OR_NIL(hhdr)) {
|
||||
GC_printf("Missing header!!(%d)\n", hhdr);
|
||||
p += HBLKSIZE;
|
||||
continue;
|
||||
}
|
||||
if (HBLK_IS_FREE(hhdr)) {
|
||||
int correct_index = GC_hblk_fl_from_blocks(
|
||||
divHBLKSZ(hhdr -> hb_sz));
|
||||
int actual_index;
|
||||
|
||||
GC_printf("\tfree block of size 0x%lx bytes",
|
||||
(unsigned long)(hhdr -> hb_sz));
|
||||
if (IS_MAPPED(hhdr)) {
|
||||
GC_printf("\n");
|
||||
} else {
|
||||
GC_printf("(unmapped)\n");
|
||||
}
|
||||
actual_index = free_list_index_of(hhdr);
|
||||
if (-1 == actual_index) {
|
||||
GC_printf("\t\tBlock not on free list %d!!\n",
|
||||
correct_index);
|
||||
} else if (correct_index != actual_index) {
|
||||
GC_printf("\t\tBlock on list %d, should be on %d!!\n",
|
||||
actual_index, correct_index);
|
||||
}
|
||||
p += hhdr -> hb_sz;
|
||||
} else {
|
||||
GC_printf("\tused for blocks of size 0x%lx bytes\n",
|
||||
(unsigned long)(hhdr -> hb_sz));
|
||||
p += HBLKSIZE * OBJ_SZ_TO_BLOCKS(hhdr -> hb_sz);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
# endif /* NO_DEBUGGING */
|
||||
|
||||
/* Initialize hdr for a block containing the indicated size and */
|
||||
/* kind of objects. */
|
||||
/* Return FALSE on failure. */
|
||||
static GC_bool setup_header(hdr * hhdr, struct hblk *block, size_t byte_sz,
|
||||
int kind, unsigned flags)
|
||||
{
|
||||
word descr;
|
||||
size_t granules;
|
||||
|
||||
/* Set size, kind and mark proc fields */
|
||||
hhdr -> hb_sz = byte_sz;
|
||||
hhdr -> hb_obj_kind = (unsigned char)kind;
|
||||
hhdr -> hb_flags = (unsigned char)flags;
|
||||
hhdr -> hb_block = block;
|
||||
descr = GC_obj_kinds[kind].ok_descriptor;
|
||||
if (GC_obj_kinds[kind].ok_relocate_descr) descr += byte_sz;
|
||||
hhdr -> hb_descr = descr;
|
||||
|
||||
# ifdef MARK_BIT_PER_OBJ
|
||||
/* Set hb_inv_sz as portably as possible. */
|
||||
/* We set it to the smallest value such that sz * inv_sz > 2**32 */
|
||||
/* This may be more precision than necessary. */
|
||||
if (byte_sz > MAXOBJBYTES) {
|
||||
hhdr -> hb_inv_sz = LARGE_INV_SZ;
|
||||
} else {
|
||||
word inv_sz;
|
||||
|
||||
# if CPP_WORDSZ == 64
|
||||
inv_sz = ((word)1 << 32)/byte_sz;
|
||||
if (((inv_sz*byte_sz) >> 32) == 0) ++inv_sz;
|
||||
# else /* 32 bit words */
|
||||
GC_ASSERT(byte_sz >= 4);
|
||||
inv_sz = ((unsigned)1 << 31)/byte_sz;
|
||||
inv_sz *= 2;
|
||||
while (inv_sz*byte_sz > byte_sz) ++inv_sz;
|
||||
# endif
|
||||
hhdr -> hb_inv_sz = inv_sz;
|
||||
}
|
||||
# else /* MARK_BIT_PER_GRANULE */
|
||||
hhdr -> hb_large_block = (unsigned char)(byte_sz > MAXOBJBYTES);
|
||||
granules = BYTES_TO_GRANULES(byte_sz);
|
||||
if (EXPECT(!GC_add_map_entry(granules), FALSE)) {
|
||||
/* Make it look like a valid block. */
|
||||
hhdr -> hb_sz = HBLKSIZE;
|
||||
hhdr -> hb_descr = 0;
|
||||
hhdr -> hb_large_block = TRUE;
|
||||
hhdr -> hb_map = 0;
|
||||
return FALSE;
|
||||
} else {
|
||||
size_t index = (hhdr -> hb_large_block? 0 : granules);
|
||||
hhdr -> hb_map = GC_obj_map[index];
|
||||
}
|
||||
# endif /* MARK_BIT_PER_GRANULE */
|
||||
|
||||
/* Clear mark bits */
|
||||
GC_clear_hdr_marks(hhdr);
|
||||
|
||||
hhdr -> hb_last_reclaimed = (unsigned short)GC_gc_no;
|
||||
return(TRUE);
|
||||
}
|
||||
|
||||
#define FL_UNKNOWN -1
|
||||
/*
|
||||
* Remove hhdr from the appropriate free list.
|
||||
* We assume it is on the nth free list, or on the size
|
||||
* appropriate free list if n is FL_UNKNOWN.
|
||||
*/
|
||||
void GC_remove_from_fl(hdr *hhdr, int n)
|
||||
{
|
||||
int index;
|
||||
|
||||
GC_ASSERT(((hhdr -> hb_sz) & (HBLKSIZE-1)) == 0);
|
||||
# ifndef USE_MUNMAP
|
||||
/* We always need index to mainatin free counts. */
|
||||
if (FL_UNKNOWN == n) {
|
||||
index = GC_hblk_fl_from_blocks(divHBLKSZ(hhdr -> hb_sz));
|
||||
} else {
|
||||
index = n;
|
||||
}
|
||||
# endif
|
||||
if (hhdr -> hb_prev == 0) {
|
||||
# ifdef USE_MUNMAP
|
||||
if (FL_UNKNOWN == n) {
|
||||
index = GC_hblk_fl_from_blocks(divHBLKSZ(hhdr -> hb_sz));
|
||||
} else {
|
||||
index = n;
|
||||
}
|
||||
# endif
|
||||
GC_ASSERT(HDR(GC_hblkfreelist[index]) == hhdr);
|
||||
GC_hblkfreelist[index] = hhdr -> hb_next;
|
||||
} else {
|
||||
hdr *phdr;
|
||||
GET_HDR(hhdr -> hb_prev, phdr);
|
||||
phdr -> hb_next = hhdr -> hb_next;
|
||||
}
|
||||
FREE_ASSERT(GC_free_bytes[index] >= hhdr -> hb_sz);
|
||||
INCR_FREE_BYTES(index, - (signed_word)(hhdr -> hb_sz));
|
||||
if (0 != hhdr -> hb_next) {
|
||||
hdr * nhdr;
|
||||
GC_ASSERT(!IS_FORWARDING_ADDR_OR_NIL(NHDR(hhdr)));
|
||||
GET_HDR(hhdr -> hb_next, nhdr);
|
||||
nhdr -> hb_prev = hhdr -> hb_prev;
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
* Return a pointer to the free block ending just before h, if any.
|
||||
*/
|
||||
struct hblk * GC_free_block_ending_at(struct hblk *h)
|
||||
{
|
||||
struct hblk * p = h - 1;
|
||||
hdr * phdr;
|
||||
|
||||
GET_HDR(p, phdr);
|
||||
while (0 != phdr && IS_FORWARDING_ADDR_OR_NIL(phdr)) {
|
||||
p = FORWARDED_ADDR(p,phdr);
|
||||
phdr = HDR(p);
|
||||
}
|
||||
if (0 != phdr) {
|
||||
if(HBLK_IS_FREE(phdr)) {
|
||||
return p;
|
||||
} else {
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
p = GC_prev_block(h - 1);
|
||||
if (0 != p) {
|
||||
phdr = HDR(p);
|
||||
if (HBLK_IS_FREE(phdr) && (ptr_t)p + phdr -> hb_sz == (ptr_t)h) {
|
||||
return p;
|
||||
}
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
/*
|
||||
* Add hhdr to the appropriate free list.
|
||||
* We maintain individual free lists sorted by address.
|
||||
*/
|
||||
void GC_add_to_fl(struct hblk *h, hdr *hhdr)
|
||||
{
|
||||
int index = GC_hblk_fl_from_blocks(divHBLKSZ(hhdr -> hb_sz));
|
||||
struct hblk *second = GC_hblkfreelist[index];
|
||||
hdr * second_hdr;
|
||||
# ifdef GC_ASSERTIONS
|
||||
struct hblk *next = (struct hblk *)((word)h + hhdr -> hb_sz);
|
||||
hdr * nexthdr = HDR(next);
|
||||
struct hblk *prev = GC_free_block_ending_at(h);
|
||||
hdr * prevhdr = HDR(prev);
|
||||
GC_ASSERT(nexthdr == 0 || !HBLK_IS_FREE(nexthdr) || !IS_MAPPED(nexthdr));
|
||||
GC_ASSERT(prev == 0 || !HBLK_IS_FREE(prevhdr) || !IS_MAPPED(prevhdr));
|
||||
# endif
|
||||
GC_ASSERT(((hhdr -> hb_sz) & (HBLKSIZE-1)) == 0);
|
||||
GC_hblkfreelist[index] = h;
|
||||
INCR_FREE_BYTES(index, hhdr -> hb_sz);
|
||||
FREE_ASSERT(GC_free_bytes[index] <= GC_large_free_bytes)
|
||||
hhdr -> hb_next = second;
|
||||
hhdr -> hb_prev = 0;
|
||||
if (0 != second) {
|
||||
GET_HDR(second, second_hdr);
|
||||
second_hdr -> hb_prev = h;
|
||||
}
|
||||
hhdr -> hb_flags |= FREE_BLK;
|
||||
}
|
||||
|
||||
#ifdef USE_MUNMAP
|
||||
|
||||
/* Unmap blocks that haven't been recently touched. This is the only way */
|
||||
/* way blocks are ever unmapped. */
|
||||
void GC_unmap_old(void)
|
||||
{
|
||||
struct hblk * h;
|
||||
hdr * hhdr;
|
||||
word sz;
|
||||
unsigned short last_rec, threshold;
|
||||
int i;
|
||||
# define UNMAP_THRESHOLD 6
|
||||
|
||||
for (i = 0; i <= N_HBLK_FLS; ++i) {
|
||||
for (h = GC_hblkfreelist[i]; 0 != h; h = hhdr -> hb_next) {
|
||||
hhdr = HDR(h);
|
||||
if (!IS_MAPPED(hhdr)) continue;
|
||||
threshold = (unsigned short)(GC_gc_no - UNMAP_THRESHOLD);
|
||||
last_rec = hhdr -> hb_last_reclaimed;
|
||||
if ((last_rec > GC_gc_no || last_rec < threshold)
|
||||
&& threshold < GC_gc_no /* not recently wrapped */) {
|
||||
sz = hhdr -> hb_sz;
|
||||
GC_unmap((ptr_t)h, sz);
|
||||
hhdr -> hb_flags |= WAS_UNMAPPED;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/* Merge all unmapped blocks that are adjacent to other free */
|
||||
/* blocks. This may involve remapping, since all blocks are either */
|
||||
/* fully mapped or fully unmapped. */
|
||||
void GC_merge_unmapped(void)
|
||||
{
|
||||
struct hblk * h, *next;
|
||||
hdr * hhdr, *nexthdr;
|
||||
word size, nextsize;
|
||||
int i;
|
||||
|
||||
for (i = 0; i <= N_HBLK_FLS; ++i) {
|
||||
h = GC_hblkfreelist[i];
|
||||
while (h != 0) {
|
||||
GET_HDR(h, hhdr);
|
||||
size = hhdr->hb_sz;
|
||||
next = (struct hblk *)((word)h + size);
|
||||
GET_HDR(next, nexthdr);
|
||||
/* Coalesce with successor, if possible */
|
||||
if (0 != nexthdr && HBLK_IS_FREE(nexthdr)) {
|
||||
nextsize = nexthdr -> hb_sz;
|
||||
if (IS_MAPPED(hhdr)) {
|
||||
GC_ASSERT(!IS_MAPPED(nexthdr));
|
||||
/* make both consistent, so that we can merge */
|
||||
if (size > nextsize) {
|
||||
GC_remap((ptr_t)next, nextsize);
|
||||
} else {
|
||||
GC_unmap((ptr_t)h, size);
|
||||
hhdr -> hb_flags |= WAS_UNMAPPED;
|
||||
}
|
||||
} else if (IS_MAPPED(nexthdr)) {
|
||||
GC_ASSERT(!IS_MAPPED(hhdr));
|
||||
if (size > nextsize) {
|
||||
GC_unmap((ptr_t)next, nextsize);
|
||||
} else {
|
||||
GC_remap((ptr_t)h, size);
|
||||
hhdr -> hb_flags &= ~WAS_UNMAPPED;
|
||||
hhdr -> hb_last_reclaimed = nexthdr -> hb_last_reclaimed;
|
||||
}
|
||||
} else {
|
||||
/* Unmap any gap in the middle */
|
||||
GC_unmap_gap((ptr_t)h, size, (ptr_t)next, nexthdr -> hb_sz);
|
||||
}
|
||||
/* If they are both unmapped, we merge, but leave unmapped. */
|
||||
GC_remove_from_fl(hhdr, i);
|
||||
GC_remove_from_fl(nexthdr, FL_UNKNOWN);
|
||||
hhdr -> hb_sz += nexthdr -> hb_sz;
|
||||
GC_remove_header(next);
|
||||
GC_add_to_fl(h, hhdr);
|
||||
/* Start over at beginning of list */
|
||||
h = GC_hblkfreelist[i];
|
||||
} else /* not mergable with successor */ {
|
||||
h = hhdr -> hb_next;
|
||||
}
|
||||
} /* while (h != 0) ... */
|
||||
} /* for ... */
|
||||
}
|
||||
|
||||
#endif /* USE_MUNMAP */
|
||||
|
||||
/*
|
||||
* Return a pointer to a block starting at h of length bytes.
|
||||
* Memory for the block is mapped.
|
||||
* Remove the block from its free list, and return the remainder (if any)
|
||||
* to its appropriate free list.
|
||||
* May fail by returning 0.
|
||||
* The header for the returned block must be set up by the caller.
|
||||
* If the return value is not 0, then hhdr is the header for it.
|
||||
*/
|
||||
struct hblk * GC_get_first_part(struct hblk *h, hdr *hhdr,
|
||||
size_t bytes, int index)
|
||||
{
|
||||
word total_size = hhdr -> hb_sz;
|
||||
struct hblk * rest;
|
||||
hdr * rest_hdr;
|
||||
|
||||
GC_ASSERT((total_size & (HBLKSIZE-1)) == 0);
|
||||
GC_remove_from_fl(hhdr, index);
|
||||
if (total_size == bytes) return h;
|
||||
rest = (struct hblk *)((word)h + bytes);
|
||||
rest_hdr = GC_install_header(rest);
|
||||
if (0 == rest_hdr) {
|
||||
/* FIXME: This is likely to be very bad news ... */
|
||||
WARN("Header allocation failed: Dropping block.\n", 0);
|
||||
return(0);
|
||||
}
|
||||
rest_hdr -> hb_sz = total_size - bytes;
|
||||
rest_hdr -> hb_flags = 0;
|
||||
# ifdef GC_ASSERTIONS
|
||||
/* Mark h not free, to avoid assertion about adjacent free blocks. */
|
||||
hhdr -> hb_flags &= ~FREE_BLK;
|
||||
# endif
|
||||
GC_add_to_fl(rest, rest_hdr);
|
||||
return h;
|
||||
}
|
||||
|
||||
/*
|
||||
* H is a free block. N points at an address inside it.
|
||||
* A new header for n has already been set up. Fix up h's header
|
||||
* to reflect the fact that it is being split, move it to the
|
||||
* appropriate free list.
|
||||
* N replaces h in the original free list.
|
||||
*
|
||||
* Nhdr is not completely filled in, since it is about to allocated.
|
||||
* It may in fact end up on the wrong free list for its size.
|
||||
* (Hence adding it to a free list is silly. But this path is hopefully
|
||||
* rare enough that it doesn't matter. The code is cleaner this way.)
|
||||
*/
|
||||
void GC_split_block(struct hblk *h, hdr *hhdr, struct hblk *n,
|
||||
hdr *nhdr, int index /* Index of free list */)
|
||||
{
|
||||
word total_size = hhdr -> hb_sz;
|
||||
word h_size = (word)n - (word)h;
|
||||
struct hblk *prev = hhdr -> hb_prev;
|
||||
struct hblk *next = hhdr -> hb_next;
|
||||
|
||||
/* Replace h with n on its freelist */
|
||||
nhdr -> hb_prev = prev;
|
||||
nhdr -> hb_next = next;
|
||||
nhdr -> hb_sz = total_size - h_size;
|
||||
nhdr -> hb_flags = 0;
|
||||
if (0 != prev) {
|
||||
HDR(prev) -> hb_next = n;
|
||||
} else {
|
||||
GC_hblkfreelist[index] = n;
|
||||
}
|
||||
if (0 != next) {
|
||||
HDR(next) -> hb_prev = n;
|
||||
}
|
||||
INCR_FREE_BYTES(index, -(signed_word)h_size);
|
||||
FREE_ASSERT(GC_free_bytes[index] > 0);
|
||||
# ifdef GC_ASSERTIONS
|
||||
nhdr -> hb_flags &= ~FREE_BLK;
|
||||
/* Don't fail test for consecutive */
|
||||
/* free blocks in GC_add_to_fl. */
|
||||
# endif
|
||||
# ifdef USE_MUNMAP
|
||||
hhdr -> hb_last_reclaimed = (unsigned short)GC_gc_no;
|
||||
# endif
|
||||
hhdr -> hb_sz = h_size;
|
||||
GC_add_to_fl(h, hhdr);
|
||||
nhdr -> hb_flags |= FREE_BLK;
|
||||
}
|
||||
|
||||
struct hblk *
|
||||
GC_allochblk_nth(size_t sz/* bytes */, int kind, unsigned flags, int n);
|
||||
|
||||
/*
|
||||
* Allocate (and return pointer to) a heap block
|
||||
* for objects of size sz bytes, searching the nth free list.
|
||||
*
|
||||
* NOTE: We set obj_map field in header correctly.
|
||||
* Caller is responsible for building an object freelist in block.
|
||||
*
|
||||
* The client is responsible for clearing the block, if necessary.
|
||||
*/
|
||||
struct hblk *
|
||||
GC_allochblk(size_t sz, int kind, unsigned flags/* IGNORE_OFF_PAGE or 0 */)
|
||||
{
|
||||
word blocks;
|
||||
int start_list;
|
||||
int i;
|
||||
|
||||
GC_ASSERT((sz & (GRANULE_BYTES - 1)) == 0);
|
||||
blocks = OBJ_SZ_TO_BLOCKS(sz);
|
||||
start_list = GC_hblk_fl_from_blocks(blocks);
|
||||
for (i = start_list; i <= N_HBLK_FLS; ++i) {
|
||||
struct hblk * result = GC_allochblk_nth(sz, kind, flags, i);
|
||||
if (0 != result) {
|
||||
return result;
|
||||
}
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
/*
|
||||
* The same, but with search restricted to nth free list.
|
||||
* Flags is IGNORE_OFF_PAGE or zero.
|
||||
* Unlike the above, sz is in bytes.
|
||||
*/
|
||||
struct hblk *
|
||||
GC_allochblk_nth(size_t sz, int kind, unsigned flags, int n)
|
||||
{
|
||||
struct hblk *hbp;
|
||||
hdr * hhdr; /* Header corr. to hbp */
|
||||
/* Initialized after loop if hbp !=0 */
|
||||
/* Gcc uninitialized use warning is bogus. */
|
||||
struct hblk *thishbp;
|
||||
hdr * thishdr; /* Header corr. to hbp */
|
||||
signed_word size_needed; /* number of bytes in requested objects */
|
||||
signed_word size_avail; /* bytes available in this block */
|
||||
|
||||
size_needed = HBLKSIZE * OBJ_SZ_TO_BLOCKS(sz);
|
||||
|
||||
/* search for a big enough block in free list */
|
||||
hbp = GC_hblkfreelist[n];
|
||||
for(; 0 != hbp; hbp = hhdr -> hb_next) {
|
||||
GET_HDR(hbp, hhdr);
|
||||
size_avail = hhdr->hb_sz;
|
||||
if (size_avail < size_needed) continue;
|
||||
if (size_avail != size_needed
|
||||
&& !GC_use_entire_heap
|
||||
&& !GC_dont_gc
|
||||
&& USED_HEAP_SIZE >= GC_requested_heapsize
|
||||
&& !TRUE_INCREMENTAL && GC_should_collect()) {
|
||||
# ifdef USE_MUNMAP
|
||||
continue;
|
||||
# else
|
||||
/* If we have enough large blocks left to cover any */
|
||||
/* previous request for large blocks, we go ahead */
|
||||
/* and split. Assuming a steady state, that should */
|
||||
/* be safe. It means that we can use the full */
|
||||
/* heap if we allocate only small objects. */
|
||||
if (!GC_enough_large_bytes_left(GC_large_allocd_bytes, n)) {
|
||||
continue;
|
||||
}
|
||||
/* If we are deallocating lots of memory from */
|
||||
/* finalizers, fail and collect sooner rather */
|
||||
/* than later. */
|
||||
if (GC_finalizer_bytes_freed > (GC_heapsize >> 4)) {
|
||||
continue;
|
||||
}
|
||||
# endif /* !USE_MUNMAP */
|
||||
}
|
||||
/* If the next heap block is obviously better, go on. */
|
||||
/* This prevents us from disassembling a single large block */
|
||||
/* to get tiny blocks. */
|
||||
{
|
||||
signed_word next_size;
|
||||
|
||||
thishbp = hhdr -> hb_next;
|
||||
if (thishbp != 0) {
|
||||
GET_HDR(thishbp, thishdr);
|
||||
next_size = (signed_word)(thishdr -> hb_sz);
|
||||
if (next_size < size_avail
|
||||
&& next_size >= size_needed
|
||||
&& !GC_is_black_listed(thishbp, (word)size_needed)) {
|
||||
continue;
|
||||
}
|
||||
}
|
||||
}
|
||||
if ( !IS_UNCOLLECTABLE(kind) &&
|
||||
(kind != PTRFREE || size_needed > MAX_BLACK_LIST_ALLOC)) {
|
||||
struct hblk * lasthbp = hbp;
|
||||
ptr_t search_end = (ptr_t)hbp + size_avail - size_needed;
|
||||
signed_word orig_avail = size_avail;
|
||||
signed_word eff_size_needed = ((flags & IGNORE_OFF_PAGE)?
|
||||
HBLKSIZE
|
||||
: size_needed);
|
||||
|
||||
|
||||
while ((ptr_t)lasthbp <= search_end
|
||||
&& (thishbp = GC_is_black_listed(lasthbp,
|
||||
(word)eff_size_needed))
|
||||
!= 0) {
|
||||
lasthbp = thishbp;
|
||||
}
|
||||
size_avail -= (ptr_t)lasthbp - (ptr_t)hbp;
|
||||
thishbp = lasthbp;
|
||||
if (size_avail >= size_needed) {
|
||||
if (thishbp != hbp &&
|
||||
0 != (thishdr = GC_install_header(thishbp))) {
|
||||
/* Make sure it's mapped before we mangle it. */
|
||||
# ifdef USE_MUNMAP
|
||||
if (!IS_MAPPED(hhdr)) {
|
||||
GC_remap((ptr_t)hbp, hhdr -> hb_sz);
|
||||
hhdr -> hb_flags &= ~WAS_UNMAPPED;
|
||||
}
|
||||
# endif
|
||||
/* Split the block at thishbp */
|
||||
GC_split_block(hbp, hhdr, thishbp, thishdr, n);
|
||||
/* Advance to thishbp */
|
||||
hbp = thishbp;
|
||||
hhdr = thishdr;
|
||||
/* We must now allocate thishbp, since it may */
|
||||
/* be on the wrong free list. */
|
||||
}
|
||||
} else if (size_needed > (signed_word)BL_LIMIT
|
||||
&& orig_avail - size_needed
|
||||
> (signed_word)BL_LIMIT) {
|
||||
/* Punt, since anything else risks unreasonable heap growth. */
|
||||
if (++GC_large_alloc_warn_suppressed
|
||||
>= GC_large_alloc_warn_interval) {
|
||||
WARN("Repeated allocation of very large block "
|
||||
"(appr. size %ld):\n"
|
||||
"\tMay lead to memory leak and poor performance.\n",
|
||||
size_needed);
|
||||
GC_large_alloc_warn_suppressed = 0;
|
||||
}
|
||||
size_avail = orig_avail;
|
||||
} else if (size_avail == 0 && size_needed == HBLKSIZE
|
||||
&& IS_MAPPED(hhdr)) {
|
||||
if (!GC_find_leak) {
|
||||
static unsigned count = 0;
|
||||
|
||||
/* The block is completely blacklisted. We need */
|
||||
/* to drop some such blocks, since otherwise we spend */
|
||||
/* all our time traversing them if pointerfree */
|
||||
/* blocks are unpopular. */
|
||||
/* A dropped block will be reconsidered at next GC. */
|
||||
if ((++count & 3) == 0) {
|
||||
/* Allocate and drop the block in small chunks, to */
|
||||
/* maximize the chance that we will recover some */
|
||||
/* later. */
|
||||
word total_size = hhdr -> hb_sz;
|
||||
struct hblk * limit = hbp + divHBLKSZ(total_size);
|
||||
struct hblk * h;
|
||||
struct hblk * prev = hhdr -> hb_prev;
|
||||
|
||||
GC_large_free_bytes -= total_size;
|
||||
GC_remove_from_fl(hhdr, n);
|
||||
for (h = hbp; h < limit; h++) {
|
||||
if (h == hbp || 0 != (hhdr = GC_install_header(h))) {
|
||||
(void) setup_header(
|
||||
hhdr, h,
|
||||
HBLKSIZE,
|
||||
PTRFREE, 0); /* Cant fail */
|
||||
if (GC_debugging_started) {
|
||||
BZERO(h, HBLKSIZE);
|
||||
}
|
||||
}
|
||||
}
|
||||
/* Restore hbp to point at free block */
|
||||
hbp = prev;
|
||||
if (0 == hbp) {
|
||||
return GC_allochblk_nth(sz, kind, flags, n);
|
||||
}
|
||||
hhdr = HDR(hbp);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
if( size_avail >= size_needed ) {
|
||||
# ifdef USE_MUNMAP
|
||||
if (!IS_MAPPED(hhdr)) {
|
||||
GC_remap((ptr_t)hbp, hhdr -> hb_sz);
|
||||
hhdr -> hb_flags &= ~WAS_UNMAPPED;
|
||||
}
|
||||
# endif
|
||||
/* hbp may be on the wrong freelist; the parameter n */
|
||||
/* is important. */
|
||||
hbp = GC_get_first_part(hbp, hhdr, size_needed, n);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
if (0 == hbp) return 0;
|
||||
|
||||
/* Add it to map of valid blocks */
|
||||
if (!GC_install_counts(hbp, (word)size_needed)) return(0);
|
||||
/* This leaks memory under very rare conditions. */
|
||||
|
||||
/* Set up header */
|
||||
if (!setup_header(hhdr, hbp, sz, kind, flags)) {
|
||||
GC_remove_counts(hbp, (word)size_needed);
|
||||
return(0); /* ditto */
|
||||
}
|
||||
|
||||
/* Notify virtual dirty bit implementation that we are about to write. */
|
||||
/* Ensure that pointerfree objects are not protected if it's avoidable. */
|
||||
GC_remove_protection(hbp, divHBLKSZ(size_needed),
|
||||
(hhdr -> hb_descr == 0) /* pointer-free */);
|
||||
|
||||
/* We just successfully allocated a block. Restart count of */
|
||||
/* consecutive failures. */
|
||||
{
|
||||
extern unsigned GC_fail_count;
|
||||
|
||||
GC_fail_count = 0;
|
||||
}
|
||||
|
||||
GC_large_free_bytes -= size_needed;
|
||||
|
||||
GC_ASSERT(IS_MAPPED(hhdr));
|
||||
return( hbp );
|
||||
}
|
||||
|
||||
struct hblk * GC_freehblk_ptr = 0; /* Search position hint for GC_freehblk */
|
||||
|
||||
/*
|
||||
* Free a heap block.
|
||||
*
|
||||
* Coalesce the block with its neighbors if possible.
|
||||
*
|
||||
* All mark words are assumed to be cleared.
|
||||
*/
|
||||
void
|
||||
GC_freehblk(struct hblk *hbp)
|
||||
{
|
||||
struct hblk *next, *prev;
|
||||
hdr *hhdr, *prevhdr, *nexthdr;
|
||||
signed_word size;
|
||||
|
||||
|
||||
GET_HDR(hbp, hhdr);
|
||||
size = hhdr->hb_sz;
|
||||
size = HBLKSIZE * OBJ_SZ_TO_BLOCKS(size);
|
||||
GC_remove_counts(hbp, (word)size);
|
||||
hhdr->hb_sz = size;
|
||||
# ifdef USE_MUNMAP
|
||||
hhdr -> hb_last_reclaimed = (unsigned short)GC_gc_no;
|
||||
# endif
|
||||
|
||||
/* Check for duplicate deallocation in the easy case */
|
||||
if (HBLK_IS_FREE(hhdr)) {
|
||||
GC_printf("Duplicate large block deallocation of %p\n", hbp);
|
||||
ABORT("Duplicate large block deallocation");
|
||||
}
|
||||
|
||||
GC_ASSERT(IS_MAPPED(hhdr));
|
||||
hhdr -> hb_flags |= FREE_BLK;
|
||||
next = (struct hblk *)((word)hbp + size);
|
||||
GET_HDR(next, nexthdr);
|
||||
prev = GC_free_block_ending_at(hbp);
|
||||
/* Coalesce with successor, if possible */
|
||||
if(0 != nexthdr && HBLK_IS_FREE(nexthdr) && IS_MAPPED(nexthdr)) {
|
||||
GC_remove_from_fl(nexthdr, FL_UNKNOWN);
|
||||
hhdr -> hb_sz += nexthdr -> hb_sz;
|
||||
GC_remove_header(next);
|
||||
}
|
||||
/* Coalesce with predecessor, if possible. */
|
||||
if (0 != prev) {
|
||||
prevhdr = HDR(prev);
|
||||
if (IS_MAPPED(prevhdr)) {
|
||||
GC_remove_from_fl(prevhdr, FL_UNKNOWN);
|
||||
prevhdr -> hb_sz += hhdr -> hb_sz;
|
||||
# ifdef USE_MUNMAP
|
||||
prevhdr -> hb_last_reclaimed = (unsigned short)GC_gc_no;
|
||||
# endif
|
||||
GC_remove_header(hbp);
|
||||
hbp = prev;
|
||||
hhdr = prevhdr;
|
||||
}
|
||||
}
|
||||
/* FIXME: It is not clear we really always want to do these merges */
|
||||
/* with -DUSE_MUNMAP, since it updates ages and hence prevents */
|
||||
/* unmapping. */
|
||||
|
||||
GC_large_free_bytes += size;
|
||||
GC_add_to_fl(hbp, hhdr);
|
||||
}
|
||||
|
1023
jam-files/engine/boehm_gc/alloc.c
Normal file
1023
jam-files/engine/boehm_gc/alloc.c
Normal file
File diff suppressed because it is too large
Load Diff
86
jam-files/engine/boehm_gc/alpha_mach_dep.S
Normal file
86
jam-files/engine/boehm_gc/alpha_mach_dep.S
Normal file
@ -0,0 +1,86 @@
|
||||
.arch ev6
|
||||
|
||||
.text
|
||||
.align 4
|
||||
.globl GC_push_regs
|
||||
.ent GC_push_regs 2
|
||||
GC_push_regs:
|
||||
ldgp $gp, 0($27)
|
||||
lda $sp, -16($sp)
|
||||
stq $26, 0($sp)
|
||||
.mask 0x04000000, 0
|
||||
.frame $sp, 16, $26, 0
|
||||
|
||||
/* $0 integer result */
|
||||
/* $1-$8 temp regs - not preserved cross calls */
|
||||
/* $9-$15 call saved regs */
|
||||
/* $16-$21 argument regs - not preserved cross calls */
|
||||
/* $22-$28 temp regs - not preserved cross calls */
|
||||
/* $29 global pointer - not preserved cross calls */
|
||||
/* $30 stack pointer */
|
||||
|
||||
# define call_push(x) \
|
||||
mov x, $16; \
|
||||
jsr $26, GC_push_one; \
|
||||
ldgp $gp, 0($26)
|
||||
|
||||
call_push($9)
|
||||
call_push($10)
|
||||
call_push($11)
|
||||
call_push($12)
|
||||
call_push($13)
|
||||
call_push($14)
|
||||
call_push($15)
|
||||
|
||||
/* $f0-$f1 floating point results */
|
||||
/* $f2-$f9 call saved regs */
|
||||
/* $f10-$f30 temp regs - not preserved cross calls */
|
||||
|
||||
/* Use the most efficient transfer method for this hardware. */
|
||||
/* Bit 1 detects the FIX extension, which includes ftoit. */
|
||||
amask 2, $0
|
||||
bne $0, $use_stack
|
||||
|
||||
#undef call_push
|
||||
#define call_push(x) \
|
||||
ftoit x, $16; \
|
||||
jsr $26, GC_push_one; \
|
||||
ldgp $gp, 0($26)
|
||||
|
||||
call_push($f2)
|
||||
call_push($f3)
|
||||
call_push($f4)
|
||||
call_push($f5)
|
||||
call_push($f6)
|
||||
call_push($f7)
|
||||
call_push($f8)
|
||||
call_push($f9)
|
||||
|
||||
ldq $26, 0($sp)
|
||||
lda $sp, 16($sp)
|
||||
ret $31, ($26), 1
|
||||
|
||||
.align 4
|
||||
$use_stack:
|
||||
|
||||
#undef call_push
|
||||
#define call_push(x) \
|
||||
stt x, 8($sp); \
|
||||
ldq $16, 8($sp); \
|
||||
jsr $26, GC_push_one; \
|
||||
ldgp $gp, 0($26)
|
||||
|
||||
call_push($f2)
|
||||
call_push($f3)
|
||||
call_push($f4)
|
||||
call_push($f5)
|
||||
call_push($f6)
|
||||
call_push($f7)
|
||||
call_push($f8)
|
||||
call_push($f9)
|
||||
|
||||
ldq $26, 0($sp)
|
||||
lda $sp, 16($sp)
|
||||
ret $31, ($26), 1
|
||||
|
||||
.end GC_push_regs
|
469
jam-files/engine/boehm_gc/backgraph.c
Normal file
469
jam-files/engine/boehm_gc/backgraph.c
Normal file
@ -0,0 +1,469 @@
|
||||
/*
|
||||
* Copyright (c) 2001 by Hewlett-Packard Company. All rights reserved.
|
||||
*
|
||||
* THIS MATERIAL IS PROVIDED AS IS, WITH ABSOLUTELY NO WARRANTY EXPRESSED
|
||||
* OR IMPLIED. ANY USE IS AT YOUR OWN RISK.
|
||||
*
|
||||
* Permission is hereby granted to use or copy this program
|
||||
* for any purpose, provided the above notices are retained on all copies.
|
||||
* Permission to modify the code and to distribute modified code is granted,
|
||||
* provided the above notices are retained, and a notice that the code was
|
||||
* modified is included with the above copyright notice.
|
||||
*
|
||||
*/
|
||||
|
||||
/*
|
||||
* This implements a full, though not well-tuned, representation of the
|
||||
* backwards points-to graph. This is used to test for non-GC-robust
|
||||
* data structures; the code is not used during normal garbage collection.
|
||||
*
|
||||
* One restriction is that we drop all back-edges from nodes with very
|
||||
* high in-degree, and simply add them add them to a list of such
|
||||
* nodes. They are then treated as permanent roots. Id this by itself
|
||||
* doesn't introduce a space leak, then such nodes can't contribute to
|
||||
* a growing space leak.
|
||||
*/
|
||||
|
||||
#ifdef MAKE_BACK_GRAPH
|
||||
|
||||
#define MAX_IN 10 /* Maximum in-degree we handle directly */
|
||||
|
||||
#include "private/dbg_mlc.h"
|
||||
#include <unistd.h>
|
||||
|
||||
#if !defined(DBG_HDRS_ALL) || (ALIGNMENT != CPP_WORDSZ/8) || !defined(UNIX_LIKE)
|
||||
# error Configuration doesnt support MAKE_BACK_GRAPH
|
||||
#endif
|
||||
|
||||
/* We store single back pointers directly in the object's oh_bg_ptr field. */
|
||||
/* If there is more than one ptr to an object, we store q | FLAG_MANY, */
|
||||
/* where q is a pointer to a back_edges object. */
|
||||
/* Every once in a while we use a back_edges object even for a single */
|
||||
/* pointer, since we need the other fields in the back_edges structure to */
|
||||
/* be present in some fraction of the objects. Otherwise we get serious */
|
||||
/* performance issues. */
|
||||
#define FLAG_MANY 2
|
||||
|
||||
typedef struct back_edges_struct {
|
||||
word n_edges; /* Number of edges, including those in continuation */
|
||||
/* structures. */
|
||||
unsigned short flags;
|
||||
# define RETAIN 1 /* Directly points to a reachable object; */
|
||||
/* retain for next GC. */
|
||||
unsigned short height_gc_no;
|
||||
/* If height > 0, then the GC_gc_no value when it */
|
||||
/* was computed. If it was computed this cycle, then */
|
||||
/* it is current. If it was computed during the */
|
||||
/* last cycle, then it represents the old height, */
|
||||
/* which is only saved for live objects referenced by */
|
||||
/* dead ones. This may grow due to refs from newly */
|
||||
/* dead objects. */
|
||||
signed_word height;
|
||||
/* Longest path through unreachable nodes to this node */
|
||||
/* that we found using depth first search. */
|
||||
|
||||
# define HEIGHT_UNKNOWN ((signed_word)(-2))
|
||||
# define HEIGHT_IN_PROGRESS ((signed_word)(-1))
|
||||
ptr_t edges[MAX_IN];
|
||||
struct back_edges_struct *cont;
|
||||
/* Pointer to continuation structure; we use only the */
|
||||
/* edges field in the continuation. */
|
||||
/* also used as free list link. */
|
||||
} back_edges;
|
||||
|
||||
/* Allocate a new back edge structure. Should be more sophisticated */
|
||||
/* if this were production code. */
|
||||
#define MAX_BACK_EDGE_STRUCTS 100000
|
||||
static back_edges *back_edge_space = 0;
|
||||
int GC_n_back_edge_structs = 0; /* Serves as pointer to never used */
|
||||
/* back_edges space. */
|
||||
static back_edges *avail_back_edges = 0;
|
||||
/* Pointer to free list of deallocated */
|
||||
/* back_edges structures. */
|
||||
|
||||
static back_edges * new_back_edges(void)
|
||||
{
|
||||
if (0 == back_edge_space) {
|
||||
back_edge_space = (back_edges *)
|
||||
GET_MEM(MAX_BACK_EDGE_STRUCTS*sizeof(back_edges));
|
||||
}
|
||||
if (0 != avail_back_edges) {
|
||||
back_edges * result = avail_back_edges;
|
||||
avail_back_edges = result -> cont;
|
||||
result -> cont = 0;
|
||||
return result;
|
||||
}
|
||||
if (GC_n_back_edge_structs >= MAX_BACK_EDGE_STRUCTS - 1) {
|
||||
ABORT("needed too much space for back edges: adjust "
|
||||
"MAX_BACK_EDGE_STRUCTS");
|
||||
}
|
||||
return back_edge_space + (GC_n_back_edge_structs++);
|
||||
}
|
||||
|
||||
/* Deallocate p and its associated continuation structures. */
|
||||
static void deallocate_back_edges(back_edges *p)
|
||||
{
|
||||
back_edges *last = p;
|
||||
|
||||
while (0 != last -> cont) last = last -> cont;
|
||||
last -> cont = avail_back_edges;
|
||||
avail_back_edges = p;
|
||||
}
|
||||
|
||||
/* Table of objects that are currently on the depth-first search */
|
||||
/* stack. Only objects with in-degree one are in this table. */
|
||||
/* Other objects are identified using HEIGHT_IN_PROGRESS. */
|
||||
/* FIXME: This data structure NEEDS IMPROVEMENT. */
|
||||
#define INITIAL_IN_PROGRESS 10000
|
||||
static ptr_t * in_progress_space = 0;
|
||||
static size_t in_progress_size = 0;
|
||||
static size_t n_in_progress = 0;
|
||||
|
||||
static void push_in_progress(ptr_t p)
|
||||
{
|
||||
if (n_in_progress >= in_progress_size)
|
||||
if (in_progress_size == 0) {
|
||||
in_progress_size = INITIAL_IN_PROGRESS;
|
||||
in_progress_space = (ptr_t *)GET_MEM(in_progress_size * sizeof(ptr_t));
|
||||
} else {
|
||||
ptr_t * new_in_progress_space;
|
||||
in_progress_size *= 2;
|
||||
new_in_progress_space = (ptr_t *)
|
||||
GET_MEM(in_progress_size * sizeof(ptr_t));
|
||||
BCOPY(in_progress_space, new_in_progress_space,
|
||||
n_in_progress * sizeof(ptr_t));
|
||||
in_progress_space = new_in_progress_space;
|
||||
/* FIXME: This just drops the old space. */
|
||||
}
|
||||
if (in_progress_space == 0)
|
||||
ABORT("MAKE_BACK_GRAPH: Out of in-progress space: "
|
||||
"Huge linear data structure?");
|
||||
in_progress_space[n_in_progress++] = p;
|
||||
}
|
||||
|
||||
static GC_bool is_in_progress(ptr_t p)
|
||||
{
|
||||
int i;
|
||||
for (i = 0; i < n_in_progress; ++i) {
|
||||
if (in_progress_space[i] == p) return TRUE;
|
||||
}
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
static void pop_in_progress(ptr_t p)
|
||||
{
|
||||
--n_in_progress;
|
||||
GC_ASSERT(in_progress_space[n_in_progress] == p);
|
||||
}
|
||||
|
||||
#define GET_OH_BG_PTR(p) \
|
||||
(ptr_t)REVEAL_POINTER(((oh *)(p)) -> oh_bg_ptr)
|
||||
#define SET_OH_BG_PTR(p,q) (((oh *)(p)) -> oh_bg_ptr) = HIDE_POINTER(q)
|
||||
|
||||
/* Execute s once for each predecessor q of p in the points-to graph. */
|
||||
/* s should be a bracketed statement. We declare q. */
|
||||
#define FOR_EACH_PRED(q, p, s) \
|
||||
{ \
|
||||
ptr_t q = GET_OH_BG_PTR(p); \
|
||||
if (!((word)q & FLAG_MANY)) { \
|
||||
if (q && !((word)q & 1)) s \
|
||||
/* !((word)q & 1) checks for a misnterpreted freelist link */ \
|
||||
} else { \
|
||||
back_edges *orig_be_ = (back_edges *)((word)q & ~FLAG_MANY); \
|
||||
back_edges *be_ = orig_be_; \
|
||||
int total_, local_; \
|
||||
int n_edges_ = be_ -> n_edges; \
|
||||
for (total_ = 0, local_ = 0; total_ < n_edges_; ++local_, ++total_) { \
|
||||
if (local_ == MAX_IN) { \
|
||||
be_ = be_ -> cont; \
|
||||
local_ = 0; \
|
||||
} \
|
||||
q = be_ -> edges[local_]; s \
|
||||
} \
|
||||
} \
|
||||
}
|
||||
|
||||
/* Ensure that p has a back_edges structure associated with it. */
|
||||
static void ensure_struct(ptr_t p)
|
||||
{
|
||||
ptr_t old_back_ptr = GET_OH_BG_PTR(p);
|
||||
|
||||
if (!((word)old_back_ptr & FLAG_MANY)) {
|
||||
back_edges *be = new_back_edges();
|
||||
be -> flags = 0;
|
||||
if (0 == old_back_ptr) {
|
||||
be -> n_edges = 0;
|
||||
} else {
|
||||
be -> n_edges = 1;
|
||||
be -> edges[0] = old_back_ptr;
|
||||
}
|
||||
be -> height = HEIGHT_UNKNOWN;
|
||||
be -> height_gc_no = GC_gc_no - 1;
|
||||
GC_ASSERT(be >= back_edge_space);
|
||||
SET_OH_BG_PTR(p, (word)be | FLAG_MANY);
|
||||
}
|
||||
}
|
||||
|
||||
/* Add the (forward) edge from p to q to the backward graph. Both p */
|
||||
/* q are pointers to the object base, i.e. pointers to an oh. */
|
||||
static void add_edge(ptr_t p, ptr_t q)
|
||||
{
|
||||
ptr_t old_back_ptr = GET_OH_BG_PTR(q);
|
||||
back_edges * be, *be_cont;
|
||||
word i;
|
||||
static unsigned random_number = 13;
|
||||
# define GOT_LUCKY_NUMBER (((++random_number) & 0x7f) == 0)
|
||||
/* A not very random number we use to occasionally allocate a */
|
||||
/* back_edges structure even for a single backward edge. This */
|
||||
/* prevents us from repeatedly tracing back through very long */
|
||||
/* chains, since we will have some place to store height and */
|
||||
/* in_progress flags along the way. */
|
||||
|
||||
GC_ASSERT(p == GC_base(p) && q == GC_base(q));
|
||||
if (!GC_HAS_DEBUG_INFO(q) || !GC_HAS_DEBUG_INFO(p)) {
|
||||
/* This is really a misinterpreted free list link, since we saw */
|
||||
/* a pointer to a free list. Dont overwrite it! */
|
||||
return;
|
||||
}
|
||||
if (0 == old_back_ptr) {
|
||||
SET_OH_BG_PTR(q, p);
|
||||
if (GOT_LUCKY_NUMBER) ensure_struct(q);
|
||||
return;
|
||||
}
|
||||
/* Check whether it was already in the list of predecessors. */
|
||||
FOR_EACH_PRED(pred, q, { if (p == pred) return; });
|
||||
ensure_struct(q);
|
||||
old_back_ptr = GET_OH_BG_PTR(q);
|
||||
be = (back_edges *)((word)old_back_ptr & ~FLAG_MANY);
|
||||
for (i = be -> n_edges, be_cont = be; i > MAX_IN;
|
||||
be_cont = be_cont -> cont, i -= MAX_IN) {}
|
||||
if (i == MAX_IN) {
|
||||
be_cont -> cont = new_back_edges();
|
||||
be_cont = be_cont -> cont;
|
||||
i = 0;
|
||||
}
|
||||
be_cont -> edges[i] = p;
|
||||
be -> n_edges++;
|
||||
if (be -> n_edges == 100) {
|
||||
# if 0
|
||||
if (GC_print_stats) {
|
||||
GC_err_printf("The following object has in-degree >= 100:\n");
|
||||
GC_print_heap_obj(q);
|
||||
}
|
||||
# endif
|
||||
}
|
||||
}
|
||||
|
||||
typedef void (*per_object_func)(ptr_t p, size_t n_bytes, word gc_descr);
|
||||
|
||||
static void per_object_helper(struct hblk *h, word fn)
|
||||
{
|
||||
hdr * hhdr = HDR(h);
|
||||
size_t sz = hhdr -> hb_sz;
|
||||
word descr = hhdr -> hb_descr;
|
||||
per_object_func f = (per_object_func)fn;
|
||||
int i = 0;
|
||||
|
||||
do {
|
||||
f((ptr_t)(h -> hb_body + i), sz, descr);
|
||||
i += sz;
|
||||
} while (i + sz <= BYTES_TO_WORDS(HBLKSIZE));
|
||||
}
|
||||
|
||||
void GC_apply_to_each_object(per_object_func f)
|
||||
{
|
||||
GC_apply_to_all_blocks(per_object_helper, (word)f);
|
||||
}
|
||||
|
||||
static void reset_back_edge(ptr_t p, size_t n_bytes, word gc_descr)
|
||||
{
|
||||
/* Skip any free list links, or dropped blocks */
|
||||
if (GC_HAS_DEBUG_INFO(p)) {
|
||||
ptr_t old_back_ptr = GET_OH_BG_PTR(p);
|
||||
if ((word)old_back_ptr & FLAG_MANY) {
|
||||
back_edges *be = (back_edges *)((word)old_back_ptr & ~FLAG_MANY);
|
||||
if (!(be -> flags & RETAIN)) {
|
||||
deallocate_back_edges(be);
|
||||
SET_OH_BG_PTR(p, 0);
|
||||
} else {
|
||||
word *currentp;
|
||||
|
||||
GC_ASSERT(GC_is_marked(p));
|
||||
|
||||
/* Back edges may point to objects that will not be retained. */
|
||||
/* Delete them for now, but remember the height. */
|
||||
/* Some will be added back at next GC. */
|
||||
be -> n_edges = 0;
|
||||
if (0 != be -> cont) {
|
||||
deallocate_back_edges(be -> cont);
|
||||
be -> cont = 0;
|
||||
}
|
||||
|
||||
GC_ASSERT(GC_is_marked(p));
|
||||
|
||||
/* We only retain things for one GC cycle at a time. */
|
||||
be -> flags &= ~RETAIN;
|
||||
}
|
||||
} else /* Simple back pointer */ {
|
||||
/* Clear to avoid dangling pointer. */
|
||||
SET_OH_BG_PTR(p, 0);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
static void add_back_edges(ptr_t p, size_t n_bytes, word gc_descr)
|
||||
{
|
||||
word *currentp = (word *)(p + sizeof(oh));
|
||||
|
||||
/* For now, fix up non-length descriptors conservatively. */
|
||||
if((gc_descr & GC_DS_TAGS) != GC_DS_LENGTH) {
|
||||
gc_descr = n_bytes;
|
||||
}
|
||||
while (currentp < (word *)(p + gc_descr)) {
|
||||
word current = *currentp++;
|
||||
FIXUP_POINTER(current);
|
||||
if (current >= (word)GC_least_plausible_heap_addr &&
|
||||
current <= (word)GC_greatest_plausible_heap_addr) {
|
||||
ptr_t target = GC_base((void *)current);
|
||||
if (0 != target) {
|
||||
add_edge(p, target);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/* Rebuild the representation of the backward reachability graph. */
|
||||
/* Does not examine mark bits. Can be called before GC. */
|
||||
void GC_build_back_graph(void)
|
||||
{
|
||||
GC_apply_to_each_object(add_back_edges);
|
||||
}
|
||||
|
||||
/* Return an approximation to the length of the longest simple path */
|
||||
/* through unreachable objects to p. We refer to this as the height */
|
||||
/* of p. */
|
||||
static word backwards_height(ptr_t p)
|
||||
{
|
||||
word result;
|
||||
ptr_t back_ptr = GET_OH_BG_PTR(p);
|
||||
back_edges *be;
|
||||
|
||||
if (0 == back_ptr) return 1;
|
||||
if (!((word)back_ptr & FLAG_MANY)) {
|
||||
if (is_in_progress(p)) return 0; /* DFS back edge, i.e. we followed */
|
||||
/* an edge to an object already */
|
||||
/* on our stack: ignore */
|
||||
push_in_progress(p);
|
||||
result = backwards_height(back_ptr)+1;
|
||||
pop_in_progress(p);
|
||||
return result;
|
||||
}
|
||||
be = (back_edges *)((word)back_ptr & ~FLAG_MANY);
|
||||
if (be -> height >= 0 && be -> height_gc_no == GC_gc_no)
|
||||
return be -> height;
|
||||
/* Ignore back edges in DFS */
|
||||
if (be -> height == HEIGHT_IN_PROGRESS) return 0;
|
||||
result = (be -> height > 0? be -> height : 1);
|
||||
be -> height = HEIGHT_IN_PROGRESS;
|
||||
FOR_EACH_PRED(q, p, {
|
||||
word this_height;
|
||||
if (GC_is_marked(q) && !(FLAG_MANY & (word)GET_OH_BG_PTR(p))) {
|
||||
if (GC_print_stats)
|
||||
GC_log_printf("Found bogus pointer from 0x%lx to 0x%lx\n", q, p);
|
||||
/* Reachable object "points to" unreachable one. */
|
||||
/* Could be caused by our lax treatment of GC descriptors. */
|
||||
this_height = 1;
|
||||
} else {
|
||||
this_height = backwards_height(q);
|
||||
}
|
||||
if (this_height >= result) result = this_height + 1;
|
||||
});
|
||||
be -> height = result;
|
||||
be -> height_gc_no = GC_gc_no;
|
||||
return result;
|
||||
}
|
||||
|
||||
word GC_max_height;
|
||||
ptr_t GC_deepest_obj;
|
||||
|
||||
/* Compute the maximum height of every unreachable predecessor p of a */
|
||||
/* reachable object. Arrange to save the heights of all such objects p */
|
||||
/* so that they can be used in calculating the height of objects in the */
|
||||
/* next GC. */
|
||||
/* Set GC_max_height to be the maximum height we encounter, and */
|
||||
/* GC_deepest_obj to be the corresponding object. */
|
||||
static void update_max_height(ptr_t p, size_t n_bytes, word gc_descr)
|
||||
{
|
||||
if (GC_is_marked(p) && GC_HAS_DEBUG_INFO(p)) {
|
||||
int i;
|
||||
word p_height = 0;
|
||||
ptr_t p_deepest_obj = 0;
|
||||
ptr_t back_ptr;
|
||||
back_edges *be = 0;
|
||||
|
||||
/* If we remembered a height last time, use it as a minimum. */
|
||||
/* It may have increased due to newly unreachable chains pointing */
|
||||
/* to p, but it can't have decreased. */
|
||||
back_ptr = GET_OH_BG_PTR(p);
|
||||
if (0 != back_ptr && ((word)back_ptr & FLAG_MANY)) {
|
||||
be = (back_edges *)((word)back_ptr & ~FLAG_MANY);
|
||||
if (be -> height != HEIGHT_UNKNOWN) p_height = be -> height;
|
||||
}
|
||||
FOR_EACH_PRED(q, p, {
|
||||
if (!GC_is_marked(q) && GC_HAS_DEBUG_INFO(q)) {
|
||||
word q_height;
|
||||
|
||||
q_height = backwards_height(q);
|
||||
if (q_height > p_height) {
|
||||
p_height = q_height;
|
||||
p_deepest_obj = q;
|
||||
}
|
||||
}
|
||||
});
|
||||
if (p_height > 0) {
|
||||
/* Remember the height for next time. */
|
||||
if (be == 0) {
|
||||
ensure_struct(p);
|
||||
back_ptr = GET_OH_BG_PTR(p);
|
||||
be = (back_edges *)((word)back_ptr & ~FLAG_MANY);
|
||||
}
|
||||
be -> flags |= RETAIN;
|
||||
be -> height = p_height;
|
||||
be -> height_gc_no = GC_gc_no;
|
||||
}
|
||||
if (p_height > GC_max_height) {
|
||||
GC_max_height = p_height;
|
||||
GC_deepest_obj = p_deepest_obj;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
word GC_max_max_height = 0;
|
||||
|
||||
void GC_traverse_back_graph(void)
|
||||
{
|
||||
GC_max_height = 0;
|
||||
GC_apply_to_each_object(update_max_height);
|
||||
if (0 != GC_deepest_obj)
|
||||
GC_set_mark_bit(GC_deepest_obj); /* Keep it until we can print it. */
|
||||
}
|
||||
|
||||
void GC_print_back_graph_stats(void)
|
||||
{
|
||||
GC_printf("Maximum backwards height of reachable objects at GC %lu is %ld\n",
|
||||
(unsigned long) GC_gc_no, (unsigned long)GC_max_height);
|
||||
if (GC_max_height > GC_max_max_height) {
|
||||
GC_max_max_height = GC_max_height;
|
||||
GC_printf("The following unreachable object is last in a longest chain "
|
||||
"of unreachable objects:\n");
|
||||
GC_print_heap_obj(GC_deepest_obj);
|
||||
}
|
||||
if (GC_print_stats) {
|
||||
GC_log_printf("Needed max total of %ld back-edge structs\n",
|
||||
GC_n_back_edge_structs);
|
||||
}
|
||||
GC_apply_to_each_object(reset_back_edge);
|
||||
GC_deepest_obj = 0;
|
||||
}
|
||||
|
||||
#endif /* MAKE_BACK_GRAPH */
|
10
jam-files/engine/boehm_gc/bdw-gc.pc
Normal file
10
jam-files/engine/boehm_gc/bdw-gc.pc
Normal file
@ -0,0 +1,10 @@
|
||||
prefix=/usr/local
|
||||
exec_prefix=${prefix}
|
||||
libdir=${exec_prefix}/lib
|
||||
includedir=${prefix}/include
|
||||
|
||||
Name: Boehm-Demers-Weiser Conservative Garbage Collector
|
||||
Description: A garbage collector for C and C++
|
||||
Version: 7.0
|
||||
Libs: -L${libdir} -lgc
|
||||
Cflags: -I${includedir}
|
10
jam-files/engine/boehm_gc/bdw-gc.pc.in
Normal file
10
jam-files/engine/boehm_gc/bdw-gc.pc.in
Normal file
@ -0,0 +1,10 @@
|
||||
prefix=@prefix@
|
||||
exec_prefix=@exec_prefix@
|
||||
libdir=@libdir@
|
||||
includedir=@includedir@
|
||||
|
||||
Name: Boehm-Demers-Weiser Conservative Garbage Collector
|
||||
Description: A garbage collector for C and C++
|
||||
Version: @PACKAGE_VERSION@
|
||||
Libs: -L${libdir} -lgc
|
||||
Cflags: -I${includedir}
|
285
jam-files/engine/boehm_gc/blacklst.c
Normal file
285
jam-files/engine/boehm_gc/blacklst.c
Normal file
@ -0,0 +1,285 @@
|
||||
/*
|
||||
* Copyright 1988, 1989 Hans-J. Boehm, Alan J. Demers
|
||||
* Copyright (c) 1991-1994 by Xerox Corporation. All rights reserved.
|
||||
*
|
||||
* THIS MATERIAL IS PROVIDED AS IS, WITH ABSOLUTELY NO WARRANTY EXPRESSED
|
||||
* OR IMPLIED. ANY USE IS AT YOUR OWN RISK.
|
||||
*
|
||||
* Permission is hereby granted to use or copy this program
|
||||
* for any purpose, provided the above notices are retained on all copies.
|
||||
* Permission to modify the code and to distribute modified code is granted,
|
||||
* provided the above notices are retained, and a notice that the code was
|
||||
* modified is included with the above copyright notice.
|
||||
*/
|
||||
/* Boehm, August 9, 1995 6:09 pm PDT */
|
||||
# include "private/gc_priv.h"
|
||||
|
||||
/*
|
||||
* We maintain several hash tables of hblks that have had false hits.
|
||||
* Each contains one bit per hash bucket; If any page in the bucket
|
||||
* has had a false hit, we assume that all of them have.
|
||||
* See the definition of page_hash_table in gc_private.h.
|
||||
* False hits from the stack(s) are much more dangerous than false hits
|
||||
* from elsewhere, since the former can pin a large object that spans the
|
||||
* block, eventhough it does not start on the dangerous block.
|
||||
*/
|
||||
|
||||
/*
|
||||
* Externally callable routines are:
|
||||
|
||||
* GC_add_to_black_list_normal
|
||||
* GC_add_to_black_list_stack
|
||||
* GC_promote_black_lists
|
||||
* GC_is_black_listed
|
||||
*
|
||||
* All require that the allocator lock is held.
|
||||
*/
|
||||
|
||||
/* Pointers to individual tables. We replace one table by another by */
|
||||
/* switching these pointers. */
|
||||
word * GC_old_normal_bl;
|
||||
/* Nonstack false references seen at last full */
|
||||
/* collection. */
|
||||
word * GC_incomplete_normal_bl;
|
||||
/* Nonstack false references seen since last */
|
||||
/* full collection. */
|
||||
word * GC_old_stack_bl;
|
||||
word * GC_incomplete_stack_bl;
|
||||
|
||||
word GC_total_stack_black_listed;
|
||||
|
||||
word GC_black_list_spacing = MINHINCR*HBLKSIZE; /* Initial rough guess */
|
||||
|
||||
void GC_clear_bl(word *);
|
||||
|
||||
void GC_default_print_heap_obj_proc(ptr_t p)
|
||||
{
|
||||
ptr_t base = GC_base(p);
|
||||
|
||||
GC_err_printf("start: %p, appr. length: %ld", base,
|
||||
(unsigned long)GC_size(base));
|
||||
}
|
||||
|
||||
void (*GC_print_heap_obj) (ptr_t p) = GC_default_print_heap_obj_proc;
|
||||
|
||||
void GC_print_source_ptr(ptr_t p)
|
||||
{
|
||||
ptr_t base = GC_base(p);
|
||||
if (0 == base) {
|
||||
if (0 == p) {
|
||||
GC_err_printf("in register");
|
||||
} else {
|
||||
GC_err_printf("in root set");
|
||||
}
|
||||
} else {
|
||||
GC_err_printf("in object at ");
|
||||
(*GC_print_heap_obj)(base);
|
||||
}
|
||||
}
|
||||
|
||||
void GC_bl_init(void)
|
||||
{
|
||||
if (!GC_all_interior_pointers) {
|
||||
GC_old_normal_bl = (word *)
|
||||
GC_scratch_alloc((word)(sizeof (page_hash_table)));
|
||||
GC_incomplete_normal_bl = (word *)GC_scratch_alloc
|
||||
((word)(sizeof(page_hash_table)));
|
||||
if (GC_old_normal_bl == 0 || GC_incomplete_normal_bl == 0) {
|
||||
GC_err_printf("Insufficient memory for black list\n");
|
||||
EXIT();
|
||||
}
|
||||
GC_clear_bl(GC_old_normal_bl);
|
||||
GC_clear_bl(GC_incomplete_normal_bl);
|
||||
}
|
||||
GC_old_stack_bl = (word *)GC_scratch_alloc((word)(sizeof(page_hash_table)));
|
||||
GC_incomplete_stack_bl = (word *)GC_scratch_alloc
|
||||
((word)(sizeof(page_hash_table)));
|
||||
if (GC_old_stack_bl == 0 || GC_incomplete_stack_bl == 0) {
|
||||
GC_err_printf("Insufficient memory for black list\n");
|
||||
EXIT();
|
||||
}
|
||||
GC_clear_bl(GC_old_stack_bl);
|
||||
GC_clear_bl(GC_incomplete_stack_bl);
|
||||
}
|
||||
|
||||
void GC_clear_bl(word *doomed)
|
||||
{
|
||||
BZERO(doomed, sizeof(page_hash_table));
|
||||
}
|
||||
|
||||
void GC_copy_bl(word *old, word *new)
|
||||
{
|
||||
BCOPY(old, new, sizeof(page_hash_table));
|
||||
}
|
||||
|
||||
static word total_stack_black_listed(void);
|
||||
|
||||
/* Signal the completion of a collection. Turn the incomplete black */
|
||||
/* lists into new black lists, etc. */
|
||||
void GC_promote_black_lists(void)
|
||||
{
|
||||
word * very_old_normal_bl = GC_old_normal_bl;
|
||||
word * very_old_stack_bl = GC_old_stack_bl;
|
||||
|
||||
GC_old_normal_bl = GC_incomplete_normal_bl;
|
||||
GC_old_stack_bl = GC_incomplete_stack_bl;
|
||||
if (!GC_all_interior_pointers) {
|
||||
GC_clear_bl(very_old_normal_bl);
|
||||
}
|
||||
GC_clear_bl(very_old_stack_bl);
|
||||
GC_incomplete_normal_bl = very_old_normal_bl;
|
||||
GC_incomplete_stack_bl = very_old_stack_bl;
|
||||
GC_total_stack_black_listed = total_stack_black_listed();
|
||||
if (GC_print_stats == VERBOSE)
|
||||
GC_log_printf("%ld bytes in heap blacklisted for interior pointers\n",
|
||||
(unsigned long)GC_total_stack_black_listed);
|
||||
if (GC_total_stack_black_listed != 0) {
|
||||
GC_black_list_spacing =
|
||||
HBLKSIZE*(GC_heapsize/GC_total_stack_black_listed);
|
||||
}
|
||||
if (GC_black_list_spacing < 3 * HBLKSIZE) {
|
||||
GC_black_list_spacing = 3 * HBLKSIZE;
|
||||
}
|
||||
if (GC_black_list_spacing > MAXHINCR * HBLKSIZE) {
|
||||
GC_black_list_spacing = MAXHINCR * HBLKSIZE;
|
||||
/* Makes it easier to allocate really huge blocks, which otherwise */
|
||||
/* may have problems with nonuniform blacklist distributions. */
|
||||
/* This way we should always succeed immediately after growing the */
|
||||
/* heap. */
|
||||
}
|
||||
}
|
||||
|
||||
void GC_unpromote_black_lists(void)
|
||||
{
|
||||
if (!GC_all_interior_pointers) {
|
||||
GC_copy_bl(GC_old_normal_bl, GC_incomplete_normal_bl);
|
||||
}
|
||||
GC_copy_bl(GC_old_stack_bl, GC_incomplete_stack_bl);
|
||||
}
|
||||
|
||||
/* P is not a valid pointer reference, but it falls inside */
|
||||
/* the plausible heap bounds. */
|
||||
/* Add it to the normal incomplete black list if appropriate. */
|
||||
#ifdef PRINT_BLACK_LIST
|
||||
void GC_add_to_black_list_normal(word p, ptr_t source)
|
||||
#else
|
||||
void GC_add_to_black_list_normal(word p)
|
||||
#endif
|
||||
{
|
||||
if (!(GC_modws_valid_offsets[p & (sizeof(word)-1)])) return;
|
||||
{
|
||||
word index = PHT_HASH((word)p);
|
||||
|
||||
if (HDR(p) == 0 || get_pht_entry_from_index(GC_old_normal_bl, index)) {
|
||||
# ifdef PRINT_BLACK_LIST
|
||||
if (!get_pht_entry_from_index(GC_incomplete_normal_bl, index)) {
|
||||
GC_err_printf(
|
||||
"Black listing (normal) %p referenced from %p ",
|
||||
(ptr_t) p, source);
|
||||
GC_print_source_ptr(source);
|
||||
GC_err_puts("\n");
|
||||
}
|
||||
# endif
|
||||
set_pht_entry_from_index(GC_incomplete_normal_bl, index);
|
||||
} /* else this is probably just an interior pointer to an allocated */
|
||||
/* object, and isn't worth black listing. */
|
||||
}
|
||||
}
|
||||
|
||||
/* And the same for false pointers from the stack. */
|
||||
#ifdef PRINT_BLACK_LIST
|
||||
void GC_add_to_black_list_stack(word p, ptr_t source)
|
||||
ptr_t source;
|
||||
#else
|
||||
void GC_add_to_black_list_stack(word p)
|
||||
#endif
|
||||
{
|
||||
word index = PHT_HASH((word)p);
|
||||
|
||||
if (HDR(p) == 0 || get_pht_entry_from_index(GC_old_stack_bl, index)) {
|
||||
# ifdef PRINT_BLACK_LIST
|
||||
if (!get_pht_entry_from_index(GC_incomplete_stack_bl, index)) {
|
||||
GC_err_printf(
|
||||
"Black listing (stack) %p referenced from %p ",
|
||||
(ptr_t)p, source);
|
||||
GC_print_source_ptr(source);
|
||||
GC_err_puts("\n");
|
||||
}
|
||||
# endif
|
||||
set_pht_entry_from_index(GC_incomplete_stack_bl, index);
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
* Is the block starting at h of size len bytes black listed? If so,
|
||||
* return the address of the next plausible r such that (r, len) might not
|
||||
* be black listed. (R may not actually be in the heap. We guarantee only
|
||||
* that every smaller value of r after h is also black listed.)
|
||||
* If (h,len) is not black listed, return 0.
|
||||
* Knows about the structure of the black list hash tables.
|
||||
*/
|
||||
struct hblk * GC_is_black_listed(struct hblk *h, word len)
|
||||
{
|
||||
word index = PHT_HASH((word)h);
|
||||
word i;
|
||||
word nblocks = divHBLKSZ(len);
|
||||
|
||||
if (!GC_all_interior_pointers) {
|
||||
if (get_pht_entry_from_index(GC_old_normal_bl, index)
|
||||
|| get_pht_entry_from_index(GC_incomplete_normal_bl, index)) {
|
||||
return(h+1);
|
||||
}
|
||||
}
|
||||
|
||||
for (i = 0; ; ) {
|
||||
if (GC_old_stack_bl[divWORDSZ(index)] == 0
|
||||
&& GC_incomplete_stack_bl[divWORDSZ(index)] == 0) {
|
||||
/* An easy case */
|
||||
i += WORDSZ - modWORDSZ(index);
|
||||
} else {
|
||||
if (get_pht_entry_from_index(GC_old_stack_bl, index)
|
||||
|| get_pht_entry_from_index(GC_incomplete_stack_bl, index)) {
|
||||
return(h+i+1);
|
||||
}
|
||||
i++;
|
||||
}
|
||||
if (i >= nblocks) break;
|
||||
index = PHT_HASH((word)(h+i));
|
||||
}
|
||||
return(0);
|
||||
}
|
||||
|
||||
|
||||
/* Return the number of blacklisted blocks in a given range. */
|
||||
/* Used only for statistical purposes. */
|
||||
/* Looks only at the GC_incomplete_stack_bl. */
|
||||
word GC_number_stack_black_listed(struct hblk *start, struct hblk *endp1)
|
||||
{
|
||||
register struct hblk * h;
|
||||
word result = 0;
|
||||
|
||||
for (h = start; h < endp1; h++) {
|
||||
word index = PHT_HASH((word)h);
|
||||
|
||||
if (get_pht_entry_from_index(GC_old_stack_bl, index)) result++;
|
||||
}
|
||||
return(result);
|
||||
}
|
||||
|
||||
|
||||
/* Return the total number of (stack) black-listed bytes. */
|
||||
static word total_stack_black_listed(void)
|
||||
{
|
||||
register unsigned i;
|
||||
word total = 0;
|
||||
|
||||
for (i = 0; i < GC_n_heap_sects; i++) {
|
||||
struct hblk * start = (struct hblk *) GC_heap_sects[i].hs_start;
|
||||
size_t len = (word) GC_heap_sects[i].hs_bytes;
|
||||
struct hblk * endp1 = start + len/HBLKSIZE;
|
||||
|
||||
total += GC_number_stack_black_listed(start, endp1);
|
||||
}
|
||||
return(total * HBLKSIZE);
|
||||
}
|
||||
|
4
jam-files/engine/boehm_gc/callprocs
Executable file
4
jam-files/engine/boehm_gc/callprocs
Executable file
@ -0,0 +1,4 @@
|
||||
#!/bin/sh
|
||||
GC_DEBUG=1
|
||||
export GC_DEBUG
|
||||
$* 2>&1 | awk '{print "0x3e=c\""$0"\""};/^\t##PC##=/ {if ($2 != 0) {print $2"?i"}}' | adb $1 | sed "s/^ >/>/"
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue
Block a user