示例#1
0
 internal DebugWriter()
 {
     Symbols = new DebugInfo();
     scopes = new FastStack<ScopeSym>();
     funs = new FastStack<FunSym>();
     var glob = new ScopeSym(0, 0, 0, 0, 0) { EndOffset = Int32.MaxValue };
     scopes.Push(glob);
     Symbols.Scopes.Add(glob);
 }
示例#2
0
        internal DebugWriter()
        {
            Symbols = new DebugInfo();
            scopes  = new FastStack <ScopeSym>();
            funs    = new FastStack <FunSym>();
            var glob = new ScopeSym(0, 0, 0, 0, 0, true)
            {
                EndOffset = Int32.MaxValue
            };

            scopes.Push(glob);
            Symbols.Scopes.Add(glob);
        }
示例#3
0
        public IEnumerable <VarSym> FindVarSyms(int offset, ScopeSym scope)
        {
            if (Symbols == null)
            {
                yield break;
            }

            for (var i = 0; i < Symbols.Vars.Count; i++)
            {
                var v = Symbols.Vars[i];

                if ((scope == null && v.Scope == 0 || v.Scope == scope.Index) &&
                    v.Offset <= offset)
                {
                    yield return(v);
                }
            }
        }