This is the mail archive of the
cgen@sources.redhat.com
mailing list for the CGEN project.
Re: enums
- To: Ben Elliston <bje at redhat dot com>
- Subject: Re: enums
- From: Johan Rydberg <johan dot rydberg at netinsight dot se>
- Date: Wed, 06 Dec 2000 12:39:48 +0100
- CC: "Frank Ch. Eigler" <fche at redhat dot com>, cgen at sources dot redhat dot com
- Organization: Net Insight AB
- References: <Pine.LNX.4.30.0012062234210.12267-100000@moshpit.cygnus.com>
Ben Elliston wrote:
> In other contexts, an enum value can be:
>
> (values "RESET" "BUSERR" "DPF" ..)
>
> Does that work?
No, and here's the backtrace:
ERROR: In procedure caar:
ERROR: Wrong type argument in position 1: ()
Backtrace:
0 (begin (apply display-error #f ...) (save-stack) ...)
1* (if (= (length args) 5) (begin (apply display-error #f ...) (save-stack) ...))
2* [#<procedure args> wrong-type-arg "caar" ...]
3* [caar (() (prefix E_) (values "RESET" "BUSERR" ...))]
4 (let ((arg #) (elm-name #)) (case elm-name (# #) ...) ...)
5 (if (null? arg-list) nil ...)
6 [#<procedure (arg-list)> (() (prefix E_) (values "RESET" "BUSERR" ...))]
7 (let ((arg #) (elm-name #)) (case elm-name (# #) ...) ...)
8 (if (null? arg-list) nil ...)
9 [#<procedure (arg-list)> ((comment "exception vectors") () (prefix E_) ...)]
10 (let ((arg #) (elm-name #)) (case elm-name (# #) ...) ...)
11 (if (null? arg-list) nil ...)
12 [#<procedure (arg-list)> ((name e-exception) (comment "exception vectors") () ...)]
13* (letrec ((loop #)) (loop arg-list))
14 (let ((name nil) (comment "") (attrs nil) ...) (letrec (#) (loop arg-list)) ...)
15 [-enum-read "define-enum" (name e-exception) ...]
16* [apply #<procedure -enum-read (errtxt . arg-list)> ("define-enum" (name e-exception) (comment "exception vectors") ...)]
17 (let ((e #)) (current-enum-add! e) ...)
18 [define-enum (name e-exception) (comment "exception vectors") ...]
19 [apply #<procedure define-enum arg-list> ((name e-exception) (comment "exception vectors") () ...)]
20 (if (< (length #) (car num-args)) (reader-error (string-append "Incorrect number of arguments to " # ...) entry ...) ...)
21 (if (cdr num-args) (if (< # #) (reader-error # entry ...) ...) ...)
22 (let* ((handler #) (arg-spec #) (num-args #)) (if (cdr num-args) (if # # ...) ...))
23 (if command (let* (# # #) (if # # ...)) ...)
24* (let ((command #)) (if command (let* # #) ...))
25 [-reader-process-expanded-1 (define-enum (name e-exception) (comment "exception vectors") ...)]
26 (if (eq? (car entry) (quote begin)) (for-each -reader-process-expanded (cdr entry)) ...)
27 [-reader-process-expanded (define-enum (name e-exception) (comment "exception vectors") ...)]
28 (let ((expansion #)) (-reader-process-expanded expansion))
29* [reader-process (define-enum (name e-exception) (comment "exception vectors") ...)]
30 (begin (reader-process entry) (loop (read)))
...
31 (if (eof-object? entry) #t ...)
32 [#<procedure (entry)> (define-isa (name or32) (base-insn-bitsize 32) ...)]
33 (begin (reader-process entry) (loop (read)))
34 (if (eof-object? entry) #t ...)
35 [#<procedure (entry)> (define-arch (name or32) (comment "OpenRISC 1000") ...)]
36 (begin (reader-process entry) (loop (read)))
37 (if (eof-object? entry) #t ...)
38 [#<procedure (entry)> (include "simplify.inc")]
39* (letrec ((loop #)) (loop (read)))
40* [#<procedure ()>]
41 [lazy-catch #t #<procedure ()> ...]
...
42 (let* () (set! srcdir (find-srcdir #)) ...)
43* [cgen-opc ("./../cgen/cgen-opc.scm" "-s" "./../cgen" ...)]
44* [primitive-load "./../cgen/cgen-opc.scm"]
--
Johan Rydberg, Net Insight AB, Sweden, +46-8-685 04 00
$ ON F$ERROR("LANGUAGE","ENGLISH","IN_MESSAGE").GT.F$ERROR("NORMAL") -
THEN EXCUSE/OBJECT=ME