当前位置: 首页>>代码示例>>C#>>正文


C# LocalBuilder.SetLocalSymInfo方法代码示例

本文整理汇总了C#中System.Reflection.Emit.LocalBuilder.SetLocalSymInfo方法的典型用法代码示例。如果您正苦于以下问题:C# LocalBuilder.SetLocalSymInfo方法的具体用法?C# LocalBuilder.SetLocalSymInfo怎么用?C# LocalBuilder.SetLocalSymInfo使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在System.Reflection.Emit.LocalBuilder的用法示例。


在下文中一共展示了LocalBuilder.SetLocalSymInfo方法的9个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。

示例1: PreBuild

 protected override void PreBuild()
 {
     var cg = CurrentContainer.GainGenerator();
     Builder = cg.CreateLocal(DataType);
     if (!string.IsNullOrWhiteSpace(Name))
     {
         Builder.SetLocalSymInfo(Name);
     }
 }
开发者ID:B-head,项目名称:Dreit-prototype,代码行数:9,代码来源:LocalStructure.cs

示例2: DeclareLocals

        /// <summary>
        /// Creates local variable declarations.
        /// </summary>
        /// <param name="il">The IL generator to use.</param>
        /// <param name="method">The method to proxy.</param>
        protected override void DeclareLocals(ILGenerator il, MethodInfo method)
        {
            base.DeclareLocals(il, method);
            target = il.DeclareLocal(typeof(object));

#if DEBUG
            target.SetLocalSymInfo("target");
#endif
        }
开发者ID:fgq841103,项目名称:spring-net,代码行数:14,代码来源:TargetAopProxyMethodBuilder.cs

示例3: SetLocalName

 internal override void SetLocalName(LocalBuilder localBuilder, string name) {
     localBuilder.SetLocalSymInfo(name);
 }
开发者ID:Profit0004,项目名称:mono,代码行数:3,代码来源:SymbolDocumentGenerator.cs

示例4: Declare

		internal void Declare(ILGenerator ilgen)
		{
			local = ilgen.DeclareLocal(type);
			if (name != null)
			{
				local.SetLocalSymInfo(name);
			}
		}
开发者ID:Semogj,项目名称:ikvm-fork,代码行数:8,代码来源:CodeEmitter.cs

示例5: DeclareLocals

        /// <summary>
        /// Creates local variable declarations.
        /// </summary>
        /// <param name="il">The IL generator to use.</param>
        /// <param name="method">The method to proxy.</param>
        protected virtual void DeclareLocals(ILGenerator il, MethodInfo method)
        {
            interceptors = il.DeclareLocal(typeof(IList));
            targetType = il.DeclareLocal(typeof(Type));
            arguments = il.DeclareLocal(typeof(Object[]));
            
#if NET_2_0
            if (method.IsGenericMethodDefinition)
            {
                genericTargetMethod = il.DeclareLocal(typeof(MethodInfo));
                genericOnProxyTargetMethod = il.DeclareLocal(typeof(MethodInfo));
            }
#endif
            if (methodReturnsValue)
            {
                returnValue = il.DeclareLocal(method.ReturnType);
            }

#if DEBUG
            interceptors.SetLocalSymInfo("interceptors");
            targetType.SetLocalSymInfo("targetType");
            arguments.SetLocalSymInfo("arguments");
#if NET_2_0
            if (method.IsGenericMethodDefinition)
            {
                genericTargetMethod.SetLocalSymInfo("genericTargetMethod");
                genericOnProxyTargetMethod.SetLocalSymInfo("genericOnProxyTargetMethod");
            }
#endif
            if (methodReturnsValue)
            {
                returnValue.SetLocalSymInfo("returnValue");
            }
#endif
        }
开发者ID:fuadm,项目名称:spring-net,代码行数:40,代码来源:AbstractAopProxyMethodBuilder.cs

示例6: MaybSetLocalName

 public void MaybSetLocalName(LocalBuilder lb, string name)
 {
     if (_isDebuggable)
         lb.SetLocalSymInfo(name);
 }
开发者ID:clojure,项目名称:clojure-clr,代码行数:5,代码来源:GenContext.cs

示例7: DeclareLocals

        /// <summary>
        /// Creates local variable declarations.
        /// </summary>
        /// <param name="il">The IL generator to use.</param>
        /// <param name="method">The method to proxy.</param>
        protected override void DeclareLocals(ILGenerator il, MethodInfo method)
        {
            base.DeclareLocals(il, method);
            targetSource = il.DeclareLocal(typeof(ITargetSourceWrapper));

#if DEBUG
            targetSource.SetLocalSymInfo("targetSource");
#endif
        }
开发者ID:hazzik,项目名称:nh-contrib-everything,代码行数:14,代码来源:TargetAopProxyMethodBuilder.cs

示例8: Declare

 public virtual void Declare(ILGenerator il)
 {
     if (_local != null) {
         throw new InvalidOperationException("Variable " + Name + " is already declared!");
     }
     _local = il.DeclareLocal(this.Type);
     _local.SetLocalSymInfo(Name);
 }
开发者ID:einaregilsson,项目名称:Process-Language-Runtime,代码行数:8,代码来源:Variable.cs

示例9: EmitInitHeapEnv

            private void EmitInitHeapEnv()
            {
                if (!HasHeapEnv()) return;

                mHeapEnvBuilder = mILGenerator.DeclareLocal(mHeapEnvTypeBuilder);
                if (JITInterpreter_DS.Instance().HasSymbolInfo()) {
                    mHeapEnvBuilder.SetLocalSymInfo(HEAP_ENV_LOCAL_NAME);
                }

                var constructor = mHeapEnvTypeBuilder.DefineDefaultConstructor(MethodAttributes.Public);
                mILGenerator.Emit(OpCodes.Newobj, constructor);
                EmitStoreLocal(mILGenerator, mHeapEnvBuilder);

                if (mLambdaNode.childrenFreeAddresses.Where(v => v.envIndex > 0).GetEnumerator().MoveNext()) {
                    var fieldBuilder = mHeapEnvTypeBuilder.DefineField(PREV_ENV_FIELD_NAME, mEnvTypeBuilder, FieldAttributes.Public);
                    mHeapEnvFieldBuilders[PREV_ENV_FIELD_NAME] = fieldBuilder;
                    JITInterpreter_DS.EmitLoadLocal(mILGenerator, mHeapEnvBuilder);
                    JITInterpreter_DS.EmitLoadThis(mILGenerator);
                    mILGenerator.Emit(OpCodes.Stfld, fieldBuilder);
                }

                var heapLocals = mLambdaNode.childrenFreeAddresses.Where(a=>a.envIndex == 0).Select(a=>a.index).OrderBy(a=>a).ToList();
                foreach (var index in heapLocals) {
                    var fieldBuilder = mHeapEnvTypeBuilder.DefineField(mLambdaNode.locals[index], typeof(object), FieldAttributes.Public);
                    mHeapEnvFieldBuilders[mLambdaNode.locals[index]] = fieldBuilder;

                    if (index < mLambdaNode.formalCount) {
                        JITInterpreter_DS.EmitLoadLocal(mILGenerator, mHeapEnvBuilder);
                        JITInterpreter_DS.EmitLoadArg(mILGenerator, HasThisArgument(), mArgBuilders[index]);
                        mILGenerator.Emit(OpCodes.Stfld, fieldBuilder);
                    }
                }
            }
开发者ID:GHScan,项目名称:DailyProjects,代码行数:33,代码来源:JITInterpreter_DS.cs


注:本文中的System.Reflection.Emit.LocalBuilder.SetLocalSymInfo方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。