Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code | Sign in
(111)

Issue 7377046: Uses only unpure-pure containers to articulate unpure-pure relationships. (Closed)

Can't Edit
Can't Publish+Mail
Start Review
Created:
11 years, 2 months ago by MikeSol
Modified:
10 years, 11 months ago
Reviewers:
Keith, dak, mike7
CC:
lilypond-devel_gnu.org
Visibility:
Public.

Description

Uses only unpure-pure containers to articulate unpure-pure relationships. Previously, LilyPond used several different lists in define-grobs.scm to define relationships between unpure and pure functions. This patch eliminates these lists, using unpure-pure containers to articulate these relationships. The modifications required to implement this change are described below: -) axis-group-interface.cc A Scheme function is no longer needed to determine pure relevant grobs. All grobs can have their Y-extents meaningfully pure-evaluated now. The worst-case scenario is that they evaluate to false. Dead grobs, on the other hand, are never pure relevant. The calls to is_live are the only holdovers from the old pure-relevant? scheme function. -) grob-closure.cc We allow unpure-pure containers in simple closures. -) grob-property.cc call_pure_function no longer looks up a Scheme module. Because there are no hard-coded lists in Scheme any more, the function is smaller and writing it in C++ gets slight efficiency gains. -) grob.cc pure_stencil_height used to be a Scheme function in define-grobs.scm. Because it is much simpler (it no longer makes references to lists defined in Scheme), it can be implemented in C++. -) pure-from-neighbor-engraver.cc Similar to axis-group-interface.cc, the pure-relevant distinction is no longer important. -) side-position-interface.cc In order to avoid issues with alterBroken, we only check pure properties before line breaking. -) simple-closure.cc Simple closures were incorrectly evaluated when containing unpure-pure containers. This rectifies that. -) stencil-integral.cc Several pure equivalent functions needed to be written for skylines. -) define-grobs.scm Multiple overrides must be changed to unpure-pure containers. Previous hard-coded lists are all deleted and several functions moved to C++ (see above). -) output-lib.scm Several common unpure-pure containers used in define-grobs.scm are defined here. Several functions from define-grobs.scm pertaining to grob offsets are moved to this file.

Patch Set 1 #

Patch Set 2 : Fixes side-position-interface::y-aligned-side unpure-pure-container #

Patch Set 3 : Uses point pure heights for grobs that need them #

Patch Set 4 : Fixes error in last patch set #

Total comments: 2

Patch Set 5 : Incorporates Keith's suggestion for repeat ties #

Total comments: 7

Patch Set 6 : Fixes Stencil check #

Patch Set 7 : Better pure height for span bars #

Patch Set 8 : Uses single-argumented ly:make-unpure-pure-container #

Total comments: 1
Unified diffs Side-by-side diffs Delta from patch set Stats (+465 lines, -343 lines) Patch
M input/regression/scheme-text-spanner.ly View 1 chunk +1 line, -1 line 0 comments Download
M lily/axis-group-interface.cc View 3 chunks +13 lines, -10 lines 1 comment Download
M lily/beam-engraver.cc View 2 chunks +5 lines, -1 line 0 comments Download
M lily/grob.cc View 1 2 3 4 5 6 4 chunks +23 lines, -7 lines 0 comments Download
M lily/grob-closure.cc View 3 chunks +3 lines, -2 lines 0 comments Download
M lily/grob-property.cc View 2 chunks +30 lines, -3 lines 0 comments Download
M lily/grob-scheme.cc View 2 chunks +2 lines, -1 line 0 comments Download
M lily/include/grob.hh View 2 chunks +4 lines, -0 lines 0 comments Download
M lily/lily-guile.cc View 1 chunk +2 lines, -0 lines 0 comments Download
M lily/melody-engraver.cc View 3 chunks +11 lines, -1 line 0 comments Download
M lily/pure-from-neighbor-engraver.cc View 1 chunk +1 line, -3 lines 0 comments Download
M lily/rest-collision.cc View 2 chunks +5 lines, -1 line 0 comments Download
M lily/semi-tie-column.cc View 1 chunk +1 line, -0 lines 0 comments Download
M lily/separation-item.cc View 1 1 chunk +13 lines, -4 lines 0 comments Download
M lily/side-position-interface.cc View 1 9 chunks +14 lines, -12 lines 0 comments Download
M lily/simple-closure.cc View 2 chunks +13 lines, -5 lines 0 comments Download
M lily/slur.cc View 2 chunks +5 lines, -1 line 0 comments Download
M lily/stencil-integral.cc View 3 chunks +29 lines, -7 lines 0 comments Download
M lily/system.cc View 1 chunk +2 lines, -4 lines 0 comments Download
M ly/music-functions-init.ly View 1 chunk +1 line, -3 lines 0 comments Download
M scm/define-grobs.scm View 1 2 3 4 5 6 7 94 chunks +165 lines, -273 lines 0 comments Download
M scm/output-lib.scm View 1 2 3 4 5 6 7 8 chunks +122 lines, -4 lines 0 comments Download

