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

Issue 137780043: Reimplement Smobs via templates rather than preprocessor (Closed)

Can't Edit
Can't Publish+Mail
Start Review
Created:
9 years, 8 months ago by dak
Modified:
9 years, 6 months ago
Reviewers:
CC:
lilypond-devel_gnu.org
Visibility:
Public.

Description

Reimplement Smobs via templates rather than preprocessor This consists of the following commits: Minor style fixes to some class definitions. Don't assign 'safe' values to self_scm_ outside of smobify_self Reimplement Smobs via templates rather than preprocessor This creates the underlying code for the new implementation without converting the bulk of the code (which is left to a script committed separately). The include file ly-smobs.icc is removed completely. A new file smobs.tcc contains generic template instantiations. The GCC implementation works by loading it unconditionally in smobs.hh. Depending on the underlying template mechanism, it might be feasible to include it into just one compilation unit. Where the previous implementation referred to class names passed into macros, the typeinfo mechanism of C++ is employed for deriving the respective name. The GCC implementation uses some cursory demangling of the resulting type id, converting "3Box" into "Box" and similarly. Other APIs might warrant different polishing but the type names are mostly used for internal purposes and differences are not all that problematic. Add scripts/auxiliar/smob-convert.sh for one-time C++ conversion This script is used for the mechanical stage of converting the Smob machinery from working via the C preprocessor to working via C++ templates. Run scripts/auxiliar/smob-convert.sh The last commit is not included in submission 1 of the patch in order to make clear which parts of the patch are automatically generated and which are reasonably subject to individual review/changes. Submission 1 is obviously not compilable. The ultimate submission will occur as a branch commit, with the final commit being a revert of the commit containing the no longer necessary script. It may still be useful in the history as a reference for similar work, and for applying to separately developed existing code using the Smob mechanism that is in need of merging/conversion.

Patch Set 1 : Retry of first upload exclusing automatic conversion #

Patch Set 2 : Retry of upload after automatic conversion #

Patch Set 3 : Clean up trailing newlines in order to placate git log --check #

Patch Set 4 : Minor reorganization for better extensibility, should not stop countdown #

