The Squirrel interpreter. See http://www.squirrel-lang.org/

Dependents:   Squirrel

Revision:
1:8a2835ae5c5d
Parent:
0:97a4f8cc534c
--- a/squirrel/sqvm.cpp	Tue Dec 16 10:20:34 2014 +0000
+++ b/squirrel/sqvm.cpp	Tue Dec 16 11:21:09 2014 +0000
@@ -657,6 +657,10 @@
 	return false;
 }
 
+#if defined(__MBED__)
+extern "C" void mbed_execute_idle(HSQUIRRELVM);
+#endif
+
 bool SQVM::Execute(SQObjectPtr &closure, SQInteger nargs, SQInteger stackbase,SQObjectPtr &outres, SQBool raiseerror,ExecutionType et)
 {
 	if ((_nnativecalls + 1) > MAX_NATIVE_CALLS) { Raise_Error(_SC("Native stack overflow")); return false; }
@@ -695,6 +699,9 @@
 	{
 		for(;;)
 		{
+#if defined(__MBED__)
+			mbed_execute_idle(this);
+#endif
 			const SQInstruction &_i_ = *ci->_ip++;
 			//dumpstack(_stackbase);
 			//scprintf("\n[%d] %s %d %d %d %d\n",ci->_ip-ci->_iv->_vals,g_InstrDesc[_i_.op].name,arg0,arg1,arg2,arg3);