Exemplo n.º 1
0
        public FunctionAnalysis1stPass GetFirstPass(QualifiedMemberIdentifier method)
        {
            var entry = GetCacheEntry(method, false);

            if ((entry == null) || (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);
        }
Exemplo n.º 2
0
        private FunctionAnalysis1stPass _GetOrCreateFirstPass(Entry entry)
        {
            if (entry.FirstPass == null)
            {
                var analyzer = new StaticAnalyzer(entry.Definition.Module.TypeSystem, this);
                entry.FirstPass = analyzer.FirstPass(entry.Identifier, entry.Expression);
            }

            return(entry.FirstPass);
        }
Exemplo n.º 3
0
        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;
        }
Exemplo n.º 4
0
        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;
        }
Exemplo n.º 5
0
        private FunctionAnalysis1stPass _GetOrCreateFirstPass (Entry entry) {
            if (entry.FirstPass == null) {
                var analyzer = new StaticAnalyzer(entry.Definition.Module.TypeSystem, this);
                entry.FirstPass = analyzer.FirstPass(entry.Identifier, entry.Expression);
            }

            return entry.FirstPass;
        }