本文整理汇总了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;未经允许,请勿转载。 |
请发表评论