]> gitweb.factorcode.org Git - factor.git/commitdiff
moved stack_chain into vm struct
authorPhil Dawes <phil@phildawes.net>
Thu, 20 Aug 2009 18:20:48 +0000 (19:20 +0100)
committerPhil Dawes <phil@phildawes.net>
Wed, 16 Sep 2009 07:16:31 +0000 (08:16 +0100)
basis/cpu/x86/x86.factor
vm/contexts.cpp
vm/contexts.hpp
vm/cpu-x86.64.S
vm/vm.hpp

index da391f632084dd11e6f8103e766b80e22b4cb7d7..798b67bc1a7d0f2adfd069dc089955bc1f7abd0e 100644 (file)
@@ -612,7 +612,7 @@ M:: x86 %call-gc ( gc-root-count -- )
     ! Call GC
     "inline_gc" f %vm-invoke ;
 
-M: x86 %alien-global
+M: x86 %alien-global ( dst symbol library -- )
     [ 0 MOV ] 2dip rc-absolute-cell rel-dlsym ;
 
 M: x86 %epilogue ( n -- ) cell - incr-stack-reg ;
@@ -742,7 +742,7 @@ M:: x86 %save-context ( temp1 temp2 callback-allowed? -- )
     #! Save Factor stack pointers in case the C code calls a
     #! callback which does a GC, which must reliably trace
     #! all roots.
-    temp1 "stack_chain" f %alien-global
+    temp1 0 MOV rc-absolute-cell rt-vm rel-fixup ! stack-chain is first item in vm struct. TODO: make vm C-STRUCT
     temp1 temp1 [] MOV
     temp2 stack-reg cell neg [+] LEA
     temp1 [] temp2 MOV
index 3d627ab05029180f43efa4a1f2db678aee82d0bc..f5c63f1e7fab2cbace0097c5cdf4f3588e02a0da 100644 (file)
@@ -1,7 +1,5 @@
 #include "master.hpp"
 
-factor::context *stack_chain;
-
 namespace factor
 {
 
index 905d3d5b495f17b1667ac507a242f9f83f29cb15..17f8a7eb70477447a22e117f0a2cb9de25f09ab2 100644 (file)
@@ -55,4 +55,3 @@ VM_C_API void unnest_stacks();
 
 }
 
-VM_C_API factor::context *stack_chain;
index 606c81c58212950ddf35e3fafe4da7cde0ee3bae..98addeb80d6fef219bb733de2c3c8a4a2008915d 100644 (file)
@@ -88,7 +88,7 @@ DEF(void,primitive_inline_cache_miss_tail,(void)):
        add $STACK_PADDING,%rsp
        jmp *%rax
 
-<<<<<<< HEAD
+
 DEF(void,get_sse_env,(void*)):
        stmxcsr (%rdi)
        ret
index 9af0c5c8f986993278a9a7e74cc3de8e77f446c3..40be36b249a9024ee9055b2aaad01ccb0d02ce3b 100644 (file)
--- a/vm/vm.hpp
+++ b/vm/vm.hpp
@@ -3,6 +3,9 @@ namespace factor
 
 struct factorvm {
 
+       factor::context *stack_chain; 
+
+
        // segments
        inline cell align_page(cell a);