The static-dispatch Reference Manual

This is the static-dispatch Reference Manual, version 0.9, generated automatically by Declt version 4.0 beta 2 "William Riker" on Sun Dec 15 07:46:47 2024 GMT+0.

Table of Contents


1 Introduction


2 Systems

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


2.1 static-dispatch

Static generic function dispatch for Common Lisp.

Author

Alexander Gutev

License

MIT

Version

0.9

Dependencies
  • alexandria (system).
  • anaphora (system).
  • arrows (system).
  • iterate (system).
  • optima (system).
  • closer-mop (system).
  • agutil (system).
  • cl-environments (system).
  • cl-form-types (system).
Source

static-dispatch.asd.

Child Component

src (module).


3 Modules

Modules are listed depth-first from the system components tree.


3.1 static-dispatch/src

Source

static-dispatch.asd.

Parent Component

static-dispatch (system).

Child Components

4 Files

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


4.1 Lisp


4.1.1 static-dispatch/static-dispatch.asd

Source

static-dispatch.asd.

Parent Component

static-dispatch (system).

ASDF Systems

static-dispatch.


4.1.2 static-dispatch/src/package.lisp

Source

static-dispatch.asd.

Parent Component

src (module).

Packages

4.1.3 static-dispatch/src/util.lisp

Dependency

package.lisp (file).

Source

static-dispatch.asd.

Parent Component

src (module).

Internals

4.1.4 static-dispatch/src/warnings.lisp

Dependency

util.lisp (file).

Source

static-dispatch.asd.

Parent Component

src (module).

Internals

4.1.5 static-dispatch/src/combin.lisp

Dependency

warnings.lisp (file).

Source

static-dispatch.asd.

Parent Component

src (module).

Public Interface
Internals

4.1.6 static-dispatch/src/combinations.lisp

Dependency

combin.lisp (file).

Source

static-dispatch.asd.

Parent Component

src (module).


4.1.7 static-dispatch/src/common.lisp

Dependency

combinations.lisp (file).

Source

static-dispatch.asd.

Parent Component

src (module).

Public Interface
Internals

4.1.8 static-dispatch/src/method-functions.lisp

Dependency

common.lisp (file).

Source

static-dispatch.asd.

Parent Component

src (module).

Public Interface

static-dispatch-type (function).

Internals

make-method-function (function).


4.1.9 static-dispatch/src/default.lisp

If Feature

(:not :sbcl)

Dependency

method-functions.lisp (file).

Source

static-dispatch.asd.

Parent Component

src (module).


4.1.10 static-dispatch/src/sbcl.lisp

If Feature

:sbcl

Dependencies
Source

static-dispatch.asd.

Parent Component

src (module).

Public Interface

static-dispatch (function).

Internals

5 Packages

Packages are listed by definition order.


5.1 static-dispatch-cl

Source

package.lisp.

Use List

5.2 closer-environments

Source

package.lisp.

Use List
  • cl-environments-cl.
  • closer-mop.
Used By List

5.3 static-dispatch

Source

package.lisp.

Use List
Used By List

static-dispatch-cl.

Public Interface
Internals

6 Definitions

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


6.1 Public Interface


6.1.1 Macros

Macro: call-method (method &optional methods)
Package

static-dispatch.

Source

combin.lisp.

Macro: defgeneric (name (&rest lambda-list) &rest options)
Package

static-dispatch.

Source

common.lisp.

Macro: define-method-combination (name &rest args)
Package

static-dispatch.

Source

combin.lisp.

Macro: defmethod (name &rest args)
Package

static-dispatch.

Source

common.lisp.

Macro: enable-static-dispatch (&rest names)
Package

static-dispatch.

Source

common.lisp.

Macro: make-method (form)
Package

static-dispatch.

Source

combin.lisp.


6.1.2 Ordinary functions

Function: invalid-method-error (method control &rest args)
Package

static-dispatch.

Source

combin.lisp.

Function: method-combination-error (control &rest args)
Package

static-dispatch.

Source

combin.lisp.

Function: static-dispatch (whole &optional env)

A no-op on SBCL since static dispatching is handled by the compiler transforms, rather than compiler macros.

Package

static-dispatch.

Source

sbcl.lisp.

Function: static-dispatch-type (fn env)

Return the declared STATIC-DISPATCH-TYPE of the function FN, in environment ENV.

Package

static-dispatch.

Source

method-functions.lisp.


6.2 Internals


6.2.1 Constants

Constant: +static-dispatch-policy+

Optimization policy at which static dispatching is performed.

Package

static-dispatch.

Source

sbcl.lisp.


6.2.2 Special variables

Special Variable: *argument-map*

List of bindings (as if to LET) binding the lambda-list variables to the names of the actual variables storing the arguments passed to the function.

Package

static-dispatch.

Source

common.lisp.

Special Variable: *call-args*

Bound to the argument list of the current generic function call.

Package

static-dispatch.

Source

common.lisp.

Special Variable: *current-gf*

The name of the generic function currently being inlined/statically dispatched.

Package

static-dispatch.

Source

common.lisp.

Special Variable: *current-method-combination*

When inside the dynamic extent of a method combination function, set to a CONS of the form (GF . COMBINATION) where name is the name of the generic function and COMBINATION is the name of the method combination.

Package

static-dispatch.

Source

combin.lisp.

Special Variable: *env*

Environment in which the current generic function is being statically dispatched.

Package

static-dispatch.

Source

common.lisp.

Special Variable: *full-arg-list-form*

Bound to a from which constructs the full argument list for use as the default argument list in CALL-NEXT-METHOD.

Package

static-dispatch.

Source

combin.lisp.

Special Variable: *generic-function-table*

Hash table mapping generic functions to a list of methods.

Package

static-dispatch.

Source

common.lisp.

Special Variable: *gf-method-combination-options*

Hash-table mapping generic function names to the list (COMBINATION OPTIONS) where COMBINATION is the name of the generic-function’s method-combination and OPTIONS is the list of options given to the method-combination.

Package

static-dispatch.

Source

combin.lisp.

Special Variable: *method-combination-functions*

Hash-table mapping method-combination names to the functions which implement them for the static-dispatch system.

This is necessary since the built in COMPUTE-EFFECTIVE-METHOD does not have a standardized output and varies considerably between implementations, hence the functionality has to be reimplemented for static-dispatch.

Package

static-dispatch.

Source

combin.lisp.

Special Variable: *method-function-package*

Package into which statically dispatched method function names are interned.

Package

static-dispatch.

Source

common.lisp.


6.2.3 Macros

Macro: define-method-combination% (name &rest args)

Define a method-combination for the static-dispatch system only.

Arguments are of the same form as to CL:DEFINE-METHOD-COMBINATION.

Package

static-dispatch.

Source

combin.lisp.

Macro: ematch* ((&rest things) &body clauses)
Package

static-dispatch.

Source

util.lisp.

Macro: lambda-match (&body clauses)
Package

static-dispatch.

Source

util.lisp.

Macro: match* ((&rest things) &body clauses)
Package

static-dispatch.

Source

util.lisp.

Macro: method-combination-function (name (&rest lambda-list) (&rest group-specs) &body body)

Generate a method-combination function for the long-form of CL:DEFINE-METHOD-COMBINATION.

Package

static-dispatch.

Source

combin.lisp.

Macro: method-combination-function-short (name operator optimize)

Generate a method-combination function for the short-form of CL:DEFINE-METHOD-COMBINATION.

Package

static-dispatch.

Source

combin.lisp.

Macro: static-dispatch-test-hook ()

A form of this macro is inserted in the output of the STATIC-DISPATCH compiler macro, in order to allow certain test code to be inserted, by shadowing this macro using MACROLET. The global expands to NIL.

Package

static-dispatch.

Source

common.lisp.

Macro: static-method-function-test-hook ()

A form of this macro is inserted in method functions, in order to allow test code to be inserted.

Package

static-dispatch.

Source

common.lisp.


6.2.4 Ordinary functions

Function: add-allow-other-keys (lambda-list)

Add &ALLOW-OTHER-KEYS to a LAMBDA-LIST.

Package

static-dispatch.

Source

common.lisp.

Function: add-compiler-macro (name)

Add compiler-macro to generic-function.

Package

static-dispatch.

Source

common.lisp.

Function: applicable-methods (methods types &optional remove-t)

Returns a list of all methods in METHODS which are applicable to the types TYPES.

If REMOVE-T is true, applicable methods with a T specializer which match a T argument type are not considered unless all other methods have a T specializer for that argument. If NIL they are considered for applicability.

Package

static-dispatch.

Source

common.lisp.

Function: block-name (gf-name)

Returns the name of the implicit block, surrounding a method of the generic function GF-NAME.

Package

static-dispatch.

Source

common.lisp.

Function: combination-function (name)

Retrieve the function implementing the method-combination COMBINATION.

Package

static-dispatch.

Source

combin.lisp.

Function: (setf combination-function) (name)

Set the combination function implementing a method-combination.

Package

static-dispatch.

Source

combin.lisp.

Function: combination-options (gf-name)

Retrieve the method combination name and options of the generic function with name GF-NAME.

Package

static-dispatch.

Source

combin.lisp.

Function: (setf combination-options) (gf-name)

Set the method combination name and options for a given generic function.

Package

static-dispatch.

Source

combin.lisp.

Function: compute-applicable-methods% (name types)

Determine the applicable methods for given argument types.

NAME is the name of the generic-function.

TYPES is the list of types of the generic-function required arguments.

Returns the sorted list of applicable methods. Returns NIL if there are no applicable methods, or if the generic-function contains a method for which there is no ‘METHOD-INFO’ object.

Package

static-dispatch.

Source

common.lisp.

Function: compute-effective-method% (gf methods args)

Static dispatch version of CLOSER-MOP:COMPUTE-EFFECTIVE-METHOD.

Compute the effective method of a generic-function for a given list of methods.

Calls the function implementing the generic function’s method-combination for the static-dispatch system. For this to happen, the generic function must be known (declared with STATIC-DISPATCH:DEFGENERIC) as well as its
method-combination (defined with STATIC-DISPATCH:DEFINE-METHOD-COMBINATION).

GF is the generic-function object.

METHODS is the list of method objects for the applicable methods, ordered with the most specific method first.

ARGS is the specifier for the arguments to the generic function call.

Package

static-dispatch.

Source

combin.lisp.

Function: compute-effective-method%% (gf combin-fn options methods args)

Compute the effective method given a method-combination function.

GF is the generic-function object.

COMBIN-FN is the method-combination function.

METHODS is the list of method objects for the applicable methods, ordered with the most specific method first.

ARGS is the specifier for the arguments to the generic function call.

Package

static-dispatch.

Source

combin.lisp.

Function: copy-temp-method (instance)
Package

static-dispatch.

Source

common.lisp.

Function: destructure-args (args lambda-list body)

Destructure the argument list, based on the lambda-list, if possible.

Generates a binding form for the variables in a lambda-list which are bound to the argument forms of the arguments to the generic function call.

ARGS is the list of argument forms passed to the generic function.

LAMBDA-LIST is the method lambda list.

BODY is the list of forms comprising the method body which are inserted in the body of the binding form. The first element of BODY may be a declare expression.

Returns a binding form, binding all variables in LAMBDA-LIST and containing BODY.

Package

static-dispatch.

Source

common.lisp.

Function: destructure-combin-lambda-list (gf lambda-list gensyms args body)

Emit a form which destructures the argument list in a method-combination.

GF is the generic-function object.

LAMBDA-LIST is the :ARGUMENTS lambda-list of the method-combination.

GENSYMS is an association list mapping variable names to the gensymed variable names which should be inserted in the resulting form.

ARGS is the arguments specifier of the generic function call.

BODY is a list of forms which make use of the variables in the lambda-list.

