|
The Clarity C++ programming language is a dialect of C++ being developed in
Sun Micro-systems Laboratories to support the development of reliable
systems and application software, and especially distributed software. We
have developed a high-level, machine-independent intermediate representation
to compile Clarity that we call MCode (for "middle code"). We use
MCode to compile Clarity programs at program runtime (i.e., on-the-fly) into
SPARC ® code for the Solaris TM operating system. The runtime
code generator produces good quality machine code and is designed to be
easily retargetable to new machines. We also support an interpreter for
MCode that supports full interoperation with C code and existing C
libraries. The choice of whether to compile or interpret MCode is done at
runtime on a procedure-by-procedure basis. MCode is significantly more
compact than native machine code. This fact, plus our ability to selectively
interpret seldom-exe-cuted code instead of compiling it, means that MCode
programs have a smaller working set and run better with less memory than the
corresponding native machine code programs. In order to support systems
programming, we store MCode in platform-standard object files. This enables
MCode programs to fully interoperate with existing C libraries and code. It
also allows programmers to use standard linkers and other program
development tools with MCode object files.
|