\doxysection{workspace/post-\/scarcity/src/memory/stack.h File Reference}
\hypertarget{stack_8h}{}\label{stack_8h}\index{workspace/post-\/scarcity/src/memory/stack.h@{workspace/post-\/scarcity/src/memory/stack.h}}
{\ttfamily \#include "{}consspaceobject.\+h"{}}\newline
{\ttfamily \#include "{}conspage.\+h"{}}\newline
Include dependency graph for stack.\+h\+:\nopagebreak
\begin{figure}[H]
\begin{center}
\leavevmode
\includegraphics[width=350pt]{stack_8h__incl}
\end{center}
\end{figure}
This graph shows which files directly or indirectly include this file\+:\nopagebreak
\begin{figure}[H]
\begin{center}
\leavevmode
\includegraphics[width=350pt]{stack_8h__dep__incl}
\end{center}
\end{figure}
\doxysubsubsection*{Macros}
\begin{DoxyCompactItemize}
\item 
\#define \mbox{\hyperlink{stack_8h_a18f65e8c5f1e28111a9a7f2e8a6f6ad5}{stackframep}}(vso)~(((struct \mbox{\hyperlink{vectorspace_8h_structvector__space__object}{vector\+\_\+space\+\_\+object}} \texorpdfstring{$\ast$}{*})vso)-\/$>$header.\+tag.\+value == \mbox{\hyperlink{stack_8h_a4ee879be4822abe5825ec13126557e40}{STACKFRAMETV}})
\begin{DoxyCompactList}\small\item\em is this vector-\/space object a stack frame? \end{DoxyCompactList}\item 
\#define \mbox{\hyperlink{stack_8h_ac3b2f9185aba165e4c772aae48eecfa1}{STACKFRAMETAG}}~"{}STAK"{}
\begin{DoxyCompactList}\small\item\em \doxylink{stack_8h}{stack.\+h} \end{DoxyCompactList}\item 
\#define \mbox{\hyperlink{stack_8h_a4ee879be4822abe5825ec13126557e40}{STACKFRAMETV}}~1262572627
\end{DoxyCompactItemize}
\doxysubsubsection*{Functions}
\begin{DoxyCompactItemize}
\item 
void \mbox{\hyperlink{stack_8h_a90f58a64fc05d37d72099ce6c5ead2f6}{dump\+\_\+frame}} (\mbox{\hyperlink{fopen_8h_a8c81a077422f5e2410ba71eb75108f6e}{URL\+\_\+\+FILE}} \texorpdfstring{$\ast$}{*}output, struct \mbox{\hyperlink{consspaceobject_8h_structcons__pointer}{cons\+\_\+pointer}} pointer)
\begin{DoxyCompactList}\small\item\em Dump a stackframe to this stream for debugging. \end{DoxyCompactList}\item 
void \mbox{\hyperlink{stack_8h_acfae3bc46140ba920312eafa2a882d4b}{dump\+\_\+stack\+\_\+trace}} (\mbox{\hyperlink{fopen_8h_a8c81a077422f5e2410ba71eb75108f6e}{URL\+\_\+\+FILE}} \texorpdfstring{$\ast$}{*}output, struct \mbox{\hyperlink{consspaceobject_8h_structcons__pointer}{cons\+\_\+pointer}} frame\+\_\+pointer)
\item 
struct \mbox{\hyperlink{consspaceobject_8h_structcons__pointer}{cons\+\_\+pointer}} \mbox{\hyperlink{stack_8h_a1045db640bff11aa4446faa2c8108544}{fetch\+\_\+arg}} (struct \mbox{\hyperlink{consspaceobject_8h_structstack__frame}{stack\+\_\+frame}} \texorpdfstring{$\ast$}{*}frame, unsigned int n)
\begin{DoxyCompactList}\small\item\em Fetch a pointer to the value of the local variable at this index. \end{DoxyCompactList}\item 
void \mbox{\hyperlink{stack_8h_ad9c6f148f705d561caa12cd7d64d4016}{free\+\_\+stack\+\_\+frame}} (struct \mbox{\hyperlink{consspaceobject_8h_structstack__frame}{stack\+\_\+frame}} \texorpdfstring{$\ast$}{*}frame)
\begin{DoxyCompactList}\small\item\em Free this stack frame. \end{DoxyCompactList}\item 
struct \mbox{\hyperlink{consspaceobject_8h_structstack__frame}{stack\+\_\+frame}} \texorpdfstring{$\ast$}{*} \mbox{\hyperlink{stack_8h_a81653b4495f0fd4e7e49b9bd99e8e8db}{get\+\_\+stack\+\_\+frame}} (struct \mbox{\hyperlink{consspaceobject_8h_structcons__pointer}{cons\+\_\+pointer}} pointer)
\begin{DoxyCompactList}\small\item\em get the actual stackframe object from this {\ttfamily pointer}, or NULL if {\ttfamily pointer} is not a stackframe pointer. \end{DoxyCompactList}\item 
struct \mbox{\hyperlink{consspaceobject_8h_structcons__pointer}{cons\+\_\+pointer}} \mbox{\hyperlink{stack_8h_ae97b7f0d449fa282f7a7c68c521dffd3}{make\+\_\+empty\+\_\+frame}} (struct \mbox{\hyperlink{consspaceobject_8h_structcons__pointer}{cons\+\_\+pointer}} previous)
\begin{DoxyCompactList}\small\item\em Make an empty stack frame, and return it. \end{DoxyCompactList}\item 
struct \mbox{\hyperlink{consspaceobject_8h_structcons__pointer}{cons\+\_\+pointer}} \mbox{\hyperlink{stack_8h_a494ca1435350714304b05f67a9fe8ba9}{make\+\_\+special\+\_\+frame}} (struct \mbox{\hyperlink{consspaceobject_8h_structcons__pointer}{cons\+\_\+pointer}} previous, struct \mbox{\hyperlink{consspaceobject_8h_structcons__pointer}{cons\+\_\+pointer}} args, struct \mbox{\hyperlink{consspaceobject_8h_structcons__pointer}{cons\+\_\+pointer}} env)
\begin{DoxyCompactList}\small\item\em A \textquotesingle{}special\textquotesingle{} frame is exactly like a normal stack frame except that the arguments are unevaluated. \end{DoxyCompactList}\item 
struct \mbox{\hyperlink{consspaceobject_8h_structcons__pointer}{cons\+\_\+pointer}} \mbox{\hyperlink{stack_8h_af448982b321038e7c24a5873b74533a7}{make\+\_\+stack\+\_\+frame}} (struct \mbox{\hyperlink{consspaceobject_8h_structcons__pointer}{cons\+\_\+pointer}} previous, struct \mbox{\hyperlink{consspaceobject_8h_structcons__pointer}{cons\+\_\+pointer}} args, struct \mbox{\hyperlink{consspaceobject_8h_structcons__pointer}{cons\+\_\+pointer}} env)
\begin{DoxyCompactList}\small\item\em Allocate a new stack frame with its previous pointer set to this value, its arguments set up from these args, evaluated in this env. \end{DoxyCompactList}\item 
void \mbox{\hyperlink{stack_8h_a6f06ca39c92c6c67e589086d32d132a8}{set\+\_\+reg}} (struct \mbox{\hyperlink{consspaceobject_8h_structstack__frame}{stack\+\_\+frame}} \texorpdfstring{$\ast$}{*}frame, int reg, struct \mbox{\hyperlink{consspaceobject_8h_structcons__pointer}{cons\+\_\+pointer}} value)
\begin{DoxyCompactList}\small\item\em set a register in a stack frame. \end{DoxyCompactList}\end{DoxyCompactItemize}


\doxysubsection{Macro Definition Documentation}
\Hypertarget{stack_8h_a18f65e8c5f1e28111a9a7f2e8a6f6ad5}\label{stack_8h_a18f65e8c5f1e28111a9a7f2e8a6f6ad5} 
\index{stack.h@{stack.h}!stackframep@{stackframep}}
\index{stackframep@{stackframep}!stack.h@{stack.h}}
\doxysubsubsection{\texorpdfstring{stackframep}{stackframep}}
{\footnotesize\ttfamily \#define stackframep(\begin{DoxyParamCaption}\item[{}]{vso }\end{DoxyParamCaption})~(((struct \mbox{\hyperlink{vectorspace_8h_structvector__space__object}{vector\+\_\+space\+\_\+object}} \texorpdfstring{$\ast$}{*})vso)-\/$>$header.\+tag.\+value == \mbox{\hyperlink{stack_8h_a4ee879be4822abe5825ec13126557e40}{STACKFRAMETV}})}



is this vector-\/space object a stack frame? 



Definition at line \mbox{\hyperlink{stack_8h_source_l00036}{36}} of file \mbox{\hyperlink{stack_8h_source}{stack.\+h}}.

\Hypertarget{stack_8h_ac3b2f9185aba165e4c772aae48eecfa1}\label{stack_8h_ac3b2f9185aba165e4c772aae48eecfa1} 
\index{stack.h@{stack.h}!STACKFRAMETAG@{STACKFRAMETAG}}
\index{STACKFRAMETAG@{STACKFRAMETAG}!stack.h@{stack.h}}
\doxysubsubsection{\texorpdfstring{STACKFRAMETAG}{STACKFRAMETAG}}
{\footnotesize\ttfamily \#define STACKFRAMETAG~"{}STAK"{}}



\doxylink{stack_8h}{stack.\+h} 

The Lisp evaluation stack.

Stack frames could be implemented in cons space; indeed, the stack could simply be an assoc list consed onto the front of the environment. But such a stack would be costly to search. The design sketched here, with stack frames as special objects, SHOULD be substantially more efficient, but does imply we need to generalise the idea of cons pages with freelists to a more general \textquotesingle{}equal sized object pages\textquotesingle{}, so that allocating/freeing stack frames can be more efficient.

Stack frames are not yet a first class object; they have no VECP pointer in cons space.

(c) 2017 Simon Brooke \href{mailto:simon@journeyman.cc}{\texttt{ simon@journeyman.\+cc}} Licensed under GPL version 2.\+0, or, at your option, any later version. macros for the tag of a stack frame. 

Definition at line \mbox{\hyperlink{stack_8h_source_l00030}{30}} of file \mbox{\hyperlink{stack_8h_source}{stack.\+h}}.

\Hypertarget{stack_8h_a4ee879be4822abe5825ec13126557e40}\label{stack_8h_a4ee879be4822abe5825ec13126557e40} 
\index{stack.h@{stack.h}!STACKFRAMETV@{STACKFRAMETV}}
\index{STACKFRAMETV@{STACKFRAMETV}!stack.h@{stack.h}}
\doxysubsubsection{\texorpdfstring{STACKFRAMETV}{STACKFRAMETV}}
{\footnotesize\ttfamily \#define STACKFRAMETV~1262572627}



Definition at line \mbox{\hyperlink{stack_8h_source_l00031}{31}} of file \mbox{\hyperlink{stack_8h_source}{stack.\+h}}.



\doxysubsection{Function Documentation}
\Hypertarget{stack_8h_a90f58a64fc05d37d72099ce6c5ead2f6}\label{stack_8h_a90f58a64fc05d37d72099ce6c5ead2f6} 
\index{stack.h@{stack.h}!dump\_frame@{dump\_frame}}
\index{dump\_frame@{dump\_frame}!stack.h@{stack.h}}
\doxysubsubsection{\texorpdfstring{dump\_frame()}{dump\_frame()}}
{\footnotesize\ttfamily void dump\+\_\+frame (\begin{DoxyParamCaption}\item[{\mbox{\hyperlink{fopen_8h_a8c81a077422f5e2410ba71eb75108f6e}{URL\+\_\+\+FILE}} \texorpdfstring{$\ast$}{*}}]{output,  }\item[{struct \mbox{\hyperlink{consspaceobject_8h_structcons__pointer}{cons\+\_\+pointer}}}]{frame\+\_\+pointer }\end{DoxyParamCaption})}



Dump a stackframe to this stream for debugging. 


\begin{DoxyParams}{Parameters}
{\em output} & the stream \\
\hline
{\em frame\+\_\+pointer} & the pointer to the frame \\
\hline
\end{DoxyParams}


Definition at line \mbox{\hyperlink{stack_8c_source_l00244}{244}} of file \mbox{\hyperlink{stack_8c_source}{stack.\+c}}.



References \mbox{\hyperlink{consspaceobject_8h_source_l00435}{stack\+\_\+frame\+::arg}}, \mbox{\hyperlink{consspaceobject_8h_source_l00441}{stack\+\_\+frame\+::args}}, \mbox{\hyperlink{consspaceobject_8h_source_l00635}{cons\+\_\+space\+\_\+object\+::count}}, \mbox{\hyperlink{stack_8c_source_l00053}{get\+\_\+stack\+\_\+frame()}}, \mbox{\hyperlink{consspaceobject_8h_source_l00437}{stack\+\_\+frame\+::more}}, \mbox{\hyperlink{consspaceobject_8h_source_l00303}{nilp}}, \mbox{\hyperlink{consspaceobject_8h_source_l00297}{pointer2cell}}, \mbox{\hyperlink{print_8c_source_l00151}{print()}}, \mbox{\hyperlink{consspaceobject_8h_a21cb645ce4ae20308447dcd59534bf38}{cons\+\_\+space\+\_\+object\+::tag}}, \mbox{\hyperlink{fopen_8h_source_l00051}{url\+\_\+fputws}}, and \mbox{\hyperlink{fopen_8h_source_l00050}{url\+\_\+fwprintf}}.



Referenced by \mbox{\hyperlink{dump_8c_source_l00059}{dump\+\_\+object()}}, and \mbox{\hyperlink{stack_8c_source_l00268}{dump\+\_\+stack\+\_\+trace()}}.

\Hypertarget{stack_8h_acfae3bc46140ba920312eafa2a882d4b}\label{stack_8h_acfae3bc46140ba920312eafa2a882d4b} 
\index{stack.h@{stack.h}!dump\_stack\_trace@{dump\_stack\_trace}}
\index{dump\_stack\_trace@{dump\_stack\_trace}!stack.h@{stack.h}}
\doxysubsubsection{\texorpdfstring{dump\_stack\_trace()}{dump\_stack\_trace()}}
{\footnotesize\ttfamily void dump\+\_\+stack\+\_\+trace (\begin{DoxyParamCaption}\item[{\mbox{\hyperlink{fopen_8h_a8c81a077422f5e2410ba71eb75108f6e}{URL\+\_\+\+FILE}} \texorpdfstring{$\ast$}{*}}]{output,  }\item[{struct \mbox{\hyperlink{consspaceobject_8h_structcons__pointer}{cons\+\_\+pointer}}}]{frame\+\_\+pointer }\end{DoxyParamCaption})}



Definition at line \mbox{\hyperlink{stack_8c_source_l00268}{268}} of file \mbox{\hyperlink{stack_8c_source}{stack.\+c}}.



References \mbox{\hyperlink{stack_8c_source_l00244}{dump\+\_\+frame()}}, \mbox{\hyperlink{stack_8c_source_l00268}{dump\+\_\+stack\+\_\+trace()}}, \mbox{\hyperlink{consspaceobject_8h_source_l00313}{exceptionp}}, \mbox{\hyperlink{stack_8c_source_l00053}{get\+\_\+stack\+\_\+frame()}}, \mbox{\hyperlink{consspaceobject_8h_a259b3afe36776f8ba8498fdf95904f25}{cons\+\_\+space\+\_\+object\+::payload}}, \mbox{\hyperlink{consspaceobject_8h_source_l00297}{pointer2cell}}, \mbox{\hyperlink{vectorspace_8h_source_l00055}{pointer\+\_\+to\+\_\+vso}}, \mbox{\hyperlink{consspaceobject_8h_source_l00433}{stack\+\_\+frame\+::previous}}, \mbox{\hyperlink{print_8c_source_l00151}{print()}}, \mbox{\hyperlink{stack_8h_source_l00036}{stackframep}}, \mbox{\hyperlink{fopen_8h_source_l00051}{url\+\_\+fputws}}, and \mbox{\hyperlink{consspaceobject_8h_source_l00385}{vectorpointp}}.



Referenced by \mbox{\hyperlink{dump_8c_source_l00059}{dump\+\_\+object()}}, \mbox{\hyperlink{stack_8c_source_l00268}{dump\+\_\+stack\+\_\+trace()}}, and \mbox{\hyperlink{print_8c_source_l00151}{print()}}.

\Hypertarget{stack_8h_a1045db640bff11aa4446faa2c8108544}\label{stack_8h_a1045db640bff11aa4446faa2c8108544} 
\index{stack.h@{stack.h}!fetch\_arg@{fetch\_arg}}
\index{fetch\_arg@{fetch\_arg}!stack.h@{stack.h}}
\doxysubsubsection{\texorpdfstring{fetch\_arg()}{fetch\_arg()}}
{\footnotesize\ttfamily struct \mbox{\hyperlink{consspaceobject_8h_structcons__pointer}{cons\+\_\+pointer}} fetch\+\_\+arg (\begin{DoxyParamCaption}\item[{struct \mbox{\hyperlink{consspaceobject_8h_structstack__frame}{stack\+\_\+frame}} \texorpdfstring{$\ast$}{*}}]{frame,  }\item[{unsigned int}]{n }\end{DoxyParamCaption})}



Fetch a pointer to the value of the local variable at this index. 



Definition at line \mbox{\hyperlink{stack_8c_source_l00286}{286}} of file \mbox{\hyperlink{stack_8c_source}{stack.\+c}}.



References \mbox{\hyperlink{consspaceobject_8h_source_l00425}{args\+\_\+in\+\_\+frame}}, \mbox{\hyperlink{consspaceobject_8h_source_l00277}{NIL}}, and \mbox{\hyperlink{consspaceobject_8h_source_l00297}{pointer2cell}}.



Referenced by \mbox{\hyperlink{lispops_8c_source_l01456}{lisp\+\_\+append()}}, \mbox{\hyperlink{lispops_8c_source_l01528}{lisp\+\_\+let()}}, and \mbox{\hyperlink{lispops_8c_source_l01510}{lisp\+\_\+list()}}.

\Hypertarget{stack_8h_ad9c6f148f705d561caa12cd7d64d4016}\label{stack_8h_ad9c6f148f705d561caa12cd7d64d4016} 
\index{stack.h@{stack.h}!free\_stack\_frame@{free\_stack\_frame}}
\index{free\_stack\_frame@{free\_stack\_frame}!stack.h@{stack.h}}
\doxysubsubsection{\texorpdfstring{free\_stack\_frame()}{free\_stack\_frame()}}
{\footnotesize\ttfamily void free\+\_\+stack\+\_\+frame (\begin{DoxyParamCaption}\item[{struct \mbox{\hyperlink{consspaceobject_8h_structstack__frame}{stack\+\_\+frame}} \texorpdfstring{$\ast$}{*}}]{frame }\end{DoxyParamCaption})}



Free this stack frame. 



Definition at line \mbox{\hyperlink{stack_8c_source_l00224}{224}} of file \mbox{\hyperlink{stack_8c_source}{stack.\+c}}.



References \mbox{\hyperlink{consspaceobject_8h_source_l00435}{stack\+\_\+frame\+::arg}}, \mbox{\hyperlink{consspaceobject_8h_source_l00425}{args\+\_\+in\+\_\+frame}}, \mbox{\hyperlink{debug_8h_source_l00021}{DEBUG\+\_\+\+ALLOC}}, \mbox{\hyperlink{debug_8c_source_l00041}{debug\+\_\+print()}}, \mbox{\hyperlink{consspaceobject_8c_source_l00080}{dec\+\_\+ref()}}, \mbox{\hyperlink{consspaceobject_8h_source_l00437}{stack\+\_\+frame\+::more}}, and \mbox{\hyperlink{consspaceobject_8h_source_l00303}{nilp}}.



Referenced by \mbox{\hyperlink{vectorspace_8c_source_l00123}{free\+\_\+vso()}}.

\Hypertarget{stack_8h_a81653b4495f0fd4e7e49b9bd99e8e8db}\label{stack_8h_a81653b4495f0fd4e7e49b9bd99e8e8db} 
\index{stack.h@{stack.h}!get\_stack\_frame@{get\_stack\_frame}}
\index{get\_stack\_frame@{get\_stack\_frame}!stack.h@{stack.h}}
\doxysubsubsection{\texorpdfstring{get\_stack\_frame()}{get\_stack\_frame()}}
{\footnotesize\ttfamily struct \mbox{\hyperlink{consspaceobject_8h_structstack__frame}{stack\+\_\+frame}} \texorpdfstring{$\ast$}{*} get\+\_\+stack\+\_\+frame (\begin{DoxyParamCaption}\item[{struct \mbox{\hyperlink{consspaceobject_8h_structcons__pointer}{cons\+\_\+pointer}}}]{pointer }\end{DoxyParamCaption})}



get the actual stackframe object from this {\ttfamily pointer}, or NULL if {\ttfamily pointer} is not a stackframe pointer. 



Definition at line \mbox{\hyperlink{stack_8c_source_l00053}{53}} of file \mbox{\hyperlink{stack_8c_source}{stack.\+c}}.



References \mbox{\hyperlink{debug_8c_source_l00041}{debug\+\_\+print()}}, \mbox{\hyperlink{debug_8c_source_l00101}{debug\+\_\+printf()}}, \mbox{\hyperlink{debug_8h_source_l00077}{DEBUG\+\_\+\+STACK}}, \mbox{\hyperlink{vectorspace_8h_a52100a8d038844c00250f5356f1b9a3f}{vector\+\_\+space\+\_\+object\+::payload}}, \mbox{\hyperlink{consspaceobject_8h_source_l00297}{pointer2cell}}, \mbox{\hyperlink{stack_8h_source_l00036}{stackframep}}, and \mbox{\hyperlink{consspaceobject_8h_source_l00385}{vectorpointp}}.



Referenced by \mbox{\hyperlink{lispops_8c_source_l00340}{c\+\_\+apply()}}, \mbox{\hyperlink{stack_8c_source_l00244}{dump\+\_\+frame()}}, \mbox{\hyperlink{stack_8c_source_l00268}{dump\+\_\+stack\+\_\+trace()}}, \mbox{\hyperlink{lispops_8c_source_l00064}{eval\+\_\+form()}}, \mbox{\hyperlink{vectorspace_8c_source_l00123}{free\+\_\+vso()}}, \mbox{\hyperlink{lispops_8c_source_l01263}{lisp\+\_\+repl()}}, \mbox{\hyperlink{stack_8c_source_l00075}{make\+\_\+empty\+\_\+frame()}}, \mbox{\hyperlink{stack_8c_source_l00183}{make\+\_\+special\+\_\+frame()}}, \mbox{\hyperlink{stack_8c_source_l00116}{make\+\_\+stack\+\_\+frame()}}, and \mbox{\hyperlink{repl_8c_source_l00033}{repl()}}.

\Hypertarget{stack_8h_ae97b7f0d449fa282f7a7c68c521dffd3}\label{stack_8h_ae97b7f0d449fa282f7a7c68c521dffd3} 
\index{stack.h@{stack.h}!make\_empty\_frame@{make\_empty\_frame}}
\index{make\_empty\_frame@{make\_empty\_frame}!stack.h@{stack.h}}
\doxysubsubsection{\texorpdfstring{make\_empty\_frame()}{make\_empty\_frame()}}
{\footnotesize\ttfamily struct \mbox{\hyperlink{consspaceobject_8h_structcons__pointer}{cons\+\_\+pointer}} make\+\_\+empty\+\_\+frame (\begin{DoxyParamCaption}\item[{struct \mbox{\hyperlink{consspaceobject_8h_structcons__pointer}{cons\+\_\+pointer}}}]{previous }\end{DoxyParamCaption})}



Make an empty stack frame, and return it. 


\begin{DoxyParams}{Parameters}
{\em previous} & the current top-\/of-\/stack; \\
\hline
{\em env} & the environment in which evaluation happens. \\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
the new frame, or NULL if memory is exhausted. 
\end{DoxyReturn}


Definition at line \mbox{\hyperlink{stack_8c_source_l00075}{75}} of file \mbox{\hyperlink{stack_8c_source}{stack.\+c}}.



References \mbox{\hyperlink{consspaceobject_8h_source_l00435}{stack\+\_\+frame\+::arg}}, \mbox{\hyperlink{consspaceobject_8h_source_l00441}{stack\+\_\+frame\+::args}}, \mbox{\hyperlink{consspaceobject_8h_source_l00425}{args\+\_\+in\+\_\+frame}}, \mbox{\hyperlink{debug_8h_source_l00021}{DEBUG\+\_\+\+ALLOC}}, \mbox{\hyperlink{debug_8c_source_l00136}{debug\+\_\+dump\+\_\+object()}}, \mbox{\hyperlink{debug_8c_source_l00041}{debug\+\_\+print()}}, \mbox{\hyperlink{consspaceobject_8h_source_l00439}{stack\+\_\+frame\+::function}}, \mbox{\hyperlink{stack_8c_source_l00053}{get\+\_\+stack\+\_\+frame()}}, \mbox{\hyperlink{vectorspace_8c_source_l00075}{make\+\_\+vso()}}, \mbox{\hyperlink{consspaceobject_8h_source_l00437}{stack\+\_\+frame\+::more}}, \mbox{\hyperlink{consspaceobject_8h_source_l00277}{NIL}}, \mbox{\hyperlink{consspaceobject_8h_source_l00303}{nilp}}, \mbox{\hyperlink{consspaceobject_8h_source_l00433}{stack\+\_\+frame\+::previous}}, and \mbox{\hyperlink{stack_8h_source_l00031}{STACKFRAMETV}}.



Referenced by \mbox{\hyperlink{lispops_8c_source_l00064}{eval\+\_\+form()}}, \mbox{\hyperlink{stack_8c_source_l00183}{make\+\_\+special\+\_\+frame()}}, and \mbox{\hyperlink{stack_8c_source_l00116}{make\+\_\+stack\+\_\+frame()}}.

\Hypertarget{stack_8h_a494ca1435350714304b05f67a9fe8ba9}\label{stack_8h_a494ca1435350714304b05f67a9fe8ba9} 
\index{stack.h@{stack.h}!make\_special\_frame@{make\_special\_frame}}
\index{make\_special\_frame@{make\_special\_frame}!stack.h@{stack.h}}
\doxysubsubsection{\texorpdfstring{make\_special\_frame()}{make\_special\_frame()}}
{\footnotesize\ttfamily struct \mbox{\hyperlink{consspaceobject_8h_structcons__pointer}{cons\+\_\+pointer}} make\+\_\+special\+\_\+frame (\begin{DoxyParamCaption}\item[{struct \mbox{\hyperlink{consspaceobject_8h_structcons__pointer}{cons\+\_\+pointer}}}]{previous,  }\item[{struct \mbox{\hyperlink{consspaceobject_8h_structcons__pointer}{cons\+\_\+pointer}}}]{args,  }\item[{struct \mbox{\hyperlink{consspaceobject_8h_structcons__pointer}{cons\+\_\+pointer}}}]{env }\end{DoxyParamCaption})}



A \textquotesingle{}special\textquotesingle{} frame is exactly like a normal stack frame except that the arguments are unevaluated. 


\begin{DoxyParams}{Parameters}
{\em previous} & the previous stack frame; \\
\hline
{\em args} & a list of the arguments to be stored in this stack frame; \\
\hline
{\em env} & the execution environment; \\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
a new special frame. 
\end{DoxyReturn}


Definition at line \mbox{\hyperlink{stack_8c_source_l00183}{183}} of file \mbox{\hyperlink{stack_8c_source}{stack.\+c}}.



References \mbox{\hyperlink{consspaceobject_8h_source_l00441}{stack\+\_\+frame\+::args}}, \mbox{\hyperlink{consspaceobject_8h_source_l00425}{args\+\_\+in\+\_\+frame}}, \mbox{\hyperlink{consspaceobject_8c_source_l00454}{c\+\_\+string\+\_\+to\+\_\+lisp\+\_\+string()}}, \mbox{\hyperlink{consspaceobject_8h_source_l00308}{consp}}, \mbox{\hyperlink{debug_8c_source_l00136}{debug\+\_\+dump\+\_\+object()}}, \mbox{\hyperlink{debug_8c_source_l00041}{debug\+\_\+print()}}, \mbox{\hyperlink{debug_8h_source_l00077}{DEBUG\+\_\+\+STACK}}, \mbox{\hyperlink{consspaceobject_8h_source_l00313}{exceptionp}}, \mbox{\hyperlink{stack_8c_source_l00053}{get\+\_\+stack\+\_\+frame()}}, \mbox{\hyperlink{consspaceobject_8c_source_l00062}{inc\+\_\+ref()}}, \mbox{\hyperlink{stack_8c_source_l00075}{make\+\_\+empty\+\_\+frame()}}, \mbox{\hyperlink{consspaceobject_8c_source_l00200}{make\+\_\+exception()}}, \mbox{\hyperlink{consspaceobject_8h_source_l00437}{stack\+\_\+frame\+::more}}, \mbox{\hyperlink{consspaceobject_8h_source_l00303}{nilp}}, \mbox{\hyperlink{consspaceobject_8h_a259b3afe36776f8ba8498fdf95904f25}{cons\+\_\+space\+\_\+object\+::payload}}, \mbox{\hyperlink{consspaceobject_8h_source_l00297}{pointer2cell}}, and \mbox{\hyperlink{stack_8c_source_l00033}{set\+\_\+reg()}}.



Referenced by \mbox{\hyperlink{lispops_8c_source_l00340}{c\+\_\+apply()}}.

\Hypertarget{stack_8h_af448982b321038e7c24a5873b74533a7}\label{stack_8h_af448982b321038e7c24a5873b74533a7} 
\index{stack.h@{stack.h}!make\_stack\_frame@{make\_stack\_frame}}
\index{make\_stack\_frame@{make\_stack\_frame}!stack.h@{stack.h}}
\doxysubsubsection{\texorpdfstring{make\_stack\_frame()}{make\_stack\_frame()}}
{\footnotesize\ttfamily struct \mbox{\hyperlink{consspaceobject_8h_structcons__pointer}{cons\+\_\+pointer}} make\+\_\+stack\+\_\+frame (\begin{DoxyParamCaption}\item[{struct \mbox{\hyperlink{consspaceobject_8h_structcons__pointer}{cons\+\_\+pointer}}}]{previous,  }\item[{struct \mbox{\hyperlink{consspaceobject_8h_structcons__pointer}{cons\+\_\+pointer}}}]{args,  }\item[{struct \mbox{\hyperlink{consspaceobject_8h_structcons__pointer}{cons\+\_\+pointer}}}]{env }\end{DoxyParamCaption})}



Allocate a new stack frame with its previous pointer set to this value, its arguments set up from these args, evaluated in this env. 


\begin{DoxyParams}{Parameters}
{\em previous} & the current top-\/of-\/stack; @args the arguments to load into this frame; \\
\hline
{\em env} & the environment in which evaluation happens. \\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
the new frame, or an exception if one occurred while building it. 
\end{DoxyReturn}


Definition at line \mbox{\hyperlink{stack_8c_source_l00116}{116}} of file \mbox{\hyperlink{stack_8c_source}{stack.\+c}}.



References \mbox{\hyperlink{consspaceobject_8h_source_l00441}{stack\+\_\+frame\+::args}}, \mbox{\hyperlink{consspaceobject_8h_source_l00425}{args\+\_\+in\+\_\+frame}}, \mbox{\hyperlink{consspaceobject_8c_source_l00454}{c\+\_\+string\+\_\+to\+\_\+lisp\+\_\+string()}}, \mbox{\hyperlink{consspaceobject_8h_source_l00308}{consp}}, \mbox{\hyperlink{debug_8c_source_l00136}{debug\+\_\+dump\+\_\+object()}}, \mbox{\hyperlink{debug_8c_source_l00041}{debug\+\_\+print()}}, \mbox{\hyperlink{debug_8c_source_l00119}{debug\+\_\+print\+\_\+object()}}, \mbox{\hyperlink{debug_8c_source_l00101}{debug\+\_\+printf()}}, \mbox{\hyperlink{debug_8h_source_l00077}{DEBUG\+\_\+\+STACK}}, \mbox{\hyperlink{lispops_8c_source_l00064}{eval\+\_\+form()}}, \mbox{\hyperlink{lispops_8c_source_l00129}{eval\+\_\+forms()}}, \mbox{\hyperlink{consspaceobject_8h_source_l00313}{exceptionp}}, \mbox{\hyperlink{stack_8c_source_l00053}{get\+\_\+stack\+\_\+frame()}}, \mbox{\hyperlink{consspaceobject_8c_source_l00062}{inc\+\_\+ref()}}, \mbox{\hyperlink{stack_8c_source_l00075}{make\+\_\+empty\+\_\+frame()}}, \mbox{\hyperlink{consspaceobject_8c_source_l00200}{make\+\_\+exception()}}, \mbox{\hyperlink{consspaceobject_8h_source_l00437}{stack\+\_\+frame\+::more}}, \mbox{\hyperlink{consspaceobject_8h_source_l00303}{nilp}}, \mbox{\hyperlink{consspaceobject_8h_a259b3afe36776f8ba8498fdf95904f25}{cons\+\_\+space\+\_\+object\+::payload}}, \mbox{\hyperlink{consspaceobject_8h_source_l00297}{pointer2cell}}, and \mbox{\hyperlink{stack_8c_source_l00033}{set\+\_\+reg()}}.



Referenced by \mbox{\hyperlink{lispops_8c_source_l00340}{c\+\_\+apply()}}, and \mbox{\hyperlink{repl_8c_source_l00033}{repl()}}.

\Hypertarget{stack_8h_a6f06ca39c92c6c67e589086d32d132a8}\label{stack_8h_a6f06ca39c92c6c67e589086d32d132a8} 
\index{stack.h@{stack.h}!set\_reg@{set\_reg}}
\index{set\_reg@{set\_reg}!stack.h@{stack.h}}
\doxysubsubsection{\texorpdfstring{set\_reg()}{set\_reg()}}
{\footnotesize\ttfamily void set\+\_\+reg (\begin{DoxyParamCaption}\item[{struct \mbox{\hyperlink{consspaceobject_8h_structstack__frame}{stack\+\_\+frame}} \texorpdfstring{$\ast$}{*}}]{frame,  }\item[{int}]{reg,  }\item[{struct \mbox{\hyperlink{consspaceobject_8h_structcons__pointer}{cons\+\_\+pointer}}}]{value }\end{DoxyParamCaption})}



set a register in a stack frame. 

Alwaye use this to do so, because that way we can be sure the inc\+\_\+ref happens! 

Definition at line \mbox{\hyperlink{stack_8c_source_l00033}{33}} of file \mbox{\hyperlink{stack_8c_source}{stack.\+c}}.



References \mbox{\hyperlink{consspaceobject_8h_source_l00435}{stack\+\_\+frame\+::arg}}, \mbox{\hyperlink{consspaceobject_8h_source_l00441}{stack\+\_\+frame\+::args}}, \mbox{\hyperlink{debug_8c_source_l00119}{debug\+\_\+print\+\_\+object()}}, \mbox{\hyperlink{debug_8c_source_l00101}{debug\+\_\+printf()}}, \mbox{\hyperlink{debug_8c_source_l00085}{debug\+\_\+println()}}, \mbox{\hyperlink{debug_8h_source_l00077}{DEBUG\+\_\+\+STACK}}, \mbox{\hyperlink{consspaceobject_8c_source_l00080}{dec\+\_\+ref()}}, and \mbox{\hyperlink{consspaceobject_8c_source_l00062}{inc\+\_\+ref()}}.



Referenced by \mbox{\hyperlink{lispops_8c_source_l00064}{eval\+\_\+form()}}, \mbox{\hyperlink{lispops_8c_source_l00564}{lisp\+\_\+apply()}}, \mbox{\hyperlink{stack_8c_source_l00183}{make\+\_\+special\+\_\+frame()}}, and \mbox{\hyperlink{stack_8c_source_l00116}{make\+\_\+stack\+\_\+frame()}}.

