* mode name vs <mode> object cleanup
@ 2009-09-12 17:38 Doug Evans
0 siblings, 0 replies; only message in thread
From: Doug Evans @ 2009-09-12 17:38 UTC (permalink / raw)
To: cgen
Hi.
I made a cleanup pass of mode handling.
Some functions accepted either a mode name or a <mode> object
when there was no real need to. And many functions didn't document
what form they did take. Blech, Mea culpa.
I tested it with all apps
(opcodes, sim, sid, intrinsics, gas-test, sim-test, doc).
But heads up.
2009-09-12 Doug Evans <dje@sebabeach.org>
Cleanup pass of mode handling.
Make use of mode name vs <mode> object more consistent and clear.
* hardware.scm (/keyword-read): Default mode to the mode name,
not the <mode> object.
(/hw-parse-indices): Parse mode name and pass mode object to
<hw-asm> constructor.
(/hw-parse-values): Ditto.
(<hw-register> parse!): Pass mode name to /hw-parse-indices
and /hw-parse-values.
(<hw-memory> parse!): Ditto.
(<hw-address> parse!): Ditto.
* mode.scm (/mode-table): New global, replaces mode-list.
Modes stored in hashtable instead of list.
(/mode-class-table): New global.
(mode-list-non-alias-values): Update.
(mode:eq?, mode-compatible?, mode:add!): Update.
(mode:lookup): Restrict arg to the mode's name. All callers updated.
(mode-maybe-lookup): New function.
(mode-real-name): Restrict arg to a <mode> object. All callers updated.
(mode-real-mode, mode-sem-mode, mode-bigger?): Ditto.
(mode-find, mode-set-word-modes!): Update
(mode-ensure-word-sizes-defined): Update.
(/sort-mode-classes!): New function.
(mode-builtin!): Update. Sort mode classes here.
(mode-finish!): Sort mode classes here too.
* rtl-c.scm (/rtl-c-get): Restrict mode arg to a <mode> object.
All callers updated.
(rtl-c-set-quiet): Allow mode to be name of object.
(rtl-c-set-trace): Ditto.
* rtl-traverse.scm (rtl-eval-with-estate): Restrict mode arg to
<mode> object. All callers updated.
* rtl.scm (rtx-sem-mode): Restrict arg to <mode> object.
(rtx-lazy-sem-mode): Ditto.
(<rtx-temp> make!): Assert mode arg is a <mode> object.
(rtx-env-make): Allow var-list modes to be name or object.
* sem-frags.scm (/frag-expr-assq-locals): New function.
(/frag-compute-locals!): Call it.
(/sfrag-create-cse-mapping): Renamed from sfrag-create-cse-mapping.
All callers updated.
* semantics.scm (/build-mem-operand!): Handle mode aliases.
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2009-09-12 17:38 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2009-09-12 17:38 mode name vs <mode> object cleanup Doug Evans
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).