From 137c94144cb236363f7af4ac86801fefde96d495 Mon Sep 17 00:00:00 2001 From: Tanaka Akira Date: Wed, 1 Mar 2000 10:08:02 +0000 Subject: zsh-workers/9947 --- Doc/Zsh/builtins.yo | 49 +++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 49 insertions(+) (limited to 'Doc/Zsh/builtins.yo') diff --git a/Doc/Zsh/builtins.yo b/Doc/Zsh/builtins.yo index a46ec0f92..3491c8591 100644 --- a/Doc/Zsh/builtins.yo +++ b/Doc/Zsh/builtins.yo @@ -1283,6 +1283,55 @@ findex(which) item(tt(which) [ tt(-wpams) ] var(name) ...)( Equivalent to tt(whence -c). ) +findex(zcompile) +cindex(wordcode, creation) +cindex(compilation) +xitem(tt(zcompile) [ tt(-U) ] [ tt(-r) | tt(-m) ] var(file) [ var(function) ... ]) +item(tt(zcompile -t) var(file) [ var(name) ... ])( +This builtin command can be used to create and display files +containing the wordcode for functions. In the first form, a wordcode +file is created. If called with only the var(file) argument, the +wordcode file has the name `var(file)tt(.zwc)' and will be placed in +the same directory as the var(file). This will make the wordcode file +be loaded instead of the normal function file when the function is +autoloaded (see +ifzman(\ +the section `Autoloading Functions' in zmanref(zshfunc) +)\ +ifnzman(\ +noderef(Functions) +) +for a description of how autoloaded functions are searched). + +If there is at least one var(function) argument, the wordcode for all +these functions will be put in the created wordcode var(file). Such +files containing the code for multiple functions are intended to be +used as elements of the tt(FPATH)/tt(fpath) special array. + +If the tt(-U) option is given, aliases in the var(function)s will not +be expanded. If the tt(-r) option is given, the function(s) in the +file will be read and copied into the shell's memory when they are +autoloaded. If the tt(-m) option is given instead, the wordcode file +will be mapped into the shell's memory. This is done in such a way +that multiple instances of the shell running on the same host will +share this mapped function. If neither tt(-r) nor tt(-m) are given, +the tt(zcompile) builtin decides which style is used based on the size +of the resulting wordcode file. + +In every case, the created file contains two versions of the wordcode, +one for big-endian machines and one for small-endian machines. The +upshot of this is that the wordcode file is machine independent and if +it is read or mapped, only one half of the file will really be used +(and mapped). + +In the second form, with the tt(-t) option, an existing wordcode file is +tested. Without further arguments, the names of the function files +used for it are listed. The first line tells the version of the shell +the file was created with and how the file will be used (mapping or +reading the file). With arguments, only the return value is set +to zero if all var(name)s name functiones defined in the file and +non-zero if at least one var(name) is not contained in the wordcode file. +) findex(zmodload) cindex(modules, loading) cindex(loading modules) -- cgit 1.4.1