Returns a list of forms which wrap BODY in code that destructures the arguments according to LAMBDA-LIST.

Package

static-dispatch.

Source

combin.lisp.

Function: destructure-list (lambda-list list)

Destructure a list.

LAMBDA-LIST is the lambda-list specifying how LIST is destructured.

LIST is the list of forms which are destructured.

Returns a list of LET* bindings which bind the variables in LAMBDA-LIST to the corresponding forms in LIST. If destructuring fails an error condition is signalled.

Package

static-dispatch.

Source

common.lisp.

Function: dispatch-warn (env name e)

Emit a static dispatch failure warning.

Checks whether the warning should actually be emitted, according to the declared static-dispatch warning level in the environment.

ENV is the lexical environment of the generic function call.

E is the error condition object, of the static-dispatch failure, which is printed in the warning.

Package

static-dispatch.

Source

warnings.lisp.

Function: enclose-in-type-declarations (forms vars types)

Encloses FORMS in a LOCALLY form which declares the types of VARS to be TYPES.

Package

static-dispatch.

Source

common.lisp.

Function: ensure-gf-methods (gf-name)

Ensures that a method table for the generic function GF-NAME exists, in *GENERIC-FUNCTION-TABLE*.

Package

static-dispatch.

Source

common.lisp.

Function: ensure-method-info (gf-name qualifiers specializers &key function-name body lambda-list remove-on-redefine-p)

Ensures that the method table, within *GENERIC-FUNCTION-TABLE*, of the generic function GF-NAME contains a method with qualifiers QUALIFIERS, specializers SPECIALIZERS, lambda-list LAMBDA-LIST, static method function-name FUNCTION-NAME, and body BODY. If the table does not contain a method for those specializers, a new ‘METHOD-INFO’ object is created.

Package

static-dispatch.

Source

common.lisp.

Function: find-method% (gf qualifiers specializers)

Same as FIND-METHOD but allows SPECIALIZERS to be a list of symbolic specializers rather than classes.

Package

static-dispatch.

Source

common.lisp.

Function: gensym-lambda-list (lambda-list)

Replace the variables in a lambda-list with gensyms.

LAMBDA-LIST: The lambda-list.

Returns two values:

1. The new lambda-list with the variables replaced by gensyms.

2. The list of bindings, as if to LET, binding the original variables to the corresponding gensym’d variables.

Package

static-dispatch.

Source

sbcl.lisp.

Function: gf-method (gf-name spec)

Returns the ‘METHOD-INFO’, of the method with specifier (qualifier and specializer list) SPEC of the generic function GF-NAME.

Package

static-dispatch.

Source

common.lisp.

Function: (setf gf-method) (gf-name spec)

Sets the method info, to VALUE, for the method with
specifier (qualifier and specializer list) SPEC of the generic function GF-NAME.

Package

static-dispatch.

Source

common.lisp.

Function: gf-methods (gf-name)

Returns the method information for the generic function GF-NAME. A hash-table mapping lists of specializers to ‘METHOD-INFO’ objects is returned.

Package

static-dispatch.

Source

common.lisp.

Function: group-combin-methods (methods groups orders)

Group the methods according to the method-combination group specifier

METHODS is the list of generic-function methods.

GROUPS is the list of patterns of each method group specifier

ORDERS is a list specifying the order, by which the methods should be ordered, of each group specifier.

Package

static-dispatch.

Source

combin.lisp.

Function: info-for-method (gf-name method)

Return the ‘METHOD-INFO’ object for a method.

GF-NAME is the name of the generic function.

METHOD is the method object.

Returns the corresponding ‘METHOD-INFO’ object or NIL if there is no information about the method.

Package

static-dispatch.

Source

common.lisp.

Function: inline-call (gf methods args types check-types &optional call-fn)

Inline a call to a generic-function with a given list of methods.

GF is the generic-function object, of the generic-function call to inline.

METHODS is the sorted list of applicable method objects.

TYPES is the list of the types of the arguments.

CHECK-TYPES is a flag for whether, if true, type checks should be inserted in the CALL-NEXT-METHOD local function definitions.

CALL-FN is a flag for whether, if true, ordinary method function calls should be emitted rather than inlining the method body.

Package

static-dispatch.

Source

common.lisp.

Function: inline-method-form (name method args next-methods &key call-fn types check-types)

Inline a method with the definitions of the CALL-NEXT-METHOD and NEXT-METHOD-P functions.

NAME is the name of the generic-function.

METHOD is the method object, of the method to inline.

ARGS is the specifier for the arguments to the generic-function call.

NEXT-METHODS is the list of the next method objects.

CALL-FN is a flag for whether, if true, ordinary method function
calls should be emitted rather than inlining the method body.

TYPES is the argument type list.

CHECK-TYPES if a flag for whether type checks should be inserted in
the CALL-NEXT-METHOD definition.

Returns a form containing the inlined method with the lexical
CALL-NEXT-METHOD and NEXT-METHOD-P function definitions.

Package

static-dispatch.

Source

common.lisp.

Function: lambda-list->type-list (lambda-list specializers)

Convert a lambda-list to a type specifier list.

LAMBDA-LIST is the lambda-list.

SPECIALIZERS is the list of type specializers of the required arguments of the lambda-list.

Package

static-dispatch.

Source

sbcl.lisp.

Function: make-add-method-info (name method fn-name body &key remove-on-redefine-p)

Create a form which adds the method information to the method table.

NAME is the name of the generic function.

METHOD is a variable storing the method object.

FN-NAME is the name of the ordinary function which implements the method.

BODY is the method body.

REMOVE-ON-REDEFINE-P is a flag for whether the method should be removed when the generic function is redefined.

Package

static-dispatch.

Source

common.lisp.

Function: make-argument-bindings (args types)

Generating LET bindings which bind the arguments to variables.

ARGS is the list of argument forms passed to the generic function call. If it’s a symbol it represents the name of a variable which stores the argument list.

TYPES is the list of type specifiers of the arguments, as determined from the environment.

