2016-03-08 08:38:48 -05:00
USING: classes classes.builtin compiler.cfg compiler.cfg.instructions
compiler.tree compiler.tree.propagation.info help.markup help.syntax
kernel layouts math slots.private ;
2014-05-04 19:12:41 -04:00
IN: compiler.cfg.intrinsics.slots
HELP: class-tag
2015-12-11 20:05:45 -05:00
{ $values { "class" class } { "tag/f" { $maybe number } } }
2014-05-04 19:12:41 -04:00
{ $description "Finds the class number for this class if it is a subclass of a builtin class, or " { $link f } " if it isn't." }
{ $examples
{ $example
"USING: compiler.cfg.intrinsics.slots math prettyprint ;"
"complex class-tag ."
"7"
}
} ;
HELP: immediate-slot-offset?
2015-12-11 20:05:45 -05:00
{ $values { "object" object } { "?" boolean } }
2014-05-04 19:12:41 -04:00
{ $description
2015-12-01 07:43:45 -05:00
{ $link t } " if the object is a " { $link fixnum } " that is small enough to fit into a machine register. It is used to determine whether immediate versions of the instructions " { $link ##set-slot } " and " { $link ##set-slot-imm } " can be emitted." }
2014-05-04 19:12:41 -04:00
{ $examples
{ $example
"USING: compiler.cfg.intrinsics.slots compiler.tree.propagation.info prettyprint ;"
2015-12-01 07:43:45 -05:00
"33 immediate-slot-offset? ."
2014-05-04 19:12:41 -04:00
"t"
}
} ;
2015-11-27 19:55:12 -05:00
HELP: node>set-slot-data
{ $values
{ "#call" #call }
{ "write-barrier?" "whether a write barrier is needed, it always is unless the item to set is an " { $link immediate } }
2015-12-11 20:05:45 -05:00
{ "tag" { $maybe number } }
2015-11-27 19:55:12 -05:00
{ "literal" "a literal" }
} { $description "Grabs the data needed from a call node to determine what intrinsic CFG instructions to emit for the " { $link set-slot } " call." } ;
2014-05-04 19:12:41 -04:00
HELP: value-tag
2015-12-11 20:05:45 -05:00
{ $values { "info" value-info-state } { "n/f" { $maybe number } } }
2014-05-04 19:12:41 -04:00
{ $description "Finds the class number for this value-info-states class (an index in the " { $link builtins } " list), or " { $link f } " if it hasn't one." } ;
HELP: emit-set-slot
2016-03-08 08:38:48 -05:00
{ $values
{ "block" basic-block }
{ "#call" #call }
{ "block'" basic-block }
}
2014-05-04 19:12:41 -04:00
{ $description "Emits intrinsic code for a " { $link set-slot } " call." } ;
2016-03-08 08:38:48 -05:00
ARTICLE: "compiler.cfg.intrinsics.slots"
"Generating instructions for slot access"
"This vocab has words for generating intrinsic CFG instructions for slot accessors."
$nl
"Main words, called directly by the compiler through the \"intrinsic\" word property:"
{ $subsections
emit-set-slot
emit-slot
} ;
ABOUT: "compiler.cfg.intrinsics.slots"