1. Special forms available in compiled code
    1. ##core#declare
    2. ##core#immutable
    3. ##core#global-ref
    4. ##core#let-location
    5. ##core#set!
    6. ##core#named-lambda
    7. ##core#loop-lambda
    8. ##core#undefined
    9. ##core#primitive
    10. ##core#inline
    11. ##core#inline_allocate
    12. ##core#inline_ref
    13. ##core#inline_update
    14. ##core#inline_loc_ref
    15. ##core#inline_loc_update
    16. ##core#compiletimetoo
    17. ##core#compiletimeonly
    18. ##core#elaborationtimetoo
    19. ##core#elaborationtimeonly
    20. Internal forms of FFI syntax
    21. ##core#define-inline
    22. ##core#define-constant
    23. ##core#check
    24. ##core#require-for-syntax
    25. ##core#require-extension
    26. ##core#app

Special forms available in compiled code

The following special forms are available when compiling code via chicken or csc. Note that these are internal and may change without notice.

##core#declare

 [special form] (##core#declare (quote SPEC) ...)

Internal form of declare. Hackish way of passing declaration-id's through syntax-expanders that would otherwise rename or macroexpand the SPEC.

##core#immutable

 [special form] (##core#immutable LITERAL)

Marks literal as being immutable and thus sharable by multiple expressions (for constant propagation).

##core#global-ref

 [special form] (##core#global-ref VARIABLE)

References the global variable given, regardless of any surrounding lexical bindings.

##core#let-location

 [special form] (##core#let-location (quote SYMBOL) (quote TYPE) [INIT] EXP)

The internal (macroexpanded) form of let-location, again to pass the name and type through uncooperative macroexpanders.

##core#set!

 [special form] (##core#set! VARIABLE EXP)

Just another name for set!.

##core#named-lambda

 [special form] (##core#named-lambda NAME LAMBDALIST BODY)

Equivalent to lambda, but may give better debug messages in certain situations (not many, though - if at all).

##core#loop-lambda

 [special form] (##core#loop-lambda LAMBDALIST BODY)

Also equivalent to lambda, but better optimizable in certain situations.

##core#undefined

 [special form] (##core#undefined)

An undefined value, superficially similar to void, but indicates in a binding (like (let ((foo (##core#undefined))) ...) that foo is really not defined, and a subsequent assignment can be considered the first true binding of the variable. This is used to find variables that have a distinct value and can thus be propagated.

##core#primitive

 [special form] (##core#primitive NAME)

Returns a procedure that calls the C function NAME. This C function must be a CPS function following the internal calling convention used for compiled code.

##core#inline

 [special form] (##core#inline OP EXP ...)

Expands into a C function or macro call to OP with the given arguments. The function will receive unconverted Scheme data objects and should return a legal Scheme value.

##core#inline_allocate

 [special form] (##core#inline_allocate (OP WORDS) EXP ...)

Similar to ##core#inline, but also adds a count of WORDS words to the storage cumulatively allocated for the containing C function. This can be used to allocate fixed small amounts of storage for data structures-

##core#inline_ref

 [special form] (##core#inline_ref (NAME TYPE))

Evaluates to the result of the C variable (actually any legal C expression) NAME with the foreign (result) type TYPE.

##core#inline_update

 [special form] (##core#inline_update (NAME TYPE) EXP)

Assigns the value of EXP to the C variable (actually any legal C lvalue) NAME, which should have the foreign type TYPE.

##core#inline_loc_ref

 [special form] (##core#inline_loc_ref (TYPE) EXP)

Returns the value stored in the location pointer EXP with the given TYPE.

##core#inline_loc_update

 [special form] (##core#inline_loc_update (TYPE) EXP1 EXP2)

Assigns EXP2 to the location pointer given in EXP.

##core#compiletimetoo

 [special form] (##core#compiletimetoo EXP)

Evaluates EXP and also compiles it as usual.

##core#compiletimeonly

 [special form] (##core#compiletimeonly EXP)

Evaluates EXP and compile as (##core#undefined).

##core#elaborationtimetoo

 [special form] (##core#elaborationtimetoo EXP)

Identical to ##core#compiletimetoo.

##core#elaborationtimeonly

 [special form] (##core#elaborationtimeonly EXP)

Identical to ##core#compiletimeonly.

Internal forms of FFI syntax

 [special form] (##core#define-foreign-variable (quote SYMBOL) (quote TYPE) [(quote STRING)])
 [special form] (##core#define-foreign-type (quote SYMBOL) (quote TYPE) [PROC1 [PROC2]])
 [special form] (##core#foreign-lambda (quote TYPE) (quote STRING) (quote TYPE) ...)
 [special form] (##core#foreign-lambda* (quote TYPE) (quote ((TYPE VAR) ...)) (quote STRING) ...)
 [special form] (##core#foreign-callback-lambda (quote TYPE) (quote STRING) (quote TYPE) ...)
 [special form] (##core#foreign-callback-lambda* (quote TYPE) (quote ((TYPE VAR) ...)) (quote STRING) ...)
 [special form] (##core#foreign-primitive (quote TYPE) (quote ((TYPE VAR) ...)) (quote STRING) ...)
 [special form] (##core#foreign-callback-wrapper (quote NAME) (quote QUALIFIERS) (quote TYPE) (quote TYPE ...) EXP)
 [special form] (##core#define-external-variable (quote NAME) (quote TYPE) (quote BOOL))

These all are the internal versions of the associated macros from the foreign function interface. They take their arguments quoted to allow the use with non-cooperative macro-expanders.

##core#define-inline

 [special form] (##core#define-inline (quote NAME) EXP)

Internal form of define-inline.

##core#define-constant

 [special form] (##core#define-constant (quote NAME) EXP)

Internal form of define-constant.

##core#check

 [special form] (##core#check EXP)

In unsafe mode, identical to #t (when compiled with the not safe or unsafe declaration or when the -unsafe compiler option is given). In safe mode compiles as EXP.

##core#require-for-syntax

 [special form] (##core#require-for-syntax EXP ...)

Internal form of require-for-syntax.

##core#require-extension

 [special form] (##core#require-extension 'ID ...)

Internal form of require-extension.

##core#app

 [special form] (##core#app EXP1 EXP2 ...)

Identical to (EXP1 EXP2 ...) but does not check EXP1 for being a procedure.