Remove a few more warnings.
[suif.git] / html / man_rescope.1.html
blobb65f5b7f44fc6419a3aad2446c439e377c7c28f4
1 <!-- manual page source format generated by PolyglotMan v3.0.7, -->
2 <!-- available via anonymous ftp from ftp.cs.berkeley.edu:/ucb/people/phelps/tcltk/rman.tar.Z -->
4 <HTML>
5 <HEAD>
6 <TITLE>Man page for rescope.1</TITLE>
7 </HEAD>
8 <BODY bgcolor=white>
9 <A HREF="#toc">Table of Contents</A><P>
11 <H2><A NAME="sect0" HREF="#toc0">Name</A></H2>
13 <P>
14 rescope - change global symbol and type scopes
16 <H2><A NAME="sect1" HREF="#toc1"><B>Synopsis</B></A></H2>
18 <P>
19 <B>rescope</B> <I>infile</I> <I>outfile</I> { <I>infile</I> <I>outfile</I> }*
21 <H2><A NAME="sect2" HREF="#toc2"><B>Description</B></A></H2>
23 <P>
24 The <I>rescope</I> program changes the scopes of global variable
25 or procedure symbols or global types, either from the
26 inter-file global symbol table to a file symbol table or
27 from a file symbol table to the inter-file symbol table.
28 <P>
29 The reason there is a separate program for these two operations
30 is that they make unusual requirements on the way
31 procedures are read and written. Symbols and types in the
32 inter-file and file symbol tables use disjoint ranges for
33 their id numbers, which is how symbol and type references
34 are read and written. All procedures that might reference
35 a symbol or type must be read in from a file before that
36 object may safely be moved to a different symbol table
37 with a different range of id numbers. But no procedure
38 that references the object may be written out until it
39 gets its new id number. This is not a problem for objects
40 moving to or from a local scope -- the symbol can only be
41 referenced in a single procedure at the time of the move.
42 But for moves between file and inter-file symbol tables,
43 directly moving the object would in general require all
44 procedures from a file to be read before any are written.
45 <P>
46 This program avoids having more than one procedure in memory
47 by using two copies of the object to be moved. The
48 original is left in the original table while the copy is
49 put in the destination. Then as procedures are read in,
50 the original is used and this program goes over the procedure
51 and changes all references to the original to the
52 copy, then writes the procedure out. It does this simultaneously
53 for all symbols and types that are being moved.
54 <P>
55 Other passes communicate which objects to move and where
56 to move them through ``globalize'' and ``filize'' annotations
57 on global objects. The ``globalize'' annotation
58 takes no arguments and should only appear on objects in a
59 file symbol table that should be moved to the inter-file
60 table. The ``filize'' annotation should have exactly one
61 integer immed as data; this annotation should appear only
62 on objects in the inter-file symbol table that should be
63 moved to a file symbol table specified by the integer
64 immed. The integer immed refers to the file id number;
65 one of the file_set_entries for the input files given to
66 this program must have a file_id() that matches the immed.
68 <H2><A NAME="sect3" HREF="#toc3"><B>History</B></A></H2>
70 <P>
71 This program was written by Chris Wilson.
72 <P>
74 <HR><P>
75 <A NAME="toc"><B>Table of Contents</B></A><P>
76 <UL>
77 <LI><A NAME="toc0" HREF="#sect0">Name</A></LI>
78 <LI><A NAME="toc1" HREF="#sect1">Synopsis</A></LI>
79 <LI><A NAME="toc2" HREF="#sect2">Description</A></LI>
80 <LI><A NAME="toc3" HREF="#sect3">History</A></LI>
81 </UL>
82 </BODY></HTML>