• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    公众号

C# QualifiedMemberIdentifier类代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了C#中QualifiedMemberIdentifier的典型用法代码示例。如果您正苦于以下问题:C# QualifiedMemberIdentifier类的具体用法?C# QualifiedMemberIdentifier怎么用?C# QualifiedMemberIdentifier使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。



QualifiedMemberIdentifier类属于命名空间,在下文中一共展示了QualifiedMemberIdentifier类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C#代码示例。

示例1: EliminateVariable

        protected void EliminateVariable (JSNode context, JSVariable variable, JSExpression replaceWith, QualifiedMemberIdentifier method) {
            {
                var replacer = new VariableEliminator(
                    variable,
                    JSChangeTypeExpression.New(replaceWith, variable.GetActualType(TypeSystem), TypeSystem)
                );
                replacer.Visit(context);
            }

            {
                var replacer = new VariableEliminator(variable, replaceWith);
                var assignments = (from a in FirstPass.Assignments where 
                                       variable.Equals(a.NewValue) ||
                                       a.NewValue.SelfAndChildrenRecursive.Any(variable.Equals)
                                       select a).ToArray();

                foreach (var a in assignments) {
                    if (!variable.Equals(a.NewValue))
                        replacer.Visit(a.NewValue);
                }
            }

            Variables.Remove(variable.Identifier);
            FunctionSource.InvalidateFirstPass(method);
        }
开发者ID:Don191,项目名称:JSIL,代码行数:25,代码来源:EliminateSingleUseTemporaries.cs


示例2: GetCacheEntry

        public Entry GetCacheEntry(QualifiedMemberIdentifier method)
        {
            Entry entry;
            if (!Cache.TryGet(method, out entry))
                throw new KeyNotFoundException("No cache entry for method '" + method + "'.");

            return entry;
        }
开发者ID:Caspeco,项目名称:JSIL,代码行数:8,代码来源:FunctionCache.cs


示例3: GetExpression

        public JSFunctionExpression GetExpression(QualifiedMemberIdentifier method)
        {
            Entry entry;
            if (!Cache.TryGetValue(method, out entry))
                throw new KeyNotFoundException("No cache entry for method '" + method + "'.");

            return entry.Expression;
        }
开发者ID:nowonu,项目名称:JSIL,代码行数:8,代码来源:FunctionCache.cs


示例4: InvalidateSecondPass

        public void InvalidateSecondPass(QualifiedMemberIdentifier method)
        {
            Entry entry;
            if (!Cache.TryGetValue(method, out entry))
                throw new KeyNotFoundException("No cache entry for method '" + method + "'.");

            entry.SecondPass = null;
        }
开发者ID:robashton,项目名称:JSIL,代码行数:8,代码来源:FunctionCache.cs


示例5: EmulateStructAssignment

 public EmulateStructAssignment(QualifiedMemberIdentifier member, IFunctionSource functionSource, TypeSystem typeSystem, TypeInfoProvider typeInfo, CLRSpecialIdentifiers clr, bool optimizeCopies)
     : base(member, functionSource)
 {
     TypeSystem = typeSystem;
     TypeInfo = typeInfo;
     CLR = clr;
     OptimizeCopies = optimizeCopies;
 }
开发者ID:simon-heinen,项目名称:JSIL,代码行数:8,代码来源:EmulateStructAssignment.cs


示例6: StaticAnalysisJSAstVisitor

        protected StaticAnalysisJSAstVisitor (QualifiedMemberIdentifier member, IFunctionSource functionSource) {
            if (functionSource == null)
                throw new ArgumentNullException("functionSource");

            Member = member;
            FunctionSource = functionSource;

            // Console.WriteLine("Static analysis visitor used in function {0}", new System.Diagnostics.StackFrame(2).GetMethod().Name);
        }
开发者ID:GlennSandoval,项目名称:JSIL,代码行数:9,代码来源:StaticAnalysisAstVisitor.cs


