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); }
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); }
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; }
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; }
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; }