Your IP : 216.73.216.48


Current Path : /usr/X11R6/share/gtk-doc/html/orc/
Upload File :
Current File : //usr/X11R6/share/gtk-doc/html/orc/orc-OrcCompiler.html

<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>OrcCompiler: Orc Reference Manual</title>
<meta name="generator" content="DocBook XSL Stylesheets V1.78.1">
<link rel="home" href="index.html" title="Orc Reference Manual">
<link rel="up" href="ch02.html" title="Application API">
<link rel="prev" href="orc-OrcProgram.html" title="OrcProgram">
<link rel="next" href="orc-OrcExecutor.html" title="OrcExecutor">
<meta name="generator" content="GTK-Doc V1.24 (XML mode)">
<link rel="stylesheet" href="style.css" type="text/css">
</head>
<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
<table class="navigation" id="top" width="100%" summary="Navigation header" cellpadding="2" cellspacing="5"><tr valign="middle">
<td width="100%" align="left" class="shortcuts">
<a href="#" class="shortcut">Top</a><span id="nav_description">  <span class="dim">|</span> 
                  <a href="#orc-OrcCompiler.description" class="shortcut">Description</a></span>
</td>
<td><a accesskey="h" href="index.html"><img src="home.png" width="16" height="16" border="0" alt="Home"></a></td>
<td><a accesskey="u" href="ch02.html"><img src="up.png" width="16" height="16" border="0" alt="Up"></a></td>
<td><a accesskey="p" href="orc-OrcProgram.html"><img src="left.png" width="16" height="16" border="0" alt="Prev"></a></td>
<td><a accesskey="n" href="orc-OrcExecutor.html"><img src="right.png" width="16" height="16" border="0" alt="Next"></a></td>
</tr></table>
<div class="refentry">
<a name="orc-OrcCompiler"></a><div class="titlepage"></div>
<div class="refnamediv"><table width="100%"><tr>
<td valign="top">
<h2><span class="refentrytitle"><a name="orc-OrcCompiler.top_of_page"></a>OrcCompiler</span></h2>
<p>OrcCompiler — Compile Orc programs</p>
</td>
<td class="gallery_image" valign="top" align="right"></td>
</tr></table></div>
<div class="refsect1">
<a name="orc-OrcCompiler.functions"></a><h2>Functions</h2>
<div class="informaltable"><table width="100%" border="0">
<colgroup>
<col width="150px" class="functions_return">
<col class="functions_name">
</colgroup>
<tbody>
<tr>
<td class="define_keyword">#define</td>
<td class="function_name">
<a class="link" href="orc-OrcCompiler.html#ORC-COMPILER-ERROR:CAPS" title="ORC_COMPILER_ERROR()">ORC_COMPILER_ERROR</a><span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="define_keyword">#define</td>
<td class="function_name">
<a class="link" href="orc-OrcCompiler.html#ORC-COMPILE-RESULT-IS-FATAL:CAPS" title="ORC_COMPILE_RESULT_IS_FATAL()">ORC_COMPILE_RESULT_IS_FATAL</a><span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="define_keyword">#define</td>
<td class="function_name">
<a class="link" href="orc-OrcCompiler.html#ORC-COMPILE-RESULT-IS-SUCCESSFUL:CAPS" title="ORC_COMPILE_RESULT_IS_SUCCESSFUL()">ORC_COMPILE_RESULT_IS_SUCCESSFUL</a><span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="define_keyword">#define</td>
<td class="function_name">
<a class="link" href="orc-OrcCompiler.html#ORC-ASM-CODE:CAPS" title="ORC_ASM_CODE()">ORC_ASM_CODE</a><span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">
<span class="returnvalue">void</span>
</td>
<td class="function_name">
<a class="link" href="orc-OrcCompiler.html#orc-compiler-append-code" title="orc_compiler_append_code ()">orc_compiler_append_code</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">
<span class="returnvalue">int</span>
</td>
<td class="function_name">
<a class="link" href="orc-OrcCompiler.html#orc-compiler-label-new" title="orc_compiler_label_new ()">orc_compiler_label_new</a> <span class="c_punctuation">()</span>
</td>
</tr>
</tbody>
</table></div>
</div>
<div class="refsect1">
<a name="orc-OrcCompiler.other"></a><h2>Types and Values</h2>
<div class="informaltable"><table width="100%" border="0">
<colgroup>
<col width="150px" class="name">
<col class="description">
</colgroup>
<tbody>
<tr>
<td class="datatype_keyword">enum</td>
<td class="function_name"><a class="link" href="orc-OrcCompiler.html#OrcCompileResult" title="enum OrcCompileResult">OrcCompileResult</a></td>
</tr>
<tr>
<td class="datatype_keyword"> </td>
<td class="function_name"><a class="link" href="orc-OrcCompiler.html#OrcCompiler" title="OrcCompiler">OrcCompiler</a></td>
</tr>
<tr>
<td class="datatype_keyword"> </td>
<td class="function_name"><a class="link" href="orc-OrcCompiler.html#OrcConstant" title="OrcConstant">OrcConstant</a></td>
</tr>
<tr>
<td class="define_keyword">#define</td>
<td class="function_name"><a class="link" href="orc-OrcCompiler.html#ORC-ENABLE-ASM-CODE:CAPS" title="ORC_ENABLE_ASM_CODE">ORC_ENABLE_ASM_CODE</a></td>
</tr>
</tbody>
</table></div>
</div>
<div class="refsect1">
<a name="orc-OrcCompiler.description"></a><h2>Description</h2>
<p>OrcCompiler is the object used to convert Orc programs contained
in an OrcProgram object into assembly code and object code.</p>
<p>The OrcCompileResult enum is used to indicate whether or not
a compilation attempt was successful or not.  The macros
<a class="link" href="orc-OrcCompiler.html#ORC-COMPILE-RESULT-IS-SUCCESSFUL:CAPS" title="ORC_COMPILE_RESULT_IS_SUCCESSFUL()"><code class="function">ORC_COMPILE_RESULT_IS_SUCCESSFUL()</code></a> and <a class="link" href="orc-OrcCompiler.html#ORC-COMPILE-RESULT-IS-FATAL:CAPS" title="ORC_COMPILE_RESULT_IS_FATAL()"><code class="function">ORC_COMPILE_RESULT_IS_FATAL()</code></a>
should be used instead of checking values directly.</p>
<p>When a program is compiled, the compiler calls the functions
contained in various OrcRule structures.  These functions generate
assembly and object instructions by calling <a class="link" href="orc-OrcCompiler.html#ORC-ASM-CODE:CAPS" title="ORC_ASM_CODE()"><code class="function">ORC_ASM_CODE()</code></a>
or functions that use <a class="link" href="orc-OrcCompiler.html#ORC-ASM-CODE:CAPS" title="ORC_ASM_CODE()"><code class="function">ORC_ASM_CODE()</code></a> internally.</p>
</div>
<div class="refsect1">
<a name="orc-OrcCompiler.functions_details"></a><h2>Functions</h2>
<div class="refsect2">
<a name="ORC-COMPILER-ERROR:CAPS"></a><h3>ORC_COMPILER_ERROR()</h3>
<pre class="programlisting">#define             ORC_COMPILER_ERROR(compiler, ...)</pre>
<p>
</p>
</div>
<hr>
<div class="refsect2">
<a name="ORC-COMPILE-RESULT-IS-FATAL:CAPS"></a><h3>ORC_COMPILE_RESULT_IS_FATAL()</h3>
<pre class="programlisting">#define ORC_COMPILE_RESULT_IS_FATAL(x) ((x) &gt;= 0x200)
</pre>
<p>
</p>
</div>
<hr>
<div class="refsect2">
<a name="ORC-COMPILE-RESULT-IS-SUCCESSFUL:CAPS"></a><h3>ORC_COMPILE_RESULT_IS_SUCCESSFUL()</h3>
<pre class="programlisting">#define ORC_COMPILE_RESULT_IS_SUCCESSFUL(x) ((x) &lt; 0x100)
</pre>
<p>
</p>
</div>
<hr>
<div class="refsect2">
<a name="ORC-ASM-CODE:CAPS"></a><h3>ORC_ASM_CODE()</h3>
<pre class="programlisting">#define ORC_ASM_CODE(compiler,...) orc_compiler_append_code(compiler, __VA_ARGS__)
</pre>
<p>
</p>
</div>
<hr>
<div class="refsect2">
<a name="orc-compiler-append-code"></a><h3>orc_compiler_append_code ()</h3>
<pre class="programlisting"><span class="returnvalue">void</span>
orc_compiler_append_code (<em class="parameter"><code><a class="link" href="orc-OrcCompiler.html#OrcCompiler" title="OrcCompiler"><span class="type">OrcCompiler</span></a> *p</code></em>,
                          <em class="parameter"><code>const <span class="type">char</span> *fmt</code></em>);</pre>
