\hypertarget{group__Embryo__Program__VM__Group}{}\doxysection{Virtual Machine Functions}
\label{group__Embryo__Program__VM__Group}\index{Virtual Machine Functions@{Virtual Machine Functions}}


Functions that deal with creating and destroying virtual machine sessions for a given program.  


\doxysubsection*{Functions}
\begin{DoxyCompactItemize}
\item 
\mbox{\hyperlink{Elua_8h_a3db3556eec8ef18cb8ddb43816974ac8}{EAPI}} void \mbox{\hyperlink{group__Embryo__Program__VM__Group_ga6f85080c0f9c9d99190ccf1bdfb60a88}{embryo\+\_\+program\+\_\+vm\+\_\+reset}} (Embryo\+\_\+\+Program $\ast$ep)
\begin{DoxyCompactList}\small\item\em Resets the current virtual machine session of the given program. \end{DoxyCompactList}\item 
\mbox{\hyperlink{Elua_8h_a3db3556eec8ef18cb8ddb43816974ac8}{EAPI}} void \mbox{\hyperlink{group__Embryo__Program__VM__Group_ga4c0362643f9ae872754caabe32ad9764}{embryo\+\_\+program\+\_\+vm\+\_\+push}} (Embryo\+\_\+\+Program $\ast$ep)
\begin{DoxyCompactList}\small\item\em Starts a new virtual machine session for the given program. \end{DoxyCompactList}\item 
\mbox{\hyperlink{Elua_8h_a3db3556eec8ef18cb8ddb43816974ac8}{EAPI}} void \mbox{\hyperlink{group__Embryo__Program__VM__Group_ga41d2fb01dff4ca61a4eb47554d4859fe}{embryo\+\_\+program\+\_\+vm\+\_\+pop}} (Embryo\+\_\+\+Program $\ast$ep)
\begin{DoxyCompactList}\small\item\em Frees the current virtual machine session associated with the given program. \end{DoxyCompactList}\end{DoxyCompactItemize}


\doxysubsection{Detailed Description}
Functions that deal with creating and destroying virtual machine sessions for a given program. 

A given embryo program can have multiple virtual machine sessions running. This is useful when you have a native call that in turn calls a function in the embryo program. The native call can start a new virtual machine session to run the function it needs. Once completed, the session can be popped off the program\textquotesingle{}s stack, and the native call can return its value to the old session.

A new virtual machine session is created by pushing a new virtual machine onto the session stack of a program using \mbox{\hyperlink{group__Embryo__Program__VM__Group_ga4c0362643f9ae872754caabe32ad9764}{embryo\+\_\+program\+\_\+vm\+\_\+push}}. The current virtual machine session can be destroyed by calling \mbox{\hyperlink{group__Embryo__Program__VM__Group_ga41d2fb01dff4ca61a4eb47554d4859fe}{embryo\+\_\+program\+\_\+vm\+\_\+pop}}. 

\doxysubsection{Function Documentation}
\mbox{\Hypertarget{group__Embryo__Program__VM__Group_ga6f85080c0f9c9d99190ccf1bdfb60a88}\label{group__Embryo__Program__VM__Group_ga6f85080c0f9c9d99190ccf1bdfb60a88}} 
\index{Virtual Machine Functions@{Virtual Machine Functions}!embryo\_program\_vm\_reset@{embryo\_program\_vm\_reset}}
\index{embryo\_program\_vm\_reset@{embryo\_program\_vm\_reset}!Virtual Machine Functions@{Virtual Machine Functions}}
\doxysubsubsection{\texorpdfstring{embryo\_program\_vm\_reset()}{embryo\_program\_vm\_reset()}}
{\footnotesize\ttfamily \mbox{\hyperlink{Elua_8h_a3db3556eec8ef18cb8ddb43816974ac8}{EAPI}} void embryo\+\_\+program\+\_\+vm\+\_\+reset (\begin{DoxyParamCaption}\item[{Embryo\+\_\+\+Program $\ast$}]{ep }\end{DoxyParamCaption})}



Resets the current virtual machine session of the given program. 


\begin{DoxyParams}{Parameters}
{\em ep} & The given program. \\
\hline
\end{DoxyParams}


Referenced by embryo\+\_\+program\+\_\+vm\+\_\+push().

\mbox{\Hypertarget{group__Embryo__Program__VM__Group_ga4c0362643f9ae872754caabe32ad9764}\label{group__Embryo__Program__VM__Group_ga4c0362643f9ae872754caabe32ad9764}} 
\index{Virtual Machine Functions@{Virtual Machine Functions}!embryo\_program\_vm\_push@{embryo\_program\_vm\_push}}
\index{embryo\_program\_vm\_push@{embryo\_program\_vm\_push}!Virtual Machine Functions@{Virtual Machine Functions}}
\doxysubsubsection{\texorpdfstring{embryo\_program\_vm\_push()}{embryo\_program\_vm\_push()}}
{\footnotesize\ttfamily \mbox{\hyperlink{Elua_8h_a3db3556eec8ef18cb8ddb43816974ac8}{EAPI}} void embryo\+\_\+program\+\_\+vm\+\_\+push (\begin{DoxyParamCaption}\item[{Embryo\+\_\+\+Program $\ast$}]{ep }\end{DoxyParamCaption})}



Starts a new virtual machine session for the given program. 

See \mbox{\hyperlink{group__Embryo__Program__VM__Group}{Virtual Machine Functions}} for more information about how this works.


\begin{DoxyParams}{Parameters}
{\em ep} & The given program. \\
\hline
\end{DoxyParams}


References embryo\+\_\+program\+\_\+vm\+\_\+reset().

\mbox{\Hypertarget{group__Embryo__Program__VM__Group_ga41d2fb01dff4ca61a4eb47554d4859fe}\label{group__Embryo__Program__VM__Group_ga41d2fb01dff4ca61a4eb47554d4859fe}} 
\index{Virtual Machine Functions@{Virtual Machine Functions}!embryo\_program\_vm\_pop@{embryo\_program\_vm\_pop}}
\index{embryo\_program\_vm\_pop@{embryo\_program\_vm\_pop}!Virtual Machine Functions@{Virtual Machine Functions}}
\doxysubsubsection{\texorpdfstring{embryo\_program\_vm\_pop()}{embryo\_program\_vm\_pop()}}
{\footnotesize\ttfamily \mbox{\hyperlink{Elua_8h_a3db3556eec8ef18cb8ddb43816974ac8}{EAPI}} void embryo\+\_\+program\+\_\+vm\+\_\+pop (\begin{DoxyParamCaption}\item[{Embryo\+\_\+\+Program $\ast$}]{ep }\end{DoxyParamCaption})}



Frees the current virtual machine session associated with the given program. 

See \mbox{\hyperlink{group__Embryo__Program__VM__Group}{Virtual Machine Functions}} for more information about how this works. Note that you will need to retrieve any return data or data on the stack before you pop.


\begin{DoxyParams}{Parameters}
{\em ep} & The given program. \\
\hline
\end{DoxyParams}
