mirror of
https://gitlab.com/embeddable-common-lisp/ecl.git
synced 2026-01-22 20:42:03 -08:00
texinfo: Port Environment from the old doc
This commit is contained in:
parent
a9bdc7427c
commit
2bdcdf9e4c
2 changed files with 101 additions and 3 deletions
99
src/doc/new-doc/standards/environment.txi
Normal file
99
src/doc/new-doc/standards/environment.txi
Normal file
|
|
@ -0,0 +1,99 @@
|
|||
@node Environment
|
||||
@section Environment
|
||||
|
||||
@node Environment - Dictionary
|
||||
@subsection Dictionary
|
||||
|
||||
@defun disassemble function-designator*
|
||||
Display the assembly code of a function
|
||||
@subsubheading Synopsis
|
||||
@table @var
|
||||
@item function-designator
|
||||
A symbol which is bound to a function in the global environment, or a lambda form
|
||||
@end table
|
||||
@subsubheading Description
|
||||
As specified in ANSI (@xref{Bibliography}) this function outputs the internal represention of a compiled function, or of a lambda form, as it would look after being compiled.
|
||||
|
||||
ECL only has a particular difference: it has two different compilers, one based on bytecodes and one based on the C language. The output will thus depend on the arguments and on which compiler is active at the moment in which this function is run.
|
||||
|
||||
@itemize
|
||||
@item If the argument is a bytecompiled function, the output will be bytecodes.
|
||||
@item If the argument is a lambda form, it will be processed by the active compiler and the appropriate output (bytecodes or C) will be shown.
|
||||
@item If the argument is a C-compiled form, ECL will retrieve its original lambda form and process it with the currently active compiler.
|
||||
@end itemize
|
||||
@end defun
|
||||
|
||||
@deffn Macro trace function-name*
|
||||
Follow the execution of functions
|
||||
@subsubheading Synopsis
|
||||
(trace @var{function-name*})
|
||||
@table @var
|
||||
@item function-name
|
||||
@{@var{symbol}|@var{symbol}[@var{option form}]*)@}
|
||||
@item symbol
|
||||
A symbol which is bound to a function in the global environment. Not evaluated.
|
||||
@item option
|
||||
One of @code{:BREAK, :BREAK-AFTER, :COND-BEFORE, :COND-AFTER, :COND, :PRINT, :PRINT-AFTER, :STEP}
|
||||
@item form
|
||||
A lisp form evaluated in an special environment.
|
||||
@item returns
|
||||
List of symbols with traced functions.
|
||||
@end table
|
||||
|
||||
@subsubheading Description
|
||||
Causes one or more functions to be traced. Each @var{function-name} can be a symbol which is bound to a function, or a list containing that symbol plus additional options. If the function bound to that symbol is called, information about the argumetns and output of this function will be printed. Trace options will modify the amount of information and when it is printed.
|
||||
|
||||
Not that if the function is called from another function compiled in the same file, tracing might not be enabled. If this is the case, to enable tracing, recompile the caller with a @code{notinline} declaration for the called function.
|
||||
|
||||
trace returns a name list of those functions that were traced by the call to trace. If no @var{function-name} is given, @code{trace} simply returns a name list of all the currently traced functions.
|
||||
|
||||
Trace options cause the normal printout to be suppressed, or cause extra information to be printed. Each option is a pair of an option keyword and a value form. If an already traced function is traced again, any new options replace the old options and a warning might be printed. The lisp @emph{form} accompanying the option is evaluated in an environment where @var{sys::arglist} is contains the list of arguments to the function.
|
||||
|
||||
The following options are defined:
|
||||
@table @code
|
||||
@item :cond, :cond-before, :cond-after
|
||||
If @code{:cond-before} is specified, then @code{trace} does nothing unless @var{form} evaluates to true at the time of the call. @code{:cond-after} is similar, but suppresses the initial printout, and is tested when the function returns. @code{:cond} tries both before and after.
|
||||
@item :step
|
||||
If @var{form} evaluates to true, the stepper is entered.
|
||||
@item :break, :break-after
|
||||
If specified, and @var{form} evaluates to true, then the debugger is invoked at the start of the function or at the end of the function according to the respective option.
|
||||
@item :print, :print-after
|
||||
In addition to the usual printout, the result of evaluating @var{form} is printed at the start of the function or at the end of the function, depending on the option. Multiple print options cause multiple values to be output, in the order in which they were introduced.
|
||||
@end table
|
||||
@end deffn
|
||||
|
||||
@node Environment - C Reference
|
||||
@subsection C Reference
|
||||
@subsubsection ANSI Dictionary
|
||||
Common Lisp and C equivalence
|
||||
|
||||
@multitable @columnfractions .3 .7
|
||||
@headitem Lisp symbol @tab C function
|
||||
@item @clhs{f_dec_un.htm,decode-universal-time} @tab cl_object cl_decode_universal_time(cl_narg narg, cl_object universal_time, ...)
|
||||
@item @clhs{f_encode.htm,encode-universal-time} @tab cl_object cl_encode_universal_time(cl_narg narg, cl_object second, cl_object minute, cl_object hour, cl_object date, cl_object month, cl_object year, ...)
|
||||
@item @clhs{f_get_un.htm,get-universal-time} @tab cl_object cl_get_universal_time(void)
|
||||
@item @clhs{f_get_un.htm,get-decoded-time} @tab cl_object cl_get_decoded_time(void)
|
||||
@item @clhs{f_sleep.htm,sleep} @tab cl_object cl_sleep(cl_object seconds)
|
||||
@item @clhs{f_apropo.htm,apropos} @tab cl_object cl_apropos(cl_narg narg, cl_object string, ...)
|
||||
@item @clhs{f_apropo.htm,apropos-list} @tab cl_object cl_apropos_list(cl_narg narg, cl_object string, ...)
|
||||
@item @clhs{f_descri.htm,describe} @tab cl_object cl_describe(cl_narg narg, cl_object object, ...)
|
||||
@item @clhs{f_desc_1.htm,describe-object} @tab [Only in Common Lisp]
|
||||
@item @clhs{f_get_in.htm,get-internal-real-time} @tab cl_object cl_get_internal_real_time()
|
||||
@item @clhs{f_get__1.htm,get-internal-run-time} @tab cl_object cl_get_internal_run_time()
|
||||
@item @clhs{f_disass.htm,disassemble} @tab [Only in Common Lisp]
|
||||
@item @clhs{f_docume.htm,documentation} @tab [Only in Common Lisp]
|
||||
@item @clhs{f_room.htm,room} @tab cl_object cl_room(cl_narg narg, ...)
|
||||
@item @clhs{f_ed.htm,ed} @tab cl_object cl_ed(cl_narg narg, ...)
|
||||
@item @clhs{f_inspec.htm,inspect} @tab cl_object cl_inspect(cl_object object)
|
||||
@item @clhs{f_dribbl.htm,dribble} @tab cl_object cl_dribble(cl_narg narg, ...)
|
||||
@item @clhs{f_lisp_i.htm,lisp-implementation-type} @tab cl_object cl_lisp_implementation_type(void)
|
||||
@item @clhs{f_lisp_i.htm,lisp-implementation-version} @tab cl_object cl_lisp_implementation_version(void)
|
||||
@item @clhs{f_short_.htm,short-site-name} @tab cl_object cl_short_site_name()
|
||||
@item @clhs{f_short_.htm,long-site-name} @tab cl_object cl_long_site_name()
|
||||
@item @clhs{f_mach_i.htm,machine-instance} @tab cl_object cl_machine_instance()
|
||||
@item @clhs{f_mach_t.htm,machine-type} @tab cl_object cl_machine_type()
|
||||
@item @clhs{f_mach_v.htm,machine-version} @tab cl_object cl_machine_version()
|
||||
@item @clhs{f_sw_tpc.htm,software-type} @tab cl_object cl_software_type()
|
||||
@item @clhs{f_sw_tpc.htm,software-version} @tab cl_object cl_software_version()
|
||||
@item @clhs{f_user_h.htm,user-homedir-pathname} @tab cl_object cl_user_homedir_pathname()
|
||||
@end multitable
|
||||
|
|
@ -26,7 +26,7 @@
|
|||
* Printer::
|
||||
* Reader::
|
||||
* System construction::
|
||||
@c * Environment::
|
||||
* Environment::
|
||||
@c * Glossary::
|
||||
@end menu
|
||||
|
||||
|
|
@ -118,8 +118,7 @@
|
|||
@c directory, it will be treated as a source code. Otherwise we'll try
|
||||
@c known extensions.
|
||||
|
||||
@c @node Environment
|
||||
@c @section Environment
|
||||
@include standards/environment.txi
|
||||
|
||||
@c @node Glossary
|
||||
@c @section Glossary
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue