eval.h 3.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103
  1. /* classes: h_files */
  2. #ifndef SCM_EVAL_H
  3. #define SCM_EVAL_H
  4. /* Copyright (C) 1995,1996,1998,1999,2000,2001,2002,2003,2004,2008,2009,2010,2011,2012
  5. * Free Software Foundation, Inc.
  6. *
  7. * This library is free software; you can redistribute it and/or
  8. * modify it under the terms of the GNU Lesser General Public License
  9. * as published by the Free Software Foundation; either version 3 of
  10. * the License, or (at your option) any later version.
  11. *
  12. * This library is distributed in the hope that it will be useful, but
  13. * WITHOUT ANY WARRANTY; without even the implied warranty of
  14. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
  15. * Lesser General Public License for more details.
  16. *
  17. * You should have received a copy of the GNU Lesser General Public
  18. * License along with this library; if not, write to the Free Software
  19. * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
  20. * 02110-1301 USA
  21. */
  22. #include "libguile/__scm.h"
  23. #include "libguile/struct.h"
  24. #include "libguile/memoize.h"
  25. /* {Options}
  26. */
  27. /* {Ilocs}
  28. *
  29. * Ilocs are relative pointers into local environment structures.
  30. *
  31. */
  32. #define SCM_ILOCP(n) (SCM_ITAG8(n)==scm_tc8_iloc)
  33. /* {Evaluator}
  34. */
  35. typedef SCM (*scm_t_trampoline_0) (SCM proc);
  36. typedef SCM (*scm_t_trampoline_1) (SCM proc, SCM arg1);
  37. typedef SCM (*scm_t_trampoline_2) (SCM proc, SCM arg1, SCM arg2);
  38. #define SCM_EXTEND_ENV scm_acons
  39. SCM_API SCM scm_call_0 (SCM proc);
  40. SCM_API SCM scm_call_1 (SCM proc, SCM arg1);
  41. SCM_API SCM scm_call_2 (SCM proc, SCM arg1, SCM arg2);
  42. SCM_API SCM scm_call_3 (SCM proc, SCM arg1, SCM arg2, SCM arg3);
  43. SCM_API SCM scm_call_4 (SCM proc, SCM arg1, SCM arg2, SCM arg3, SCM arg4);
  44. SCM_API SCM scm_call_5 (SCM proc, SCM arg1, SCM arg2, SCM arg3, SCM arg4,
  45. SCM arg5);
  46. SCM_API SCM scm_call_6 (SCM proc, SCM arg1, SCM arg2, SCM arg3, SCM arg4,
  47. SCM arg5, SCM arg6);
  48. SCM_API SCM scm_call_7 (SCM proc, SCM arg1, SCM arg2, SCM arg3, SCM arg4,
  49. SCM arg5, SCM arg6, SCM arg7);
  50. SCM_API SCM scm_call_8 (SCM proc, SCM arg1, SCM arg2, SCM arg3, SCM arg4,
  51. SCM arg5, SCM arg6, SCM arg7, SCM arg8);
  52. SCM_API SCM scm_call_9 (SCM proc, SCM arg1, SCM arg2, SCM arg3, SCM arg4,
  53. SCM arg5, SCM arg6, SCM arg7, SCM arg8, SCM arg9);
  54. SCM_API SCM scm_call_n (SCM proc, SCM *argv, size_t nargs);
  55. SCM_API SCM scm_call (SCM proc, ...);
  56. SCM_API SCM scm_apply_0 (SCM proc, SCM args);
  57. SCM_API SCM scm_apply_1 (SCM proc, SCM arg1, SCM args);
  58. SCM_API SCM scm_apply_2 (SCM proc, SCM arg1, SCM arg2, SCM args);
  59. SCM_API SCM scm_apply_3 (SCM proc, SCM arg1, SCM arg2, SCM arg3, SCM args);
  60. SCM_API SCM scm_nconc2last (SCM lst);
  61. SCM_API SCM scm_apply (SCM proc, SCM arg1, SCM args);
  62. #define scm_dapply(proc,arg1,args) scm_apply (proc, arg1, args)
  63. SCM_API SCM scm_map (SCM proc, SCM arg1, SCM args);
  64. SCM_API SCM scm_for_each (SCM proc, SCM arg1, SCM args);
  65. SCM_API SCM scm_primitive_eval (SCM exp);
  66. #define scm_primitive_eval_x(exp) scm_primitive_eval (exp)
  67. SCM_API SCM scm_eval (SCM exp, SCM module);
  68. #define scm_eval_x(exp, module) scm_eval (exp, module)
  69. SCM_INTERNAL void scm_init_eval (void);
  70. #endif /* SCM_EVAL_H */
  71. /*
  72. Local Variables:
  73. c-file-style: "gnu"
  74. End:
  75. */