示例7: EliminateSingleUseTemporaries

 public EliminateSingleUseTemporaries (
     QualifiedMemberIdentifier member, IFunctionSource functionSource, 
     TypeSystem typeSystem, Dictionary<string, JSVariable> variables,
     ITypeInfoSource typeInfo
 ) : base (member, functionSource) {
     TypeSystem = typeSystem;
     Variables = variables;
     TypeInfo = typeInfo;
 }
开发者ID:Don191,项目名称:JSIL,代码行数:9,代码来源:EliminateSingleUseTemporaries.cs


示例8: HoistAllocations

 public HoistAllocations (
     QualifiedMemberIdentifier member, 
     IFunctionSource functionSource, 
     TypeSystem typeSystem,
     MethodTypeFactory methodTypes
 ) 
     : base (member, functionSource) {
     TypeSystem = typeSystem;
     MethodTypes = methodTypes;
 }
开发者ID:cbsistem,项目名称:JSIL,代码行数:10,代码来源:AllocationHoisting.cs


示例9: TryGetExpression

        public bool TryGetExpression(QualifiedMemberIdentifier method, out JSFunctionExpression function)
        {
            Entry entry;
            if (!Cache.TryGetValue(method, out entry)) {
                function = null;
                return false;
            }

            function = entry.Expression;
            return true;
        }
开发者ID:robashton,项目名称:JSIL,代码行数:11,代码来源:FunctionCache.cs


示例10: GetSecondPass

        public FunctionAnalysis2ndPass GetSecondPass(QualifiedMemberIdentifier method)
        {
            Entry entry;
            if (!Cache.TryGetValue(method, out entry))
                throw new KeyNotFoundException("No cache entry for method '" + method + "'.");

            if (entry.SecondPass == null)
                entry.SecondPass = new FunctionAnalysis2ndPass(this, GetFirstPass(method));

            return entry.SecondPass;
        }
开发者ID:robashton,项目名称:JSIL,代码行数:11,代码来源:FunctionCache.cs


示例11: GetCacheEntry

        public Entry GetCacheEntry(QualifiedMemberIdentifier method, bool throwOnFail = true)
        {
            Entry entry;
            if (!Cache.TryGet(method, out entry)) {
                if (throwOnFail)
                    throw new KeyNotFoundException("No cache entry for method '" + method + "'.");
                else
                    return null;
            }

            return entry;
        }
开发者ID:robterrell,项目名称:JSIL,代码行数:12,代码来源:FunctionCache.cs


示例12: EliminatePointlessRetargeting

        public EliminatePointlessRetargeting (
            QualifiedMemberIdentifier member, 
            IFunctionSource functionSource, 
            TypeSystem typeSystem,
            MethodTypeFactory methodTypes
        ) 
            : base (member, functionSource) {
            TypeSystem = typeSystem;
            MethodTypes = methodTypes;

            SeenRetargetsInScope.Push(new Dictionary<RetargetKey, int>());
            ScopeNodeIndices.Push(-1);
        }
开发者ID:GlennSandoval,项目名称:JSIL,代码行数:13,代码来源:EliminatePointlessRetargeting.cs


示例13: GetFirstPass

        public FunctionAnalysis1stPass GetFirstPass(QualifiedMemberIdentifier method)
        {
            Entry entry;
            if (!Cache.TryGetValue(method, out entry))
                throw new KeyNotFoundException("No cache entry for method '" + method + "'.");

            if (entry.FirstPass == null) {
                var analyzer = new StaticAnalyzer(entry.Definition.Module.TypeSystem, this);
                entry.FirstPass = analyzer.FirstPass(entry.Expression);
            }

            return entry.FirstPass;
        }
开发者ID:robashton,项目名称:JSIL,代码行数:13,代码来源:FunctionCache.cs


