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


Resets the current virtual machine session of the given program.  


\subsection*{Functions}
\begin{DoxyCompactItemize}
\item 
\mbox{\hyperlink{group__Elua_ga3db3556eec8ef18cb8ddb43816974ac8}{E\+A\+PI}} 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{group__Elua_ga3db3556eec8ef18cb8ddb43816974ac8}{E\+A\+PI}} 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}


\subsection{Detailed Description}
Resets the current virtual machine session of the given program. 


\begin{DoxyParams}{Parameters}
{\em ep} & The given program.\\
\hline
\end{DoxyParams}
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}}. 

\subsection{Function Documentation}
\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}}
\subsubsection{\texorpdfstring{embryo\+\_\+program\+\_\+vm\+\_\+push()}{embryo\_program\_vm\_push()}}
{\footnotesize\ttfamily \mbox{\hyperlink{group__Elua_ga3db3556eec8ef18cb8ddb43816974ac8}{E\+A\+PI}} 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}
\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}}
\subsubsection{\texorpdfstring{embryo\+\_\+program\+\_\+vm\+\_\+pop()}{embryo\_program\_vm\_pop()}}
{\footnotesize\ttfamily \mbox{\hyperlink{group__Elua_ga3db3556eec8ef18cb8ddb43816974ac8}{E\+A\+PI}} 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}
