The inlined-generic-function Reference Manual

This is the inlined-generic-function Reference Manual, version 0.1, generated automatically by Declt version 4.0 beta 2 "William Riker" on Mon Feb 26 16:46:16 2024 GMT+0.

Table of Contents


1 Introduction


2 Systems

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


2.1 inlined-generic-function

MOP implementation of the fast inlinable generic functions dispatched in compile-time

Author

Masataro Asai

Contact

License

LLGPL

Version

0.1

Dependencies
  • trivia (system).
  • closer-mop (system).
  • alexandria (system).
  • iterate (system).
  • introspect-environment (system).
Source

inlined-generic-function.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 inlined-generic-function/inlined-generic-function.asd

Source

inlined-generic-function.asd.

Parent Component

inlined-generic-function (system).

ASDF Systems

inlined-generic-function.


3.1.3 inlined-generic-function/src/1.mop.lisp

Dependency

src/0.package.lisp (file).

Source

inlined-generic-function.asd.

Parent Component

inlined-generic-function (system).

Public Interface
Internals

break+ (macro).


3.1.4 inlined-generic-function/src/2.compiler.lisp

Dependency

src/1.mop.lisp (file).

Source

inlined-generic-function.asd.

Parent Component

inlined-generic-function (system).

Public Interface

inline-generic-function (function).

Internals

3.1.5 inlined-generic-function/src/3.invalid-branch.lisp

Dependency

src/2.compiler.lisp (file).

Source

inlined-generic-function.asd.

Parent Component

inlined-generic-function (system).

Public Interface

4 Packages

Packages are listed by definition order.


4.1 inlined-generic-function

Source

src/0.package.lisp.

Nickname

inlined-gf

Used By List

inlined-generic-function.impl.

Public Interface

4.2 inlined-generic-function.impl

Source

src/0.package.lisp.

Use List
Public Interface

*invalid-branch-warning-level* (special variable).

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: *invalid-branch-warning-level*

A flag controlling the level of compile-time warning signaled when
compiling a call to INVALID-BRANCH.
This does not affect the behavior of INVALID-BRANCH, which always signals an error.

Package

inlined-generic-function.impl.

Source

src/3.invalid-branch.lisp.


5.1.2 Ordinary functions

Function: inline-generic-function (whole &optional env)

Returns an inlined form which is equivalent to calling the generic function.

Package

inlined-generic-function.

Source

src/2.compiler.lisp.

Function: invalid-branch (&optional message)

This function mark a specific part of the code to be invalid.
It MUST NOT be used in a valid code.

On supported implementations (currently SBCL only),
the compiler signals a warning,style-warning or error
(depending on the value of *INVALID-BRANCH-WARNING-LEVEL*)
when the compiler fails to eliminiate it as a dead-code.

This is useful to detect a specific kind of errors,
e.g. type errors, infinite loops, infinite recursion and so on.
When it happens, you should fix the code, add a type restriction etc.
in order to make it compile.

On unsupported implementations, this function has no compile-time effect and just signals an error.

Supported implementations:

SBCL:
This feature is tested against all patch versions in the latest minor version, as well as the most recent patches in the past two minor versions.

Package

inlined-generic-function.

Source

src/3.invalid-branch.lisp.


5.1.3 Generic functions

Generic Reader: method-lambda-expression (object)
Generic Writer: (setf method-lambda-expression) (object)
Package

inlined-generic-function.

Methods
Reader Method: method-lambda-expression ((inlined-method inlined-method))
Writer Method: (setf method-lambda-expression) ((inlined-method inlined-method))

original lambda expression w/o decoration e.g. call-next-method

Source

src/1.mop.lisp.

Target Slot

lambda-expression.

Generic Reader: method-lambda-expression* (object)
Generic Writer: (setf method-lambda-expression*) (object)
Package

inlined-generic-function.

Methods
Reader Method: method-lambda-expression* ((inlined-method inlined-method))
Writer Method: (setf method-lambda-expression*) ((inlined-method inlined-method))

Cached result of make-method-lambda

Source

src/1.mop.lisp.

Target Slot

lambda-expression*.


5.1.4 Standalone methods

Method: ensure-generic-function-using-class :after ((gf inlined-generic-function) fun-name &rest rest &key &allow-other-keys)

This method is called while the compilation results of defgeneric form is being loaded. It sets up the compiler macro for this generic function.

Package

sb-mop.

Source

src/1.mop.lisp.

Method: make-method-lambda ((gf inlined-generic-function) (m inlined-method) lambda-expression environment)

Appends an additional keyword argument to the secondary value, which is passed to make-instance and sets the value

Package

sb-mop.

Source

src/1.mop.lisp.


5.1.5 Classes

Class: inlined-generic-function

A metaobject representing inlinable generic function.

Package

inlined-generic-function.

Source

src/1.mop.lisp.

Direct superclasses

standard-generic-function.

Direct methods
Direct Default Initargs
InitargValue
:method-class(find-class (quote inlined-method))
Class: inlined-method

A metaobject representing inlinable method.

Package

inlined-generic-function.

Source

src/1.mop.lisp.

Direct superclasses

standard-method.

Direct methods
Direct slots
Slot: lambda-expression

original lambda expression w/o decoration e.g. call-next-method

Package

inlined-generic-function.impl.

Initargs

:method-lambda-expression

Readers

method-lambda-expression.

Writers

(setf method-lambda-expression).

Slot: lambda-expression*

Cached result of make-method-lambda

Package

inlined-generic-function.impl.

Initargs

:method-lambda-expression*

Readers

method-lambda-expression*.

Writers

(setf method-lambda-expression*).


5.2 Internals


5.2.1 Special variables

Special Variable: *current-gf*
Package

inlined-generic-function.impl.

Source

src/2.compiler.lisp.

Special Variable: *current-inline-form*
Package

inlined-generic-function.impl.

Source

src/2.compiler.lisp.


5.2.2 Macros

Macro: break+ (&rest args)
Package

inlined-generic-function.impl.

Source

src/1.mop.lisp.


5.2.3 Ordinary functions

Function: %call-method (args method more-methods specs)
Package

inlined-generic-function.impl.

Source

src/2.compiler.lisp.

Function: %compile-generic-function (gf args whole)
Package

inlined-generic-function.impl.

Source

src/2.compiler.lisp.

Function: %compute-applicable-methods (gf specializers)
Package

inlined-generic-function.impl.

Source

src/2.compiler.lisp.

Function: %matcher-body (gensyms gf m method-combination specializers whole)
Package

inlined-generic-function.impl.

Source

src/2.compiler.lisp.

Function: %matcher-clause (gensyms gf method-combination whole argument-precedence-order lambda-list methods)
Package

inlined-generic-function.impl.

Source

src/2.compiler.lisp.

Function: %matcher-pattern (lambda-list argument-precedence-order specializers)
Package

inlined-generic-function.impl.

Source

src/2.compiler.lisp.

Function: compile-generic-function (gf args env whole)
Package

inlined-generic-function.impl.

Source

src/2.compiler.lisp.

Function: improve-readability (form)
Package

inlined-generic-function.impl.

Source

src/2.compiler.lisp.

Function: inline-discriminating-function (*current-inline-form* args form specs)

Corresponds to compute-discriminating-function in AMOP

Package

inlined-generic-function.impl.

Source

src/2.compiler.lisp.

Function: lambda-list-atoms (lambda-list)
Package

inlined-generic-function.impl.

Source

src/2.compiler.lisp.

Function: reorder-to-precedence (lambda-list precedence-order specializers)
Package

inlined-generic-function.impl.

Source

src/2.compiler.lisp.

Function: specializer< (lambda-list precedence-order m1 m2)

return true if some specializer of m1, checked in an precedence order, is a subtype of the specializer of m2

Package

inlined-generic-function.impl.

Source

src/2.compiler.lisp.

Function: take-while (pred lst)
Package

inlined-generic-function.impl.

Source

src/2.compiler.lisp.


5.2.4 Generic functions

Generic Function: dummy ()
Package

inlined-generic-function.impl.

Source

src/2.compiler.lisp.


Appendix A Indexes


A.1 Concepts


A.2 Functions

Jump to:   %   (  
B   C   D   E   F   G   I   L   M   R   S   T  
Index Entry  Section

%
%call-method: Private ordinary functions
%compile-generic-function: Private ordinary functions
%compute-applicable-methods: Private ordinary functions
%matcher-body: Private ordinary functions
%matcher-clause: Private ordinary functions
%matcher-pattern: Private ordinary functions

(
(setf method-lambda-expression): Public generic functions
(setf method-lambda-expression): Public generic functions
(setf method-lambda-expression*): Public generic functions
(setf method-lambda-expression*): Public generic functions

B
break+: Private macros

C
compile-generic-function: Private ordinary functions

D
dummy: Private generic functions

E
ensure-generic-function-using-class: Public standalone methods

F
Function, %call-method: Private ordinary functions
Function, %compile-generic-function: Private ordinary functions
Function, %compute-applicable-methods: Private ordinary functions
Function, %matcher-body: Private ordinary functions
Function, %matcher-clause: Private ordinary functions
Function, %matcher-pattern: Private ordinary functions
Function, compile-generic-function: Private ordinary functions
Function, improve-readability: Private ordinary functions
Function, inline-discriminating-function: Private ordinary functions
Function, inline-generic-function: Public ordinary functions
Function, invalid-branch: Public ordinary functions
Function, lambda-list-atoms: Private ordinary functions
Function, reorder-to-precedence: Private ordinary functions
Function, specializer<: Private ordinary functions
Function, take-while: Private ordinary functions

G
Generic Function, (setf method-lambda-expression): Public generic functions
Generic Function, (setf method-lambda-expression*): Public generic functions
Generic Function, dummy: Private generic functions
Generic Function, method-lambda-expression: Public generic functions
Generic Function, method-lambda-expression*: Public generic functions

I
improve-readability: Private ordinary functions
inline-discriminating-function: Private ordinary functions
inline-generic-function: Public ordinary functions
invalid-branch: Public ordinary functions

L
lambda-list-atoms: Private ordinary functions

M
Macro, break+: Private macros
make-method-lambda: Public standalone methods
Method, (setf method-lambda-expression): Public generic functions
Method, (setf method-lambda-expression*): Public generic functions
Method, ensure-generic-function-using-class: Public standalone methods
Method, make-method-lambda: Public standalone methods
Method, method-lambda-expression: Public generic functions
Method, method-lambda-expression*: Public generic functions
method-lambda-expression: Public generic functions
method-lambda-expression: Public generic functions
method-lambda-expression*: Public generic functions
method-lambda-expression*: Public generic functions

R
reorder-to-precedence: Private ordinary functions

S
specializer<: Private ordinary functions

T
take-while: Private ordinary functions


A.4 Data types

Jump to:   C   F   I   P   S  
Index Entry  Section

C
Class, inlined-generic-function: Public classes
Class, inlined-method: Public classes

F
File, inlined-generic-function.asd: The inlined-generic-function/inlined-generic-function․asd file
File, src/0.package.lisp: The inlined-generic-function/src/0․package․lisp file
File, src/1.mop.lisp: The inlined-generic-function/src/1․mop․lisp file
File, src/2.compiler.lisp: The inlined-generic-function/src/2․compiler․lisp file
File, src/3.invalid-branch.lisp: The inlined-generic-function/src/3․invalid-branch․lisp file

I
inlined-generic-function: The inlined-generic-function system
inlined-generic-function: The inlined-generic-function package
inlined-generic-function: Public classes
inlined-generic-function.asd: The inlined-generic-function/inlined-generic-function․asd file
inlined-generic-function.impl: The inlined-generic-function․impl package
inlined-method: Public classes

P
Package, inlined-generic-function: The inlined-generic-function package
Package, inlined-generic-function.impl: The inlined-generic-function․impl package

S
src/0.package.lisp: The inlined-generic-function/src/0․package․lisp file
src/1.mop.lisp: The inlined-generic-function/src/1․mop․lisp file
src/2.compiler.lisp: The inlined-generic-function/src/2․compiler․lisp file
src/3.invalid-branch.lisp: The inlined-generic-function/src/3․invalid-branch․lisp file
System, inlined-generic-function: The inlined-generic-function system