<li><a href="#t_floating">Floating Point Types</a></li>
<li><a href="#t_void">Void Type</a></li>
<li><a href="#t_label">Label Type</a></li>
+ <li><a href="#t_metadata">Metadata Type</a></li>
</ol>
</li>
<li><a href="#t_derived">Derived Types</a>
<a href="#t_vector">vector</a>,
<a href="#t_struct">structure</a>,
<a href="#t_array">array</a>,
- <a href="#t_label">label</a>.
+ <a href="#t_label">label</a>,
+ <a href="#t_metadata">metadata</a>.
</td>
</tr>
<tr>
<td><a href="#t_primitive">primitive</a></td>
<td><a href="#t_label">label</a>,
<a href="#t_void">void</a>,
- <a href="#t_floating">floating point</a>.</td>
+ <a href="#t_floating">floating point</a>,
+ <a href="#t_metadata">metadata</a>.</td>
</tr>
<tr>
<td><a href="#t_derived">derived</a></td>
</pre>
</div>
+<!-- _______________________________________________________________________ -->
+<div class="doc_subsubsection"> <a name="t_metadata">Metadata Type</a> </div>
+
+<div class="doc_text">
+<h5>Overview:</h5>
+<p>The metadata type represents embedded metadata. The only derived type that
+may contain metadata is <tt>metadata*</tt> or a function type that returns or
+takes metadata typed parameters, but not pointer to metadata types.</p>
+
+<h5>Syntax:</h5>
+
+<pre>
+ metadata
+</pre>
+</div>
+
<!-- ======================================================================= -->
<div class="doc_subsection"> <a name="t_derived">Derived Types</a> </div>
<dt><b>Metadata node</b></dt>
<dd>A metadata node is a structure-like constant with the type of an empty
- struct. For example: "<tt>{ } !{ i32 0, { } !"test" }</tt>". Unlike other
- constants that are meant to be interpreted as part of the instruction stream,
- metadata is a place to attach additional information such as debug info.
+ struct. For example: "<tt>metadata !{ i32 0, metadata !"test" }</tt>".
+ Unlike other constants that are meant to be interpreted as part of the
+ instruction stream, metadata is a place to attach additional information such
+ as debug info.
</dd>
</dl>
<p>Embedded metadata provides a way to attach arbitrary data to the
instruction stream without affecting the behaviour of the program. There are
-two metadata primitives, strings and nodes. All metadata has the type of an
-empty struct and is identified in syntax by a preceding exclamation point
-('<tt>!</tt>').
+two metadata primitives, strings and nodes. All metadata has the
+<tt>metadata</tt> type and is identified in syntax by a preceding exclamation
+point ('<tt>!</tt>').
</p>
<p>A metadata string is a string surrounded by double quotes. It can contain
<p>Metadata nodes are represented with notation similar to structure constants
(a comma separated list of elements, surrounded by braces and preceeded by an
-exclamation point). For example: "<tt>!{ { } !"test\00", i32 10}</tt>".
+exclamation point). For example: "<tt>!{ metadata !"test\00", i32 10}</tt>".
</p>
<p>A metadata node will attempt to track changes to the values it holds. In
the event that a value is deleted, it will be replaced with a typeless
-"<tt>null</tt>", such as "<tt>{ } !{null, i32 0}</tt>".</p>
+"<tt>null</tt>", such as "<tt>metadata !{null, i32 10}</tt>".</p>
<p>Optimizations may rely on metadata to provide additional information about
the program that isn't available in the instructions, or that isn't easily