Returns three values:

1. A list of LET bindings.
2. The new argument list.
3. A list of declarations relating to the variables.

Package

static-dispatch.

Source

common.lisp.

Function: make-dispatch-type-list (args node)

Generate a form which generates the argument type list.

ARGS are the transform arguments to include in the type list.

NODE is the compilation node argument.

Package

static-dispatch.

Source

sbcl.lisp.

Function: make-ignorable-declarations (vars)

Creates a DECLARE IGNORABLE expression for the variables in VARS.

Package

static-dispatch.

Source

common.lisp.

Function: make-inline-method-body (method args types check-types)

Returns the inline method body (without the CALL-NEXT-METHOD and NEXT-METHOD-P functions), of a METHOD, when applied on arguments ARGS with types TYPES.

Package

static-dispatch.

Source

common.lisp.

Function: make-method-function (gf-name name lambda-list body)

Generate a DEFUN form implementing a generic function method.

GF-NAME is the name of the generic function.

NAME is the name of the function to generate.

LAMBDA-LIST is the ordinary function’s lambda-list.

BODY is the body implementing the method.

Returns a DEFUN form for the method function.

Package

static-dispatch.

Source

method-functions.lisp.

Function: make-method-function-call (function args &optional extra)

Generate call to the function which implements a method.

FUNCTION is the name of the function which implements the method.

ARGS is the argument specifier of the method. Either a list containing the argument forms, or a symbol naming the variable in which the argument list is stored.

EXTRA is a list of extra arguments to pass before ARGS.

Returns the function call form.

Package

static-dispatch.

Source

common.lisp.

Function: make-reconstruct-arg-list (lambda-list)

Generate a form which generates a form that reconstructs an argument list.

The generated form is expected to be used inside a DEFTRANSFORM where each lambda-list variable is bound to the compilation entity or NIL if not provided.

LAMBDA-LIST is the lambda-list from which to reconstruct the argument list.

Returns a form that when evaluated produces another form that reconstructs the argument list.

Package

static-dispatch.

Source

sbcl.lisp.

Function: make-reconstruct-static-arg-list (lambda-list)

Generate a form that reconstructs an argument list.

The generated form is expected to be used inside a DEFTRANSFORM where each lambda-list variable is bound to the compilation entity or NIL if not provided.

LAMBDA-LIST is the lambda-list from which to reconstruct the argument list.

Returns a form that when evaluated returns the static argument list.

Package

static-dispatch.

Source

sbcl.lisp.

Function: make-static-dispatch (name lambda-list specializers)
Package

static-dispatch.

Source

sbcl.lisp.

Function: make-temp-method (&key body)
Package

static-dispatch.

Source

common.lisp.

Function: make-type-checks (vars types)

Returns a list of CHECK-TYPE forms for each variable in VARS and corresponding type in TYPES.

Package

static-dispatch.

Source

common.lisp.

Function: make-type-declarations (vars types)

Returns a DECLARE expression which declares each variable in VARS to be of the type stored in the corresponding element of TYPES

Package

static-dispatch.

Source

common.lisp.

Function: method-spec (method-info)

Return the method specifier, i.e. the key used within the method table.

METHOD-INFO is the ‘METHOD-INFO’ object of the method.

Package

static-dispatch.

Source

common.lisp.

Function: next-method-default-args (args)

Generate the default CALL-NEXT-METHOD argument list form.

ARGS is the argument list specifier of the arguments passed to the current method. This may either be a list of forms or a symbol which names a variable in which the full list is stored.

Returns a form that creates the default CALL-NEXT-METHOD argument list.

Package

static-dispatch.

Source

common.lisp.

Function: order-by-precedence (precedence args)

Orders the list ARGS by the order specified in PRECEDENCE.

Package

static-dispatch.

Source

common.lisp.

Function: order-method-specializers (methods precedence)

Orders the specializers of METHODS by the argument precedence order PRECEDENCE.

Package

static-dispatch.

Source

common.lisp.

Function: parse-method (def)
Package

static-dispatch.

Source

common.lisp.

Function: parse-method-lambda-list (lambda-list)
Package

static-dispatch.

Source

common.lisp.

Function: positions (item seq)

Return a list containing the positions of the elements of sequence SEQ which are EQL to ITEM.

Package

static-dispatch.

Source

sbcl.lisp.

Function: precedence-order (lambda-list precedence)

Returns a list of the generic function arguments in argument precedence order (PRECEDENCE). Each element in the list is the index of the argument within LAMBDA-LIST.

Package

static-dispatch.

Source

common.lisp.

Function: remove-defined-methods (name)

Remove the methods of a generic-function for which REMOVE-ON-REDEFINE-P is true.

NAME is the name of the generic function.

Package

static-dispatch.

Source

common.lisp.

Function: should-apply? (methods type-list)

Check whether the current transform should be applied.

A transform is generated for each method, therefore each transform should only be applied if the most specific method is the transform’s method. This is done by comparing the type-list for the most specific method to the transform’s type-list and if they match, the transform is applied.

METHODS is the sorted list of applicable methods.

TYPE-LIST is the type list for the current transform.

Return true if the transform should be applied.

Package

static-dispatch.

Source

sbcl.lisp.

Function: should-call-fn? (name env)

Returns true if a call to the ordinary function, implementing the method for generic-function NAME, should be emitted rather than inlining the method body.

Function calls are emitted when there is a SPACE optimize quality equal to 3 in the environment ENV.

Package

static-dispatch.

Source

common.lisp.

Function: should-check-types? (env)

Returns true if CHECK-TYPE forms should be added in the body of CALL-NEXT-METHOD. CHECK-TYPE forms are added if the priority of the SAFETY optimize quality is greater than or equal to the SPEED optimize quality in the environment ENV.

Package

static-dispatch.

Source

common.lisp.

Function: should-warn? (env)

Returns true if warnings should be emitted for static-dispatching errors in the environment ENV.

Package

static-dispatch.

Source

warnings.lisp.

