Example #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;
        }
Example #2
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;
        }
Example #3
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;
        }
Example #4
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;
        }
Example #5
0
 public ILBuilderVisualizer(ITokenDeferral tokenDeferral)
 {
     this.tokenDeferral = tokenDeferral;
 }
Example #6
0
 public ILBuilderVisualizer(ITokenDeferral tokenDeferral)
 {
     _tokenDeferral = tokenDeferral;
 }
Example #7
0
        private ReflectionEmitter(
            EmitContext context,
            IEnumerable<KeyValuePair<Cci.IAssemblyReference, string>> referencedAssemblies,
            ModuleBuilder builder,
            AssemblyLoader assemblyLoader)
        {
            Debug.Assert(context.Module != null);
            Debug.Assert(referencedAssemblies != null);
            Debug.Assert(builder != null);
            Debug.Assert(assemblyLoader != null);

            _module = context.Module;
            _context = context;
            _builder = builder;
            _tokenResolver = (ITokenDeferral)context.Module;
            _assemblyLoader = assemblyLoader;
            _referencedAssemblies = LoadReferencedAssemblies(referencedAssemblies);
        }