2.2 Running the compiler
some_command
indicates that some_command (followed by pressing the return key) is typed at the compiler prompt. Compiler commands appear in boldface, and %
is used as a sample Unix shell prompt.
To compile a new program (say, myprog.cecil) run a make command which specifies the name of your program: Cecil> make myprog.cecil
. The make command parses the file named myprog.cecil and any files transitively included by this file, constructs global data structures describing the program (e.g., the object inheritance graph and the table of defined methods), produces Phase-1"compiled" (C++ or assembly) code for the application in the gen directory (which is created if necessary), and then invokes a Phase-2 make[1] to compile the intermediate files into .o files and link the .o files into a target executable, gen/myprog. The generated executable can be run either from a UNIX prompt or by typing run at the Vortex prompt.
Once a program has been compiled, further invocations of the make command (the program name is optional after the first time) incrementally recompile only files that changed (or depend on a changed file).
The save command writes the program checkpoint to a file named program.db. The checkpoint contains a snapshot of the application's source code, the interprocedural information computed by the compiler, and recompilation dependencies, as well as the current settings of the Vortex compiler's options. At this point, it is safe to quit Vortex by typing the quit command. (really_quit skips asking for confirmation.)
To reload a program's checkpoint file, use the load program.db command. The compiler's state is restored to where it was at the point of the previous save, permitting more incremental development to proceed. If you do not load a checkpoint file, the first make command will perform a full non-incremental compilation.
gmake
is available to run Phase-2 compiles. Section 7 describes how to change this assumption.
Generated with Harlequin WebMaker