AssociativeCacheExample.cm
Created by: Serlet, April 12, 1985 3:17:45 pm PST
Bertrand Serlet July 28, 1985 10:41:24 pm PDT
-- Starting Dragoman
///commands/compile Foo.mesa
Dragoman
Run AssociativeCacheImpl
-- Initializing the thing
← &handle ← Dragoman.Start[backingFile: "Dragoman.ts", instr: 2, data: 1] -- number of caches
-- Specifying the caches
← Dragoman.SetInstructionCache[handle: &handle, number: 0, cache: AssociativeCache.NewCache[lines: 50, quadsPerLine: 2]] -- first instruction cache
← Dragoman.SetInstructionCache[handle: &handle, number: 1, cache: AssociativeCache.NewCache[lines: 50, quadsPerLine: 2]] -- second instruction cache
← Dragoman.SetDataCache[handle: &handle, number: 0, cache: AssociativeCache.NewCache[lines: 50, quadsPerLine: 2]] -- the only data cache
-- Marking interesting GFI's
← Dragoman.MarkGFIs[&handle, LIST ["CompilerClientCommandImpl", "CompilerServerCommandImpl", "CompilerSequencer", "Pass3", "Pass1", "Pass3S", "Pass3B", "Code", "Pass2", "ObjectOut", "Driver", "SymbolPackExt", "FSStreamImpl", "FileStreamCreateImpl", "IOCommonImpl", "FileStreamImpl", "FSMainImpl1", "FileParmPack", "FSOpenFileImpl", "FSFileOpsImpl", "FSDirImpl", "FileImpl", "BTreeDelete", "IOPrintImpl", "BTreeWrite", "BTreeVMImpl", "FilePagesImpl", "DiskImpl", "UserProfileImpl", "RopeImpl", "BTreeRead", "IOClassesImpl"]]
-- Running the simulation
← Dragoman.Run[&handle, "///commands/compile Foo.mesa"]