* Problem with obj->string Change in sid-cpu.scm
@ 2006-05-09 17:57 Dave Brolley
[not found] ` <20060509180030.GB13413@redhat.com>
0 siblings, 1 reply; 3+ messages in thread
From: Dave Brolley @ 2006-05-09 17:57 UTC (permalink / raw)
To: cgen
I'm having a problem with the change below. Guile is complaining that
obj->string is not bound. My version of guile is:
>> guile --version
Guile 1.3
Copyright (c) 1995, 1996, 1997 Free Software Foundation
Should I be using something newer or is there a way to accomplish the
same thing more portably?
Thanks,
Dave
------------------------------------------------
2005-12-28 Nathan Sidwell <nathan@codesourcery.com>
* sid-cpu.scm (-gen-hw-stream-and-destream-fns): Stringize mode
for concatenation.
(-hw-gen-write-stack-decl): Likewise.
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: Problem with object->string Change in sid-cpu.scm
[not found] ` <4460DEBE.801@redhat.com>
@ 2006-05-09 18:44 ` Frank Ch. Eigler
2006-05-09 19:04 ` Problem with object->string Change in sid-cpu.scm -- patch committed Dave Brolley
0 siblings, 1 reply; 3+ messages in thread
From: Frank Ch. Eigler @ 2006-05-09 18:44 UTC (permalink / raw)
To: Dave Brolley; +Cc: cgen
Hi -
> Sorry --- my typo. The change does use object->string.
OK. Other places in sid-cpu.scm apply symbol->string to mode values,
so that should be safe here. So might obj:name.
- FChE
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: Problem with object->string Change in sid-cpu.scm -- patch committed
2006-05-09 18:44 ` Problem with object->string " Frank Ch. Eigler
@ 2006-05-09 19:04 ` Dave Brolley
0 siblings, 0 replies; 3+ messages in thread
From: Dave Brolley @ 2006-05-09 19:04 UTC (permalink / raw)
To: Frank Ch. Eigler; +Cc: cgen
[-- Attachment #1: Type: text/plain, Size: 229 bytes --]
Frank Ch. Eigler wrote:
>OK. Other places in sid-cpu.scm apply symbol->string to mode values,
>so that should be safe here. So might obj:name.
>
>
>
That does the trick. Thanks! The attached patch has been committed.
Dave
[-- Attachment #2: cgen-symbol.ChangeLog --]
[-- Type: text/plain, Size: 196 bytes --]
2006-05-09 Dave Brolley <brolley@redhat.com>
* sid-cpu.scm (-gen-hw-stream-and-destream-fns): Use symbol->string instead of
object->string om the mode.
(-hw-gen-write-stack-decl): Likewise.
[-- Attachment #3: cgen-symbol.patch.txt --]
[-- Type: text/plain, Size: 1926 bytes --]
Index: cgen/sid-cpu.scm
===================================================================
RCS file: /cvs/src/src/cgen/sid-cpu.scm,v
retrieving revision 1.16
diff -c -p -r1.16 sid-cpu.scm
*** cgen/sid-cpu.scm 9 May 2006 18:07:51 -0000 1.16
--- cgen/sid-cpu.scm 9 May 2006 18:57:12 -0000
*************** namespace @arch@ {
*** 212,218 ****
(write-stacks
(map (lambda (n) (sa n "_writes"))
(append (map (lambda (r) (gen-c-symbol (obj:name r))) regs)
! (map (lambda (m) (sa (object->string m) "_memory")) useful-mode-names))))
(stream-reg (lambda (r)
(let ((rname (sa "hardware." (gen-c-symbol (obj:name r)))))
(if (hw-scalar? r)
--- 212,218 ----
(write-stacks
(map (lambda (n) (sa n "_writes"))
(append (map (lambda (r) (gen-c-symbol (obj:name r))) regs)
! (map (lambda (m) (sa (symbol->string m) "_memory")) useful-mode-names))))
(stream-reg (lambda (r)
(let ((rname (sa "hardware." (gen-c-symbol (obj:name r)))))
(if (hw-scalar? r)
*************** typedef struct {
*** 406,415 ****
; (pipe-sz (+ 1 (max-delay (cpu-max-delay (current-cpu)))))
; (sz (* pipe-sz (-worst-case-number-of-writes-to nm))))
! (mode-pad (spaces (- 4 (string-length (object->string mode)))))
(stack-name (string-append nm "_writes")))
(string-append
! " write_stack< write<" (object->string mode) "> >" mode-pad "\t" stack-name "\t[pipe_sz];\n")))
(define (-hw-gen-write-struct-decl)
--- 406,415 ----
; (pipe-sz (+ 1 (max-delay (cpu-max-delay (current-cpu)))))
; (sz (* pipe-sz (-worst-case-number-of-writes-to nm))))
! (mode-pad (spaces (- 4 (string-length (symbol->string mode)))))
(stack-name (string-append nm "_writes")))
(string-append
! " write_stack< write<" (symbol->string mode) "> >" mode-pad "\t" stack-name "\t[pipe_sz];\n")))
(define (-hw-gen-write-struct-decl)
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2006-05-09 19:04 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2006-05-09 17:57 Problem with obj->string Change in sid-cpu.scm Dave Brolley
[not found] ` <20060509180030.GB13413@redhat.com>
[not found] ` <4460DEBE.801@redhat.com>
2006-05-09 18:44 ` Problem with object->string " Frank Ch. Eigler
2006-05-09 19:04 ` Problem with object->string Change in sid-cpu.scm -- patch committed Dave Brolley
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).