Next: , Previous: , Up: compiler   [Index]


17.5 System values bound to core primitive names

Every core primitive value has a name that is considered part of Vicare’s core language; such primitive name is the actual public name of the binding exported by the boot image. The name of the function display is the symbol display; the name of the record–type descriptor &condition-rtd is the symbol &condition-rtd.

The name’s property list contains a special entry whose value is the storage location gensym (“loc” for short) of the core primitive value; we can easily inspect such situation as follows:

(import (vicare)
  (prefix (vicare compiler) compiler.))

(compiler.initialise-compiler)

(getprop 'display (compiler.system-value-gensym))
⇒ loc.display

;; extract the procedure from the loc
(symbol-value (getprop 'display (compiler.system-value-gensym)))
⇒ #<procedure display>

(compiler.system-value 'display)
⇒ #<procedure display>

(compiler.system-value '&condition-rtd)
⇒ #[rtd name=&condition ...]

We see that the property list contains an entry with key set to the symbol returned by system-value-gensym; notice that this key is different every time we rebuild the boot image.

Function: system-value symbol

Attempt to extract from symbol the core primitive value of which symbol is the name; if successful return the Scheme object, else raise an assertion violation.

Function: system-value-gensym

Return special gensym used internally to map core primitive names to their value.