Dev checkpoint

db4
Phil Dawes 2009-08-23 19:40:59 +01:00
parent 58190c06dc
commit cdb6304fef
4 changed files with 10 additions and 5 deletions

View File

@ -257,11 +257,13 @@ M: x86.32 %callback-value ( ctype -- )
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

View File

@ -17,7 +17,7 @@ bool factorvm::in_code_heap_p(cell ptr)
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 */

View File

@ -90,8 +90,9 @@ void factorvm::nest_stacks()
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();
}
@ -110,8 +111,9 @@ void factorvm::unnest_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();
}

View File

@ -50,8 +50,9 @@ PRIMITIVE(set_datastack);
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);
}