some files aren't too happy in a library
[suif.git] / html / suif1_88.html
blob18a2335eaf7651e4df6e950c9842eaac561f321a
1 <HTML>
2 <HEAD>
3 <!-- This HTML file has been created by texi2html 1.54
4 from suif1.texi on 28 April 1999 -->
6 <TITLE>The SUIF Version 1 Library - Copying the Objects</TITLE>
7 <link href="suif1_89.html" rel=Next>
8 <link href="suif1_87.html" rel=Previous>
9 <link href="suif1_toc.html" rel=ToC>
11 </HEAD>
12 <BODY>
13 <p>Go to the <A HREF="suif1_1.html">first</A>, <A HREF="suif1_87.html">previous</A>, <A HREF="suif1_89.html">next</A>, <A HREF="suif1_113.html">last</A> section, <A HREF="suif1_toc.html">table of contents</A>.
14 <P><HR><P>
17 <H2><A NAME="SEC88" HREF="suif1_toc.html#TOC88">Copying the Objects</A></H2>
19 <P>
20 <A NAME="IDX641"></A>
21 <A NAME="IDX642"></A>
22 <A NAME="IDX643"></A>
23 <A NAME="IDX644"></A>
24 <A NAME="IDX645"></A>
25 <A NAME="IDX646"></A>
26 Once the exposed references have been resolved, the code can be copied.
27 The <CODE>tree_node_list</CODE>, <CODE>tree_node</CODE>, <CODE>operand</CODE>,
28 <CODE>instruction</CODE>, <CODE>block_symtab</CODE>, and <CODE>proc_symtab</CODE> classes
29 have <CODE>clone_helper</CODE> methods to perform the actual copying. These
30 methods change references to objects in the original objects lists of
31 the <CODE>replacements</CODE> structure to references to the newly created
32 replacements.
34 </P>
35 <P>
36 <A NAME="IDX647"></A>
37 Annotations on the objects are also cloned. The <CODE>clone_annotes</CODE>
38 method is used to copy the annotations from one <CODE>suif_object</CODE> to
39 another. Unregistered annotations cannot be copied because the
40 structure of their data fields is unknown. The <CODE>clone_helper</CODE>
41 methods call <CODE>clone_annotes</CODE> for each object that is cloned; you
42 generally do not need to call it directly.
44 </P>
45 <P>
46 The <CODE>clone_helper</CODE> and <CODE>clone_annotes</CODE> methods can also be
47 used to perform another related function. It is occasionally necessary
48 to replace references to one set of objects with references to another
49 set of objects. Since the cloning methods do that anyway, it is easy to
50 have them update the references without actually making copies. Setting
51 the <CODE>no_copy</CODE> parameter causes them to update the references as
52 specified in a <CODE>replacements</CODE> structure without copying the
53 objects.
55 </P>
57 <P><HR><P>
58 <p>Go to the <A HREF="suif1_1.html">first</A>, <A HREF="suif1_87.html">previous</A>, <A HREF="suif1_89.html">next</A>, <A HREF="suif1_113.html">last</A> section, <A HREF="suif1_toc.html">table of contents</A>.
59 </BODY>
60 </HTML>