-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathStaticAnalysisAstVisitor.cs
More file actions
36 lines (29 loc) · 1.22 KB
/
Copy pathStaticAnalysisAstVisitor.cs
File metadata and controls
36 lines (29 loc) · 1.22 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using JSIL.Ast;
using JSIL.Internal;
using JSIL.Transforms;
namespace JSIL.Ast {
public abstract class StaticAnalysisJSAstVisitor : JSAstVisitor {
public readonly QualifiedMemberIdentifier Member;
protected readonly IFunctionSource FunctionSource;
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);
}
protected FunctionAnalysis1stPass GetFirstPass (QualifiedMemberIdentifier method) {
return FunctionSource.GetFirstPass(method, Member);
}
protected FunctionAnalysis2ndPass GetSecondPass (JSMethod method) {
return FunctionSource.GetSecondPass(method, Member);
}
protected void InvalidateFirstPass () {
FunctionSource.InvalidateFirstPass(Member);
}
}
}