At this level there are two kinds of local variables: Locals - have identities by which consuming code refers to them. Typical use is a local variable or a compiler generated temp that can be accessed in multiple operations. Any object can be used as identity. Reference equality is used. Temps - do not have identity. They are borrowed and returned to the free list. Typical use is a scratch temporary or spilling storage.
Exemple #1
0
        internal ILBuilder(ITokenDeferral module, LocalSlotManager localSlotManager, OptimizationLevel optimizations)
        {
            Debug.Assert(BitConverter.IsLittleEndian);

            this.module           = module;
            this.LocalSlotManager = localSlotManager;
            _emitState            = default(EmitState);
            _scopeManager         = new LocalScopeManager();

            leaderBlock = _currentBlock = _scopeManager.CreateBlock(this);

            _labelInfos    = new SmallDictionary <object, LabelInfo>(ReferenceEqualityComparer.Instance);
            _optimizations = optimizations;
        }
Exemple #2
0
        internal ILBuilder(ITokenDeferral module, LocalSlotManager localSlotManager, bool isOptimizing)
        {
            Debug.Assert(BitConverter.IsLittleEndian);

            this.module           = module;
            this.LocalSlotManager = localSlotManager;
            this.emitState        = default(EmitState);
            this.scopeManager     = new LocalScopeManager();

            leaderBlock = currentBlock = this.scopeManager.CreateBlock(this);

            labelInfos        = new SmallDictionary <object, LabelInfo>(ReferenceEqualityComparer.Instance);
            this.isOptimizing = isOptimizing;
        }