public Module(uint version, GeneratorPool <Instruction> instPool = null, GeneratorPool <LiteralInteger> integerPool = null) { _version = version; _bound = 1; _capabilities = new List <Capability>(); _extensions = new List <string>(); _extInstImports = new Dictionary <DeterministicStringKey, Instruction>(); _addressingModel = AddressingModel.Logical; _memoryModel = MemoryModel.Simple; _entrypoints = new List <Instruction>(); _executionModes = new List <Instruction>(); _debug = new List <Instruction>(); _annotations = new List <Instruction>(); _typeDeclarations = new Dictionary <TypeDeclarationKey, Instruction>(); _constants = new Dictionary <ConstantKey, Instruction>(); _globals = new List <Instruction>(); _functionsDeclarations = new List <Instruction>(); _functionsDefinitions = new List <Instruction>(); _instPool = instPool ?? new GeneratorPool <Instruction>(); _integerPool = integerPool ?? new GeneratorPool <LiteralInteger>(); LiteralInteger.RegisterPool(_integerPool); }
internal static void UnregisterPool() { _pool = null; }
internal static void RegisterPool(GeneratorPool <LiteralInteger> pool) { _pool = pool; }