home *** CD-ROM | disk | FTP | other *** search
/ Frozen Fish 1: Amiga / FrozenFish-Apr94.iso / bbs / oct93 / develop / umbscheme.lha / UMBScheme / src / architecture.h < prev    next >
C/C++ Source or Header  |  1993-07-21  |  3KB  |  110 lines

  1. /* architecture.h -- UMB Scheme, architecture interface.
  2.  
  3. UMB Scheme Interpreter                    $Revision: 2.5 $
  4. Copyright (C) 1988, 1991 William R Campbell
  5.  
  6. This program is free software; you can redistribute it and/or modify
  7. it under the terms of the GNU General Public License as published by
  8. the Free Software Foundation; either version 1, or (at your option)
  9. any later version.
  10.  
  11. This program is distributed in the hope that it will be useful,
  12. but WITHOUT ANY WARRANTY; without even the implied warranty of
  13. MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  14. GNU General Public License for more details.
  15.  
  16. You should have received a copy of the GNU General Public License
  17. along with this program; if not, write to the Free Software
  18. Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
  19.  
  20. UMB Scheme was written by Bill Campbell with help from Karl Berry,
  21. Barbara Dixey, Ira Gerstein, Mary Glaser, Kathy Hargreaves, Bill McCabe,
  22. Long Nguyen, Susan Quina, Jeyashree Sivasubram, Bela Sohoni and Thang Quoc Tran.
  23.  
  24. For additional information about UMB Scheme, contact the author:
  25.  
  26.     Bill Campbell
  27.     Department of Mathematics and Computer Science
  28.     University of Massachusetts at Boston
  29.     Harbor Campus
  30.     Boston, MA 02125
  31.  
  32.     Telephone: 617-287-6449     Internet: bill@cs.umb.edu
  33.  
  34. */
  35.  
  36. /* Register set. */
  37.  
  38. Import    Object    Expression_Register ;
  39. Import    Object    Value_Register ;
  40. Import    Object    Environment_Register ;
  41. Import    Object    Function_Register ;
  42. Import    Object    Arguments_Register ;
  43. Import    Object    State_Register ;
  44. Import    ELabel    PC_Register ;
  45.  
  46. /* Place for saving top level registers while in debug mode. */
  47.  
  48. Import    Object    Value_Debugged ;
  49. Import    Object    State_Debugged ;
  50.  
  51. /* Argument stack. */
  52.  
  53. #define ARG_STACK_SIZE    50000
  54.  
  55. #ifdef _DCC
  56. __far
  57. #endif
  58. Import    Object    Arg_Stack[] ;
  59. Import    Integer Arg_Stack_Ptr ;
  60.  
  61. #define Push(x)         {Object Xxxx = (x); Arg_Stack[Arg_Stack_Ptr++]=Xxxx;}
  62. #define Top(n)          (Arg_Stack[Arg_Stack_Ptr-(n)])
  63. #define Pop(n)          Arg_Stack_Ptr-=(n)
  64. #define Replace(n,x)    Arg_Stack[Arg_Stack_Ptr-(n)]=(x)
  65. #define Reset_Stack(n)  Arg_Stack_Ptr=(n)
  66. #define Current_Stack() Arg_Stack_Ptr;
  67.  
  68. /* State stack. */
  69.  
  70. Import    void    Save() ;
  71. Import    void    Restore() ;
  72.  
  73. /* The environment. */
  74.  
  75. Import    void    Assign( /* Object sym, val, env */ ) ;
  76. Import    void    Define( /* Object sym, val, env */ ) ;
  77. Import    void    Extend_Environment( /* Integer frame_size */) ;
  78. Import    Object    Intern_Name( /* String name */ ) ;
  79. Import    void    Symbol_Hash_Iterate();
  80.  
  81. /* Memory management. */
  82. Import    void    Get_Heap_Size();
  83. Import    void    Get_Arg_Stack_Ptr();
  84. Import    Object    Allocate();
  85. Import    void    Freeze_Stable_Space();
  86. Import    Boolean Allocating;
  87. Import    Boolean Show_GC_Messages;
  88.  
  89.  
  90. Import void Initialize_Architecture();
  91.  
  92. /* The garbage collector. */
  93. Import Object Move_Object();
  94. Import void Relocate();
  95.  
  96. #if NEGATIVE_ADDRESSES
  97.     /* NEGATIVE_ADDRESSES defined in portable.h */
  98. #define Is_Forwarded(o) (((int) Get_Type(o)) > 0)
  99. #else
  100. #define Is_Forwarded(o) (((int) Get_Type(o)) < 0)
  101. #endif
  102.  
  103. #define Get_Forwarding_Address(o) ((Object) (-((int) Get_Type(o))))
  104. #define Set_Forwarding_Address(old,new) \
  105.         Get_Type(old) = (Scheme_Type) (-((int)(new)))
  106.  
  107. /* General */
  108. Import Object Copy_Object();
  109.  
  110.