FOR logQuadsPerLine:
INT
IN [0..3]
DO
quadsPerLine: INT ← TwoToThe[logQuadsPerLine];
bc, mc: CacheModels.Cache;
handle: Dragoman.Handle ← Dragoman.Start[
backingFile: Rope.Cat[
Rope.Cat[prog, ".", cacheType, "."],
Rope.Cat[Convert.RopeFromInt[20*linesDiv20], "L."],
Rope.Cat[Convert.RopeFromInt[quadsPerLine], "QPL."],
Rope.Cat[Convert.RopeFromInt[wordsPerQuad], "WPQ.ts"]],
instr: 1,
data: 1];
bc ← AssociativeCache.NewCache[lines: 512, quadsPerLine: 8, wordsPerQuad: 8];
mc ← AssociativeCache.NewCache[lines: 50, quadsPerLine: 4, wordsPerQuad: 1];
Dragoman.SetInstructionCache[handle: handle, number: 0, cache: AssociativeCache.NewCache[lines: 20*linesDiv20, quadsPerLine: quadsPerLine, wordsPerQuad: wordsPerQuad, lru: FALSE, realCache: bc, mapCache: mc]];
Dragoman.SetDataCache[handle: handle, number: 0, cache: AssociativeCache.NewCache[lines: 20*linesDiv20, quadsPerLine: quadsPerLine, wordsPerQuad: wordsPerQuad, lru: FALSE, realCache: bc, mapCache: mc]];
MarkCompilerGFIs[handle];
Dragoman.Run[handle, "///commands/compile /indigo/Dragon/Dragoman/MediumProg.mesa /indigo/Dragon/Dragoman/MediumProgImpl.mesa"];
bc.print[bc, handle.tsOut, "Real cache"];
mc.print[mc, handle.tsOut, "Map cache"];
Dragoman.End[handle];
ENDLOOP;