System\Xml\Xsl\Xslt\CompilerScopeManager.cs (36)
34public ScopeFlags flags;
41public bool IsVariable { get { return (flags & ScopeFlags.Variable) != 0; } }
42public bool IsNamespace { get { return (flags & ScopeFlags.NsDecl) != 0; } }
60_records[0].flags = ScopeFlags.NsDecl;
67_records[0].flags = ScopeFlags.NsDecl;
147private void AddRecord(ScopeFlags flag, string? ncName, string? uri, [AllowNull] V value)
149Debug.Assert(flag == (flag & ScopeFlags.ExclusiveFlags) && BitOperations.IsPow2((uint)flag), "One exclusive flag");
152ScopeFlags flags = _records[_lastRecord].flags;
153bool canReuseLastRecord = (_lastScopes == 0) && (flags & ScopeFlags.ExclusiveFlags) == 0;
157flags &= ScopeFlags.InheritedFlags;
166private void SetFlag(ScopeFlags flag, bool value)
168Debug.Assert(flag == (flag & ScopeFlags.InheritedFlags) && BitOperations.IsPow2((uint)flag), "one inherited flag");
169ScopeFlags flags = _records[_lastRecord].flags;
177flags &= ScopeFlags.InheritedFlags;
179if (flag == ScopeFlags.CanHaveApplyImports)
185flags &= ~ScopeFlags.CompatibilityFlags;
193Debug.Assert((_records[_lastRecord].flags & ScopeFlags.CompatibilityFlags) != ScopeFlags.CompatibilityFlags,
202AddRecord(ScopeFlags.Variable, varName.LocalName, varName.NamespaceUri, value);
213ScopeFlags flags = GetName(ref _records[record], out recPrefix, out recNsUri);
215(flags & ScopeFlags.NsDecl) != 0 &&
230private static ScopeFlags GetName(ref ScopeRecord re, out string? prefix, out string? nsUri)
239AddRecord(ScopeFlags.NsDecl, prefix, nsUri, default(V));
244AddRecord(ScopeFlags.NsExcl, null, nsUri, default(V));
254ScopeFlags flags = GetName(ref _records[record], out recPrefix, out recNsUri);
255if ((flags & ScopeFlags.NsExcl) != 0)
269(flags & ScopeFlags.NsDecl) != 0 &&
280(flags & ScopeFlags.NsDecl) != 0 &&
305ScopeFlags flags = GetName(ref _records[record], out recLocal, out recNsUri);
307(flags & ScopeFlags.Variable) != 0 &&
340get { return (_records[_lastRecord].flags & ScopeFlags.ForwardCompatibility) != 0; }
341set { SetFlag(ScopeFlags.ForwardCompatibility, value); }
346get { return (_records[_lastRecord].flags & ScopeFlags.BackwardCompatibility) != 0; }
347set { SetFlag(ScopeFlags.BackwardCompatibility, value); }
352get { return (_records[_lastRecord].flags & ScopeFlags.CanHaveApplyImports) != 0; }
353set { SetFlag(ScopeFlags.CanHaveApplyImports, value); }