build0.lsp 1.6 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576
  1. %
  2. % Create fasl files for compiler, ccomp and extras and build a CSL
  3. % checkpoint image for a system that includes them.
  4. %
  5. % Run this using
  6. % csl -z build0.lsp -l build0.log
  7. %
  8. (verbos 3)
  9. (rdf "$cslbase/compat.lsp")
  10. (rdf "$cslbase/extras.lsp")
  11. (rdf "$cslbase/compiler.lsp")
  12. (clear_source_database)
  13. % First I compile those things that appear to be most heavily used in the
  14. % compiler. This should speed up the whole bootstrap compilation process
  15. (compile '(
  16. s!:improve s!:literal_order s!:comval s!:outopcode0
  17. s!:plant_basic_block s!:remlose s!:islocal
  18. s!:is_lose_and_exit s!:comatom s!:destination_label
  19. s!:record_literal s!:resolve_labels s!:expand_jump
  20. s!:outopcode1lit stable!-sortip s!:iseasy s!:outjump
  21. s!:add_pending s!:comcall s!:resolve_literals))
  22. (compile!-all)
  23. % Build fasl files for the compatibility code and the two
  24. % versions of the compiler.
  25. (clear_source_database)
  26. (faslout 'compat)
  27. (rdf "$cslbase/compat.lsp")
  28. (rdf "$cslbase/extras.lsp")
  29. (faslend)
  30. (faslout 'compiler)
  31. (rdf "$cslbase/compiler.lsp")
  32. (faslend)
  33. (faslout 'ccomp)
  34. (rdf "$cslbase/ccomp.lsp")
  35. (faslend)
  36. (bytecounts)
  37. (save_source_database "$cslbase/whereis.lsp")
  38. %
  39. % (restart-csl nil) is a fairly dramatic, and maybe dangerous function. It
  40. % abandons all existing Lisp data and restarts the system from scratch,
  41. % with only minimal built-in functionality.
  42. %
  43. (restart!-csl nil)
  44. (load!-module 'compat)
  45. (setq !*comp nil)
  46. (set!-autoload 'compile 'compiler)
  47. (set!-autoload 'compile!-all 'compiler)
  48. (set!-autoload 'faslout 'compiler)
  49. (set!-autoload 'c_out 'compiler)
  50. (setq !*comp t)
  51. (preserve)