Beispiel #1
0
        private static HLLocal CreateLocal(ILocalDefinition pDefinition)
        {
            HLLocal local = new HLLocal();

            //local.Definition = pDefinition;
            local.Name               = pDefinition.Name.Value;
            local.Signature          = HLDomain.GetLocalSignature(pDefinition);
            sLocals[local.Signature] = local;

            //local.Container = GetOrCreateMethod(pDefinition.MethodDefinition);
            ITypeReference type = pDefinition.Type;

            if (pDefinition.IsReference)
            {
                type = MutableModelHelper.GetManagedPointerTypeReference(type, Host.InternFactory, type);
            }
            local.IsReference = pDefinition.IsReference;
            local.Type        = GetOrCreateType(type);
            return(local);
        }