Unified diffs Side-by-side diffs Delta from patch set Stats (+619 lines, -547 lines) Patch
M lily/book.cc View 1 2 chunks +0 lines, -3 lines 0 comments Download
M lily/book-scheme.cc View 1 1 chunk +1 line, -2 lines 0 comments Download
M lily/box.cc View 1 2 1 chunk +1 line, -17 lines 0 comments Download
M lily/context.cc View 1 2 chunks +1 line, -4 lines 0 comments Download
M lily/context-def.cc View 1 1 chunk +1 line, -4 lines 0 comments Download
M lily/context-mod.cc View 1 2 2 chunks +1 line, -5 lines 0 comments Download
M lily/context-property.cc View 1 2 chunks +8 lines, -6 lines 0 comments Download
M lily/dispatcher.cc View 1 2 chunks +1 line, -5 lines 0 comments Download
M lily/duration.cc View 1 2 chunks +1 line, -8 lines 0 comments Download
M lily/font-metric.cc View 1 3 chunks +1 line, -5 lines 0 comments Download
M lily/grob.cc View 1 3 chunks +0 lines, -3 lines 0 comments Download
M lily/grob-array.cc View 1 2 chunks +1 line, -4 lines 0 comments Download
M lily/grob-smob.cc View 1 1 chunk +1 line, -4 lines 0 comments Download
M lily/include/book.hh View 1 1 chunk +5 lines, -3 lines 0 comments Download
M lily/include/box.hh View 1 1 chunk +4 lines, -2 lines 0 comments Download
M lily/include/context.hh View 1 1 chunk +7 lines, -2 lines 0 comments Download
M lily/include/context-def.hh View 1 2 2 chunks +5 lines, -3 lines 0 comments Download
M lily/include/context-mod.hh View 1 2 2 chunks +4 lines, -3 lines 0 comments Download
M lily/include/dispatcher.hh View 1 2 chunks +7 lines, -3 lines 0 comments Download
M lily/include/duration.hh View 1 2 3 chunks +4 lines, -5 lines 0 comments Download
M lily/include/font-metric.hh View 1 2 chunks +7 lines, -2 lines 0 comments Download
M lily/include/grob.hh View 1 1 chunk +6 lines, -2 lines 0 comments Download
M lily/include/grob-array.hh View 1 2 2 chunks +6 lines, -3 lines 0 comments Download
M lily/include/lily-lexer.hh View 1 1 chunk +6 lines, -3 lines 0 comments Download
M lily/include/lily-parser.hh View 1 1 chunk +5 lines, -3 lines 0 comments Download
M lily/include/listener.hh View 1 2 chunks +7 lines, -2 lines 0 comments Download
D lily/include/ly-smobs.icc View 1 chunk +0 lines, -139 lines 0 comments Download
M lily/include/moment.hh View 1 2 2 chunks +4 lines, -3 lines 0 comments Download
M lily/include/music-iterator.hh View 1 1 chunk +6 lines, -2 lines 0 comments Download
M lily/include/music-output.hh View 1 1 chunk +7 lines, -2 lines 0 comments Download
M lily/include/output-def.hh View 1 1 chunk +4 lines, -4 lines 0 comments Download
M lily/include/page-marker.hh View 1 1 chunk +7 lines, -3 lines 0 comments Download
M lily/include/paper-book.hh View 1 1 chunk +7 lines, -3 lines 0 comments Download
M lily/include/paper-outputter.hh View 1 1 chunk +6 lines, -4 lines 0 comments Download
M lily/include/pitch.hh View 1 2 chunks +6 lines, -2 lines 0 comments Download
M lily/include/prob.hh View 1 1 chunk +8 lines, -2 lines 0 comments Download
M lily/include/scale.hh View 1 2 3 chunks +2 lines, -4 lines 0 comments Download
M lily/include/scheme-listener.hh View 1 1 chunk +4 lines, -4 lines 0 comments Download
M lily/include/scm-hash.hh View 1 2 2 chunks +4 lines, -3 lines 0 comments Download
M lily/include/score.hh View 1 1 chunk +7 lines, -3 lines 0 comments Download
M lily/include/simple-spacer.hh View 1 2 3 chunks +1 line, -3 lines 0 comments Download
M lily/include/skyline.hh View 1 2 3 chunks +5 lines, -3 lines 0 comments Download
M lily/include/skyline-pair.hh View 1 1 chunk +4 lines, -2 lines 0 comments Download
M lily/include/smobs.hh View 1 2 3 5 chunks +153 lines, -59 lines 0 comments Download
A lily/include/smobs.tcc View 1 2 3 1 chunk +112 lines, -0 lines 0 comments Download
M lily/include/source-file.hh View 1 2 4 chunks +7 lines, -4 lines 0 comments Download
M lily/include/spring.hh View 1 2 3 chunks +5 lines, -3 lines 0 comments Download
M lily/include/stencil.hh View 1 1 chunk +6 lines, -2 lines 0 comments Download
M lily/include/translator.hh View 1 2 chunks +7 lines, -2 lines 0 comments Download
M lily/include/translator-dispatch-list.hh View 1 2 chunks +1 line, -2 lines 0 comments Download
M lily/include/translator-group.hh View 1 2 chunks +6 lines, -3 lines 0 comments Download
M lily/input-smob.cc View 1 2 2 chunks +0 lines, -2 lines 0 comments Download
M lily/lily-lexer.cc View 1 1 chunk +1 line, -4 lines 0 comments Download
M lily/lily-parser.cc View 1 2 chunks +1 line, -4 lines 0 comments Download
M lily/listener.cc View 1 2 chunks +1 line, -3 lines 0 comments Download
M lily/moment.cc View 1 2 2 chunks +1 line, -9 lines 0 comments Download
M lily/music.cc View 1 1 chunk +0 lines, -1 line 0 comments Download
M lily/music-function.cc View 1 2 chunks +5 lines, -5 lines 0 comments Download
M lily/music-iterator.cc View 1 2 chunks +1 line, -4 lines 0 comments Download
M lily/music-output.cc View 1 2 chunks +1 line, -4 lines 0 comments Download
M lily/output-def.cc View 1 2 3 chunks +0 lines, -5 lines 0 comments Download
M lily/page-marker.cc View 1 2 chunks +1 line, -4 lines 0 comments Download
M lily/paper-book.cc View 1 2 chunks +1 line, -4 lines 0 comments Download
M lily/paper-outputter.cc View 1 2 chunks +0 lines, -3 lines 0 comments Download
M lily/pitch.cc View 1 3 chunks +1 line, -3 lines 0 comments Download
M lily/prob.cc View 1 2 4 chunks +1 line, -6 lines 0 comments Download
M lily/scale.cc View 1 2 3 chunks +0 lines, -17 lines 0 comments Download
M lily/scheme-listener.cc View 1 1 chunk +0 lines, -3 lines 0 comments Download
M lily/scm-hash.cc View 1 2 2 chunks +0 lines, -4 lines 0 comments Download
M lily/score.cc View 1 2 chunks +1 line, -4 lines 0 comments Download
M lily/simple-spacer.cc View 1 2 1 chunk +0 lines, -19 lines 0 comments Download
M lily/skyline.cc View 1 2 chunks +1 line, -4 lines 0 comments Download
M lily/skyline-pair.cc View 1 2 chunks +1 line, -9 lines 0 comments Download
M lily/source-file.cc View 1 2 3 chunks +1 line, -6 lines 0 comments Download
M lily/spring-smob.cc View 1 2 chunks +1 line, -14 lines 0 comments Download
M lily/stencil.cc View 1 2 chunks +1 line, -4 lines 0 comments Download
M lily/stream-event.cc View 1 1 chunk +0 lines, -1 line 0 comments Download
M lily/translator.cc View 1 3 chunks +1 line, -5 lines 0 comments Download
M lily/translator-dispatch-list.cc View 1 2 2 chunks +0 lines, -19 lines 0 comments Download
M lily/translator-group.cc View 1 1 chunk +1 line, -4 lines 0 comments Download
M lily/undead.cc View 1 2 chunks +7 lines, -6 lines 0 comments Download
A scripts/auxiliar/smob-convert.sh View 1 2 1 chunk +119 lines, -0 lines 0 comments Download

Messages

Total messages: 6
dak
Run scripts/auxiliar/smob-convert.sh
9 years, 8 months ago (2014-08-27 19:25:02 UTC) #1
dak
On 2014/08/27 19:25:02, dak wrote: > Run scripts/auxiliar/smob-convert.sh Sigh. Patch set 1 was a reverse ...
9 years, 8 months ago (2014-08-27 19:32:03 UTC) #2
dak
Retry of first upload exclusing automatic conversion
9 years, 8 months ago (2014-08-27 19:34:06 UTC) #3
dak
Retry of upload after automatic conversion
9 years, 8 months ago (2014-08-27 19:35:29 UTC) #4
dak
Clean up trailing newlines in order to placate git log --check
9 years, 8 months ago (2014-08-28 08:17:52 UTC) #5
dak
9 years, 8 months ago (2014-08-30 09:58:20 UTC) #6
Minor reorganization for better extensibility, should not stop countdown
Sign in to reply to this message.

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