Merge branch 'master' of git://factorcode.org/git/factor

db4
Doug Coleman 2009-09-24 21:15:23 -05:00
commit d6851f5832
12 changed files with 15 additions and 15 deletions

View File

@ -246,10 +246,10 @@ M: struct binary-zero?
slots empty? [ struct-must-have-slots ] when slots empty? [ struct-must-have-slots ] when
class redefine-struct-tuple-class class redefine-struct-tuple-class
slots make-slots dup check-struct-slots :> slot-specs slots make-slots dup check-struct-slots :> slot-specs
slot-specs offsets-quot call :> size
slot-specs struct-align :> alignment slot-specs struct-align :> alignment
slot-specs offsets-quot call alignment align :> size
class slot-specs size alignment align alignment c-type-for-class :> c-type class slot-specs size alignment c-type-for-class :> c-type
c-type class typedef c-type class typedef
class slot-specs define-accessors class slot-specs define-accessors

View File

@ -40,6 +40,7 @@ M:: x86.32 %dispatch ( src temp -- )
! Registers for fastcall ! Registers for fastcall
M: x86.32 param-reg-1 EAX ; M: x86.32 param-reg-1 EAX ;
M: x86.32 param-reg-2 EDX ; M: x86.32 param-reg-2 EDX ;
M: x86.32 param-reg-3 ECX ;
M: x86.32 pic-tail-reg EBX ; M: x86.32 pic-tail-reg EBX ;

View File

@ -38,7 +38,7 @@ M:: x86.64 %dispatch ( src temp -- )
M: x86.64 param-reg-1 int-regs param-regs first ; M: x86.64 param-reg-1 int-regs param-regs first ;
M: x86.64 param-reg-2 int-regs param-regs second ; M: x86.64 param-reg-2 int-regs param-regs second ;
: param-reg-3 ( -- reg ) int-regs param-regs third ; inline M: x86.64 param-reg-3 int-regs param-regs third ;
M: x86.64 pic-tail-reg RBX ; M: x86.64 pic-tail-reg RBX ;

View File

@ -55,6 +55,7 @@ HOOK: temp-reg cpu ( -- reg )
! Fastcall calling convention ! Fastcall calling convention
HOOK: param-reg-1 cpu ( -- reg ) HOOK: param-reg-1 cpu ( -- reg )
HOOK: param-reg-2 cpu ( -- reg ) HOOK: param-reg-2 cpu ( -- reg )
HOOK: param-reg-3 cpu ( -- reg )
HOOK: pic-tail-reg cpu ( -- reg ) HOOK: pic-tail-reg cpu ( -- reg )
@ -832,8 +833,10 @@ M:: x86 %call-gc ( gc-root-count -- )
param-reg-1 gc-root-base param@ LEA param-reg-1 gc-root-base param@ LEA
! Pass number of roots as second parameter ! Pass number of roots as second parameter
param-reg-2 gc-root-count MOV param-reg-2 gc-root-count MOV
! Pass vm as third argument
param-reg-3 0 MOV rc-absolute-cell rt-vm rel-fixup
! Call GC ! Call GC
"inline_gc" %vm-invoke-3rd-arg ; "inline_gc" f %alien-invoke ;
M: x86 %alien-global ( dst symbol library -- ) M: x86 %alien-global ( dst symbol library -- )
[ 0 MOV ] 2dip rc-absolute-cell rel-dlsym ; [ 0 MOV ] 2dip rc-absolute-cell rel-dlsym ;

View File

@ -7,7 +7,7 @@ cocoa.views cocoa.windows combinators command-line
core-foundation core-foundation.run-loop core-graphics core-foundation core-foundation.run-loop core-graphics
core-graphics.types destructors fry generalizations io.thread core-graphics.types destructors fry generalizations io.thread
kernel libc literals locals math math.bitwise math.rectangles memory kernel libc literals locals math math.bitwise math.rectangles memory
namespaces sequences threads ui namespaces sequences threads ui colors
ui.backend ui.backend.cocoa.views ui.clipboards ui.gadgets ui.backend ui.backend.cocoa.views ui.clipboards ui.gadgets
ui.gadgets.worlds ui.pixel-formats ui.pixel-formats.private ui.gadgets.worlds ui.pixel-formats ui.pixel-formats.private
ui.private words.symbol ; ui.private words.symbol ;

View File

