本文整理汇总了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);
}
示例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;
}
示例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;
}
示例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;
}
示例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;
}
示例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);
}
示例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;
}
示例8: HoistAllocations
public HoistAllocations (
QualifiedMemberIdentifier member,
IFunctionSource functionSource,
TypeSystem typeSystem,
MethodTypeFactory methodTypes
)
: base (member, functionSource) {
TypeSystem = typeSystem;
MethodTypes = methodTypes;
}
示例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;
}
示例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;
}
示例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;
}
示例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);
}
示例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;
}
示例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;
}
示例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
);
}