当前位置: 首页>>代码示例>>C#>>正文


C# QualifiedMemberIdentifier类代码示例

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


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


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