<p>Generates a string using <code class="function">sprintf()</code> on the given format and
arguments, and appends that string to the generated assembly
code for the compiler.</p>
<p>This function is used by the <a class="link" href="orc-OrcCompiler.html#ORC-ASM-CODE:CAPS" title="ORC_ASM_CODE()"><code class="function">ORC_ASM_CODE()</code></a> macro.</p>
<p>This function is useful in a function implementing an OrcRule
or implementing a target.</p>
<div class="refsect3">
<a name="id-1.3.4.6.6.7"></a><h4>Parameters</h4>
<div class="informaltable"><table width="100%" border="0">
<colgroup>
<col width="150px" class="parameters_name">
<col class="parameters_description">
<col width="200px" class="parameters_annotations">
</colgroup>
<tbody>
<tr>
<td class="parameter_name"><p>p</p></td>
<td class="parameter_description"><p>an OrcCompiler object</p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>fmt</p></td>
<td class="parameter_description"><p>a printf-style format string</p></td>
<td class="parameter_annotations"> </td>
</tr>
</tbody>
</table></div>
</div>
</div>
<hr>
<div class="refsect2">
<a name="orc-compiler-label-new"></a><h3>orc_compiler_label_new ()</h3>
<pre class="programlisting"><span class="returnvalue">int</span>
orc_compiler_label_new (<em class="parameter"><code><a class="link" href="orc-OrcCompiler.html#OrcCompiler" title="OrcCompiler"><span class="type">OrcCompiler</span></a> *compiler</code></em>);</pre>
<p>
</p>
</div>
</div>
<div class="refsect1">
<a name="orc-OrcCompiler.other_details"></a><h2>Types and Values</h2>
<div class="refsect2">
<a name="OrcCompileResult"></a><h3>enum OrcCompileResult</h3>
<p>
</p>
<div class="refsect3">
<a name="id-1.3.4.7.2.4"></a><h4>Members</h4>
<div class="informaltable"><table width="100%" border="0">
<colgroup>
<col width="300px" class="enum_members_name">
<col class="enum_members_description">
<col width="200px" class="enum_members_annotations">
</colgroup>
<tbody>
<tr>
<td class="enum_member_name"><p><a name="ORC-COMPILE-RESULT-OK:CAPS"></a>ORC_COMPILE_RESULT_OK</p></td>
<td class="enum_member_description"> </td>
<td class="enum_member_annotations"> </td>
</tr>
<tr>
<td class="enum_member_name"><p><a name="ORC-COMPILE-RESULT-UNKNOWN-COMPILE:CAPS"></a>ORC_COMPILE_RESULT_UNKNOWN_COMPILE</p></td>
<td class="enum_member_description"> </td>
<td class="enum_member_annotations"> </td>
</tr>
<tr>
<td class="enum_member_name"><p><a name="ORC-COMPILE-RESULT-MISSING-RULE:CAPS"></a>ORC_COMPILE_RESULT_MISSING_RULE</p></td>
<td class="enum_member_description"> </td>
<td class="enum_member_annotations"> </td>
</tr>
<tr>
<td class="enum_member_name"><p><a name="ORC-COMPILE-RESULT-UNKNOWN-PARSE:CAPS"></a>ORC_COMPILE_RESULT_UNKNOWN_PARSE</p></td>
<td class="enum_member_description"> </td>
<td class="enum_member_annotations"> </td>
</tr>
<tr>
<td class="enum_member_name"><p><a name="ORC-COMPILE-RESULT-PARSE:CAPS"></a>ORC_COMPILE_RESULT_PARSE</p></td>
<td class="enum_member_description"> </td>
<td class="enum_member_annotations"> </td>
</tr>
<tr>
<td class="enum_member_name"><p><a name="ORC-COMPILE-RESULT-VARIABLE:CAPS"></a>ORC_COMPILE_RESULT_VARIABLE</p></td>
<td class="enum_member_description"> </td>
<td class="enum_member_annotations"> </td>
</tr>
</tbody>
</table></div>
</div>
</div>
<hr>
<div class="refsect2">
<a name="OrcCompiler"></a><h3>OrcCompiler</h3>
<pre class="programlisting">typedef struct {
} OrcCompiler;
</pre>
<p>The OrcCompiler structure has no public members</p>
</div>
<hr>
<div class="refsect2">
<a name="OrcConstant"></a><h3>OrcConstant</h3>
<pre class="programlisting">typedef struct {
} OrcConstant;
</pre>
<p>The OrcConstant structure has no public members</p>
</div>
<hr>
<div class="refsect2">
<a name="ORC-ENABLE-ASM-CODE:CAPS"></a><h3>ORC_ENABLE_ASM_CODE</h3>
<pre class="programlisting">#define ORC_ENABLE_ASM_CODE
</pre>
<p>
</p>
</div>
</div>
</div>
<div class="footer">
<hr>Generated by GTK-Doc V1.24</div>
</body>
</html>