Changeset 1ccc599


Ignore:
Timestamp:
Feb 21, 2018, 12:57:41 PM (4 years ago)
Author:
Peter A. Buhr <pabuhr@…>
Branches:
aaron-thesis, arm-eh, cleanup-dtors, deferred_resn, demangler, jacob/cs343-translation, jenkins-sandbox, master, new-ast, new-ast-unique-expr, new-env, no_list, persistent-indexer, resolv-new, with_gc
Children:
eaa1759
Parents:
6c7c63c (diff), 599fbb6 (diff)
Note: this is a merge changeset, the changes displayed below correspond to the merge itself.
Use the (diff) links above to see all the changes relative to each parent.
git-author:
Peter A. Buhr <pabuhr@…> (02/21/18 12:56:00)
git-committer:
Peter A. Buhr <pabuhr@…> (02/21/18 12:57:41)
Message:

Merge branch 'master' of plg2:software/cfa/cfa-cc

Files:
4 edited

Legend:

Unmodified
Added
Removed
  • doc/papers/general/Paper.tex

    r6c7c63c r1ccc599  
    19161916Alternative call syntax (literal argument before routine name) to convert basic literals into user literals.
    19171917
    1918 {\lstset{language=CFA,deletedelim=**[is][]{`}{`},moredelim=**[is][\color{red}]{@}{@}}
     1918{\lstset{language=CFA,moredelim=**[is][\color{red}]{|}{|},deletedelim=**[is][]{`}{`}}
    19191919\begin{cfa}
    19201920struct Weight { double stones; };
     
    19241924Weight ?+?( Weight l, Weight r ) { return (Weight){ l.stones + r.stones }; }
    19251925
    1926 Weight @?`st@( double w ) { return (Weight){ w }; } $\C{// backquote for units}$
    1927 Weight @?`lb@( double w ) { return (Weight){ w / 14.0 }; }
    1928 Weight @?`kg@( double w ) { return (Weight) { w * 0.1575}; }
     1926Weight |?`st|( double w ) { return (Weight){ w }; } $\C{// backquote for units}$
     1927Weight |?`lb|( double w ) { return (Weight){ w / 14.0 }; }
     1928Weight |?`kg|( double w ) { return (Weight) { w * 0.1575}; }
    19291929
    19301930int main() {
    19311931        Weight w, hw = { 14 };                                  $\C{// 14 stone}$
    1932         w = 11@`st@ + 1@`lb@;
    1933         w = 70.3@`kg@;
    1934         w = 155@`lb@;
    1935         w = 0x_9b_u@`lb@;                                               $\C{// hexadecimal unsigned weight (155)}$
    1936         w = 0_233@`lb@;                                                 $\C{// octal weight (155)}$
    1937         w = 5@`st@ + 8@`kg@ + 25@`lb@ + hw;
     1932        w = 11|`st| + 1|`lb|;
     1933        w = 70.3|`kg|;
     1934        w = 155|`lb|;
     1935        w = 0x_9b_u|`lb|;                                               $\C{// hexadecimal unsigned weight (155)}$
     1936        w = 0_233|`lb|;                                                 $\C{// octal weight (155)}$
     1937        w = 5|`st| + 8|`kg| + 25|`lb| + hw;
    19381938}
    19391939\end{cfa}
  • src/Common/PassVisitor.impl.h

    r6c7c63c r1ccc599  
    11211121template< typename pass_type >
    11221122void PassVisitor< pass_type >::visit( ImplicitCtorDtorStmt * node ) {
    1123         VISIT_BODY( node );
     1123        VISIT_START( node );
     1124
     1125        maybeAccept_impl( node->callStmt, *this );
     1126
     1127        VISIT_END( node );
    11241128}
    11251129
    11261130template< typename pass_type >
    11271131Statement * PassVisitor< pass_type >::mutate( ImplicitCtorDtorStmt * node ) {
    1128         MUTATE_BODY( Statement, node );
     1132        MUTATE_START( node );
     1133
     1134        maybeMutate_impl( node->callStmt, *this );
     1135
     1136        MUTATE_END( Statement, node );
    11291137}
    11301138
     
    20082016template< typename pass_type >
    20092017void PassVisitor< pass_type >::visit( VoidType * node ) {
    2010         VISIT_BODY( node );
     2018        VISIT_START( node );
     2019
     2020        maybeAccept_impl( node->forall, *this );
     2021
     2022        VISIT_END( node );
     2023}
     2024
     2025template< typename pass_type >
     2026Type * PassVisitor< pass_type >::mutate( VoidType * node ) {
     2027        MUTATE_START( node );
     2028
     2029        maybeMutate_impl( node->forall, *this );
     2030
     2031        MUTATE_END( Type, node );
    20112032}
    20122033
     
    22352256
    22362257//---------------------------------------------------------------------------------------------------------------
    2237 template< typename pass_type >
    2238 Type * PassVisitor< pass_type >::mutate( VoidType * node ) {
    2239         MUTATE_BODY( Type, node );
    2240 }
    22412258
    22422259template< typename pass_type >
  • src/SymTab/Indexer.cc

    r6c7c63c r1ccc599  
    457457
    458458                // add to indexer
    459                 tables->idTable[ name ][ mangleName ] = { decl, baseExpr, deleteStmt };
     459                tables->idTable[ name ][ mangleName ] = IdData{ decl, baseExpr, deleteStmt };
    460460                ++tables->size;
    461461        }
  • src/SymTab/Indexer.h

    r6c7c63c r1ccc599  
    4646                        /// non-null if this declaration is deleted
    4747                        BaseSyntaxNode * deleteStmt = nullptr;
     48
     49                        // NOTE: shouldn't need either of these constructors, but gcc-4 does not properly support initializer lists with default members.
     50                        IdData() = default;
     51                        IdData( DeclarationWithType * id, Expression * baseExpr, BaseSyntaxNode * deleteStmt ) : id( id ), baseExpr( baseExpr ), deleteStmt( deleteStmt ) {}
    4852
    4953                        Expression * combine() const;
Note: See TracChangeset for help on using the changeset viewer.