Sophie

Sophie

distrib > Mandriva > 2010.0 > i586 > media > contrib-release > by-pkgid > bd5c3d824c3db63ffd9226c15941e6ad > files > 293

mozart-1.4.0-1mdv2010.0.i586.rpm

<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD><TITLE>A Compiler Switches</TITLE><LINK href="ozdoc.css" rel="stylesheet" type="text/css"></HEAD><BODY><TABLE align="center" border="0" cellpadding="6" cellspacing="6" class="nav"><TR bgcolor="#DDDDDD"><TD><A href="node4.html#chapter.api">&lt;&lt; Prev</A></TD><TD><A href="index.html">- Up -</A></TD><TD><A href="node6.html#appendix.narrator">Next &gt;&gt;</A></TD></TR></TABLE><DIV id="appendix.switches"><H1><A name="appendix.switches">A Compiler Switches</A></H1><P> This appendix describes the available boolean switches, giving their name, their default setting, and their effects on the compilation process if they are set. </P><DIV class="unnumbered"><H2><A name="label21">Global Configuration</A></H2><P> </P><DL><DT><SPAN class="ignore"><CODE><SPAN class="reference">\switch&nbsp;+</SPAN></CODE></SPAN><CODE><SPAN class="reference">compilerpasses</SPAN></CODE> (default: <CODE><SPAN class="keyword">false</SPAN></CODE>) </DT><DD><P>Output tracing information about the different phases the execution of each query proceeds through. </P></DD><DT><SPAN class="ignore"><CODE><SPAN class="reference">\switch&nbsp;+</SPAN></CODE></SPAN><CODE><SPAN class="reference">showinsert</SPAN></CODE> (default: <CODE><SPAN class="keyword">false</SPAN></CODE>) </DT><DD><P>Show the names of files as they get inserted by the <CODE><SPAN class="reference">\insert</SPAN></CODE> macro directive, after their name has been resolved by means of the environment variable <CODE>OZPATH</CODE> (see <A href="node2.html#section.directives.macro">Section&nbsp;2.2</A>). </P></DD><DT><SPAN class="ignore"><CODE><SPAN class="reference">\switch&nbsp;+</SPAN></CODE></SPAN><CODE><SPAN class="reference">echoqueries</SPAN></CODE> (default: <CODE><SPAN class="keyword">true</SPAN></CODE>) </DT><DD><P>Output each (compilation) query verbatim. </P></DD><DT><SPAN class="ignore"><CODE><SPAN class="reference">\switch&nbsp;+</SPAN></CODE></SPAN><CODE><SPAN class="reference">showdeclares</SPAN></CODE> (default: <CODE><SPAN class="keyword">true</SPAN></CODE>) </DT><DD><P>Summarize the variables declared by each query and thus added to the environment (provided the compilation succeeds and the compiled code is actually executed). </P></DD><DT><SPAN class="ignore"><CODE><SPAN class="reference">\switch&nbsp;+</SPAN></CODE></SPAN><CODE><SPAN class="reference">watchdog</SPAN></CODE> (default: <CODE><SPAN class="keyword">true</SPAN></CODE>) </DT><DD><P>Terminate the current compilation if one of the compiler's threads blocks unexpectedly. This is useful for debugging the compiler. </P></DD></DL><P> </P></DIV><DIV class="unnumbered"><H2><A name="label22">Warnings</A></H2><P> </P><DL><DT><SPAN class="ignore"><CODE><SPAN class="reference">\switch&nbsp;+</SPAN></CODE></SPAN><CODE><SPAN class="reference">warnredecl</SPAN></CODE> (default: <CODE><SPAN class="keyword">false</SPAN></CODE>) </DT><DD><P>Output warnings about redeclarations of top-level variables, either by <CODE><SPAN class="keyword">declare</SPAN></CODE> or locally. </P></DD><DT><SPAN class="ignore"><CODE><SPAN class="reference">\switch&nbsp;+</SPAN></CODE></SPAN><CODE><SPAN class="reference">warnshadow</SPAN></CODE> (default: <CODE><SPAN class="keyword">false</SPAN></CODE>) </DT><DD><P>Output warnings about redeclarations of all variables, either by <CODE><SPAN class="keyword">declare</SPAN></CODE> or locally (subsumes <SPAN class="ignore"><CODE><SPAN class="reference">\switch&nbsp;+</SPAN></CODE></SPAN><CODE><SPAN class="reference">warnredecl</SPAN></CODE>). </P></DD><DT><SPAN class="ignore"><CODE><SPAN class="reference">\switch&nbsp;+</SPAN></CODE></SPAN><CODE><SPAN class="reference">warnunused</SPAN></CODE> (default: <CODE><SPAN class="keyword">true</SPAN></CODE>) </DT><DD><P>Output warnings about local variables never used or used only once (that is, initialized but never used again). </P></DD><DT><SPAN class="ignore"><CODE><SPAN class="reference">\switch&nbsp;+</SPAN></CODE></SPAN><CODE><SPAN class="reference">warnunusedformals</SPAN></CODE> (default: <CODE><SPAN class="keyword">false</SPAN></CODE>) </DT><DD><P>Output the above warnings also for formal parameters. If <SPAN class="ignore"><CODE><SPAN class="reference">\switch&nbsp;+</SPAN></CODE></SPAN><CODE><SPAN class="reference">warnunused</SPAN></CODE> is not set, this switch is ignored. </P></DD><DT><SPAN class="ignore"><CODE><SPAN class="reference">\switch&nbsp;+</SPAN></CODE></SPAN><CODE><SPAN class="reference">warnforward</SPAN></CODE> (default: <CODE><SPAN class="keyword">false</SPAN></CODE>) </DT><DD><P>Warn about uses of features, attributes, or methods which are not known to be declared in the enclosing class. </P></DD><DT><SPAN class="ignore"><CODE><SPAN class="reference">\switch&nbsp;+</SPAN></CODE></SPAN><CODE><SPAN class="reference">warnopt</SPAN></CODE> (default: <CODE><SPAN class="keyword">false</SPAN></CODE>) </DT><DD><P>Warn if a <CODE><SPAN class="keyword">case</SPAN></CODE> conditional cannot be translated into optimized code. Also warn if a <CODE><SPAN class="keyword">cond</SPAN></CODE> or disjunction's guard is translated with an explicit thread creation. </P></DD></DL><P> </P></DIV><DIV class="unnumbered"><H2><A name="label23">I. Parsing and Expanding</A></H2><P> </P><DL><DT><SPAN class="ignore"><CODE><SPAN class="reference">\switch&nbsp;+</SPAN></CODE></SPAN><CODE><SPAN class="reference">unnest</SPAN></CODE> (default: <CODE><SPAN class="keyword">true</SPAN></CODE>) </DT><DD><P>Enable unnesting. If unnesting is disabled, none of the following passes are executed either. </P></DD><DT><SPAN class="ignore"><CODE><SPAN class="reference">\switch&nbsp;+</SPAN></CODE></SPAN><CODE><SPAN class="reference">expression</SPAN></CODE> (default: <CODE><SPAN class="keyword">false</SPAN></CODE>) </DT><DD><P>Compile expressions, not statements. The result of an evaluated expression can be obtained through an output argument of the enqueued query (see <A href="node4.html#section.api.engines">Section&nbsp;4.3</A>) or the variable <CODE><I>`result`</I></CODE>. </P></DD><DT><SPAN class="ignore"><CODE><SPAN class="reference">\switch&nbsp;+</SPAN></CODE></SPAN><CODE><SPAN class="reference">allowdeprecated</SPAN></CODE> (default: <CODE><SPAN class="keyword">true</SPAN></CODE>) </DT><DD><P>Allow the use of deprecated syntax, i.&nbsp;e., allow to use <CODE><SPAN class="keyword">case</SPAN></CODE> for boolean conditionals and to mix <CODE><SPAN class="keyword">if</SPAN></CODE> with <CODE><SPAN class="keyword">elsecase</SPAN></CODE> and <CODE><SPAN class="keyword">case</SPAN></CODE> with <CODE><SPAN class="keyword">elseif</SPAN></CODE>. </P></DD><DT><SPAN class="ignore"><CODE><SPAN class="reference">\switch&nbsp;+</SPAN></CODE></SPAN><CODE><SPAN class="reference">gump</SPAN></CODE> (default: <CODE><SPAN class="keyword">false</SPAN></CODE>) </DT><DD><P>Allow Gump definitions. If this switch is off, Gump keywords are parsed as ordinary atoms. </P></DD></DL><P> The remaining Gump-related switches are described in <A href="../gump/index.html">``Gump - A Front-End Generator for Oz''</A>. </P></DIV><DIV class="unnumbered"><H2><A name="label24">II. Static Analysis</A></H2><P> </P><DL><DT><SPAN class="ignore"><CODE><SPAN class="reference">\switch&nbsp;+</SPAN></CODE></SPAN><CODE><SPAN class="reference">staticanalysis</SPAN></CODE> (default: <CODE><SPAN class="keyword">true</SPAN></CODE>) </DT><DD><P>Perform static analysis. Switching this off has severe impacts on optimization and error reporting. </P></DD></DL><P> </P></DIV><DIV class="unnumbered"><H2><A name="label25">III. Core Output</A></H2><P> </P><DL><DT><SPAN class="ignore"><CODE><SPAN class="reference">\switch&nbsp;+</SPAN></CODE></SPAN><CODE><SPAN class="reference">core</SPAN></CODE> (default: <CODE><SPAN class="keyword">false</SPAN></CODE>) </DT><DD><P>Output the result of the core expansion of a query. </P></DD><DT><SPAN class="ignore"><CODE><SPAN class="reference">\switch&nbsp;+</SPAN></CODE></SPAN><CODE><SPAN class="reference">realcore</SPAN></CODE> (default: <CODE><SPAN class="keyword">false</SPAN></CODE>) </DT><DD><P>Output the core expansion as it really is (and not beautified by, e.&nbsp;g., the use of operator symbols). </P></DD><DT><SPAN class="ignore"><CODE><SPAN class="reference">\switch&nbsp;+</SPAN></CODE></SPAN><CODE><SPAN class="reference">debugvalue</SPAN></CODE> (default: <CODE><SPAN class="keyword">false</SPAN></CODE>) </DT><DD><P>Include annotations about the values propagated by static analysis. </P></DD><DT><SPAN class="ignore"><CODE><SPAN class="reference">\switch&nbsp;+</SPAN></CODE></SPAN><CODE><SPAN class="reference">debugtype</SPAN></CODE> (default: <CODE><SPAN class="keyword">false</SPAN></CODE>) </DT><DD><P>Include annotations about the types inferred by static analysis. </P></DD></DL><P> </P></DIV><DIV class="unnumbered"><H2><A name="label26">IV. Code Generation</A></H2><P> </P><DL><DT><SPAN class="ignore"><CODE><SPAN class="reference">\switch&nbsp;+</SPAN></CODE></SPAN><CODE><SPAN class="reference">codegen</SPAN></CODE> (default: <CODE><SPAN class="keyword">true</SPAN></CODE>) </DT><DD><P>Generate code. </P></DD><DT><SPAN class="ignore"><CODE><SPAN class="reference">\switch&nbsp;+</SPAN></CODE></SPAN><CODE><SPAN class="reference">outputcode</SPAN></CODE> (default: <CODE><SPAN class="keyword">false</SPAN></CODE>) </DT><DD><P>Output the generated code as human-readable assembly code. </P></DD><DT><SPAN class="ignore"><CODE><SPAN class="reference">\switch&nbsp;+</SPAN></CODE></SPAN><CODE><SPAN class="reference">recordhoist</SPAN></CODE> (default: <CODE><SPAN class="keyword">true</SPAN></CODE>) </DT><DD><P>Perform the record hoisting optimization. </P></DD></DL><P> </P></DIV><DIV class="unnumbered"><H2><A name="label27">V. Feeding to the Emulator</A></H2><P> </P><DL><DT><SPAN class="ignore"><CODE><SPAN class="reference">\switch&nbsp;+</SPAN></CODE></SPAN><CODE><SPAN class="reference">feedtoemulator</SPAN></CODE> (default: <CODE><SPAN class="keyword">true</SPAN></CODE>) </DT><DD><P>Load the generated code into the emulator and execute it. </P></DD><DT><SPAN class="ignore"><CODE><SPAN class="reference">\switch&nbsp;+</SPAN></CODE></SPAN><CODE><SPAN class="reference">threadedqueries</SPAN></CODE> (default: <CODE><SPAN class="keyword">true</SPAN></CODE>) </DT><DD><P>Execute each piece of generated code in a separate thread without waiting for it to terminate before proceeding to the next query. </P></DD><DT><SPAN class="ignore"><CODE><SPAN class="reference">\switch&nbsp;+</SPAN></CODE></SPAN><CODE><SPAN class="reference">profile</SPAN></CODE> (default: <CODE><SPAN class="keyword">false</SPAN></CODE>) </DT><DD><P>Include profiling information in the generated code. </P></DD></DL><P> </P></DIV><DIV class="unnumbered"><H2><A name="label28">VI. Debugging</A></H2><P> Most of these switches are used by the source level debugger, described in <A href="../ozcar/index.html">``The Mozart Debugger''</A>. </P><DL><DT><SPAN class="ignore"><CODE><SPAN class="reference">\switch&nbsp;+</SPAN></CODE></SPAN><CODE><SPAN class="reference">runwithdebugger</SPAN></CODE> (default: <CODE><SPAN class="keyword">false</SPAN></CODE>) </DT><DD><P>Place a static breakpoint on the first statement of each compiled query. </P></DD></DL><P> Note that the following switches severely impact code size and run-time efficiency of the generated code. </P><DL><DT><SPAN class="ignore"><CODE><SPAN class="reference">\switch&nbsp;+</SPAN></CODE></SPAN><CODE><SPAN class="reference">controlflowinfo</SPAN></CODE> (default: <CODE><SPAN class="keyword">false</SPAN></CODE>) </DT><DD><P>Include program flow information in the generated code. </P></DD><DT><SPAN class="ignore"><CODE><SPAN class="reference">\switch&nbsp;+</SPAN></CODE></SPAN><CODE><SPAN class="reference">staticvarnames</SPAN></CODE> (default: <CODE><SPAN class="keyword">false</SPAN></CODE>) </DT><DD><P>Include environment information in the generated code. </P></DD><DT><SPAN class="ignore"><CODE><SPAN class="reference">\switch&nbsp;+</SPAN></CODE></SPAN><CODE><SPAN class="reference">dynamicvarnames</SPAN></CODE> (default: <CODE><SPAN class="keyword">false</SPAN></CODE>) </DT><DD><P>All created local variables are annotated with their print name at run time, such that <CODE>System<SPAN class="keyword">.</SPAN>printName</CODE> applied to the variable's value returns this name. </P></DD></DL><P></P></DIV></DIV><TABLE align="center" border="0" cellpadding="6" cellspacing="6" class="nav"><TR bgcolor="#DDDDDD"><TD><A href="node4.html#chapter.api">&lt;&lt; Prev</A></TD><TD><A href="index.html">- Up -</A></TD><TD><A href="node6.html#appendix.narrator">Next &gt;&gt;</A></TD></TR></TABLE><HR><ADDRESS><A href="http://www.ps.uni-sb.de/~kornstae/">Leif&nbsp;Kornstaedt</A><BR><SPAN class="version">Version 1.4.0 (20090610)</SPAN></ADDRESS></BODY></HTML>