@ -64,7 +64,7 @@ M: x11-ui-backend (pixel-format-attribute)
] if-empty ; ] if-empty ;
M: x11-ui-backend system-background-color M: x11-ui-backend system-background-color
T{ rgba f 0.0 0.0 0.0 0.0 } ; inline T{ rgba f 1.0 1.0 1.0 0.0 } ; inline
CONSTANT: modifiers CONSTANT: modifiers
{ {

View File

@ -94,12 +94,10 @@ DEF(F_FASTCALL void,throw_impl,(CELL quot, F_STACK_FRAME *rewind_to, void *vm)):
jmp *QUOT_XT_OFFSET(ARG0) jmp *QUOT_XT_OFFSET(ARG0)
DEF(F_FASTCALL void,lazy_jit_compile,(CELL quot, void *vm)): DEF(F_FASTCALL void,lazy_jit_compile,(CELL quot, void *vm)):
mov ARG1,NV_TEMP_REG /* stash vm ptr */ mov ARG1,ARG2
mov STACK_REG,ARG1 /* Save stack pointer */ mov STACK_REG,ARG1 /* Save stack pointer */
sub $STACK_PADDING,STACK_REG sub $STACK_PADDING,STACK_REG
push NV_TEMP_REG /* push vm ptr as arg3 */
call MANGLE(lazy_jit_compile_impl) call MANGLE(lazy_jit_compile_impl)
pop NV_TEMP_REG
mov RETURN_REG,ARG0 /* No-op on 32-bit */ mov RETURN_REG,ARG0 /* No-op on 32-bit */
add $STACK_PADDING,STACK_REG add $STACK_PADDING,STACK_REG
jmp *QUOT_XT_OFFSET(ARG0) /* Call the quotation */ jmp *QUOT_XT_OFFSET(ARG0) /* Call the quotation */

View File

@ -48,9 +48,7 @@ DEF(F_FASTCALL void,c_to_factor,(CELL quot, void *vm)):
/* Save stack pointer */ /* Save stack pointer */
lea -CELL_SIZE(STACK_REG),ARG0 lea -CELL_SIZE(STACK_REG),ARG0
push ARG1 /* save vm ptr */
call MANGLE(save_callstack_bottom) call MANGLE(save_callstack_bottom)
pop ARG1
/* Call quot-xt */ /* Call quot-xt */
mov NV_TEMP_REG,ARG0 mov NV_TEMP_REG,ARG0

View File

@ -681,7 +681,7 @@ void factor_vm::inline_gc(cell *gc_roots_base, cell gc_roots_size)
gc_locals.pop_back(); gc_locals.pop_back();
} }
VM_ASM_API void inline_gc(cell *gc_roots_base, cell gc_roots_size, factor_vm *myvm) VM_ASM_API_OVERFLOW void inline_gc(cell *gc_roots_base, cell gc_roots_size, factor_vm *myvm)
{ {
ASSERTVM(); ASSERTVM();
VM_PTR->inline_gc(gc_roots_base,gc_roots_size); VM_PTR->inline_gc(gc_roots_base,gc_roots_size);

View File

@ -20,6 +20,6 @@ PRIMITIVE(gc_stats);
PRIMITIVE(clear_gc_stats); PRIMITIVE(clear_gc_stats);
PRIMITIVE(become); PRIMITIVE(become);
struct factor_vm; struct factor_vm;
VM_ASM_API void inline_gc(cell *gc_roots_base, cell gc_roots_size, factor_vm *myvm); VM_ASM_API_OVERFLOW void inline_gc(cell *gc_roots_base, cell gc_roots_size, factor_vm *myvm);
} }

View File

@ -368,7 +368,7 @@ cell factor_vm::lazy_jit_compile_impl(cell quot_, stack_frame *stack)
return quot.value(); return quot.value();
} }
VM_ASM_API cell lazy_jit_compile_impl(cell quot_, stack_frame *stack, factor_vm *myvm) VM_ASM_API_OVERFLOW cell lazy_jit_compile_impl(cell quot_, stack_frame *stack, factor_vm *myvm)
{ {
ASSERTVM(); ASSERTVM();
return VM_PTR->lazy_jit_compile_impl(quot_,stack); return VM_PTR->lazy_jit_compile_impl(quot_,stack);

View File

@ -27,7 +27,7 @@ PRIMITIVE(jit_compile);
PRIMITIVE(array_to_quotation); PRIMITIVE(array_to_quotation);
PRIMITIVE(quotation_xt); PRIMITIVE(quotation_xt);
VM_ASM_API cell lazy_jit_compile_impl(cell quot, stack_frame *stack, factor_vm *myvm); VM_ASM_API_OVERFLOW cell lazy_jit_compile_impl(cell quot, stack_frame *stack, factor_vm *myvm);
PRIMITIVE(quot_compiled_p); PRIMITIVE(quot_compiled_p);