- define-policy has more strict syntax checking
- define-policy puts clauses in parenthesis
- compute-policy is rewritten for readibility
- augment-policy is rewritten for readibility
- define-policy and define-policy-alias are separate macros
- make compilation-speed supported similar to other optimzie qualities
- make define-policy idempotent for recompilation with the same options
- remove dead code branches
- rework code to eliminate multiple EVAL-WHENs (for readibility)
The function push-vars initialized a slot var-index and called
cmp-env-register-var however var-index is never read so there is no need for
that. Remove both function and the unused slot.
reset-cache did cons a new array but did not assign it to the cache variable
so it was essentially a no-op. Also we bind cache to lexvar and then declare
that lexvar to preserve declaration semantics.
c1make-global-variable -> make-global-var (and move to cmpvar) -- this function
does not create c1form so this name was wrong
cmp-env-declare-special -> declare-special (and move to cmpenv-var) -- this
function does not only declare special but it also creates an instance of a
variable - move that to a new file cmpenv-var.lsp
Use proper package accessors instead. This was mostly already done. Removal of
package imports make it easier to tell when symbols do not belong to cmp.
It is worth noting that *active-protection* and *pending-actions* are generally
not used too (because *pending-actions* are never modified), but if we want to
add some useful semantics to with-compilation-unit one day then we'll need both.
For empty structs, the size was off by one. While this did not affect
structs that were created directly with the structure constructor, for
structs that were externalized with MAKE-LOAD-FORM-SAVING-SLOTS
instances which were one element too large were created.
The pattern in the long form of the define-method-combination may contain * as
a list element meaning "any" qualifier. For example:
(define-method-combination foo ()
((bar (:xxx * :yyy)))
...)
In this case qualifiers `:xxx 3 :yyy' and `:xxx :zzz :yyy' will match.
The comment mentioned that aux variables (the sixth value) are returned the
same way as requireds, optionals and keywords however factually that was not
the case - the number of variables was not the first element of the list. This
commit updates the function and all its callers.