示例#1
0
        public ThreadContextState SaveStackAndFrame(Frame frame, Cons form)
        {
            var saved = new ThreadContextState();

            saved.EvaluationStack = EvaluationStack;
            saved.SpecialStack    = SpecialStack;
            saved.Frame           = Frame;
            saved.NestingDepth    = NestingDepth;

            ++NestingDepth;

            if (NestingDepth == 10000)
            {
                Debugger.Break();
            }

            if (frame != null)
            {
                Frame      = frame;
                Frame.Link = saved.Frame;
            }

            if (form != null)
            {
                EvaluationStack = Runtime.MakeCons(form, EvaluationStack);
            }

            return(saved);
        }
示例#2
0
 public void RestoreStackAndFrame(ThreadContextState saved)
 {
     Frame           = saved.Frame;
     EvaluationStack = saved.EvaluationStack;
     SpecialStack    = saved.SpecialStack;
     NestingDepth    = saved.NestingDepth;
 }
示例#3
0
 public static object RestoreStackAndFrame(ThreadContextState saved)
 {
     // used by compiler generated code
     CurrentThreadContext.RestoreStackAndFrame(saved);
     return(null);
 }
 public static object RestoreStackAndFrame(ThreadContextState saved)
 {
     // used by compiler generated code
     CurrentThreadContext.RestoreStackAndFrame(saved);
     return null;
 }
示例#5
0
 public void RestoreFrame(ThreadContextState saved)
 {
     Frame = saved.Frame;
 }
示例#6
0
        public ThreadContextState SaveStackAndFrame(Frame frame = null, Cons form = null)
        {
            var saved = new ThreadContextState();

            saved.EvaluationStack = EvaluationStack;
            saved.SpecialStack = SpecialStack;
            saved.Frame = Frame;
            saved.NestingDepth = NestingDepth;

            ++NestingDepth;

            if (NestingDepth == 10000)
            {
                Debugger.Break();
            }

            if (frame != null)
            {
                Frame = new Frame(frame, null);
                Frame.Link = saved.Frame;
            }

            if (form != null)
            {
                EvaluationStack = Runtime.MakeCons(form, EvaluationStack);
            }

            return saved;
        }
示例#7
0
 public void RestoreStackAndFrame(ThreadContextState saved)
 {
     Frame = saved.Frame;
     EvaluationStack = saved.EvaluationStack;
     SpecialStack = saved.SpecialStack;
     NestingDepth = saved.NestingDepth;
 }
示例#8
0
 public void RestoreFrame(ThreadContextState saved)
 {
     Frame = saved.Frame;
 }