\doxysection{workspace/post-\/scarcity/src/memory/stack.c File Reference}
\hypertarget{stack_8c}{}\label{stack_8c}\index{workspace/post-\/scarcity/src/memory/stack.c@{workspace/post-\/scarcity/src/memory/stack.c}}
{\ttfamily \#include $<$stdlib.\+h$>$}\newline
{\ttfamily \#include "{}memory/consspaceobject.\+h"{}}\newline
{\ttfamily \#include "{}memory/conspage.\+h"{}}\newline
{\ttfamily \#include "{}debug.\+h"{}}\newline
{\ttfamily \#include "{}memory/dump.\+h"{}}\newline
{\ttfamily \#include "{}ops/lispops.\+h"{}}\newline
{\ttfamily \#include "{}io/print.\+h"{}}\newline
{\ttfamily \#include "{}memory/stack.\+h"{}}\newline
{\ttfamily \#include "{}memory/vectorspace.\+h"{}}\newline
Include dependency graph for stack.\+c\+:\nopagebreak
\begin{figure}[H]
\begin{center}
\leavevmode
\includegraphics[width=350pt]{stack_8c__incl}
\end{center}
\end{figure}
\doxysubsubsection*{Functions}
\begin{DoxyCompactItemize}
\item 
void \mbox{\hyperlink{stack_8c_ab70c7fa9a11ab6d15513b3513db2e6e3}{dump\+\_\+frame}} (\mbox{\hyperlink{fopen_8h_a8c81a077422f5e2410ba71eb75108f6e}{URL\+\_\+\+FILE}} \texorpdfstring{$\ast$}{*}output, struct \mbox{\hyperlink{consspaceobject_8h_structcons__pointer}{cons\+\_\+pointer}} frame\+\_\+pointer)
\begin{DoxyCompactList}\small\item\em Dump a stackframe to this stream for debugging. \end{DoxyCompactList}\item 
void \mbox{\hyperlink{stack_8c_ac0d2b280590cff44f75908a88e24f8b4}{dump\+\_\+stack\+\_\+trace}} (\mbox{\hyperlink{fopen_8h_a8c81a077422f5e2410ba71eb75108f6e}{URL\+\_\+\+FILE}} \texorpdfstring{$\ast$}{*}output, struct \mbox{\hyperlink{consspaceobject_8h_structcons__pointer}{cons\+\_\+pointer}} pointer)
\item 
struct \mbox{\hyperlink{consspaceobject_8h_structcons__pointer}{cons\+\_\+pointer}} \mbox{\hyperlink{stack_8c_a6e989b705aea0873495c7259121e0e33}{fetch\+\_\+arg}} (struct \mbox{\hyperlink{consspaceobject_8h_structstack__frame}{stack\+\_\+frame}} \texorpdfstring{$\ast$}{*}frame, unsigned int index)
\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_8c_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_8c_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_8c_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_8c_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_8c_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_8c_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{Function Documentation}
\Hypertarget{stack_8c_ab70c7fa9a11ab6d15513b3513db2e6e3}\label{stack_8c_ab70c7fa9a11ab6d15513b3513db2e6e3} 
\index{stack.c@{stack.c}!dump\_frame@{dump\_frame}}
\index{dump\_frame@{dump\_frame}!stack.c@{stack.c}}
\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_8c_ac0d2b280590cff44f75908a88e24f8b4}\label{stack_8c_ac0d2b280590cff44f75908a88e24f8b4} 
\index{stack.c@{stack.c}!dump\_stack\_trace@{dump\_stack\_trace}}
\index{dump\_stack\_trace@{dump\_stack\_trace}!stack.c@{stack.c}}
\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}}}]{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_8c_a6e989b705aea0873495c7259121e0e33}\label{stack_8c_a6e989b705aea0873495c7259121e0e33} 
\index{stack.c@{stack.c}!fetch\_arg@{fetch\_arg}}
\index{fetch\_arg@{fetch\_arg}!stack.c@{stack.c}}
\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}]{index }\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_8c_ad9c6f148f705d561caa12cd7d64d4016}\label{stack_8c_ad9c6f148f705d561caa12cd7d64d4016} 
\index{stack.c@{stack.c}!free\_stack\_frame@{free\_stack\_frame}}
\index{free\_stack\_frame@{free\_stack\_frame}!stack.c@{stack.c}}
\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_8c_a81653b4495f0fd4e7e49b9bd99e8e8db}\label{stack_8c_a81653b4495f0fd4e7e49b9bd99e8e8db} 
\index{stack.c@{stack.c}!get\_stack\_frame@{get\_stack\_frame}}
\index{get\_stack\_frame@{get\_stack\_frame}!stack.c@{stack.c}}
\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_8c_ae97b7f0d449fa282f7a7c68c521dffd3}\label{stack_8c_ae97b7f0d449fa282f7a7c68c521dffd3} 
\index{stack.c@{stack.c}!make\_empty\_frame@{make\_empty\_frame}}
\index{make\_empty\_frame@{make\_empty\_frame}!stack.c@{stack.c}}
\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_8c_a494ca1435350714304b05f67a9fe8ba9}\label{stack_8c_a494ca1435350714304b05f67a9fe8ba9} 
\index{stack.c@{stack.c}!make\_special\_frame@{make\_special\_frame}}
\index{make\_special\_frame@{make\_special\_frame}!stack.c@{stack.c}}
\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_8c_af448982b321038e7c24a5873b74533a7}\label{stack_8c_af448982b321038e7c24a5873b74533a7} 
\index{stack.c@{stack.c}!make\_stack\_frame@{make\_stack\_frame}}
\index{make\_stack\_frame@{make\_stack\_frame}!stack.c@{stack.c}}
\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_8c_a6f06ca39c92c6c67e589086d32d132a8}\label{stack_8c_a6f06ca39c92c6c67e589086d32d132a8} 
\index{stack.c@{stack.c}!set\_reg@{set\_reg}}
\index{set\_reg@{set\_reg}!stack.c@{stack.c}}
\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()}}.

