ORC @ SourceForge.net Logo

last updated:Feb 22 , 2002


Coding conventions and guideline for Open Research Compiler


StyleWhile personal programming style (methods of commenting, use of identifiers, spacing and so on) is of course a highly personal issue and many electrons have been wasted arguing about the naturally "best" way. It is important to preserve the overall consistency of style in a given file and the whole component within the compiler. Style should also be evolving. Outdated styles should also be migrated whenever time/opportunity allows.


Data Type and Name


As per other languages, header files are the black box documentation (interface) of your code, to be used by anyone calling your code. The usual caveats for such information apply as well as the following :

Memory Usage

The compiler is designed to take advantage of  the fact that compilation has known phase ordering  so that entire chunks of memory can be totally freed upon completion of a specific phase. A memory pool push/pop mechanism is designed to manage memory usage on top of STL's segmented array.

            some_type x(&your_local_pool);

Class definition

class COMP_UNIT {
  COMP_UNIT& operator = (const COMP_UNIT);
#define Set_XXX(y)    (XXX(y) != SOME_FLAG)