當前位置: 首頁>>代碼示例>>C#>>正文


C# AddressOp類代碼示例

本文整理匯總了C#中AddressOp的典型用法代碼示例。如果您正苦於以下問題:C# AddressOp類的具體用法?C# AddressOp怎麽用?C# AddressOp使用的例子?那麽, 這裏精選的類代碼示例或許可以為您提供幫助。


AddressOp類屬於命名空間,在下文中一共展示了AddressOp類的13個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的C#代碼示例。

示例1: AddressOf

		public void AddressOf (EmitContext ec, AddressOp Mode)
		{
			expr.Emit (ec);
		}
開發者ID:calumjiao,項目名稱:Mono-Class-Libraries,代碼行數:4,代碼來源:expression.cs

示例2: AddressOf

		public void AddressOf (EmitContext ec, AddressOp mode)
		{
			unwrap.AddressOf (ec, mode);
		}
開發者ID:saga,項目名稱:mono,代碼行數:4,代碼來源:nullable.cs

示例3: AddressOf

		public void AddressOf (EmitContext ec, AddressOp mode)
		{
			VariableInfo vi = VariableInfo;

			ec.ig.Emit (OpCodes.Ldloca, vi.LocalBuilder);
		}
開發者ID:emtees,項目名稱:old-code,代碼行數:6,代碼來源:expression.cs

示例4: AddressOf

 public void AddressOf(EmitContext ec, AddressOp mode)
 {
     throw new NotImplementedException ();
 }
開發者ID:speier,項目名稱:shake,代碼行數:4,代碼來源:dynamic.cs

示例5: AddressOf

		public void AddressOf (EmitContext ec, AddressOp mode)
		{
			if (IsHoistedEmitRequired (ec)) {
				HoistedVariable.AddressOf (ec, mode);
				return;
			}

			Variable.EmitAddressOf (ec);
		}
開發者ID:lewurm,項目名稱:benchmarker,代碼行數:9,代碼來源:expression.cs

示例6: AddressOf

        public void AddressOf(EmitContext ec, AddressOp mode)
        {
            if ((mode & AddressOp.Store) != 0)
                spec.MemberDefinition.SetIsAssigned ();
            if ((mode & AddressOp.Load) != 0)
                spec.MemberDefinition.SetIsUsed ();

            //
            // Handle initonly fields specially: make a copy and then
            // get the address of the copy.
            //
            bool need_copy;
            if (spec.IsReadOnly){
                need_copy = true;
                if (ec.HasSet (EmitContext.Options.ConstructorScope)){
                    if (IsStatic){
                        if (ec.IsStatic)
                            need_copy = false;
                    } else
                        need_copy = false;
                }
            } else
                need_copy = false;

            if (need_copy){
                LocalBuilder local;
                Emit (ec);
                local = ec.DeclareLocal (type, false);
                ec.Emit (OpCodes.Stloc, local);
                ec.Emit (OpCodes.Ldloca, local);
                return;
            }

            if (IsStatic){
                ec.Emit (OpCodes.Ldsflda, spec);
            } else {
                if (!prepared)
                    EmitInstance (ec, false);
                ec.Emit (OpCodes.Ldflda, spec);
            }
        }
開發者ID:speier,項目名稱:shake,代碼行數:41,代碼來源:ecore.cs

示例7: AddressOf

		public void AddressOf (EmitContext ec, AddressOp mode)
		{
			ILGenerator ig = ec.ig;

			FieldBase f = TypeManager.GetField (FieldInfo);
			if (f != null){				
				if ((mode & AddressOp.Store) != 0)
					f.SetAssigned ();
				if ((mode & AddressOp.Load) != 0)
					f.SetMemberIsUsed ();
			}

			//
			// Handle initonly fields specially: make a copy and then
			// get the address of the copy.
			//
			bool need_copy;
			if (FieldInfo.IsInitOnly){
				need_copy = true;
				if (ec.HasSet (EmitContext.Options.ConstructorScope)){
					if (FieldInfo.IsStatic){
						if (ec.IsStatic)
							need_copy = false;
					} else
						need_copy = false;
				}
			} else
				need_copy = false;
			
			if (need_copy){
				LocalBuilder local;
				Emit (ec);
				local = ig.DeclareLocal (type);
				ig.Emit (OpCodes.Stloc, local);
				ig.Emit (OpCodes.Ldloca, local);
				return;
			}


			if (FieldInfo.IsStatic){
				ig.Emit (OpCodes.Ldsflda, GetConstructedFieldInfo ());
			} else {
				if (!prepared)
					EmitInstance (ec, false);
				ig.Emit (OpCodes.Ldflda, GetConstructedFieldInfo ());
			}
		}
