public inbox for sid@sourceware.org
 help / color / mirror / Atom feed
* RFC: fixup.scm -> guile.scm, update sid
@ 2005-02-07 17:56 Jim Blandy
  2005-02-07 18:00 ` Frank Ch. Eigler
  0 siblings, 1 reply; 3+ messages in thread
From: Jim Blandy @ 2005-02-07 17:56 UTC (permalink / raw)
  To: cgen, sid


[I'd posted this earlier, as two separate messages, but it seems to
have been swallowed.]

I need review from both SID and CGEN folks for this.

One of the changes I outlined in my original post was to move away
From loading fixup.scm from every cgen-APP.scm file, and instead have
the app-specific shell script wrappers (which are the ones that know
which Scheme will be used) specify an implementation-specific file
like guile.scm or mzscheme.scm.

The nice thing is that this can be done one app at a time.  We can
convert, say, sid/component/cgen-cpu/CGEN.sh.in and cgen/cgen-sid.scm
at the same time, without affecting, say, opcodes.

While we're in transition, some apps will be using fixup.scm, and some
will be using guile.scm.  So we'll need to keep the transition brief,
and keep fixup.scm and guile.scm synchronized.

Here's the first step.  

cgen/ChangeLog:
2005-02-02  Jim Blandy  <jimb@redhat.com>

	* guile.scm: New file, containing Guile-specific definitions and
	adaptations.  This is loaded by the app-specific shell scripts.
	Initially identical to fixup.scm.
	* cgen-sid.scm: Don't load fixup.scm here.

sid/component/cgen-cpu/ChangeLog:
2005-02-02  Jim Blandy  <jimb@redhat.com>

	* CGEN.sh.in: Request on the command line that cgen/guile.scm be
	loaded before cgen-sid.scm; cgen-sid.scm no longer loads fixup.scm.

Index: sid/component/cgen-cpu/CGEN.sh.in
===================================================================
RCS file: /cvs/src/src/sid/component/cgen-cpu/CGEN.sh.in,v
retrieving revision 1.4
diff -c -p -r1.4 CGEN.sh.in
*** sid/component/cgen-cpu/CGEN.sh.in	8 Sep 2003 18:55:35 -0000	1.4
--- sid/component/cgen-cpu/CGEN.sh.in	2 Feb 2005 23:17:16 -0000
*************** then
*** 68,74 ****
  else
      cgen=guile
  fi
! 
  
  rm -f tmp-desc-$$.h1 tmp-desc-$$.h
  rm -f tmp-cpu-$$.h1 tmp-cpu-$$.h
--- 68,74 ----
  else
      cgen=guile
  fi
! cgen="${cgen} -l ${cgendir}/guile.scm -s"
  
  rm -f tmp-desc-$$.h1 tmp-desc-$$.h
  rm -f tmp-cpu-$$.h1 tmp-cpu-$$.h
*************** do
*** 96,102 ****
      esac
  done
  
! ${cgen} -s ${cgendir}/cgen-sid.scm \
  	-s ${cgendir} \
  	${cgenflags} \
  	-f "${archflags}" \
--- 96,102 ----
      esac
  done
  
! ${cgen} ${cgendir}/cgen-sid.scm \
  	-s ${cgendir} \
  	${cgenflags} \
  	-f "${archflags}" \
Index: sid/component/cgen-cpu/ChangeLog
===================================================================
RCS file: /cvs/src/src/sid/component/cgen-cpu/ChangeLog,v
retrieving revision 1.52
diff -c -p -r1.52 ChangeLog
*** sid/component/cgen-cpu/ChangeLog	25 Jun 2004 17:44:35 -0000	1.52
--- sid/component/cgen-cpu/ChangeLog	2 Feb 2005 23:17:16 -0000
***************
*** 1,3 ****
--- 1,8 ----
+ 2005-02-02  Jim Blandy  <jimb@redhat.com>
+ 
+ 	* CGEN.sh.in: Request on the command line that cgen/guile.scm be
+ 	loaded before cgen-sid.scm; cgen-sid.scm no longer loads fixup.scm.
+ 
  2004-06-25  Dave Brolley  <brolley@redhat.com>
  
  	* tracedis.cxx (register_name): Add parameter for the cgen MACH. Save
Index: cgen/cgen-sid.scm
===================================================================
RCS file: /cvs/src/src/cgen/cgen-sid.scm,v
retrieving revision 1.3
diff -c -p -r1.3 cgen-sid.scm
*** cgen/cgen-sid.scm	8 Sep 2003 17:17:22 -0000	1.3
--- cgen/cgen-sid.scm	2 Feb 2005 23:17:21 -0000
***************
*** 10,18 ****
  ; Load the various support routines.
  
  (define (load-files srcdir)
-   ; Fix up Scheme to be what we use (guile is always in flux).
-   (primitive-load-path (string-append srcdir "/fixup.scm"))
- 
    (load (string-append srcdir "/read.scm"))
    (load (string-append srcdir "/utils-sim.scm"))
    (load (string-append srcdir "/sid.scm"))
--- 10,15 ----
Index: cgen/guile.scm
===================================================================
RCS file: cgen/guile.scm
diff -N cgen/guile.scm
*** cgen/guile.scm	1 Jan 1970 00:00:00 -0000
--- cgen/guile.scm	2 Feb 2005 23:17:21 -0000
***************
*** 0 ****
--- 1,59 ----
+ ; Guile-specific functions.
+ ; Copyright (C) 2000, 2004 Red Hat, Inc.
+ ; This file is part of CGEN.
+ ; See file COPYING.CGEN for details.
+ 
+ (define *guile-major-version* (string->number (major-version)))
+ (define *guile-minor-version* (string->number (minor-version)))
+ 
+ ; eval takes a module argument in 1.6 and later
+ 
+ (if (or (> *guile-major-version* 1)
+ 	(>= *guile-minor-version* 6))
+     (define (eval1 expr)
+       (eval expr (current-module)))
+     (define (eval1 expr)
+       (eval expr))
+ )
+ 
+ ; symbol-bound? is deprecated in 1.6
+ 
+ (if (or (> *guile-major-version* 1)
+ 	(>= *guile-minor-version* 6))
+     (define (symbol-bound? table s)
+       (if table
+ 	  (error "must pass #f for symbol-bound? first arg"))
+       ; FIXME: Not sure this is 100% correct.
+       (module-defined? (current-module) s))
+ )
+ 
+ (if (symbol-bound? #f 'load-from-path)
+     (begin
+       (define (load file)
+ 	(begin
+ 	  ;(load-from-path file)
+ 	  (primitive-load-path file)
+ 	  ))
+       )
+ )
+ 
+ ; FIXME: to be deleted
+ (define =? =)
+ (define >=? >=)
+ 
+ (if (not (symbol-bound? #f '%stat))
+     (begin
+       (define %stat stat)
+       )
+ )
+ 
+ (if (symbol-bound? #f 'debug-enable)
+     (debug-enable 'backtrace)
+ )
+ 
+ ; Guile 1.3 has reverse!, Guile 1.2 has list-reverse!.
+ ; CGEN uses reverse!
+ (if (and (not (symbol-bound? #f 'reverse!))
+ 	 (symbol-bound? #f 'list-reverse!))
+     (define reverse! list-reverse!)
+ )




^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: RFC: fixup.scm -> guile.scm, update sid
  2005-02-07 17:56 RFC: fixup.scm -> guile.scm, update sid Jim Blandy
@ 2005-02-07 18:00 ` Frank Ch. Eigler
  2005-02-07 18:25   ` Jim Blandy
  0 siblings, 1 reply; 3+ messages in thread
From: Frank Ch. Eigler @ 2005-02-07 18:00 UTC (permalink / raw)
  To: Jim Blandy; +Cc: cgen, sid

[-- Attachment #1: Type: text/plain, Size: 367 bytes --]

Hi -


jimb wrote:

> [I'd posted this earlier, as two separate messages, but it seems to
> have been swallowed.]
>
> I need review from both SID and CGEN folks for this.
> [...]

Why?  It seemed like a pretty obvious change, especially on the sid side.

You're doing fine - go ahead and make your changes; we'll keep an
eye out for something objectionable.


- FChE

[-- Attachment #2: Type: application/pgp-signature, Size: 189 bytes --]

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: RFC: fixup.scm -> guile.scm, update sid
  2005-02-07 18:00 ` Frank Ch. Eigler
@ 2005-02-07 18:25   ` Jim Blandy
  0 siblings, 0 replies; 3+ messages in thread
From: Jim Blandy @ 2005-02-07 18:25 UTC (permalink / raw)
  To: Frank Ch. Eigler; +Cc: cgen, sid


"Frank Ch. Eigler" <fche@redhat.com> writes:
> > I need review from both SID and CGEN folks for this.
> > [...]
> 
> Why?  It seemed like a pretty obvious change, especially on the sid side.
> 
> You're doing fine - go ahead and make your changes; we'll keep an
> eye out for something objectionable.

Okay, thanks very much.  That will help me work much more quickly.
I'll do my best to avoid screwing things up too badly.

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2005-02-07 18:25 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2005-02-07 17:56 RFC: fixup.scm -> guile.scm, update sid Jim Blandy
2005-02-07 18:00 ` Frank Ch. Eigler
2005-02-07 18:25   ` Jim Blandy

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).