; Copyright 1998 Lars T Hansen.             -*- scheme -*-
; 
; $Id: applyhook0.mal 2543 2005-07-20 21:54:03Z pnkfelix $
; 
; Larceny library -- apply-hook support code.

; *apply-hook-proc-offset*

`((,$const 3)
  (,$setglbl *apply-hook-proc-offset*)
  (,$const *apply-hook-proc-offset*)
  (,$return))

; *apply-hook-obj-offset*

`((,$const 4)
  (,$setglbl *apply-hook-obj-offset*)
  (,$const *apply-hook-obj-offset*)
  (,$return))

; make-apply-hook-1

`((,$lambda ((,$args= 2)
	     (,$lambda ((,$args= 1)
			(,$lexical 0 1)
			(,$invoke 1))
		       2
		       #(applyhook/1 #f 1 #f #f))
	     (,$return))
	    0
	    #f)
  (,$setglbl make-apply-hook-1)
  (,$const make-apply-hook-1)
  (,$return))

; make-apply-hook-2

`((,$lambda ((,$args= 2)
	     (,$lambda ((,$args= 2)
			(,$lexical 0 1)
			(,$invoke 2))
		       2
		       #(applyhook/2 #f 2 #f #f))
	     (,$return))
	    0
	    #f)
  (,$setglbl make-apply-hook-2)
  (,$const make-apply-hook-2)
  (,$return))

; make-apply-hook-3

`((,$lambda ((,$args= 2)
	     (,$lambda ((,$args= 3)
			(,$lexical 0 1)
			(,$invoke 3))
		       2
		       #(applyhook/3 #f 3 #f #f))
	     (,$return))
	    0
	    #f)
  (,$setglbl make-apply-hook-3)
  (,$const make-apply-hook-3)
  (,$return))

; make-apply-hook-4

`((,$lambda ((,$args= 2)
	     (,$lambda ((,$args= 4)
			(,$lexical 0 1)
			(,$invoke 4))
		       2
		       #(applyhook/4 #f 4 #f #f))
	     (,$return))
	    0
	    #f)
  (,$setglbl make-apply-hook-4)
  (,$const make-apply-hook-4)
  (,$return))

; make-apply-hook-5

`((,$lambda ((,$args= 2)
	     (,$lambda ((,$args= 5)
			(,$lexical 0 1)
			(,$invoke 5))
		       2
		       #(applyhook/5 #f 5 #f #f))
	     (,$return))
	    0
	    #f)
  (,$setglbl make-apply-hook-5)
  (,$const make-apply-hook-5)
  (,$return))

; make-apply-hook-n

`((,$lambda ((,$args= 2)
	     (,$lambda ((,$args>= 0)
			(,$movereg 1 2)
			(,$lexical 0 1)
			(,$setreg 1)
			(,$global apply)
			(,$invoke 2))
		       2
		       #(applyhook/n #f 0.0 #f #f))
	     (,$return))
	    0
	    #f)
  (,$setglbl make-apply-hook-n)
  (,$const make-apply-hook-n)
  (,$return))

; eof