開發者ID:calumjiao,項目名稱:Mono-Class-Libraries,代碼行數:47,代碼來源:ecore.cs

示例8: EmitAddressOf

		protected override IMemoryLocation EmitAddressOf (EmitContext ec, AddressOp Mode)
		{
			instance = base.EmitAddressOf (ec, Mode);

			if (!initializers.IsEmpty)
				initializers.Emit (ec);

			return instance;
		}
開發者ID:calumjiao,項目名稱:Mono-Class-Libraries,代碼行數:9,代碼來源:expression.cs

示例9: AddressOf

		public void AddressOf (EmitContext ec, AddressOp mode)
		{
			ILGenerator ig = ec.ig;

			FieldBase f = TypeManager.GetField (FieldInfo);
			if (f != null){
				if ((f.ModFlags & Modifiers.VOLATILE) != 0){
					Report.Warning (420, 1, loc, "`{0}': A volatile field references will not be treated as volatile", 
							f.GetSignatureForError ());
				}
					
				if ((mode & AddressOp.Store) != 0)
					f.SetAssigned ();
				if ((mode & AddressOp.Load) != 0)
					f.SetMemberIsUsed ();
			}

			//
			// Handle initonly fields specially: make a copy and then
			// get the address of the copy.
			//
			bool need_copy;
			if (FieldInfo.IsInitOnly){
				need_copy = true;
				if (ec.IsConstructor){
					if (FieldInfo.IsStatic){
						if (ec.IsStatic)
							need_copy = false;
					} else
						need_copy = false;
				}
			} else
				need_copy = false;
			
			if (need_copy){
				LocalBuilder local;
				Emit (ec);
				local = ig.DeclareLocal (type);
				ig.Emit (OpCodes.Stloc, local);
				ig.Emit (OpCodes.Ldloca, local);
				return;
			}


			if (FieldInfo.IsStatic){
				ig.Emit (OpCodes.Ldsflda, GetConstructedFieldInfo ());
			} else {
				if (!prepared)
					EmitInstance (ec, false);
				ig.Emit (OpCodes.Ldflda, GetConstructedFieldInfo ());
			}
		}
開發者ID:lewurm,項目名稱:benchmarker,代碼行數:52,代碼來源:ecore.cs

示例10: AddressOf

		public void AddressOf (EmitContext ec, AddressOp mode)
		{
			IMemoryLocation ml;

			if (temp_field != null) {
				ml = temp_field as IMemoryLocation;
				if (ml == null) {
					var lt = new LocalTemporary (temp_field.Type);
					temp_field.Emit (ec);
					lt.Store (ec);
					ml = lt;
				}
			} else {
				ml = expr as VariableReference;
			}

			if (ml != null)
				ml.AddressOf (ec, mode);
			else
				LocalVariable.AddressOf (ec, mode);
		}
開發者ID:Paccc,項目名稱:SharpDevelop,代碼行數:21,代碼來源:nullable.cs

示例11: AddressOf

		public void AddressOf (EmitContext ec, AddressOp mode)
		{
			if (builder == null)
				builder = ec.GetTemporaryLocal (type);

			if (builder.LocalType.IsByRef) {
				//
				// if is_address, than this is just the address anyways,
				// so we just return this.
				//
				ec.Emit (OpCodes.Ldloc, builder);
			} else {
				ec.Emit (OpCodes.Ldloca, builder);
			}
		}
開發者ID:dyxu,項目名稱:vimrc,代碼行數:15,代碼來源:assign.cs

示例12: AddressOf

		public void AddressOf (EmitContext ec, AddressOp mode)
		{
			GetFieldExpression (ec).AddressOf (ec, mode);
		}
開發者ID:rabink,項目名稱:mono,代碼行數:4,代碼來源:anonymous.cs

示例13: AddressOf

		public void AddressOf (EmitContext ec, AddressOp mode)
		{
			if (builder == null)
				builder = ec.GetTemporaryLocal (is_address ? TypeManager.GetReferenceType (type): type);

			// if is_address, than this is just the address anyways,
			// so we just return this.
			ILGenerator ig = ec.ig;

			if (is_address)
				ig.Emit (OpCodes.Ldloc, builder);
			else
				ig.Emit (OpCodes.Ldloca, builder);
		}
開發者ID:calumjiao,項目名稱:Mono-Class-Libraries,代碼行數:14,代碼來源:assign.cs


注:本文中的AddressOp類示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。