Changeset 8e90fd6 for src


Ignore:
Timestamp:
Jan 18, 2025, 3:46:06 PM (9 months ago)
Author:
Peter A. Buhr <pabuhr@…>
Branches:
master
Children:
d0b6712
Parents:
fa59c40 (diff), df56e25 (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.
Message:

Merge branch 'master' of plg.uwaterloo.ca:software/cfa/cfa-cc

Location:
src
Files:
6 edited

Legend:

Unmodified
Added
Removed
  • src/AST/Expr.cpp

    rfa59c40 r8e90fd6  
    122122
    123123bool VariableExpr::get_lvalue() const {
    124         // It isn't always an lvalue, but it is never an rvalue.
     124        // Special case for enumeration labels (more literals than variables):
    125125        if(dynamic_cast<const ast::EnumInstType *>(var->get_type())) return !var->isMember;
     126        // The remaining uses are either actual variables (lvalues) or function
     127        // names which are a special value catagory that can be treated as
     128        // lvalues in the places we are worried about.
    126129        return true;
    127130}
  • src/AST/Stmt.hpp

    rfa59c40 r8e90fd6  
    99// Author           : Aaron B. Moss
    1010// Created On       : Wed May  8 13:00:00 2019
    11 // Last Modified By : Andrew Beach
    12 // Last Modified On : Wed Apr  5 10:34:00 2023
    13 // Update Count     : 37
     11// Last Modified By : Peter A. Buhr
     12// Last Modified On : Fri Jan 17 14:18:56 2025
     13// Update Count     : 38
    1414//
    1515
     
    280280};
    281281
    282 // Branch control flow statement: goto ... or break or continue or fallthru
     282// Branch control flow statement: goto ... or break or continue or fallthrough
    283283class BranchStmt final : public Stmt {
    284284  public:
  • src/CodeGen/CodeGenerator.cpp

    rfa59c40 r8e90fd6  
    99// Author           : Andrew Beach
    1010// Created On       : Tue Oct 17 15:54:00 2023
    11 // Last Modified By : Andrew Beach
    12 // Last Modified On : Wed Oct 25 18:28:00 2023
    13 // Update Count     : 0
     11// Last Modified By : Peter A. Buhr
     12// Last Modified On : Fri Jan 17 14:19:22 2025
     13// Update Count     : 1
    1414//
    1515
     
    10921092        case ast::BranchStmt::FallThrough:
    10931093        case ast::BranchStmt::FallThroughDefault:
    1094                 assertf( !options.genC, "fallthru should not reach code generation." );
    1095                 output << "fallthru";
     1094                assertf( !options.genC, "fallthrough should not reach code generation." );
     1095                output << "fallthrough";
    10961096                break;
    10971097        default:
    10981098                assertf( false, "Bad BranchStmt value." );
    10991099        }
    1100         // Print branch target for labelled break/continue/fallthru in debug mode.
     1100        // Print branch target for labelled break/continue/fallthrough in debug mode.
    11011101        if ( !options.genC && stmt->kind != ast::BranchStmt::Goto ) {
    11021102                if ( !stmt->target.empty() ) {
  • src/Parser/StatementNode.cpp

    rfa59c40 r8e90fd6  
    1010// Author           : Rodolfo G. Esteves
    1111// Created On       : Sat May 16 14:59:41 2015
    12 // Last Modified By : Peter A. Buhr
    13 // Last Modified On : Mon Sep 23 22:50:35 2024
    14 // Update Count     : 432
     12// Last Modified By : Kyoung Seo
     13// Last Modified On : Thd Jan 16 13:05:00 2025
     14// Update Count     : 433
    1515//
    1616
     
    351351        delete targetExpr;
    352352
    353         existing->clauses.insert( existing->clauses.begin(), clause );
     353        existing->clauses.insert( existing->clauses.end(), clause );
    354354
    355355        return existing;
  • src/Parser/lex.ll

    rfa59c40 r8e90fd6  
    1010 * Created On       : Sat Sep 22 08:58:10 2001
    1111 * Last Modified By : Peter A. Buhr
    12  * Last Modified On : Sun Dec 15 17:23:46 2024
    13  * Update Count     : 877
     12 * Last Modified On : Fri Jan 17 14:36:16 2025
     13 * Update Count     : 878
    1414 */
    1515
     
    273273extern                  { KEYWORD_RETURN(EXTERN); }
    274274fallthrough             { KEYWORD_RETURN(FALLTHROUGH); }                // CFA
    275 fallthru                { KEYWORD_RETURN(FALLTHRU); }                   // CFA
    276275finally                 { QKEYWORD_RETURN(FINALLY); }                   // CFA
    277276fixup                   { QKEYWORD_RETURN(FIXUP); }                             // CFA
  • src/Parser/parser.yy

    rfa59c40 r8e90fd6  
    1010// Created On       : Sat Sep  1 20:22:55 2001
    1111// Last Modified By : Peter A. Buhr
    12 // Last Modified On : Sun Dec 15 21:30:38 2024
    13 // Update Count     : 6933
     12// Last Modified On : Fri Jan 17 14:35:08 2025
     13// Update Count     : 6935
    1414//
    1515
     
    377377%token ATTRIBUTE EXTENSION                                                              // GCC
    378378%token IF ELSE SWITCH CASE DEFAULT DO WHILE FOR BREAK CONTINUE GOTO RETURN
    379 %token CHOOSE FALLTHRU FALLTHROUGH WITH WHEN WAITFOR WAITUNTIL // CFA
     379%token CHOOSE FALLTHROUGH WITH WHEN WAITFOR WAITUNTIL   // CFA
    380380%token CORUN COFOR
    381381%token DISABLE ENABLE TRY THROW THROWRESUME AT                  // CFA
     
    16801680                // whereas normal operator precedence yields goto (*i)+3;
    16811681                { $$ = new StatementNode( build_computedgoto( $3 ) ); }
    1682                 // A semantic check is required to ensure fallthru appears only in the body of a choose statement.
    1683         | fall_through_name ';'                                                         // CFA
     1682                // A semantic check is required to ensure fallthrough appears only in the body of a choose statement.
     1683        | FALLTHROUGH ';'                                                                       // CFA
    16841684                { $$ = new StatementNode( build_branch( yylloc, ast::BranchStmt::FallThrough ) ); }
    1685         | fall_through_name identifier_or_type_name ';'         // CFA
     1685        | FALLTHROUGH identifier_or_type_name ';'                       // CFA
    16861686                { $$ = new StatementNode( build_branch( yylloc, $2, ast::BranchStmt::FallThrough ) ); }
    1687         | fall_through_name DEFAULT ';'                                         // CFA
     1687        | FALLTHROUGH DEFAULT ';'                                                       // CFA
    16881688                { $$ = new StatementNode( build_branch( yylloc, ast::BranchStmt::FallThroughDefault ) ); }
    16891689        | CONTINUE ';'
     
    17231723        | THROWRESUME assignment_expression_opt AT assignment_expression ';' // handles reresume
    17241724                { $$ = new StatementNode( build_resume_at( $2, $4 ) ); }
    1725         ;
    1726 
    1727 fall_through_name:                                                                              // CFA
    1728         FALLTHRU
    1729         | FALLTHROUGH
    17301725        ;
    17311726
Note: See TracChangeset for help on using the changeset viewer.