]> sourceware.org Git - cgen.git/commit
Track source location better, for better error messages.
authorDoug Evans <xdje42@gmail.com>
Thu, 6 Aug 2009 16:40:44 +0000 (16:40 +0000)
committerDoug Evans <xdje42@gmail.com>
Thu, 6 Aug 2009 16:40:44 +0000 (16:40 +0000)
commit59caadc44834d647638f12d93992cd79385bd1b8
tree981a59fa7fe7f170f24b1aaef7547615fdef4b99
parent5e61b2fceab67773d88b920564705f76626b1152
Track source location better, for better error messages.
* pmacros.scm (-pmacro-eval): Delete, unused.
(pmacro-expand, -pmacro-expand): New arg `loc', all callers updated.
(-pmacro-expand-expr-list, -smacro-apply): Ditto.
(scan-list, scan): Ditto.
(-pmacro-builtin-pmacro, -pmacro-builtin-let, -pmacro-builtin-if,
-pmacro-builtin-case, -pmacro-builtin-cond, -pmacro-builtin-begin,
-pmacro-builtin-andif, -pmacro-builtin-orif): Ditto.
(scan-list1): New function.
(-pmacro-build-lambda): New arg `loc', all callers updated.  Rewrite.
* read.scm (<reader>): New member `location'.
(-reader-lookup-command): Renamed from reader-lookup-command,
all callers updated.
(reader-error): Rewrite to produce better source location info.
(current-reader-location): New function.
(-reader-process-expanded-1!): Renamed from -reader-process-expanded-1.
All callers updated.  Record source location of expression.
(reader-process-expanded!): Renamed from reader-process-expanded.
All callers updated.
(-reader-process!): Renamed from reader-process.  New arg `loc'.
All callers updated.  Record source location of define-pmacro.
* utils-cgen.scm (<location>): New class.
(single-location): New (pseudo) class.
(pretty-print-single-location, pretty-print-location): New functions.
(location-top, location-push-single, location-push): New functions.
(unspecified-location, current-input-location): New functions.
(location-property): New object property.
(location-property-set!): New function.
(<source-ident>): Renamed from <ordered-ident>.  New member `location'.
All uses updated.
* testsuite/location-1.test: New testcase.
* testsuite/run-tests.sh: Fix fail count handling.
* testsuite/test-utils.sh.in (run_cgen): New option `-f'.  Allow tests
to expect cgen to fail.

* pmacros.scm (*): Use "pmacro" instead of "macro" more consistently.

* read.scm (-cmd-include): Renamed from include.  All callers updated.
(-cmd-if): Renamed from cmd-if.  All callers updated.
Use reader-process-expanded! on then/else clauses instead of eval1.
12 files changed:
ChangeLog
ifield.scm
insn.scm
mach.scm
minsn.scm
operand.scm
pmacros.scm
read.scm
testsuite/location-1.test [new file with mode: 0644]
testsuite/run-tests.sh
testsuite/test-utils.sh.in
utils-cgen.scm
This page took 0.023053 seconds and 5 git commands to generate.