comp-support.red 941 B

12345678910111213141516171819202122232425262728293031323334353637
  1. %
  2. % COMP-SUPPORT.RED - Run-time support for optimized Cons and List compilation
  3. %
  4. % Author: Eric Benson
  5. % Symbolic Computation Group
  6. % Computer Science Dept.
  7. % University of Utah
  8. % Date: 20 September 1981
  9. % Copyright (c) 1981 University of Utah
  10. %
  11. CommentOutCode << % defined in CONS-MKVECT.RED
  12. CompileTime(SavedCompFn := RemProp('Cons, 'CompFn)); % else can't compile
  13. lisp procedure NCons U; %. U . NIL, or 1-argument EXPR for LIST
  14. U . NIL;
  15. lisp procedure XCons(U, V); %. V . U
  16. V . U;
  17. CompileTime put('Cons, 'CompFn, SavedCompFn);
  18. >>;
  19. lisp procedure List5(U, V, W, X, Y); %. 5-argument EXPR for LIST
  20. U . List4(V, W, X, Y);
  21. lisp procedure List4(U, V, W, X); %. 4-argument EXPR for LIST
  22. U . List3(V, W, X);
  23. lisp procedure List3(U, V, W); %. 3-argument EXPR for LIST
  24. U . List2(V, W);
  25. lisp procedure List2(U, V); %. 2-argument EXPR for LIST
  26. U . NCons V;
  27. END;