# Petit Larceny

lth / 5 October 1998

## Introduction

This is the design document for Petit Larceny, a version of Larceny that compiles Scheme to portable C. This is not a tutorial document.

## How to use it

To load the compiler back-end for Petit Larceny, start the development environment with "nbuild -petit", or load the file "Util/load-twobit-C.sch" into a running Larceny (when in the Larceny build directory).

## Source files

The directory Rts/Standard-C contains all the support files for Petit Larceny that it does not share with the rest of the system. Currently there are the following source files:

            twobit.h        Macros for all MAL instructions and primops.
            multiply.c      Portable 32x32->64 multiplication code.
            millicode.h     Header file for portable millicode implementation.
            millicode.c     Portable millicode implementation, including
                            dispatch loop.
            arithmetic.mac  Generic arithmetic macros.
            arithmetic.c    Generic arithmetic implementation; auto-generated
                            from arithmetic.mac.
            expander.sch    Simple macro expander for generic arithmetic macros.

There are two other files:

            twobit.c.old    Experimental dispatch loop, etc (from Will).
            twobit.h.old    Experimental instruction macros, etc (from Will).

The directory Asm/Standard-C contains the assembler back-end for Petit Larceny. There are the following source files: pass5p2.sch MAL code emitter procedures. dumpheap-extra.sch Overriding procedures for heap dumper. switches.sch Assembler switches.

$Id: noteX-petit.html 87 1998-11-25 14:38:41Z lth $
larceny@ccs.neu.edu