home *** CD-ROM | disk | FTP | other *** search
/ Linux Cubed Series 2: Applications / Linux Cubed Series 2 - Applications.iso / editors / emacs / xemacs / xemacs-1.004 / xemacs-1 / xemacs-19.13 / src / bytecode.h < prev    next >
Encoding:
C/C++ Source or Header  |  1995-03-21  |  3.3 KB  |  90 lines

  1. /* Fundamental definitions for XEmacs Lisp interpreter.
  2.    Copyright (C) 1985, 1986, 1987, 1992, 1993 Free Software Foundation, Inc.
  3.  
  4. This file is part of XEmacs.
  5.  
  6. XEmacs is free software; you can redistribute it and/or modify it
  7. under the terms of the GNU General Public License as published by the
  8. Free Software Foundation; either version 2, or (at your option) any
  9. later version.
  10.  
  11. XEmacs is distributed in the hope that it will be useful, but WITHOUT
  12. ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
  13. FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
  14. for more details.
  15.  
  16. You should have received a copy of the GNU General Public License
  17. along with XEmacs; see the file COPYING.  If not, write to the Free
  18. Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA.  */
  19.  
  20. /* Synched up with: Not in FSF. */
  21.  
  22. #ifndef _XEMACS_BYTECODE_H_
  23. #define _XEMACS_BYTECODE_H_
  24.  
  25. /* Meanings of slots in a Lisp_Bytecode.
  26.    This is kludgily used by `elt' and `concat' to pretend that bytecode
  27.    objects are really sequences and should be eliminated eventually...
  28.  */
  29. #define COMPILED_ARGLIST 0
  30. #define COMPILED_BYTECODE 1
  31. #define COMPILED_CONSTANTS 2
  32. #define COMPILED_STACK_DEPTH 3
  33. #define COMPILED_DOC_STRING 4
  34. #define COMPILED_INTERACTIVE 5
  35. #define COMPILED_DOMAIN 6
  36.  
  37. struct Lisp_Bytecode
  38.   {
  39.     struct lrecord_header lheader;
  40.     unsigned short maxdepth;
  41.     struct 
  42.       {
  43.         unsigned int documentationp: 1;
  44.         unsigned int interactivep: 1;
  45.     /* Only used if I18N3, but always defined for simplicity. */
  46.     unsigned int domainp: 1;
  47.       } flags;
  48.     Lisp_Object bytecodes;
  49.     Lisp_Object constants;
  50.     Lisp_Object arglist;
  51.     /* This uses the minimal number of conses; see accessors in data.c. */
  52.     Lisp_Object doc_and_interactive;
  53.   };
  54.  
  55. extern Lisp_Object bytecode_documentation (struct Lisp_Bytecode *b);
  56. extern Lisp_Object bytecode_interactive (struct Lisp_Bytecode *b);
  57. extern Lisp_Object bytecode_domain (struct Lisp_Bytecode *b);
  58. extern void set_bytecode_documentation (struct Lisp_Bytecode *b,
  59.                     Lisp_Object);
  60.  
  61. DECLARE_LRECORD (bytecode, struct Lisp_Bytecode);
  62. #define XBYTECODE(x) XRECORD (x, bytecode, struct Lisp_Bytecode)
  63. #define XSETBYTECODE(x, p) XSETRECORD (x, p, bytecode)
  64. #define BYTECODEP(x) RECORDP (x, bytecode)
  65. #define CHECK_BYTECODE(x, i) CHECK_RECORD (x, bytecode)
  66.  
  67. /* total 1765 internal 101 doc-and-int 775 doc-only 389 int-only 42 neither 559
  68.  no doc slot, no int slot
  69.     overhead                        : (* 1765 0) =    0
  70.     doc-and-int (args . (doc . int)): (*  775 4) = 3100
  71.     doc-only    (args . doc)        : (*  389 2) =  778
  72.     int-only    (args . int)        : (*   42 2) =   84
  73.     neither     args                : (*  559 0) =    0 = 3962
  74.  combined
  75.     overhead                        : (* 1765 1) = 1765
  76.     doc-and-int (doc . int)         : (*  775 2) = 1550 
  77.     doc-only    doc                 : (*  389 0) =    0
  78.     int-only    int                 : (*   42 0) =    0 
  79.     neither     -                   : (*  559 0) =    0 = 3315
  80.  both
  81.     overhead                        : (* 1765 2) = 3530
  82.     doc-and-int -                   : (*  775 0) =    0
  83.     doc-only    -                   : (*  389 0) =    0
  84.     int-only    -                   : (*   42 0) =    0 
  85.     neither     -                   : (*  559 0)  =   0 = 3530
  86. */
  87.  
  88. #endif /* _XEMACS_BYTECODE_H_ */
  89.  
  90.