#|
slinker - library2.sxml
A Scheme linker for Transputer bytecodes targeting the Transterpreter
Copyright (C) 2004-2006 Matthew C. Jadud, Christian L. Jacobsen

 This program is free software; you can redistribute it and/or modify
 it under the terms of the GNU General Public License as published by
 the Free Software Foundation; either version 2 of the License, or
 (at your option) any later version.
 
 This program is distributed in the hope that it will be useful,
 but WITHOUT ANY WARRANTY; without even the implied warranty of
 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 GNU General Public License for more details.

 You should have received a copy of the GNU General Public License
 along with this program; if not, write to the Free Software
 Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
|#
(process
 (begin
   (par
      tcoff2bin
      decode
      specialize-trivially
      specialize-nontrivially
      remove-unknown-things
      propagate-debugging-info
      remove-debugging-instructions
      ;; I think the get-and-remove-filename pass only does the remove part these
      ;; days, so it is probably no longer needed, as there are better places to
      ;; remove the filename. If somebody can confirm this, please remove the
      ;; comments - clj3
      ;;get-and-remove-filename 
      remove-useless-text
      find-procentries
      find-globalnames
      shiftimm->shifts
      jentry2jump
      expand-loopend
      expand-starttable
      expand-mobileinit
      expand-semaphore
      expand-reschedule
      expand-barrier
      expand-floatingpoint-specials
      unify-jumps
      unify-labels
      guarantee-unique-label-names
      get-and-remove-spaces
      expand-notprocess)
   (seq
    resolve-stubnames-permissive
    renumber
    inst2binary
    data-bytes2binary
    boolinvert2binary
    widenshort2binary)
   (if *OPT-OPTIMAL-PFX*
       (seq jumps-and-loads2binary)
       (seq
        insert-alignment
        jumps2binary
        load-labels2binary))
   (seq
    annotate-global-procedures
    debug-ip
    prune-debugging-info
    binary2scheme)))
