2014-05-16 12:15:14 -04:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								USING:  compiler.cfg  compiler.cfg.registers  help.markup  help.syntax  ;
  
						 
					
						
							
								
									
										
										
										
											2014-05-06 12:09:34 -04:00 
										
									 
								 
							 
							
								
							 
							
								 
							
							
								IN:  compiler.cfg.stacks.local  
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								HELP:  current-height  
						 
					
						
							
								
									
										
										
										
											2014-07-18 04:47:08 -04:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								{ $class-description "A 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. It has the following slots:" 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								  { $table
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								    { { $slot "d"  } { "Current datastack height."  } }
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								    { { $slot "r"  } { "Current retainstack height."  } }
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								    { { $slot "emit-d"  } { "Queued up datastack height change."  } }
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								    { { $slot "emit-r"  } { "Queued up retainstack height change."  } }
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								  }
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								} ;
 
							 
						 
					
						
							
								
									
										
										
										
											2014-05-06 12:09:34 -04:00 
										
									 
								 
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2014-05-16 12:15:14 -04:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								HELP:  translate-local-loc  
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								{ $values { "loc"  loc } { "loc'"  loc } }
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								{ $description "Translates an absolute stack location to one that is relative to the current stacks height as given in "  { $link current-height } "."  }
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								{ $examples
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								  { $example
							 
						 
					
						
							
								
									
										
										
										
											2014-06-08 21:20:27 -04:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								    "USING: compiler.cfg.stacks.local compiler.cfg.registers namespaces prettyprint ;" 
							 
						 
					
						
							
								
									
										
										
										
											2014-05-16 12:15:14 -04:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								    "T{ current-height { d 3 } } current-height set D 7 translate-local-loc ." 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								    "D 4" 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								  }
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								} ;
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2014-05-06 12:09:34 -04:00 
										
									 
								 
							 
							
								
							 
							
								 
							
							
								HELP:  emit-height-changes  
						 
					
						
							
								
									
										
										
										
											2014-05-26 07:26:00 -04:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								{ $description "Emits stack height change instructions to the CFG being built. This is done when a "  { $link basic-block } " is begun or ended."  }
							 
						 
					
						
							
								
									
										
										
										
											2014-05-06 12:09:34 -04:00 
										
									 
								 
							 
							
								
							 
							
								 
							
							
								{ $examples
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								  { $example
							 
						 
					
						
							
								
									
										
										
										
											2014-05-10 19:45:07 -04:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								    "USING: compiler.cfg.stacks.local make namespaces prettyprint ;" 
							 
						 
					
						
							
								
									
										
										
										
											2014-05-06 12:09:34 -04:00 
										
									 
								 
							 
							
								
							 
							
								 
							
							
								    "T{ current-height { emit-d 4 } { emit-r -2 } } current-height set [ emit-height-changes ] { } make ." 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								    "{ T{ ##inc-d { n 4 } } T{ ##inc-r { n -2 } } }" 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								  }
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								} ;