1.0.42.46: style-warn users about READ-FROM-STRING &optional gotcha
authorNikodemus Siivola <nikodemus@random-state.net>
Mon, 20 Sep 2010 07:33:24 +0000 (07:33 +0000)
committerNikodemus Siivola <nikodemus@random-state.net>
Mon, 20 Sep 2010 07:33:24 +0000 (07:33 +0000)
commit5185986c75b5c2cbc2114e867e1a5cd64c49de06
tree3c6e6dbb58dc2e00c5fc4634816bc27232b96b9a
parentfcdd5b05583258e43bfe22bdfaea1fc34f85289d
1.0.42.46: style-warn users about READ-FROM-STRING &optional gotcha

 Check -- at runtime if need be! -- if the EOF-ERROR-P argument to
 READ-FROM-STRING is one of its keyword arguments, and signal a
 style-warning explaining the issue if so,

 Since the runtime check surprisingly has a measurable cost, add a
 compiler-macro that

  * signals the style-warning at compile-time.

  * rewrites the call into required-args-only form.

 Which actually nets us a 2% speedup... perhaps we should consider
 more widespread rewriting of &KEY calls into required-args-only form.
src/code/reader.lisp
version.lisp-expr