Fix some typos

release
Slava Pestov 2007-10-10 00:20:45 -04:00
parent c41f21412e
commit 9072011c32
1 changed files with 8 additions and 7 deletions

View File

@ -4,7 +4,7 @@ USING: alien.c-types arrays cpu.x86.assembler
cpu.x86.architecture cpu.x86.intrinsics cpu.x86.sse2
cpu.x86.allot cpu.architecture kernel kernel.private math
namespaces sequences generator.registers generator.fixup system
alien ;
alien alien.compiler alien.structs slots splitting math.functions ;
IN: cpu.x86.64
PREDICATE: x86-backend amd64-backend
@ -178,10 +178,10 @@ T{ x86-backend f 8 } compiler-backend set-global
! The ABI for passing structs by value is pretty messed up
"void*" c-type clone "__stack_value" define-primitive-type
T{ stack-regs } "__stack_value" c-type set-c-type-reg-class
T{ stack-params } "__stack_value" c-type set-c-type-reg-class
: struct-types&offset ( ctype -- pairs )
c-type struct-type-fields [
: struct-types&offset ( struct-type -- pairs )
struct-type-fields [
dup slot-spec-type swap slot-spec-offset 2array
] map ;
@ -192,14 +192,15 @@ T{ stack-regs } "__stack_value" c-type set-c-type-reg-class
: flatten-large-struct ( type -- )
heap-size cell align
cell /i "__stack_value" <repetition> % ;
cell /i "__stack_value" c-type <repetition> % ;
M: struct-type flatten-value-type ( type -- seq )
dup c-size 16 > [
dup heap-size 16 > [
flatten-large-struct
] [
struct-types&offset split-struct [
[ c-type c-type-reg-class ] map
T{ int-regs } swap member? "void*" "double" ? ,
T{ int-regs } swap member?
"void*" "double" ? c-type ,
] each
] if ;