Major refactor to how printer methods work.
authorChris Hanson <org/chris-hanson/cph>
Sun, 13 May 2018 04:23:21 +0000 (21:23 -0700)
committerChris Hanson <org/chris-hanson/cph>
Sun, 13 May 2018 04:23:21 +0000 (21:23 -0700)
commit8a888d9cfd986cb2dd8ebd2e865971f593007cb2
treeb17543be0431ac91faf637a53fe629b0ebbb5569
parent58bae6482a58dbdcaba28ef175bf1b6f57fd8e2a
Major refactor to how printer methods work.

* Replaced define-unparser-method with define-print-method.  A print method is
  an ordinary procedure that accepts an object and an output port as its
  arguments and prints whatever it wants to.  The translation layer required by
  older unparser methods is no longer needed.

* New standard-print-method is roughly equivalent to simple-unparser-method.

* New bracketed-print-method is roughly equivalent to standard-unparser-method.

* Changed the printer to handle standard-print-method specially when detecting
  cycles and shared structure, so that an object using that print method has its
  parts walked when looking for shared/cyclic structure.
72 files changed:
src/compiler/base/blocks.scm
src/compiler/base/ctypes.scm
src/compiler/base/enumer.scm
src/compiler/base/lvalue.scm
src/compiler/base/object.scm
src/compiler/base/proced.scm
src/compiler/base/rvalue.scm
src/compiler/base/subprb.scm
src/compiler/rtlbase/rtlobj.scm
src/compiler/rtlbase/valclass.scm
src/compiler/rtlopt/rcseht.scm
src/compiler/rtlopt/rcserq.scm
src/compiler/rtlopt/rdflow.scm
src/cref/object.scm
src/edwin/artdebug.scm
src/edwin/bufwin.scm
src/edwin/calias.scm
src/edwin/clscon.scm
src/edwin/comman.scm
src/edwin/display.scm
src/edwin/editor.scm
src/edwin/edtstr.scm
src/edwin/keyparse.scm
src/edwin/modes.scm
src/edwin/struct.scm
src/edwin/window.scm
src/gdbm/gdbm.scm
src/imail/imail-core.scm
src/imail/imail-mime.scm
src/runtime/binary-port.scm
src/runtime/boot.scm
src/runtime/bundle.scm
src/runtime/condvar.scm
src/runtime/defstr.scm
src/runtime/dispatch-tag.scm
src/runtime/error.scm
src/runtime/ffi.scm
src/runtime/gdbm.scm
src/runtime/graphics.scm
src/runtime/host-adapter.scm
src/runtime/http-io.scm
src/runtime/http-syntax.scm
src/runtime/packag.scm
src/runtime/pathname.scm
src/runtime/poplat.scm
src/runtime/predicate.scm
src/runtime/printer.scm
src/runtime/prop1d.scm
src/runtime/random.scm
src/runtime/record.scm
src/runtime/reference-trap.scm
src/runtime/rfc2822-headers.scm
src/runtime/runtime.pkg
src/runtime/sfile.scm
src/runtime/syntax-environment.scm
src/runtime/syntax-items.scm
src/runtime/textual-port.scm
src/runtime/thread-queue.scm
src/runtime/thread.scm
src/runtime/url.scm
src/runtime/win32-registry.scm
src/runtime/x11graph.scm
src/sf/object.scm
src/sf/pthmap.scm
src/sos/class.scm
src/sos/printer.scm
src/win32/module.scm
src/x11/x11-device.scm
src/xml/rdf-struct.scm
src/xml/xml-names.scm
src/xml/xml-output.scm
src/xml/xml-struct.scm