The compiler-macro-notes Reference Manual

This is the compiler-macro-notes Reference Manual, version 0.2.1, generated automatically by Declt version 4.0 beta 2 "William Riker" on Sun Jan 15 05:49:27 2023 GMT+0.

Table of Contents


1 Introduction


2 Systems

The main system appears first, followed by any subsystem dependency.


2.1 compiler-macro-notes

Provides a macro and some conditions for use within macros and compiler-macros.

Author

Shubhamkar B. Ayare

License

MIT

Version

0.2.1

Dependencies
  • alexandria (system).
  • cl-environments (system).
Source

compiler-macro-notes.asd.

Child Components

3 Files

Files are sorted by type and then listed depth-first from the systems components trees.


3.1 Lisp


3.1.1 compiler-macro-notes/compiler-macro-notes.asd

Source

compiler-macro-notes.asd.

Parent Component

compiler-macro-notes (system).

ASDF Systems

compiler-macro-notes.


3.1.2 compiler-macro-notes/package.lisp

Source

compiler-macro-notes.asd.

Parent Component

compiler-macro-notes (system).

Packages

compiler-macro-notes.


3.1.3 compiler-macro-notes/notes.lisp

Dependency

package.lisp (file).

Source

compiler-macro-notes.asd.

Parent Component

compiler-macro-notes (system).

Public Interface
Internals

3.1.4 compiler-macro-notes/with-notes.lisp

Dependency

notes.lisp (file).

Source

compiler-macro-notes.asd.

Parent Component

compiler-macro-notes (system).

Public Interface
Internals

4 Packages

Packages are listed by definition order.


4.1 compiler-macro-notes

Source

package.lisp.

Use List
  • alexandria.
  • cl-environments.cltl2.
  • common-lisp.
Public Interface
Internals

5 Definitions

Definitions are sorted by export status, category, package, and then by lexicographic order.


5.1 Public Interface


5.1.1 Special variables

Special Variable: *muffled-notes-type*

Bound to a type. Notes that are of type given by the value of this variable will not be printed.
Example:
- No notes will be printed if values is T.
- Optimization notes will not be printed if values is COMPILER-MACRO-NOTES:OPTIMIZATION-FAILURE-NOTE

The compile time value of this variable is OR-ed with the MUFFLE declarations to decide which notes to muffle.

Package

compiler-macro-notes.

Source

with-notes.lisp.


5.1.2 Macros

Macro: with-notes ((form env &rest key-args &key name unwind-on-signal other-conditions per-line-prefix optimization-note-condition) &body body)

A macro to readably signal COMPILER-MACRO-NOTES:NOTE for end-users:
- Expects ENV to evaluate to an environment suitable for passing to CL-ENVIRONMENTS.CLTL2:DEFINE-DECLARATION
- BODY is surrounded by a (BLOCK WITH-NOTES ...) on the outside
- Further, WITH-NOTES also wraps the BODY in an UNWIND-PROTECT and prints the conditions that were signalled before exiting. If UNWIND-ON-SIGNAL is non-NIL, then returns FORM if a condition was signalled, else if no condition was signalled returns the (primary) return value of BODY.
- If UNWIND-ON-SIGNAL is NIL, surrounds BODY in a HANDLER-BIND and prints all the compiler notes that were signalled. If non-NIL, prints only the first signalled note.
- OPTIMIZATION-FAILURE-NOTEs are printed only if OPTIMIZATION-NOTE-CONDITION form evaluates to non-NIL: OPTIMIZATION-NOTE-CONDITION is expected to be a form.
- OTHER-CONDITIONS is a type-specifier that indicates which other conditions should be reported.
- If the user code in BODY does result in an expansion, then it is expected to avoid performing a nonlocal exit to a place outside WITH-NOTES. Not
doing so could result in an incorrect print of the expansion paths.

Package

compiler-macro-notes.

Source

with-notes.lisp.


5.1.3 Ordinary functions

Function: muffle (note)

Do not print this NOTE.
As a declaration, this takes in type specifiers as arguments.

Package

compiler-macro-notes.

Source

notes.lisp.


5.1.4 Conditions

Condition: note
Package

compiler-macro-notes.

Source

notes.lisp.

Direct superclasses

condition.

Direct subclasses

optimization-failure-note.

Direct methods
Direct slots
Slot: datum
Initargs

:datum

Readers

datum.

Writers

This slot is read-only.

Slot: args
Initargs

:args

Readers

args.

Writers

This slot is read-only.

Slot: muffled-p
Initform

(quote nil)

Readers

muffled-p.

Writers

(setf muffled-p).

Condition: optimization-failure-note
Package

compiler-macro-notes.

Source

notes.lisp.

Direct superclasses

note.


5.2 Internals


5.2.1 Special variables

Special Variable: *swank-signalled-notes*
Package

compiler-macro-notes.

Source

with-notes.lisp.


5.2.2 Ordinary functions

Function: swank-signal (note env)
Package

compiler-macro-notes.

Source

with-notes.lisp.

Function: with-notes-function (body form env &key name unwind-on-signal other-conditions per-line-prefix optimization-note-condition)
Package

compiler-macro-notes.

Source

with-notes.lisp.


5.2.3 Generic functions

Generic Reader: args (condition)
Package

compiler-macro-notes.

Methods
Reader Method: args ((condition note))
Source

notes.lisp.

Target Slot

args.

Generic Reader: datum (condition)
Package

compiler-macro-notes.

Methods
Reader Method: datum ((condition note))
Source

notes.lisp.

Target Slot

datum.

Generic Reader: muffled-p (condition)
Generic Writer: (setf muffled-p) (condition)
Package

compiler-macro-notes.

Methods
Reader Method: muffled-p ((condition note))
Writer Method: (setf muffled-p) ((condition note))
Source

notes.lisp.

Target Slot

muffled-p.


Appendix A Indexes


A.1 Concepts