Dev checkpoint

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

View File

@ -257,11 +257,13 @@ M: x86.32 %callback-value ( ctype -- )
ESP 12 SUB ESP 12 SUB
! Save top of data stack in non-volatile register ! Save top of data stack in non-volatile register
%prepare-unbox %prepare-unbox
push-vm-ptr
EAX PUSH EAX PUSH
! Restore data/call/retain stacks ! Restore data/call/retain stacks
"unnest_stacks" f %alien-invoke "unnest_stacks" f %alien-invoke
! Place top of data stack in EAX ! Place top of data stack in EAX
EAX POP EAX POP
temp-reg POP
! Restore C stack ! Restore C stack
ESP 12 ADD ESP 12 ADD
! Unbox EAX ! Unbox EAX

View File

@ -17,7 +17,7 @@ bool factorvm::in_code_heap_p(cell ptr)
bool 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 */ /* Compile a word definition with the non-optimizing compiler. Allocates memory */

View File

@ -90,8 +90,9 @@ void factorvm::nest_stacks()
reset_retainstack(); 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(); return vm->nest_stacks();
} }
@ -110,8 +111,9 @@ void factorvm::unnest_stacks()
dealloc_context(old_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(); return vm->unnest_stacks();
} }

View File

@ -50,8 +50,9 @@ PRIMITIVE(set_datastack);
PRIMITIVE(set_retainstack); PRIMITIVE(set_retainstack);
PRIMITIVE(check_datastack); PRIMITIVE(check_datastack);
VM_C_API void nest_stacks(); struct factorvm;
VM_C_API void unnest_stacks(); VM_C_API void nest_stacks(factorvm *vm);
VM_C_API void unnest_stacks(factorvm *vm);
} }