Function: sort-methods (methods)

Sorts METHODS by specificity.

Package

static-dispatch.

Source

common.lisp.

Function: specializer->cl (specializer)

Returns the CL representation of a specializer as used in a DEFMETHOD lambda-list. ‘CLASS’ specializers are replaced with their CLASS-NAME and EQL specializers are replaced with ‘(EQL ,EQL-SPECIALIZER-OBJECT). The EQL-SPECIALIZER-OBJECT is the value to which the EQL object form was evaluated not the form itself.

Package

static-dispatch.

Source

common.lisp.

Function: specializer< (s1 s2)

Returns true if the specializer list S1 is more specific than specializer list S2.

Package

static-dispatch.

Source

common.lisp.

Function: static-dispatch? (name env)

Checks whether the generic function named NAME should be statically dispatched. This is the case if it is declared inline in the environment ENV.

Package

static-dispatch.

Source

common.lisp.

Function: static-overload (name args type-list types node)
Package

static-dispatch.

Source

sbcl.lisp.

Reader: temp-method-body (instance)
Writer: (setf temp-method-body) (instance)
Package

static-dispatch.

Source

common.lisp.

Target Slot

body.

Function: temp-method-p (object)
Package

static-dispatch.

Source

common.lisp.

Function: unparse-lambda-list (required optional rest key allow-other-keys aux keyp)

Construct a lambda-list out of its components.

REQUIRED is the list of required arguments.

OPTIONAL is the list of optional argument specifiers.

REST is the rest argument, or NIL if there is no rest argument.

ALLOW-OTHER-KEYS is a flag for whether &ALLOW-OTHER-KEYS should be present.

AUX is the list of auxiliary variable specifiers.

KEYP is a flag for whether &key should be present.

Returns the lambda list.

Package

static-dispatch.

Source

common.lisp.

Function: wrap-in-macros (name args form &key call-fn types check-types)

Wrap a form in the lexical CALL-METHOD and MAKE-METHOD macros.

NAME is the name of the generic-function being statically dispatched.

ARGS is the specifier for the arguments of the generic-function call.

FORM is the form which should be inserted in the body of the MACROLET.

CALL-FN is a flag for whether, if true, ordinary method function calls should be emitted rather than inlining the method body.

TYPES is the argument type list.

CHECK-TYPES is a flag for whether type checks should be inserted in the CALL-NEXT-METHOD definitions.

Returns a MACROLET form.

Package

static-dispatch.

Source

common.lisp.


6.2.5 Generic functions

Generic Reader: body (object)
Generic Writer: (setf body) (object)
Package

static-dispatch.

Methods
Reader Method: body ((method-info method-info))
Writer Method: (setf body) ((method-info method-info))

The method function body.

Source

common.lisp.

Target Slot

body.

Generic Reader: combination (condition)
Package

static-dispatch.

Methods
Reader Method: combination ((condition user-method-combination-error))
Source

combin.lisp.

Target Slot

combination.

Reader Method: combination ((condition combin-missing-required))
Source

combin.lisp.

Target Slot

combination.

Reader Method: combination ((condition unknown-method-combination))
Source

combin.lisp.

Target Slot

combination.

Generic Reader: function-name (object)
Generic Writer: (setf function-name) (object)
Package

static-dispatch.

Methods
Reader Method: function-name ((method-info method-info))
Writer Method: (setf function-name) ((method-info method-info))

The name of the ordinary function implementing the method.

Source

common.lisp.

Target Slot

function-name.

Generic Reader: gf-name (condition)
Package

static-dispatch.

Methods
Reader Method: gf-name ((condition user-method-combination-error))
Source

combin.lisp.

Target Slot

gf-name.

Generic Reader: group-spec (condition)
Package

static-dispatch.

Methods
Reader Method: group-spec ((condition combin-missing-required))
Source

combin.lisp.

Target Slot

group-spec.

Generic Reader: lambda-list (object)
Generic Writer: (setf lambda-list) (object)
Package

static-dispatch.

Methods
Reader Method: lambda-list ((method-info method-info))
Writer Method: (setf lambda-list) ((method-info method-info))

The lambda-list of the method.

Source

common.lisp.

Target Slot

lambda-list.

Generic Reader: message (condition)
Package

static-dispatch.

Methods
Reader Method: message ((condition user-method-combination-error))
Source

combin.lisp.

Target Slot

message.

Generic Reader: qualifiers (object)
Generic Writer: (setf qualifiers) (object)
Package

static-dispatch.

Methods
Reader Method: qualifiers ((method-info method-info))
Writer Method: (setf qualifiers) ((method-info method-info))

List of method qualifiers.

Source

common.lisp.

Target Slot

qualifiers.

Generic Reader: remove-on-redefine-p (object)
Generic Writer: (setf remove-on-redefine-p) (object)
Package

static-dispatch.

Methods
Reader Method: remove-on-redefine-p ((method-info method-info))
Writer Method: (setf remove-on-redefine-p) ((method-info method-info))

True if the method should be removed when the DEFGENERIC form is re-evaluated.

Source

common.lisp.

Target Slot

remove-on-redefine-p.

Generic Reader: specializers (object)
Generic Writer: (setf specializers) (object)
Package

static-dispatch.

Methods
Reader Method: specializers ((method-info method-info))
Writer Method: (setf specializers) ((method-info method-info))

The method’s specializers

Source

common.lisp.

Target Slot

specializers.

Generic Reader: the-method (condition)
Package

static-dispatch.

Methods
Reader Method: the-method ((condition user-invalid-method-error))
Source

combin.lisp.

Target Slot

the-method.


6.2.6 Conditions

Condition: combin-destructure-args-error

Represents an error in destructuring the (rest/keyword) section of the generic function lambda-list.

Package

static-dispatch.

Source

combin.lisp.

Direct superclasses

error.

Condition: combin-missing-required

Error condition representing the error of no methods being matched to a required group specifier in a method combination.

Package

static-dispatch.

Source

combin.lisp.

Direct superclasses

error.

Direct methods
Direct slots
Slot: combination

Method combination name

Initargs

:combination

Readers

combination.

Writers

This slot is read-only.

Slot: group-spec

Method group specifier

Initargs

:group-spec

Readers

group-spec.

Writers

This slot is read-only.

Condition: unknown-method-combination

Error condition representing a method-combination which has not been defined through STATIC-DISPATCH-CL:DEFINE-METHOD-COMBINATION, and hence static-dispatch doesn’t know about it.

Package

static-dispatch.

Source

combin.lisp.

Direct superclasses

error.

Direct methods

combination.

Direct slots
Slot: combination

The method combination

Initargs

:combination

Readers

combination.

Writers

This slot is read-only.

Condition: user-invalid-method-error

Error condition representing a method whose qualifiers do not match any group specifier. Signalled with the INVALID-METHOD-ERROR function.

Package

static-dispatch.

Source

combin.lisp.

Direct superclasses

user-method-combination-error.

Direct methods

the-method.

Direct slots
Slot: the-method

The invalid method

Initargs

:the-method

Readers

the-method.

Writers

This slot is read-only.

Condition: user-method-combination-error

User method combination error condition signalled with METHOD-COMBINATION-ERROR function.

Package

static-dispatch.

Source

combin.lisp.

Direct superclasses

error.

Direct subclasses

user-invalid-method-error.

Direct methods
Direct slots
Slot: gf-name

Name of the generic function

Initargs

:gf-name

Readers

gf-name.

Writers

This slot is read-only.

Slot: combination

Name of the method combination

Initargs

:combination

Readers

combination.

Writers

This slot is read-only.

Slot: message

The error message

Initargs

:message

Readers

message.

Writers

This slot is read-only.


6.2.7 Structures

Structure: temp-method

Represents a ’temporary’ method created with MAKE-METHOD.

Package

static-dispatch.

Source

common.lisp.

Direct superclasses

structure-object.

Direct slots
Slot: body
Readers

temp-method-body.

Writers

(setf temp-method-body).


6.2.8 Classes

Class: method-info

Stores the body of a method and the name of a non-generic function which contains the method’s body.

Package

static-dispatch.

Source

common.lisp.

Direct methods
Direct slots
Slot: body

The method function body.

Initargs

:body

Readers

body.

Writers

(setf body).

Slot: qualifiers

List of method qualifiers.

Initargs

:qualifiers

Readers

qualifiers.

Writers

(setf qualifiers).

Slot: lambda-list

The lambda-list of the method.

Initargs

:lambda-list

Readers

lambda-list.

Writers

(setf lambda-list).

Slot: specializers

The method’s specializers

Initargs

:specializers

Readers

specializers.

Writers

(setf specializers).

Slot: function-name

The name of the ordinary function implementing the method.

Initargs

:function-name

Readers

function-name.

Writers

(setf function-name).

Slot: remove-on-redefine-p

True if the method should be removed when the DEFGENERIC form is re-evaluated.

Initargs

:remove-on-redefine-p

Readers

remove-on-redefine-p.

Writers

(setf remove-on-redefine-p).


Appendix A Indexes


A.1 Concepts


A.2 Functions

Jump to:   (  
A   B   C   D   E   F   G   I   L   M   N   O   P   Q   R   S   T   U   W  
Index Entry  Section

(
(setf body): Private generic functions
(setf body): Private generic functions
(setf combination-function): Private ordinary functions
(setf combination-options): Private ordinary functions
(setf function-name): Private generic functions
(setf function-name): Private generic functions
(setf gf-method): Private ordinary functions
(setf lambda-list): Private generic functions
(setf lambda-list): Private generic functions
(setf qualifiers): Private generic functions
(setf qualifiers): Private generic functions
(setf remove-on-redefine-p): Private generic functions
(setf remove-on-redefine-p): Private generic functions
(setf specializers): Private generic functions
(setf specializers): Private generic functions
(setf temp-method-body): Private ordinary functions

A
add-allow-other-keys: Private ordinary functions
add-compiler-macro: Private ordinary functions
applicable-methods: Private ordinary functions

B
block-name: Private ordinary functions
body: Private generic functions
body: Private generic functions

C
call-method: Public macros
combination: Private generic functions
combination: Private generic functions
combination: Private generic functions
combination: Private generic functions
combination-function: Private ordinary functions
combination-options: Private ordinary functions
compute-applicable-methods%: Private ordinary functions
compute-effective-method%: Private ordinary functions
compute-effective-method%%: Private ordinary functions
copy-temp-method: Private ordinary functions

D
defgeneric: Public macros
define-method-combination: Public macros
define-method-combination%: Private macros
defmethod: Public macros
destructure-args: Private ordinary functions
destructure-combin-lambda-list: Private ordinary functions
destructure-list: Private ordinary functions
dispatch-warn: Private ordinary functions

E
ematch*: Private macros
enable-static-dispatch: Public macros
enclose-in-type-declarations: Private ordinary functions
ensure-gf-methods: Private ordinary functions
ensure-method-info: Private ordinary functions

F
find-method%: Private ordinary functions
Function, (setf combination-function): Private ordinary functions
Function, (setf combination-options): Private ordinary functions
Function, (setf gf-method): Private ordinary functions
Function, (setf temp-method-body): Private ordinary functions
Function, add-allow-other-keys: Private ordinary functions
Function, add-compiler-macro: Private ordinary functions
Function, applicable-methods: Private ordinary functions
Function, block-name: Private ordinary functions
Function, combination-function: Private ordinary functions
Function, combination-options: Private ordinary functions
Function, compute-applicable-methods%: Private ordinary functions
Function, compute-effective-method%: Private ordinary functions
Function, compute-effective-method%%: Private ordinary functions
Function, copy-temp-method: Private ordinary functions
Function, destructure-args: Private ordinary functions
Function, destructure-combin-lambda-list: Private ordinary functions
Function, destructure-list: Private ordinary functions
Function, dispatch-warn: Private ordinary functions
Function, enclose-in-type-declarations: Private ordinary functions
Function, ensure-gf-methods: Private ordinary functions
Function, ensure-method-info: Private ordinary functions
Function, find-method%: Private ordinary functions
Function, gensym-lambda-list: Private ordinary functions
Function, gf-method: Private ordinary functions
Function, gf-methods: Private ordinary functions
Function, group-combin-methods: Private ordinary functions
Function, info-for-method: Private ordinary functions
Function, inline-call: Private ordinary functions
Function, inline-method-form: Private ordinary functions
Function, invalid-method-error: Public ordinary functions
Function, lambda-list->type-list: Private ordinary functions
Function, make-add-method-info: Private ordinary functions
Function, make-argument-bindings: Private ordinary functions
Function, make-dispatch-type-list: Private ordinary functions
Function, make-ignorable-declarations: Private ordinary functions
Function, make-inline-method-body: Private ordinary functions
Function, make-method-function: Private ordinary functions
Function, make-method-function-call: Private ordinary functions
Function, make-reconstruct-arg-list: Private ordinary functions
Function, make-reconstruct-static-arg-list: Private ordinary functions
Function, make-static-dispatch: Private ordinary functions
Function, make-temp-method: Private ordinary functions
Function, make-type-checks: Private ordinary functions
Function, make-type-declarations: Private ordinary functions
Function, method-combination-error: Public ordinary functions
Function, method-spec: Private ordinary functions
Function, next-method-default-args: Private ordinary functions
Function, order-by-precedence: Private ordinary functions
Function, order-method-specializers: Private ordinary functions
Function, parse-method: Private ordinary functions
Function, parse-method-lambda-list: Private ordinary functions
Function, positions: Private ordinary functions
Function, precedence-order: Private ordinary functions
Function, remove-defined-methods: Private ordinary functions
Function, should-apply?: Private ordinary functions
Function, should-call-fn?: Private ordinary functions
Function, should-check-types?: Private ordinary functions
Function, should-warn?: Private ordinary functions
Function, sort-methods: Private ordinary functions
Function, specializer->cl: Private ordinary functions
Function, specializer<: Private ordinary functions
Function, static-dispatch: Public ordinary functions
Function, static-dispatch-type: Public ordinary functions
Function, static-dispatch?: Private ordinary functions
Function, static-overload: Private ordinary functions
Function, temp-method-body: Private ordinary functions
Function, temp-method-p: Private ordinary functions
Function, unparse-lambda-list: Private ordinary functions
Function, wrap-in-macros: Private ordinary functions
function-name: Private generic functions
function-name: Private generic functions

G
Generic Function, (setf body): Private generic functions
Generic Function, (setf function-name): Private generic functions
Generic Function, (setf lambda-list): Private generic functions
Generic Function, (setf qualifiers): Private generic functions
Generic Function, (setf remove-on-redefine-p): Private generic functions
Generic Function, (setf specializers): Private generic functions
Generic Function, body: Private generic functions
Generic Function, combination: Private generic functions
Generic Function, function-name: Private generic functions
Generic Function, gf-name: Private generic functions
Generic Function, group-spec: Private generic functions
Generic Function, lambda-list: Private generic functions
Generic Function, message: Private generic functions
Generic Function, qualifiers: Private generic functions
Generic Function, remove-on-redefine-p: Private generic functions
Generic Function, specializers: Private generic functions
Generic Function, the-method: Private generic functions
gensym-lambda-list: Private ordinary functions
gf-method: Private ordinary functions
gf-methods: Private ordinary functions
gf-name: Private generic functions
gf-name: Private generic functions
group-combin-methods: Private ordinary functions
group-spec: Private generic functions
group-spec: Private generic functions

I
info-for-method: Private ordinary functions
inline-call: Private ordinary functions
inline-method-form: Private ordinary functions
invalid-method-error: Public ordinary functions

L
lambda-list: Private generic functions
lambda-list: Private generic functions
lambda-list->type-list: Private ordinary functions
lambda-match: Private macros

M
Macro, call-method: Public macros
Macro, defgeneric: Public macros
Macro, define-method-combination: Public macros
Macro, define-method-combination%: Private macros
Macro, defmethod: Public macros
Macro, ematch*: Private macros
Macro, enable-static-dispatch: Public macros
Macro, lambda-match: Private macros
Macro, make-method: Public macros
Macro, match*: Private macros
Macro, method-combination-function: Private macros
Macro, method-combination-function-short: Private macros
Macro, static-dispatch-test-hook: Private macros
Macro, static-method-function-test-hook: Private macros
make-add-method-info: Private ordinary functions
make-argument-bindings: Private ordinary functions
make-dispatch-type-list: Private ordinary functions
make-ignorable-declarations: Private ordinary functions
make-inline-method-body: Private ordinary functions
make-method: Public macros
make-method-function: Private ordinary functions
make-method-function-call: Private ordinary functions
make-reconstruct-arg-list: Private ordinary functions
make-reconstruct-static-arg-list: Private ordinary functions
make-static-dispatch: Private ordinary functions
make-temp-method: Private ordinary functions
make-type-checks: Private ordinary functions
make-type-declarations: Private ordinary functions
match*: Private macros
message: Private generic functions
message: Private generic functions
Method, (setf body): Private generic functions
Method, (setf function-name): Private generic functions
Method, (setf lambda-list): Private generic functions
Method, (setf qualifiers): Private generic functions
Method, (setf remove-on-redefine-p): Private generic functions
Method, (setf specializers): Private generic functions
Method, body: Private generic functions
Method, combination: Private generic functions
Method, combination: Private generic functions
Method, combination: Private generic functions
Method, function-name: Private generic functions
Method, gf-name: Private generic functions
Method, group-spec: Private generic functions
Method, lambda-list: Private generic functions
Method, message: Private generic functions
Method, qualifiers: Private generic functions
Method, remove-on-redefine-p: Private generic functions
Method, specializers: Private generic functions
Method, the-method: Private generic functions
method-combination-error: Public ordinary functions
method-combination-function: Private macros
method-combination-function-short: Private macros
method-spec: Private ordinary functions

N
next-method-default-args: Private ordinary functions

O
order-by-precedence: Private ordinary functions
order-method-specializers: Private ordinary functions

P
parse-method: Private ordinary functions
parse-method-lambda-list: Private ordinary functions
positions: Private ordinary functions
precedence-order: Private ordinary functions

Q
qualifiers: Private generic functions
qualifiers: Private generic functions

R
remove-defined-methods: Private ordinary functions
remove-on-redefine-p: Private generic functions
remove-on-redefine-p: Private generic functions

S
should-apply?: Private ordinary functions
should-call-fn?: Private ordinary functions
should-check-types?: Private ordinary functions
should-warn?: Private ordinary functions
sort-methods: Private ordinary functions
specializer->cl: Private ordinary functions
specializer<: Private ordinary functions
specializers: Private generic functions
specializers: Private generic functions
static-dispatch: Public ordinary functions
static-dispatch-test-hook: Private macros
static-dispatch-type: Public ordinary functions
static-dispatch?: Private ordinary functions
static-method-function-test-hook: Private macros
static-overload: Private ordinary functions

T
temp-method-body: Private ordinary functions
temp-method-p: Private ordinary functions
the-method: Private generic functions
the-method: Private generic functions

U
unparse-lambda-list: Private ordinary functions

W
wrap-in-macros: Private ordinary functions


A.3 Variables

Jump to:   *   +  
B   C   F   G   L   M   Q   R   S   T  
Index Entry  Section

*
*argument-map*: Private special variables
*call-args*: Private special variables
*current-gf*: Private special variables
*current-method-combination*: Private special variables
*env*: Private special variables
*full-arg-list-form*: Private special variables
*generic-function-table*: Private special variables
*gf-method-combination-options*: Private special variables
*method-combination-functions*: Private special variables
*method-function-package*: Private special variables

+
+static-dispatch-policy+: Private constants

B
body: Private structures
body: Private classes

C
combination: Private conditions
combination: Private conditions
combination: Private conditions
Constant, +static-dispatch-policy+: Private constants

F
function-name: Private classes

G
gf-name: Private conditions
group-spec: Private conditions

L
lambda-list: Private classes

M
message: Private conditions

Q
qualifiers: Private classes

R
remove-on-redefine-p: Private classes

S
Slot, body: Private structures
Slot, body: Private classes
Slot, combination: Private conditions
Slot, combination: Private conditions
Slot, combination: Private conditions
Slot, function-name: Private classes
Slot, gf-name: Private conditions
Slot, group-spec: Private conditions
Slot, lambda-list: Private classes
Slot, message: Private conditions
Slot, qualifiers: Private classes
Slot, remove-on-redefine-p: Private classes
Slot, specializers: Private classes
Slot, the-method: Private conditions
Special Variable, *argument-map*: Private special variables
Special Variable, *call-args*: Private special variables
Special Variable, *current-gf*: Private special variables
Special Variable, *current-method-combination*: Private special variables
Special Variable, *env*: Private special variables
Special Variable, *full-arg-list-form*: Private special variables
Special Variable, *generic-function-table*: Private special variables
Special Variable, *gf-method-combination-options*: Private special variables
Special Variable, *method-combination-functions*: Private special variables
Special Variable, *method-function-package*: Private special variables
specializers: Private classes

T
the-method: Private conditions


A.4 Data types

Jump to:   C   D   F   M   P   S   T   U   W  
Index Entry  Section

C
Class, method-info: Private classes
closer-environments: The closer-environments package
combin-destructure-args-error: Private conditions
combin-missing-required: Private conditions
combin.lisp: The static-dispatch/src/combin․lisp file
combinations.lisp: The static-dispatch/src/combinations․lisp file
common.lisp: The static-dispatch/src/common․lisp file
Condition, combin-destructure-args-error: Private conditions
Condition, combin-missing-required: Private conditions
Condition, unknown-method-combination: Private conditions
Condition, user-invalid-method-error: Private conditions
Condition, user-method-combination-error: Private conditions

D
default.lisp: The static-dispatch/src/default․lisp file

F
File, combin.lisp: The static-dispatch/src/combin․lisp file
File, combinations.lisp: The static-dispatch/src/combinations․lisp file
File, common.lisp: The static-dispatch/src/common․lisp file
File, default.lisp: The static-dispatch/src/default․lisp file
File, method-functions.lisp: The static-dispatch/src/method-functions․lisp file
File, package.lisp: The static-dispatch/src/package․lisp file
File, sbcl.lisp: The static-dispatch/src/sbcl․lisp file
File, static-dispatch.asd: The static-dispatch/static-dispatch․asd file
File, util.lisp: The static-dispatch/src/util․lisp file
File, warnings.lisp: The static-dispatch/src/warnings․lisp file

M
method-functions.lisp: The static-dispatch/src/method-functions․lisp file
method-info: Private classes
Module, src: The static-dispatch/src module

P
Package, closer-environments: The closer-environments package
Package, static-dispatch: The static-dispatch package
Package, static-dispatch-cl: The static-dispatch-cl package
package.lisp: The static-dispatch/src/package․lisp file

S
sbcl.lisp: The static-dispatch/src/sbcl․lisp file
src: The static-dispatch/src module
static-dispatch: The static-dispatch system
static-dispatch: The static-dispatch package
static-dispatch-cl: The static-dispatch-cl package
static-dispatch.asd: The static-dispatch/static-dispatch․asd file
Structure, temp-method: Private structures
System, static-dispatch: The static-dispatch system

T
temp-method: Private structures

U
unknown-method-combination: Private conditions
user-invalid-method-error: Private conditions
user-method-combination-error: Private conditions
util.lisp: The static-dispatch/src/util․lisp file

W
warnings.lisp: The static-dispatch/src/warnings․lisp file