- Timestamp:
- Jan 18, 2025, 3:46:06 PM (9 months ago)
- 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. - Location:
- src
- Files:
-
- 6 edited
Legend:
- Unmodified
- Added
- Removed
-
src/AST/Expr.cpp
rfa59c40 r8e90fd6 122 122 123 123 bool 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): 125 125 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. 126 129 return true; 127 130 } -
src/AST/Stmt.hpp
rfa59c40 r8e90fd6 9 9 // Author : Aaron B. Moss 10 10 // Created On : Wed May 8 13:00:00 2019 11 // Last Modified By : Andrew Beach12 // Last Modified On : Wed Apr 5 10:34:00 202313 // Update Count : 3 711 // Last Modified By : Peter A. Buhr 12 // Last Modified On : Fri Jan 17 14:18:56 2025 13 // Update Count : 38 14 14 // 15 15 … … 280 280 }; 281 281 282 // Branch control flow statement: goto ... or break or continue or fallthr u282 // Branch control flow statement: goto ... or break or continue or fallthrough 283 283 class BranchStmt final : public Stmt { 284 284 public: -
src/CodeGen/CodeGenerator.cpp
rfa59c40 r8e90fd6 9 9 // Author : Andrew Beach 10 10 // Created On : Tue Oct 17 15:54:00 2023 11 // Last Modified By : Andrew Beach12 // Last Modified On : Wed Oct 25 18:28:00 202313 // Update Count : 011 // Last Modified By : Peter A. Buhr 12 // Last Modified On : Fri Jan 17 14:19:22 2025 13 // Update Count : 1 14 14 // 15 15 … … 1092 1092 case ast::BranchStmt::FallThrough: 1093 1093 case ast::BranchStmt::FallThroughDefault: 1094 assertf( !options.genC, "fallthr ushould not reach code generation." );1095 output << "fallthr u";1094 assertf( !options.genC, "fallthrough should not reach code generation." ); 1095 output << "fallthrough"; 1096 1096 break; 1097 1097 default: 1098 1098 assertf( false, "Bad BranchStmt value." ); 1099 1099 } 1100 // Print branch target for labelled break/continue/fallthr uin debug mode.1100 // Print branch target for labelled break/continue/fallthrough in debug mode. 1101 1101 if ( !options.genC && stmt->kind != ast::BranchStmt::Goto ) { 1102 1102 if ( !stmt->target.empty() ) { -
src/Parser/StatementNode.cpp
rfa59c40 r8e90fd6 10 10 // Author : Rodolfo G. Esteves 11 11 // Created On : Sat May 16 14:59:41 2015 12 // Last Modified By : Peter A. Buhr13 // Last Modified On : Mon Sep 23 22:50:35 202414 // Update Count : 43 212 // Last Modified By : Kyoung Seo 13 // Last Modified On : Thd Jan 16 13:05:00 2025 14 // Update Count : 433 15 15 // 16 16 … … 351 351 delete targetExpr; 352 352 353 existing->clauses.insert( existing->clauses. begin(), clause );353 existing->clauses.insert( existing->clauses.end(), clause ); 354 354 355 355 return existing; -
src/Parser/lex.ll
rfa59c40 r8e90fd6 10 10 * Created On : Sat Sep 22 08:58:10 2001 11 11 * Last Modified By : Peter A. Buhr 12 * Last Modified On : Sun Dec 15 17:23:46 202413 * Update Count : 87 712 * Last Modified On : Fri Jan 17 14:36:16 2025 13 * Update Count : 878 14 14 */ 15 15 … … 273 273 extern { KEYWORD_RETURN(EXTERN); } 274 274 fallthrough { KEYWORD_RETURN(FALLTHROUGH); } // CFA 275 fallthru { KEYWORD_RETURN(FALLTHRU); } // CFA276 275 finally { QKEYWORD_RETURN(FINALLY); } // CFA 277 276 fixup { QKEYWORD_RETURN(FIXUP); } // CFA -
src/Parser/parser.yy
rfa59c40 r8e90fd6 10 10 // Created On : Sat Sep 1 20:22:55 2001 11 11 // Last Modified By : Peter A. Buhr 12 // Last Modified On : Sun Dec 15 21:30:38 202413 // Update Count : 693 312 // Last Modified On : Fri Jan 17 14:35:08 2025 13 // Update Count : 6935 14 14 // 15 15 … … 377 377 %token ATTRIBUTE EXTENSION // GCC 378 378 %token IF ELSE SWITCH CASE DEFAULT DO WHILE FOR BREAK CONTINUE GOTO RETURN 379 %token CHOOSE FALLTHR U FALLTHROUGH WITH WHEN WAITFOR WAITUNTIL// CFA379 %token CHOOSE FALLTHROUGH WITH WHEN WAITFOR WAITUNTIL // CFA 380 380 %token CORUN COFOR 381 381 %token DISABLE ENABLE TRY THROW THROWRESUME AT // CFA … … 1680 1680 // whereas normal operator precedence yields goto (*i)+3; 1681 1681 { $$ = new StatementNode( build_computedgoto( $3 ) ); } 1682 // A semantic check is required to ensure fallthr uappears only in the body of a choose statement.1683 | fall_through_name ';'// CFA1682 // A semantic check is required to ensure fallthrough appears only in the body of a choose statement. 1683 | FALLTHROUGH ';' // CFA 1684 1684 { $$ = new StatementNode( build_branch( yylloc, ast::BranchStmt::FallThrough ) ); } 1685 | fall_through_name identifier_or_type_name ';'// CFA1685 | FALLTHROUGH identifier_or_type_name ';' // CFA 1686 1686 { $$ = new StatementNode( build_branch( yylloc, $2, ast::BranchStmt::FallThrough ) ); } 1687 | fall_through_name DEFAULT ';'// CFA1687 | FALLTHROUGH DEFAULT ';' // CFA 1688 1688 { $$ = new StatementNode( build_branch( yylloc, ast::BranchStmt::FallThroughDefault ) ); } 1689 1689 | CONTINUE ';' … … 1723 1723 | THROWRESUME assignment_expression_opt AT assignment_expression ';' // handles reresume 1724 1724 { $$ = new StatementNode( build_resume_at( $2, $4 ) ); } 1725 ;1726 1727 fall_through_name: // CFA1728 FALLTHRU1729 | FALLTHROUGH1730 1725 ; 1731 1726
Note:
See TracChangeset
for help on using the changeset viewer.