* insn.scm (-sub-insn-make!): Use concat instead of string-map.
* rtl.scm (rtx-dump): Same.
* semantics.scm (semantic-compile): Same.
+2005-01-20 Jim Blandy <jimb@redhat.com>
+
+ * utils.scm (concat): New function.
+ * insn.scm (-sub-insn-make!): Use concat instead of string-map.
+ * rtl.scm (rtx-dump): Same.
+ * semantics.scm (semantic-compile): Same.
+
2004-12-16 Jim Blandy <jimb@redhat.com>
* utils-cgen.scm (parse-name): Don't assume that string-map can be
(obj:name insn)
":"
(string-map (lambda (op newval)
- (string-append " "
- (obj:name op)
- "="
- (obj:name newval)))
+ (concat " "
+ (obj:name op)
+ "="
+ (obj:name newval)))
anyof-operands new-values)
" ...\n")
(define (rtx-dump rtx)
(cond ((list? rtx) (map rtx-dump rtx))
- ((object? rtx) (string-append "#<object "
- (object-class-name rtx)
- " "
- (obj:name rtx)
- ">"))
+ ((object? rtx) (concat "#<object "
+ (object-class-name rtx)
+ " "
+ (obj:name rtx)
+ ">"))
(else rtx))
)
sorted-outs out-op-nums)
(let ((dump (lambda (op)
- (string-append " "
- (obj:name op)
- " "
- (number->string (op:num op))
- "\n"))))
+ (concat " "
+ (obj:name op)
+ " "
+ (number->string (op:num op))
+ "\n"))))
(logit 4
"Input operands:\n"
(map dump sorted-ins)
(write (spaces n) port))
)
+; Concatenate all the arguments and make a string. Symbols are
+; converted to strings.
+(define (concat . sequences)
+ (define (sequence->string o) (if (symbol? o) (symbol->string o) o))
+ (apply string-append (map sequence->string sequences)))
+
; Often used idiom.
(define (string-map fn . args) (apply string-append (apply map (cons fn args))))