public ILEmitterCtx( MemoryManager memory, TranslatorCache cache, TranslatorQueue queue, TranslationTier tier, Block graph) { Memory = memory ?? throw new ArgumentNullException(nameof(memory)); _cache = cache ?? throw new ArgumentNullException(nameof(cache)); _queue = queue ?? throw new ArgumentNullException(nameof(queue)); _currBlock = graph ?? throw new ArgumentNullException(nameof(graph)); Tier = tier; _labels = new Dictionary <long, ILLabel>(); _visitedBlocks = new Dictionary <Block, ILBlock>(); _visitedBlocks.Add(graph, new ILBlock()); _branchTargets = new Queue <Block>(); _ilBlocks = new List <ILBlock>(); _subPosition = graph.Position; ResetBlockState(); if (AdvanceOpCode()) { EmitSynchronization(); _ilBlock.Add(new ILOpCodeLoadState(_ilBlock, isSubEntry: true)); } }
public Translator(MemoryManager memory) { _memory = memory; _dummyThreadState = new CpuThreadState(); _dummyThreadState.Running = false; _cache = new TranslatorCache(); _queue = new TranslatorQueue(); }
public ILEmitterCtx( MemoryManager memory, TranslatorCache cache, TranslatorQueue queue, TranslationTier tier) { Memory = memory ?? throw new ArgumentNullException(nameof(memory)); _cache = cache ?? throw new ArgumentNullException(nameof(cache)); _queue = queue ?? throw new ArgumentNullException(nameof(queue)); Tier = tier; _labels = new Dictionary <long, ILLabel>(); _irLabels = new Dictionary <ILLabel, BasicBlock>(); _irBlocks = new List <BasicBlock>(); NewNextBlock(); EmitSynchronization(); EmitLoadContext(); }
public ILEmitterCtx(TranslatorCache cache, TranslatorQueue queue, TranslationTier tier, Block graph) { _cache = cache ?? throw new ArgumentNullException(nameof(cache)); _queue = queue ?? throw new ArgumentNullException(nameof(queue)); _currBlock = graph ?? throw new ArgumentNullException(nameof(graph)); Tier = tier; _labels = new Dictionary <long, ILLabel>(); _visitedBlocks = new Dictionary <Block, ILBlock>(); _visitedBlocks.Add(graph, new ILBlock()); _branchTargets = new Queue <Block>(); _ilBlocks = new List <ILBlock>(); _subPosition = graph.Position; ResetBlockState(); AdvanceOpCode(); }