ESP 12 SUB
! Save top of data stack in non-volatile register
%prepare-unbox
+ push-vm-ptr
EAX PUSH
! Restore data/call/retain stacks
"unnest_stacks" f %alien-invoke
! Place top of data stack in EAX
EAX POP
+ temp-reg POP
! Restore C stack
ESP 12 ADD
! Unbox EAX
bool in_code_heap_p(cell ptr)
{
- return vm->in_code_heap_p(ptr);
+ return vm->in_code_heap_p(ptr); // used by os specific signal handlers
}
/* Compile a word definition with the non-optimizing compiler. Allocates memory */
reset_retainstack();
}
-void nest_stacks()
+void nest_stacks(factorvm *myvm)
{
+ printf("PHIL nest_stacks %d %d\n",vm,myvm);fflush(stdout);
return vm->nest_stacks();
}
dealloc_context(old_stacks);
}
-void unnest_stacks()
+void unnest_stacks(factorvm *myvm)
{
+ printf("PHIL unnest_stacks %d %d\n",vm,myvm);fflush(stdout);
return vm->unnest_stacks();
}
PRIMITIVE(set_retainstack);
PRIMITIVE(check_datastack);
-VM_C_API void nest_stacks();
-VM_C_API void unnest_stacks();
+struct factorvm;
+VM_C_API void nest_stacks(factorvm *vm);
+VM_C_API void unnest_stacks(factorvm *vm);
}