[cfe-commits] r113760 - /cfe/trunk/docs/PCHInternals.html
Argyrios Kyrtzidis
akyrtzi at gmail.com
Mon Sep 13 10:48:02 PDT 2010
Author: akirtzidis
Date: Mon Sep 13 12:48:02 2010
New Revision: 113760
URL: http://llvm.org/viewvc/llvm-project?rev=113760&view=rev
Log:
Update 'docs/PCHInternals.html' about how subexpressions are stored.
Modified:
cfe/trunk/docs/PCHInternals.html
Modified: cfe/trunk/docs/PCHInternals.html
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/docs/PCHInternals.html?rev=113760&r1=113759&r2=113760&view=diff
==============================================================================
--- cfe/trunk/docs/PCHInternals.html (original)
+++ cfe/trunk/docs/PCHInternals.html Mon Sep 13 12:48:02 2010
@@ -391,23 +391,23 @@
that statement or expression. Each substatement or subexpression
within an expression is stored as a separate record (which keeps most
records to a fixed size). Within the precompiled header, the
-subexpressions of an expression are stored prior to the expression
+subexpressions of an expression are stored, in reverse order, prior to the expression
that owns those expression, using a form of <a
href="http://en.wikipedia.org/wiki/Reverse_Polish_notation">Reverse
Polish Notation</a>. For example, an expression <code>3 - 4 + 5</code>
would be represented as follows:</p>
<table border="1">
- <tr><td><code>IntegerLiteral(3)</code></td></tr>
+ <tr><td><code>IntegerLiteral(5)</code></td></tr>
<tr><td><code>IntegerLiteral(4)</code></td></tr>
+ <tr><td><code>IntegerLiteral(3)</code></td></tr>
<tr><td><code>BinaryOperator(-)</code></td></tr>
- <tr><td><code>IntegerLiteral(5)</code></td></tr>
<tr><td><code>BinaryOperator(+)</code></td></tr>
<tr><td>STOP</td></tr>
</table>
<p>When reading this representation, Clang evaluates each expression
-record it encounters, builds the appropriate abstract synax tree node,
+record it encounters, builds the appropriate abstract syntax tree node,
and then pushes that expression on to a stack. When a record contains <i>N</i>
subexpressions--<code>BinaryOperator</code> has two of them--those
expressions are popped from the top of the stack. The special STOP
More information about the cfe-commits
mailing list