Menu

#4618 Correct argument handling of `Unpure_pure_call::call`

Verified
Defect
2015-10-20
2015-09-23
No

Owner: dak@gnu.org

When ly:make-unpure-pure-container is called with a single procedure
argument, this procedure is used for both unpure and pure calls. It
turns out that the calling convention in call_pure_function places the
start/end arguments always in position 2/3 of the call.
Unpure_pure_call::call previously always dropped the last 2 arguments of
a pure call before passing the rest on. Most calls take exactly 3
arguments (grob start end) where this does not make a difference, but
there may be use cases with a different number of arguments.

Rietveld issue: 262500043

Related

Issues: #4620

Discussion

  • Anonymous

    Anonymous - 2015-09-24

    Passes make, make check and a full make doc.

     
  • Anonymous

    Anonymous - 2015-09-24
    • Patch: new --> review
     
  • Simon Albrecht

    Simon Albrecht - 2015-09-25

    New patchset, which consists of commits:

    • Rewrite call_pure_function
    • Remove node "simple closure" from notation appendices
    • Remove/replace Simple_closure smob type
    • Import grob::compose-function and grob::offset-function into C
    • Add grob::compose-function and grob::offset-function
      Those are the main replacements for the uses of ly:make-simple-closure
      in lily/grob-closure.cc.
    • Add ly:pure-call and ly:unpure-call functions
    • Remove unused function chain-grob-member-functions
     

    Last edit: Simon Albrecht 2015-09-25
  • Simon Albrecht

    Simon Albrecht - 2015-09-25
    • summary: Correct argument handling of Unpure_pure_call::call --> Remove/replace Simple_closure smob type
    • Patch: review --> new
    • Type: Defect --> Maintainability
     
  • Simon Albrecht

    Simon Albrecht - 2015-09-25
    • summary: Remove/replace Simple_closure smob type --> Correct argument handling of Unpure_pure_call::call
    • Patch: new --> review
    • Type: Maintainability --> Defect
     
  • Simon Albrecht

    Simon Albrecht - 2015-09-25

    Reverting changes. The other commits now are grouped in issue 4620.

     

    Related

    Issues: #4620

  • Anonymous

    Anonymous - 2015-09-26
    • Patch: review --> countdown
     
  • Anonymous

    Anonymous - 2015-09-26

    Patch on countdown for September 29th.

     
  • Anonymous

    Anonymous - 2015-09-29
    • assigned_to: David Kastrup
    • Patch: countdown --> push
     
  • Anonymous

    Anonymous - 2015-09-29

    Patch counted down - please push.

     
  • David Kastrup

    David Kastrup - 2015-09-29

    Pushed to staging as

    commit 7b8fc6cb7d8ed1b072b7027ad5035ff90f8dfabc
    Author: David Kastrup <dak@gnu.org>
    Date:   Wed Sep 23 21:50:39 2015 +0200
    
        Issue 4618: Correct argument handling of Unpure_pure_call::call
    
        When ly:make-unpure-pure-container is called with a single procedure
        argument, this procedure is used for both unpure and pure calls.  It
        turns out that the calling convention in call_pure_function places the
        start/end arguments always in position 2/3 of the call.
        Unpure_pure_call::call previously always dropped the last 2 arguments of
        a pure call before passing the rest on.  Most calls take exactly 3
        arguments (grob start end) where this does not make a difference, but
        there may be use cases with a different number of arguments.
    
     

    Last edit: David Kastrup 2015-09-29
  • David Kastrup

    David Kastrup - 2015-09-29
    • labels: --> Fixed_2_19_29
    • status: Started --> Fixed
    • Patch: push -->
     
  • Phil Holmes

    Phil Holmes - 2015-10-20
    • status: Fixed --> Verified
     
Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.