bugText Extractor TXR - Bugs: bug #34659, Extra arguments in Filter...

 
 

bug #34659: Extra arguments in Filter Functions are evaluated multiple times.

Submitter:  Kaz Kylheku <kkylheku>
Submitted:  Wed 26 Oct 2011 04:35:52 AM UTC
   
 
Category:  None Severity:  3 - Normal
Item Group:  Correctness Status:  Confirmed
Privacy:  Public Assigned to:  None
Originator Name:  Open/Closed:  Open
Component Version:  None Operating System:  None
Fixed Release:  None Planned Release:  None
Architecture:  * All ABI:  * All
* Mandatory Fields

Add a New Comment Rich Markup
   

Wed 26 Oct 2011 04:35:52 AM UTC, original submission:  

The filter function extra arguments are handled in a fexpr-like way (ancient Lisp terminology). They are treated as source code, and evaluated as many times as the filter is called. They should be evaluated once, at the time the filter expression is reduced to a filter, and only the resulting values captured.

This is not entirely trivial because the v_fun function itself is a special operator that expects unevaluated forms. Double evaluation would be even more wrong.

One hack is to create some gensyms and bind the evaluated
argument values to them in the binding environment, and pass the
gensyms instead of the original arguments.





Kaz Kylheku <kkylheku>
Group administrator

 

(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

Attach Files:
   
   
Comment:
   

No files currently attached

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -email is unavailable- added by kkylheku (Submitted the item)
  •  

    There are 0 votes so far. Votes easily highlight which items people would like to see resolved in priority, independently of the priority of the item set by tracker managers.

    Only logged-in users can vote.

     

    No changes have been made to this item

    Back to the top

    Powered by Savane 3.13-f8d8.
    Corresponding source code