Ejemplo n.º 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);
 }
Ejemplo n.º 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);
        }
Ejemplo n.º 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);
                }
            }
        }