]> gitweb.factorcode.org Git - factor.git/commitdiff
Dev checkpoint
authorPhil Dawes <phil@phildawes.net>
Sun, 23 Aug 2009 18:40:59 +0000 (19:40 +0100)
committerPhil Dawes <phil@phildawes.net>
Wed, 16 Sep 2009 07:17:26 +0000 (08:17 +0100)
basis/cpu/x86/32/32.factor
vm/code_heap.cpp
vm/contexts.cpp
vm/contexts.hpp

index adddc4c5b207e863ff397971e414a2766c71814f..fe365f2e502f0a334f61a0b299dd90b11f281329 100755 (executable)
@@ -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
index 39f0dfd52ac29c50a71abe8c6517c9f6efb05e27..d91e349db77328811b83d879816e6d3e0bbcc3cd 100755 (executable)
@@ -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 */
index f5c63f1e7fab2cbace0097c5cdf4f3588e02a0da..26197a4863290d47610a699247d4dc7cad0866e1 100644 (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();
 }
 
index 17f8a7eb70477447a22e117f0a2cb9de25f09ab2..060b15fad770dc4eaa910b6f5f20a813c7136ea5 100644 (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);
 
 }