{ $description "Called to end the local analysis of a block. The word fills in the blocks slots " { $slot "replaces" } ", " { $slot "peeks" } " and " { $slot "kills" } " with what the blocks replaces, peeks and kill locations are." } ;
{ $description "A tuple which keeps track of the stacks heights and increments of a " { $link basic-block } " during local analysis. The idea is that if the stack change instructions are tracked, then multiple changes can be folded into one. It has the following slots:"
{ $table
{
{ $slot "ds-begin" }
"Datastack height at the beginning of the block."
}
{
{ $slot "rs-begin" }
"Retainstack height at the beginning of the block."
}
{
{ $slot "ds-inc" }
"Datastack change during the block."
}
{
{ $slot "rs-inc" }
"Retainstack change during the block."
}
}
}
{ $see-also inc-stack reset-incs } ;
! { $var-description "A two-tuple used to keep track of the heights of the data and retain stacks in a " { $link basic-block } " The idea is that if the stack change instructions are tracked, then multiple changes can be folded into one. The first item is the datastacks current height and queued up height change. The second item is the same for the retain stack." } ;
"{ T{ ##inc { loc D: 4 } } T{ ##inc { loc R: -2 } } }"
}
} ;
HELP:inc-stack
{ $values { "loc" loc } }
{ $description "Increases or decreases the data or retain stack depending on if loc is a " { $link ds-loc } " or " { $link rs-loc } " instance. An " { $link ##inc } " instruction will later be inserted." } ;
{ $description "Retrieves the virtual register at the given stack location. If no register has been stored at that location, then a new vreg is returned." } ;
{ $var-description "An " { $link assoc } " that maps from stack locations to virtual registers that were put on the stack during the local analysis phase. " { $link ds-push } " and similar words writes to it." }
{ { $slot "peeks" } " all stack locations that the block reads before writing" }
{ { $slot "replaces" } " all stack locations that the block writes" }
{ { $slot "kills" } " all stack locations which become unavailable after the block ends because of the stack height being decremented. For example, if the block contains " { $link drop } ", then D: 0 will be contained in kills because that stack location will not be live anymore." }