compiler.*: new docs
parent
e359f3fca4
commit
2e332f73b5
|
@ -1,5 +1,5 @@
|
|||
USING: alien.c-types compiler.cfg.instructions help.markup help.syntax make
|
||||
math ;
|
||||
USING: alien.c-types compiler.cfg.instructions help.markup help.syntax
|
||||
math sequences ;
|
||||
IN: compiler.cfg.builder.alien.boxing
|
||||
|
||||
HELP: box
|
||||
|
@ -36,6 +36,10 @@ HELP: box-return
|
|||
}
|
||||
{ $see-also ##box-alien } ;
|
||||
|
||||
HELP: flatten-c-type
|
||||
{ $values { "c-type" abstract-c-type } { "pairs" sequence } }
|
||||
{ $description "pairs have shape { rep on-stack? f }" } ;
|
||||
|
||||
HELP: stack-size
|
||||
{ $values
|
||||
{ "c-type" c-type }
|
||||
|
|
|
@ -10,7 +10,6 @@ IN: compiler.cfg.builder.alien.boxing
|
|||
|
||||
SYMBOL: struct-return-area
|
||||
|
||||
! pairs have shape { rep on-stack? }
|
||||
GENERIC: flatten-c-type ( c-type -- pairs )
|
||||
|
||||
M: c-type flatten-c-type
|
||||
|
|
|
@ -1,9 +1,6 @@
|
|||
USING: cpu.architecture help.markup help.syntax math ;
|
||||
USING: cpu.architecture help.markup help.syntax kernel math vectors ;
|
||||
IN: compiler.cfg.builder.alien.params
|
||||
|
||||
HELP: stack-params
|
||||
{ $var-description "Count of the number of bytes of stack allocation required to store the current call frames parameters." } ;
|
||||
|
||||
HELP: alloc-stack-param
|
||||
{ $values { "rep" representation } { "n" integer } }
|
||||
{ $description "Allocates space for a stack parameter value of the given representation and returns the previous stack parameter offset." }
|
||||
|
@ -15,3 +12,15 @@ HELP: alloc-stack-param
|
|||
"0"
|
||||
}
|
||||
} ;
|
||||
|
||||
HELP: reg-class-full?
|
||||
{ $values { "reg-class" vector } { "odd-register?" boolean } { "?" boolean } }
|
||||
{ $description "The register class is full if there are no registers left in it, or if there is only one register and 'odd-register?' is " { $link t } ". If it is full, then it is emptied as a side-effect." } ;
|
||||
|
||||
HELP: stack-params
|
||||
{ $var-description "Count of the number of bytes of stack allocation required to store the current call frames parameters." } ;
|
||||
|
||||
ARTICLE: "compiler.cfg.builder.alien.params"
|
||||
"Allocation for alien node parameters" "This vocab allocates registers and spill slots for alien calls." ;
|
||||
|
||||
ABOUT: "compiler.cfg.builder.alien.params"
|
||||
|
|
|
@ -2,8 +2,8 @@ USING: alien arrays assocs byte-arrays classes combinators
|
|||
compiler.cfg compiler.cfg.builder compiler.cfg.intrinsics.fixnum
|
||||
compiler.cfg.linear-scan.assignment compiler.cfg.liveness
|
||||
compiler.cfg.ssa.destruction compiler.cfg.value-numbering
|
||||
compiler.codegen.gc-maps cpu.architecture help.markup help.syntax
|
||||
kernel layouts math sequences slots.private system vm ;
|
||||
compiler.codegen.gc-maps compiler.tree cpu.architecture help.markup
|
||||
help.syntax kernel layouts math sequences slots.private system vm ;
|
||||
IN: compiler.cfg.instructions
|
||||
|
||||
HELP: ##alien-invoke
|
||||
|
@ -31,7 +31,17 @@ HELP: ##alien-invoke
|
|||
}
|
||||
"Which function arguments that goes in " { $slot "reg-inputs" } " and which goes in " { $slot "stack-inputs" } " depend on the calling convention. In " { $link cdecl } " on " { $link x86.32 } ", all arguments goes in " { $slot "stack-inputs" } ", in " { $link x86.64 } " the first six arguments are passed in registers and then stack parameters are used for the remainder."
|
||||
}
|
||||
{ $see-also %alien-invoke } ;
|
||||
{ $see-also #alien-invoke %alien-invoke } ;
|
||||
|
||||
HELP: ##alien-indirect
|
||||
{ $class-description
|
||||
"An instruction representing an indirect alien call. The first item on the datastack is a pointer to the function to call and the parameters follows. It has the following slots:"
|
||||
{ $table
|
||||
{ { $slot "src" } { "Spill slot containing the function pointer." } }
|
||||
{ { $slot "reg-outputs" } { "Sequence of output values passed in registers." } }
|
||||
}
|
||||
}
|
||||
{ $see-also alien-indirect %alien-indirect } ;
|
||||
|
||||
HELP: ##allot
|
||||
{ $class-description
|
||||
|
|
|
@ -5,15 +5,18 @@ IN: compiler.codegen.labels
|
|||
HELP: binary-literal-table
|
||||
{ $var-description "A relocation table used during code generation to keep track of binary relocations. Binary literals are stored at the end of the generated assembly code on the code heap." } ;
|
||||
|
||||
HELP: define-label
|
||||
{ $values { "name" string } }
|
||||
{ $description "Defines a new label with the given name. The " { $slot "offset" } " slot is filled in later." } ;
|
||||
|
||||
HELP: emit-binary-literals
|
||||
{ $description "Emits all binary literals in the " { $link binary-literal-table } "." } ;
|
||||
|
||||
HELP: rel-binary-literal
|
||||
{ $values { "literal" byte-array } { "class" "relocation class" } }
|
||||
{ $description "Adds a binary literal to the relocation table." }
|
||||
{ $see-also binary-literal-table } ;
|
||||
|
||||
HELP: define-label
|
||||
{ $values { "name" string } }
|
||||
{ $description "Defines a new label with the given name. The " { $slot "offset" } " slot is filled in later." } ;
|
||||
|
||||
HELP: resolve-label
|
||||
{ $values { "label/name" { $link label } " or " { $link string } } }
|
||||
{ $description "Assigns the current " { $link compiled-offset } " to the given label." } ;
|
||||
|
|
Loading…
Reference in New Issue