moved stack_chain into vm struct

db4
Phil Dawes 2009-08-20 19:20:48 +01:00
parent 25bbca2f66
commit 9a37b6abb6
5 changed files with 6 additions and 6 deletions

View 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

View File

@ -1,7 +1,5 @@
#include "master.hpp"
factor::context *stack_chain;
namespace factor
{

View File

@ -55,4 +55,3 @@ VM_C_API void unnest_stacks();
}
VM_C_API factor::context *stack_chain;

View 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

View File

@ -3,6 +3,9 @@ namespace factor
struct factorvm {
factor::context *stack_chain;
// segments
inline cell align_page(cell a);