home *** CD-ROM | disk | FTP | other *** search
/ AmigActive 3 / AACD03.BIN / AACD / Programming / sofa / archive / SmallEiffel.lha / SmallEiffel / man / compile_to_c.txt < prev    next >
Text File  |  1999-06-05  |  8KB  |  173 lines

  1.  
  2.                           The compile_to_c command
  3.                                       
  4.    Usage
  5.    
  6.    compile_to_c [options] <Root-Class> [<Root-Procedure>] [*.c] [*.o]
  7.    [-l*]
  8.    
  9.    Command compile_to_c is the SmallEiffel ANSI C code generator. Usualy
  10.    this command is automatically called by command [1]compile but you can
  11.    use it separately to produce C code.
  12.    
  13.    Command compile_to_c must have at least one argument to indicate the
  14.    starting execution point of the system. Thus your program will start
  15.    in <Root-Procedure> of <Root-Class>. The default <Root-Procedure> is
  16.    make.
  17.    
  18.    Command compile_to_c produces all the required C files as well as a
  19.    script file. The name of this script file changes with the operating
  20.    system used (*.make on Unix or *.BAT on DOS for example).
  21.    
  22.    Loading path for Eiffel source files
  23.    
  24.    compile_to_c uses the technique described in the documentation for
  25.    command [2]finder to locate the Eiffel source files it tries to
  26.    compile.
  27.    
  28.    Options to select Eiffel compilation modes
  29.    
  30.    There are 8 modes of compilation given by the following options names:
  31.    -debug_check -all_check -loop_check -invariant_check -ensure_check
  32.    -require_check -no_check and -boost option. Only one mode can be
  33.    selected for the whole system to compile. Mode -all_check is the
  34.    default one.
  35.    -boost:
  36.           Compilation mode with the highest degree of optimization.
  37.           There is no target's existence test, no system-level validity
  38.           checking. Some routines are inlined. No code is generated to
  39.           get an execution trace in case of failure. No assertion is
  40.           checked.
  41.    -no_check:
  42.           Compilation mode in which no Eiffel assertion is checked.
  43.           The target's existence test is performed. Some code is
  44.           generated for the system-level validity checking, and to
  45.           produce an execution trace (an execution stack is managed).
  46.           There is no inlining and no assertion check.
  47.    -require_check:
  48.           Compilation mode in which Eiffel preconditions are checked.
  49.           The generated code is similar to the previous one, but also
  50.           includes code to test preconditions (require).
  51.    -ensure_check:
  52.           The generated code is similar to the previous one, but also
  53.           includes code to test postconditions (ensure).
  54.    -invariant_check:
  55.           The generated code is similar to the previous one, but also
  56.           includes code to test class invariants.
  57.    -loop_check:
  58.           The generated code is similar to the previous one, but also
  59.           includes code to test loop variants and loop invariants.
  60.    -all_check:
  61.           The default mode. The generated code is similar to the previous
  62.           one, but also includes code for the check instruction.
  63.    -debug_check:
  64.           The generated code is similar to the previous one, but also
  65.           includes code for debug instructions. All debugs are checked
  66.           regardless of the optional string key.
  67.           
  68.    Other options
  69.    
  70.    -verbose:
  71.           Print system information during the compilation (full path of
  72.           loaded files, type inference score, removed files, etc.).
  73.    -version:
  74.           Show the number of the [3]version of SmallEiffel you're using.
  75.    -cc <c_compiler>:
  76.           Call <c_compiler> instead of the default C compiler. See the
  77.           READ_ME file of directory sys to set the default C compiler as
  78.           well as the default linker.
  79.    -no_gc:
  80.           No Garbage Collector.
  81.           When this option is selected, no GC is produced and (at least)
  82.           one actual malloc is perform for each object creation. This
  83.           option is useful when one prefers to use another GC provided by
  84.           an external library (such as the Boehm-Demers-Weiser
  85.           conservative GC), or when no GC is needed. Whithout flag
  86.           -no_gc, SmallEiffel computes a customized GC for each system.
  87.           It is important to rememeber that some architecture-dependent
  88.           code may be required for the proper operation of the GC (see
  89.           file SmallEiffel/sys/gc for details).
  90.    -no_split:
  91.           Produce only one C file for the whole Eiffel system.
  92.           This may enable the C compiler to inline more functions calls.
  93.           This option is useful only to finalize an application (the
  94.           incremental C compiling mode is switched off with -no_split).
  95.    -no_strip:
  96.           Do not remove symbol information from the generated executable
  97.           file.
  98.           This option is useful only when finalizing an application
  99.    -o <output_name>:
  100.           Name the executable file output_name.
  101.           This has the same meaning as the -o option of many C compilers.
  102.    -cecil <cecil_file>:
  103.           Allow some Eiffel features to be called from C (see the
  104.           [4]cecil file for details). To call C functions/macros from
  105.           Eiffel see the [5]external file.
  106.    -no_main:
  107.           Avoid generation of the C main function: thus, the root
  108.           procedure is not started. This is useful when one prefers to
  109.           start execution from outside before calling Eiffel routines via
  110.           the cecil interface. Before calling the first Eiffel routine
  111.           one has to call once a predefined C function in order to
  112.           initialize internal runtime information for the Eiffel world
  113.           (see example in directory SmallEiffel/lib_show/cecil/example7
  114.           for details).
  115.    -no_style_warning:
  116.           Suppress output for warning messages related to non respect of
  117.           standard Eiffel style guidelines (for example ItEm will not
  118.           trigger a warning).
  119.    -case_insensitive:
  120.           Switch case insensitive mode on.
  121.           For example, when this mode is selected, the Eiffel parser
  122.           considers that the following identifiers refer to the same
  123.           feature: item, ITEM, ItEm, ...
  124.    -no_warning:
  125.           Suppress output for all warning messages (error messages are
  126.           still printed).
  127.    -trace:
  128.           This option may be useful to debug your program or to realize
  129.           some profiling.
  130.           When selected, this option allows the user either to generate a
  131.           "trace.se" file at execution time, or to enter the interactive
  132.           debugger.
  133.           + When one interactively chooses the generation of the trace
  134.             file, a (usually huge) file "trace.se" is created in the
  135.             launching directory which shows the code the program is
  136.             executing: which line, which column, in which Eiffel source
  137.             file. Because all classes are traced, "trace.se" is a huge
  138.             file even for a small program.
  139.             Feature GENERAL.trace_switch allows to dynamically turn
  140.             on/off trace generation. At run time, when argument of
  141.             trace_switch is true, trace printing is switched on
  142.             (conversely, false is to switch off trace printing). When
  143.             option -trace is not selected, calls to trace_switch are not
  144.             taken in account by compile_to_c (no C code is produced). The
  145.             -trace mode is not available with mode -boost. Using at the
  146.             same time -trace with -boost as the same effect as using
  147.             -trace with -no_check. Also keep in mind that very simple
  148.             instructions (as for example "i := i + 1;") may not be
  149.             traced.
  150.           + When the interactive debugger is chosen, the user enters a
  151.             gdb like interface. Please note that currently just an embryo
  152.             of debugger is implemented. It is only possible to display
  153.             the execution stack and step into the code.
  154.             Command ? displays a short help message.
  155.           
  156.    Options passed to the C compiler
  157.    
  158.    Remaining options, *.c files, *.o files, library -l* are passed to the
  159.    C compiler/linker.
  160.    
  161.                                    [Line]
  162.    Copyright © Dominique COLNET and Suzanne COLLIN - [6]<colnet@loria.fr>
  163.                   Last update: 05 June 1999, by DC & OZ. 
  164.  
  165. References
  166.  
  167.    1. file://localhost/home/colnet/SmallEiffel/man/man/compile.html
  168.    2. file://localhost/home/colnet/SmallEiffel/man/man/finder.html
  169.    3. file://localhost/home/colnet/SmallEiffel/man/man/SmallEiffelFAQ.html#Q02
  170.    4. file://localhost/home/colnet/SmallEiffel/man/man/cecil.html
  171.    5. file://localhost/home/colnet/SmallEiffel/man/man/external.html
  172.    6. mailto:colnet@loria.fr
  173.