Exemplo n.º 1
0
 public override bool Equals(object obj)
 {
     if (obj is FieldRef)
     {
         FieldRef fref = (FieldRef)obj;
         return(FieldDesc.Equals(fref.FieldDesc));
     }
     else
     {
         return(false);
     }
 }
Exemplo n.º 2
0
        public void VisitFieldRef(FieldRef fieldRef)
        {
            var cfd = fieldRef.FieldDesc as CILFieldDescriptor;

            if (cfd != null)
            {
                FieldFacts facts = FactUniverse.Instance.GetFacts(cfd.Field);
                ConstValue = fieldRef.FieldDesc.ConstantValue;
                Result     = !facts.IsWritten;
            }
            else
            {
                Result = false;
            }
        }
 public void VisitFieldRef(FieldRef fieldRef)
 {
     var fd = fieldRef.FieldDesc;
     if (fd.IsStatic)
     {
         var cfd = fd as CILFieldDescriptor;
         if (cfd != null)
         {
             var pkg = _design.TypeLib.GetPackage(cfd.Field.DeclaringType);
             fd = pkg.Canonicalize(fd);
             CurComponent.AddDependency(pkg);
         }
     }
     else
     {
         fd = CurComponent.Canonicalize(fd);
     }
     _result = new FieldRef(fd);
 }
Exemplo n.º 4
0
 public static object DefaultEval(FieldRef fieldRef, IEvaluator eval)
 {
     return fieldRef.FieldDesc.Value;
 }
Exemplo n.º 5
0
 public void VisitFieldRef(FieldRef fieldRef)
 {
     var cfd = fieldRef.FieldDesc as CILFieldDescriptor;
     if (cfd != null)
     {
         FieldFacts facts = FactUniverse.Instance.GetFacts(cfd.Field);
         ConstValue = fieldRef.FieldDesc.ConstantValue;
         Result = !facts.IsWritten;
     }
     else
     {
         Result = false;
     }
 }
Exemplo n.º 6
0
 public void VisitFieldRef(FieldRef fieldRef)
 {
     OnVisitFieldRef(fieldRef);
 }
Exemplo n.º 7
0
 public static object DefaultEval(FieldRef fieldRef, IEvaluator eval)
 {
     return(fieldRef.FieldDesc.Value);
 }
Exemplo n.º 8
0
 public void VisitFieldRef(FieldRef fieldRef)
 {
     OnVisitFieldRef(fieldRef);
 }
Exemplo n.º 9
0
 public object DefaultEvalFieldRef(FieldRef fieldRef)
 {
     return FieldRef.DefaultEval(fieldRef, this);
 }
Exemplo n.º 10
0
 public object EvalFieldRef(FieldRef fieldRef)
 {
     return DoEvalFieldRef(fieldRef);
 }
Exemplo n.º 11
0
 public void VisitFieldRef(FieldRef fieldRef)
 {
     Result = _vhdg.MakeIDName(fieldRef.Name, fieldRef.FieldDesc);
 }