ANEW M_Object new_shred(const VM_Shred);
ANN void fork_launch(const M_Object, const m_uint);
ANN void __release(const M_Object, const VM_Shred);
-ANN void exception(const VM_Shred, const m_str);
ANN void broadcast(const M_Object);
#define STRING(o) (*(m_str*) ((M_Object)o)->data)
#define UGEN(o) (*(UGen*) ((M_Object)o)->data)
#define ARRAY(o) (*(M_Vector*) ((M_Object)o)->data)
#define IO_FILE(o) (*(FILE**) (((M_Object)o)->data + SZ_INT))
-#define Except(s, c) { exception(s, c); return; }
static inline void _release(const restrict M_Object obj, const restrict VM_Shred shred) {
if(!--obj->ref)__release(obj, shred);
#include "gack.h"
#undef insert_symbol
-ANN void exception(const VM_Shred shred, const m_str c) {
-//handle(shred);
- gw_err("{+}%s{0}: shred[{-}id=%" UINT_F "{0}:%s], PC=[{-}%" UINT_F "{0}]\n",
- c, shred->tick->xid, shred->info->name, shred->pc - 1);
- vm_shred_exit(shred);
-}
M_Object new_object(MemPool p, const VM_Shred shred, const Type t) {
const M_Object a = mp_calloc(p, M_Object);
m_uint i;
Func f = *(Func*)MEM(0);
if(!f){
- Except(shred, "NullCallbackException");
+ handle(shred, "NullCallbackException");
}
m_uint offset = shred->mem - ((m_bit*)shred + sizeof(struct VM_Shred_) + SIZEOF_REG);
PUSH_MEM(shred, offset);