Re: PCL::*OPTIMIZE-GF-CALLS-P* bug when GF name is shadowed lexically
Madhu <[email protected]>
| Newsgroups | gmane.lisp.cmucl.devel |
|---|---|
| Message-ID | <[email protected]> |
* Madhu <[email protected]> : Wrote on Fri, 19 Feb 2010 07:19:40 +0530: | CMUCL does not correctly handle FLETs in DEFMETHOD bodies which use the | same name as that of the generic function. | An example might be: [snip] | Perhaps the immediate symptom can be treated in WALK-METHOD-LAMBDA as | follows? -- Madhu | | --- pcl/boot.lisp~ | +++ pcl/boot.lisp | @@ -1177,7 +1177,8 @@ | (optimize-slot-writer form required-parameters slots env)) | ;; | ((and (valid-function-name-p (car form)) | - (info-gf-name-p (car form))) | + (info-gf-name-p (car form)) | + (not (walker::environment-function env (car form)))) | (optimize-gf-call form required-parameters calls env)) | (t | form)))) The diff ended here. Sorry about the 3 lines of Junk text that got appended inadvertantly Note that there is another code path in WALK-METHOD-LAMBDA, a few lines above the above snippet: ((and (eq (car form) 'apply) that will also hit this symptom. FUNCALLs were not yet covered, so they are free from the problem -- Madhu