コード例 #1
0
ファイル: ChunkPool.cpp プロジェクト: kavon/SALSA
ChunkPool::ChunkPool(int o, int initialSize) :
	owner(o),
	chunkQueue(new MSQueue<SPChunk*>())
{
	AtomicStatistics* stat = new AtomicStatistics(); // no need to count the initialization operations
	for(int i = 0; i < initialSize; i++) {
		putChunk(new SPChunk(owner), stat);
	}
	delete stat;
}
コード例 #2
0
ファイル: putChunk.cpp プロジェクト: MP2E/GDCC
         //
         // Info::putChunkSTRL
         //
         void Info::putChunkSTRL()
         {
            if(!numChunkSTRL) return;

            Core::Array<Core::String> strs{numChunkSTRL};

            for(auto &s : strs) s = Core::STR_;

            for(auto const &itr : prog->rangeStrEnt()) if(itr.defin)
               strs[itr.valueInt] = itr.valueStr;

            putChunk(UseChunkSTRE ? "STRE" : "STRL", strs, true);
         }
コード例 #3
0
ファイル: putChunk.cpp プロジェクト: MP2E/GDCC
         //
         // Info::putChunkSNAM
         //
         void Info::putChunkSNAM()
         {
            if(!numChunkSNAM) return;

            Core::Array<Core::String> strs{numChunkSNAM};

            for(auto &s : strs) s = Core::STR_;

            for(auto const &itr : prog->rangeFunction())
            {
               if(itr.ctype != IR::CallType::ScriptS)
                  continue;

               strs[itr.valueInt] = itr.valueStr;
            }

            putChunk("SNAM", strs, false);
         }
コード例 #4
0
ファイル: putChunk.cpp プロジェクト: MP2E/GDCC
         //
         // Info::putChunkMEXP
         //
         void Info::putChunkMEXP()
         {
            if(!numChunkMEXP) return;

            Core::Array<Core::String> strs{numChunkMEXP};
            for(auto &s : strs) s = Core::STR_;

            for(auto const &itr : prog->rangeObject())
            {
               if(!itr.defin && itr.space.base == IR::AddrBase::MapReg)
                  strs[itr.value] = itr.glyph;
            }

            for(auto const &itr : prog->rangeSpaceMapArs())
               if(itr.defin) strs[itr.value] = itr.glyph;

            putChunk("MEXP", strs, false);
         }