示例14: GetFirstPass

        public FunctionAnalysis1stPass GetFirstPass(QualifiedMemberIdentifier method)
        {
            Entry entry = GetCacheEntry(method);

            if (entry.Expression == null)
                return null;

            if (entry.InProgress)
                return null;

            if (entry.FirstPass == null) {
                entry.InProgress = true;
                try {
                    var analyzer = new StaticAnalyzer(entry.Definition.Module.TypeSystem, this);
                    entry.FirstPass = analyzer.FirstPass(entry.Expression);
                } finally {
                    entry.InProgress = false;
                }
            }

            return entry.FirstPass;
        }
开发者ID:Caspeco,项目名称:JSIL,代码行数:22,代码来源:FunctionCache.cs


示例15: GetCachedMethod

        private JSCachedMethod GetCachedMethod (JSMethod method) {
            if (!IsCacheable(method))
                return null;

            var type = method.Reference.DeclaringType.Resolve();
            if (type == null)
                return null;

            var identifier = new QualifiedMemberIdentifier(
                new TypeIdentifier(type),
                new MemberIdentifier(TypeInfo, method.Reference)
            );

            CachedMethodRecord record;
            if (!CachedMethods.TryGetValue(identifier, out record))
                CachedMethods.Add(identifier, record = new CachedMethodRecord(method, NextID++));

            return new JSCachedMethod(
                method.Reference, method.Method,
                method.MethodTypes, method.GenericArguments,
                record.Index
            );
        }
开发者ID:GlennSandoval,项目名称:JSIL,代码行数:23,代码来源:CacheBaseMethods.cs


示例16: GetFirstPass

 protected FunctionAnalysis1stPass GetFirstPass(QualifiedMemberIdentifier method)
 {
     return FunctionSource.GetFirstPass(method, Member);
 }
开发者ID:simon-heinen,项目名称:JSIL,代码行数:4,代码来源:StaticAnalysisAstVisitor.cs


示例17: OptimizeArrayEnumerators

 public OptimizeArrayEnumerators(QualifiedMemberIdentifier member, IFunctionSource functionSource, TypeSystem typeSystem)
     : base(member, functionSource)
 {
     TypeSystem = typeSystem;
 }
开发者ID:poizan42,项目名称:JSIL,代码行数:5,代码来源:OptimizeArrayEnumerators.cs


示例18: GetExpression

 public JSFunctionExpression GetExpression (QualifiedMemberIdentifier method) {
     var entry = GetCacheEntry(method);
     return entry.Expression;
 }
开发者ID:cbsistem,项目名称:JSIL,代码行数:4,代码来源:FunctionCache.cs


示例19: CreateNull

        internal void CreateNull(
            MethodInfo info, MethodReference method, 
            QualifiedMemberIdentifier identifier
        )
        {
            var entry = new Entry {
                Identifier = identifier,
                Info = info,
                Reference = method,
                Expression = null
            };

            Cache.Add(identifier, entry);
        }
开发者ID:nowonu,项目名称:JSIL,代码行数:14,代码来源:FunctionCache.cs


示例20: Create

        internal JSFunctionExpression Create(
            MethodInfo info, MethodDefinition methodDef, MethodReference method, 
            QualifiedMemberIdentifier identifier, ILBlockTranslator translator, 
            IEnumerable<JSVariable> parameters, JSBlockStatement body
        )
        {
            var result = new JSFunctionExpression(
                new JSMethod(method, info),
                translator.Variables,
                parameters,
                body
            );

            var entry = new Entry {
                Identifier = identifier,
                Info = info,
                Reference = method,
                Expression = result,
                Variables = translator.Variables,
                ParameterNames = translator.ParameterNames,
                SpecialIdentifiers = translator.SpecialIdentifiers
            };

            Cache.Add(identifier, entry);
            OptimizationQueue.Add(identifier);

            return result;
        }
开发者ID:nowonu,项目名称:JSIL,代码行数:28,代码来源:FunctionCache.cs



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


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
C# QualifiedName类代码示例发布时间:2022-05-24
下一篇:
C# QuadTree类代码示例发布时间:2022-05-24
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap