cleavir environment
1.0.0Interface for managing lexical environments.
The cleavir-env
system defines an interface Cleavir can use to query information from client environments. It also defines lexical environment objects used internally when processing code (e.g. for cleavir-cst-to-ast
).
This system is slated to be phased out in favor of Trucler. The only unresolved sticking point is that Cleavir sometimes wants to stick its own information into lexical environments, and this is not possible for unprepared clients.
Minimal definitions by clients
Briefly, here are the generic functions that must be specialized in order for cleavir-cst-to-ast
to work:
variable-info
: Returns information about variables.function-info
: Retrieves information about operators (functions, macros, special operators).optimize-info
: Retrives information about current optimization settings, as well as current policy (see the cleavir-compilation-policy system).declaration
: Retrieves the list of valid nonstandard declarations.type-expand
: Analogously tocl:macroexpand
, expands macro (deftype
-defined) type specifiers. This is required for CST-to-AST to do any type specifier parsing, which it may need to do even if the program contains no type declarations. Type specifier parsing can be further customized via the other generic functions in cleavir-environment, as well as the cleavir-ctype system, but this is not necessary.eval
: Evaluates a form. This is used in conversion ofcl:macrolet
to produce the local macroexpander.cst-eval
: Evaluates a CST of a form. This is used to execute compile-time side effects.
An example set of method definitions can be seen in the cleavir-example
system.
System Information
Definition Index
-
CLEAVIR-ENVIRONMENT
- CLEAVIR-ENV
No documentation provided.-
EXTERNAL CLASS BLOCK
No documentation provided. -
EXTERNAL CLASS BLOCK-INFO
No documentation provided. -
EXTERNAL CLASS CONSTANT-VARIABLE-INFO
No documentation provided. -
EXTERNAL CLASS FUNCTION
No documentation provided. -
EXTERNAL CLASS FUNCTION-DYNAMIC-EXTENT
No documentation provided. -
EXTERNAL CLASS FUNCTION-IGNORE
No documentation provided. -
EXTERNAL CLASS FUNCTION-TYPE
No documentation provided. -
EXTERNAL CLASS GLOBAL-FUNCTION-INFO
No documentation provided. -
EXTERNAL CLASS GLOBAL-MACRO-INFO
No documentation provided. -
EXTERNAL CLASS INLINE
No documentation provided. -
EXTERNAL CLASS INLINE-EXPANSION
No documentation provided. -
EXTERNAL CLASS LEXICAL-VARIABLE
No documentation provided. -
EXTERNAL CLASS LEXICAL-VARIABLE-INFO
No documentation provided. -
EXTERNAL CLASS LOCAL-FUNCTION-INFO
No documentation provided. -
EXTERNAL CLASS LOCAL-MACRO-INFO
No documentation provided. -
EXTERNAL CLASS MACRO
No documentation provided. -
EXTERNAL CLASS OPTIMIZE
No documentation provided. -
EXTERNAL CLASS OPTIMIZE-INFO
No documentation provided. -
EXTERNAL CLASS SPECIAL-OPERATOR-INFO
No documentation provided. -
EXTERNAL CLASS SPECIAL-VARIABLE
No documentation provided. -
EXTERNAL CLASS SPECIAL-VARIABLE-INFO
No documentation provided. -
EXTERNAL CLASS SYMBOL-MACRO
No documentation provided. -
EXTERNAL CLASS SYMBOL-MACRO-INFO
No documentation provided. -
EXTERNAL CLASS TAG
No documentation provided. -
EXTERNAL CLASS TAG-INFO
No documentation provided. -
EXTERNAL CLASS VARIABLE-DYNAMIC-EXTENT
No documentation provided. -
EXTERNAL CLASS VARIABLE-IGNORE
No documentation provided. -
EXTERNAL CLASS VARIABLE-TYPE
No documentation provided. -
EXTERNAL FUNCTION ENVIRONMENT-POLICY
- ENVIRONMENT
No documentation provided. -
EXTERNAL FUNCTION PARSE-TYPE-SPECIFIER
- TYPE-SPECIFIER
- ENVIRONMENT
- SYSTEM
No documentation provided. -
EXTERNAL FUNCTION PARSE-VALUES-TYPE-SPECIFIER
- TYPE-SPECIFIER
- ENVIRONMENT
- SYSTEM
No documentation provided. -
EXTERNAL GENERIC-FUNCTION ADD-BLOCK
- ENVIRONMENT
- SYMBOL
- &OPTIONAL
- IDENTITY
No documentation provided. -
EXTERNAL GENERIC-FUNCTION ADD-FUNCTION-DYNAMIC-EXTENT
- ENVIRONMENT
- FUNCTION-NAME
No documentation provided. -
EXTERNAL GENERIC-FUNCTION ADD-FUNCTION-IGNORE
- ENVIRONMENT
- FUNCTION-NAME
- IGNORE
No documentation provided. -
EXTERNAL GENERIC-FUNCTION ADD-FUNCTION-TYPE
- ENVIRONMENT
- FUNCTION-NAME
- TYPE
No documentation provided. -
EXTERNAL GENERIC-FUNCTION ADD-INLINE
- ENVIRONMENT
- FUNCTION-NAME
- INLINE
No documentation provided. -
EXTERNAL GENERIC-FUNCTION ADD-INLINE-EXPANSION
- ENVIRONMENT
- FUNCTION-NAME
- EXPANSION
No documentation provided. -
EXTERNAL GENERIC-FUNCTION ADD-LEXICAL-VARIABLE
- ENVIRONMENT
- SYMBOL
- &OPTIONAL
- IDENTITY
No documentation provided. -
EXTERNAL GENERIC-FUNCTION ADD-LOCAL-FUNCTION
- ENVIRONMENT
- FUNCTION-NAME
- &OPTIONAL
- IDENTITY
No documentation provided. -
EXTERNAL GENERIC-FUNCTION ADD-LOCAL-MACRO
- ENVIRONMENT
- SYMBOL
- EXPANDER
No documentation provided. -
EXTERNAL GENERIC-FUNCTION ADD-LOCAL-SYMBOL-MACRO
- ENVIRONMENT
- SYMBOL
- EXPANSION
No documentation provided. -
EXTERNAL GENERIC-FUNCTION ADD-OPTIMIZE
- ENVIRONMENT
- OPTIMIZE
- POLICY
No documentation provided. -
EXTERNAL GENERIC-FUNCTION ADD-SPECIAL-VARIABLE
- ENVIRONMENT
- SYMBOL
No documentation provided. -
EXTERNAL GENERIC-FUNCTION ADD-TAG
- ENVIRONMENT
- SYMBOL
- &OPTIONAL
- IDENTITY
No documentation provided. -
EXTERNAL GENERIC-FUNCTION ADD-VARIABLE-DYNAMIC-EXTENT
- ENVIRONMENT
- SYMBOL
No documentation provided. -
EXTERNAL GENERIC-FUNCTION ADD-VARIABLE-IGNORE
- ENVIRONMENT
- SYMBOL
- IGNORE
No documentation provided. -
EXTERNAL GENERIC-FUNCTION ADD-VARIABLE-TYPE
- ENVIRONMENT
- SYMBOL
- TYPE
No documentation provided. -
EXTERNAL GENERIC-FUNCTION AST
- OBJECT
No documentation provided. -
EXTERNAL GENERIC-FUNCTION ATTRIBUTES
- OBJECT
No documentation provided. -
EXTERNAL GENERIC-FUNCTION BLOCK-INFO
- ENVIRONMENT
- SYMBOL
No documentation provided. -
EXTERNAL GENERIC-FUNCTION COMPILE-TIME
- ENVIRONMENT
- &KEY
- VARIABLE-SHADOW
- FUNCTION-SHADOW
No documentation provided. -
EXTERNAL GENERIC-FUNCTION COMPILER-MACRO
- OBJECT
No documentation provided. -
EXTERNAL GENERIC-FUNCTION COMPILER-MACRO-FUNCTION
- FUNCTION-NAME
- ENVIRONMENT
No documentation provided. -
EXTERNAL GENERIC-FUNCTION CST-EVAL
- CST
- ENVIRONMENT
- DISPATCH-ENVIRONMENT
- SYSTEM
No documentation provided. -
EXTERNAL GENERIC-FUNCTION DECLARATIONS
- ENVIRONMENT
No documentation provided. -
EXTERNAL GENERIC-FUNCTION DYNAMIC-EXTENT
- OBJECT
No documentation provided. -
EXTERNAL GENERIC-FUNCTION EVAL
- FORM
- ENVIRONMENT
- DISPATCH-ENVIRONMENT
No documentation provided. -
EXTERNAL GENERIC-FUNCTION EXPANDER
- OBJECT
No documentation provided. -
EXTERNAL GENERIC-FUNCTION EXPANSION
- OBJECT
No documentation provided. -
EXTERNAL GENERIC-FUNCTION FIND-CLASS
- NAME
- ENVIRONMENT
- SYSTEM
- &OPTIONAL
- ERRORP
No documentation provided. -
EXTERNAL GENERIC-FUNCTION FUNCTION-DYNAMIC-EXTENT
- ENVIRONMENT
- DEFINING-INFO
No documentation provided. -
EXTERNAL GENERIC-FUNCTION FUNCTION-IGNORE
- ENVIRONMENT
- DEFINING-INFO
No documentation provided. -
EXTERNAL GENERIC-FUNCTION FUNCTION-INFO
- SYSTEM
- ENVIRONMENT
- FUNCTION-NAME
No documentation provided. -
EXTERNAL GENERIC-FUNCTION FUNCTION-TYPE
- ENVIRONMENT
- DEFINING-INFO
No documentation provided. -
EXTERNAL GENERIC-FUNCTION GLOBAL-ENVIRONMENT
- ENVIRONMENT
No documentation provided. -
EXTERNAL GENERIC-FUNCTION GLOBAL-P
- OBJECT
No documentation provided. -
EXTERNAL GENERIC-FUNCTION IDENTITY
- OBJECT
No documentation provided. -
EXTERNAL GENERIC-FUNCTION IGNORE
- OBJECT
No documentation provided. -
EXTERNAL GENERIC-FUNCTION INLINE
- OBJECT
No documentation provided. -
EXTERNAL GENERIC-FUNCTION MACRO-FUNCTION
- SYMBOL
- ENVIRONMENT
No documentation provided. -
EXTERNAL GENERIC-FUNCTION NAME
- OBJECT
No documentation provided. -
EXTERNAL GENERIC-FUNCTION OPTIMIZE
- OBJECT
No documentation provided. -
EXTERNAL GENERIC-FUNCTION OPTIMIZE-INFO
- ENVIRONMENT
No documentation provided. -
EXTERNAL GENERIC-FUNCTION OPTIMIZE-QUALITIES
- ENVIRONMENT
No documentation provided. -
EXTERNAL GENERIC-FUNCTION PARSE-COMPOUND-TYPE-SPECIFIER
- HEAD
- REST
- ENVIRONMENT
- SYSTEM
No documentation provided. -
EXTERNAL GENERIC-FUNCTION PARSE-EXPANDED-TYPE-SPECIFIER
- TYPE-SPECIFIER
- ENVIRONMENT
- SYSTEM
No documentation provided. -
EXTERNAL GENERIC-FUNCTION POLICY
- OBJECT
No documentation provided. -
EXTERNAL GENERIC-FUNCTION SYMBOL-MACRO-EXPANSION
- SYMBOL
- ENVIRONMENT
No documentation provided. -
EXTERNAL GENERIC-FUNCTION TAG-INFO
- ENVIRONMENT
- TAG
No documentation provided. -
EXTERNAL GENERIC-FUNCTION TYPE
- OBJECT
No documentation provided. -
EXTERNAL GENERIC-FUNCTION TYPE-EXPAND
- ENVIRONMENT
- TYPE-SPECIFIER
No documentation provided. -
EXTERNAL GENERIC-FUNCTION VALUE
- OBJECT
No documentation provided. -
EXTERNAL GENERIC-FUNCTION VARIABLE-DYNAMIC-EXTENT
- ENVIRONMENT
- DEFINING-INFO
No documentation provided. -
EXTERNAL GENERIC-FUNCTION VARIABLE-IGNORE
- ENVIRONMENT
- DEFINING-INFO
No documentation provided. -
EXTERNAL GENERIC-FUNCTION VARIABLE-INFO
- SYSTEM
- ENVIRONMENT
- SYMBOL
No documentation provided. -
EXTERNAL GENERIC-FUNCTION VARIABLE-TYPE
- ENVIRONMENT
- DEFINING-INFO
No documentation provided.