This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: cleanup vtable gc
> This should be documented in c-tree.texi.
Ah yes. I forgot we had tree docs outside the headers.
r~
* doc/c-tree.texi (Expression trees): Add VTABLE_REF.
Index: c-tree.texi
===================================================================
RCS file: /cvs/gcc/gcc/gcc/doc/c-tree.texi,v
retrieving revision 1.20
diff -c -p -d -r1.20 c-tree.texi
*** c-tree.texi 2001/10/09 23:11:55 1.20
--- c-tree.texi 2001/10/12 00:36:36
*************** This macro returns the attributes on the
*** 1741,1746 ****
--- 1741,1747 ----
@tindex EXIT_EXPR
@tindex CLEANUP_POINT_EXPR
@tindex ARRAY_REF
+ @tindex VTABLE_REF
The internal representation for expressions is for the most part quite
straightforward. However, there are a few facts that one must bear in
*************** is taken, and this value replaces the fi
*** 2252,2256 ****
--- 2253,2268 ----
list. In this case, the value of the expression is the @code{VAR_DECL}
given by the third operand to the @code{AGGR_INIT_EXPR}; constructors do
not return a value.
+
+ @item VTABLE_REF
+ A @code{VTABLE_REF} indicates that the interior expression computes
+ a value that is a vtable entry. It is used with @option{-fvtable-gc}
+ to track the reference through to front end to the middle end, at
+ which point we transform this to a @code{REG_VTABLE_REF} note, which
+ survives the balance of code generation.
+
+ The first operand is the expression that computes the vtable reference.
+ The second operand is the @code{VAR_DECL} of the vtable. The third
+ operand is an @code{INTEGER_CST} of the byte offset into the vtable.
@end table