Opened 6 years ago

#1091 new enhancement

Document compiler policy

Reported by: fredgilham Owned by:
Priority: normal Milestone:
Component: Documentation Version: unspecific
Keywords: Cc:

Description

It seems useful to document the effects of the compiler optimization qualities. Looking at the source code I came up with the following:

CCL Compiler Policy

always allow constant substitution

allow tail recursion elimination --- when debug < 3

inhibit register allocation of variables --- when debug = 3

trust declarations --- safety < 3 and safety >= speed

open code functions declared inline --- speed >= space + 2

inhibit safety checking --- speed = 3 and safety = 0

declarations become type checks --- safety = 3 or safety > speed

inline self calls --- debug < 3

allow transforms --- compilation speed < 3 and speed > 0

or safety and debug both < 3

force boundp checks --- safety = 3

strict structure typechecking --- debug or safety > speed or

debug or safety >= 2

I don't know if this is complete or completely correct. It would be nice to have an authoritative version as part of the documentation.

Change History (0)

Note: See TracTickets for help on using tickets.