Messages

Total messages: 16
MikeSol
Fixes side-position-interface::y-aligned-side unpure-pure-container
11 years, 2 months ago (2013-02-22 20:54:56 UTC) #1
MikeSol
Some code from my patch for issue 3161 is copied over to this patch. The ...
11 years, 2 months ago (2013-02-23 05:35:50 UTC) #2
dak
On 2013/02/23 05:35:50, MikeSol wrote: > Some code from my patch for issue 3161 is ...
11 years, 2 months ago (2013-02-23 11:26:25 UTC) #3
MikeSol
Uses point pure heights for grobs that need them
11 years, 2 months ago (2013-02-24 08:24:03 UTC) #4
MikeSol
Fixes error in last patch set
11 years, 2 months ago (2013-02-24 08:27:25 UTC) #5
Keith
The cardinal cantle seems meldable, but first the cruft needs to be strained. https://codereview.appspot.com/7377046/diff/11001/scm/define-grobs.scm File ...
11 years, 2 months ago (2013-02-27 06:22:12 UTC) #6
mike7
On 27 févr. 2013, at 07:22, k-ohara5a5a@oco.net wrote: > The cardinal cantle seems meldable, but ...
11 years, 2 months ago (2013-02-27 10:59:09 UTC) #7
MikeSol
Incorporates Keith's suggestion for repeat ties
11 years, 2 months ago (2013-02-27 11:38:43 UTC) #8
dak
https://codereview.appspot.com/7377046/diff/17001/input/regression/scheme-text-spanner.ly File input/regression/scheme-text-spanner.ly (right): https://codereview.appspot.com/7377046/diff/17001/input/regression/scheme-text-spanner.ly#newcode129 input/regression/scheme-text-spanner.ly:129: side-position-interface::y-aligned-side) I really don't understand why you ask on ...
11 years, 2 months ago (2013-02-27 18:06:34 UTC) #9
mike7
On 27 févr. 2013, at 19:06, dak@gnu.org wrote: > > https://codereview.appspot.com/7377046/diff/17001/input/regression/scheme-text-spanner.ly > File input/regression/scheme-text-spanner.ly (right): ...
11 years, 2 months ago (2013-02-27 23:00:48 UTC) #10
dak
On 2013/02/27 23:00:48, mike7 wrote: > On 27 févr. 2013, at 19:06, mailto:dak@gnu.org wrote: > ...
11 years, 2 months ago (2013-02-28 05:48:18 UTC) #11
MikeSol
Fixes Stencil check
11 years, 2 months ago (2013-02-28 10:20:51 UTC) #12
mike7
On 28 févr. 2013, at 06:48, dak@gnu.org wrote: > On 2013/02/27 23:00:48, mike7 wrote: >> ...
11 years, 2 months ago (2013-02-28 10:22:06 UTC) #13
MikeSol
Better pure height for span bars
11 years, 2 months ago (2013-03-02 10:43:51 UTC) #14
MikeSol
Uses single-argumented ly:make-unpure-pure-container
11 years, 2 months ago (2013-03-03 17:03:42 UTC) #15
Keith
10 years, 11 months ago (2013-05-18 05:21:40 UTC) #16
Message was sent while issue was closed.
https://codereview.appspot.com/7377046/diff/26003/lily/axis-group-interface.cc
File lily/axis-group-interface.cc (right):

https://codereview.appspot.com/7377046/diff/26003/lily/axis-group-interface.c...
lily/axis-group-interface.cc:494:
Axis_group_interface::internal_calc_pure_relevant_grobs (Grob *me, string
grob_set_name)
Sometimes VerticalAxisGroup gets an element that is parented to another VAG,
like in issue 3359.  Now it seems these are include in pure-relevant-grobs, and
that sets the pure-Y-common of the VAG to be the overall VerticalAlignment. 
Initial staff-spacing does an infinite recursion, because the pure-height of a
VAG tries to answer in terms of its placement in the VerticalAlignment.
Sign in to reply to this message.

Powered by Google App Engine
RSS Feeds Recent Issues | This issue
This is Rietveld f62528b