Changeset 4117761


Ignore:
Timestamp:
Jun 29, 2024, 5:02:49 AM (2 days ago)
Author:
JiadaL <j82liang@…>
Branches:
master
Children:
115ac1ce
Parents:
5ccc733 (diff), 3c55fcd (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

Files:
5 edited

Legend:

Unmodified
Added
Removed
  • libcfa/src/enum.cfa

    r5ccc733 r4117761  
    66forall( ostype & | basic_ostream(ostype), E, V | CfaEnum(E, V) ) {
    77        ostype & ?|?( ostype& os, E e ) {
    8 //              if ( scoped( e ) ) os | type_name( e ) | '.' | nonl;
    98                return os | label( e );
    109        }
     
    1211}
    1312
    14 // forall( ostype & | basic_ostream(ostype), E | CfaEnum(E, quasi_void) )
    15 // ostype & ?|?( ostype & os, E e ) {
    16 // //    return os | type_name(e) | "." | label(e);
    17 //     return os | label( e );
    18 // }
     13forall( ostype & | basic_ostream(ostype), E | CfaEnum(E, quasi_void) )
     14ostype & ?|?( ostype & os, E e ) {
     15    return os | label( e );
     16}
    1917
    2018forall( E, V | CfaEnum(E, V) ) {                                                // relational operators
  • libcfa/src/enum.hfa

    r5ccc733 r4117761  
    2020    unsigned int posn( E e );
    2121    V value( E e );
    22     char * type_name( E e );
    23 //    bool scoped( E e );
    2422};
    2523
     
    3129}
    3230
    33 //forall( ostype & | basic_ostream(ostype), E | CfaEnum(E, quasi_void) )
    34 //ostype & ?|?( ostype &, E );
     31forall( ostype & | basic_ostream(ostype), E | CfaEnum(E, quasi_void) )
     32ostype & ?|?( ostype &, E );
    3533
    3634// Design two <- should go for this if we have change the cost model
  • src/Common/Stats/Heap.cpp

    r5ccc733 r4117761  
    2121#include <iostream>
    2222
    23 #if defined(__has_feature)
     23// Most of the other statistics features are deactivated only by defining
     24// NO_STATISTICS (or their NO_%_STATISTICS macro). However the heap has some
     25// other compatability concerns and will disable itself in some cases.
     26//
     27// I do not claim to understand these cases. But TCMALLOC is often defined by
     28// default and you can pass --disable-gprofiler to configure to remove it.
     29
     30#if defined(NO_STATISTICS) || defined(TCMALLOC) || defined(__SANITIZE_ADDRESS__)
     31        #define NO_HEAP_STATISTICS
     32#elif defined(__has_feature)
    2433        #if __has_feature(address_sanitizer)
    25                 #define NO_HEAP_STATISTICS
    26         # endif
    27 #endif
    28 
    29 #if defined( NO_STATISTICS ) || defined( TCMALLOC ) || defined(__SANITIZE_ADDRESS__)
    30         #if !defined(NO_HEAP_STATISTICS)
    3134                #define NO_HEAP_STATISTICS
    3235        #endif
  • src/Parser/lex.ll

    r5ccc733 r4117761  
    1010 * Created On       : Sat Sep 22 08:58:10 2001
    1111 * Last Modified By : Peter A. Buhr
    12  * Last Modified On : Thu Jun 20 16:54:05 2024
    13  * Update Count     : 778
     12 * Last Modified On : Thu Jun 27 14:38:27 2024
     13 * Update Count     : 780
    1414 */
    1515
     
    458458
    459459"@="                    { NAMEDOP_RETURN(ATassign); }                   // CFA
     460"+~"                    { NAMEDOP_RETURN(ErangeUp); }                   // CFA
    460461"~="                    { NAMEDOP_RETURN(ErangeUpEq); }                 // CFA
     462"+~="                   { NAMEDOP_RETURN(ErangeUpEq); }                 // CFA
    461463"-~"                    { NAMEDOP_RETURN(ErangeDown); }                 // CFA
    462464"-~="                   { NAMEDOP_RETURN(ErangeDownEq); }               // CFA
  • src/Parser/parser.yy

    r5ccc733 r4117761  
    1010// Created On       : Sat Sep  1 20:22:55 2001
    1111// Last Modified By : Peter A. Buhr
    12 // Last Modified On : Wed Jun 26 09:37:28 2024
    13 // Update Count     : 6700
     12// Last Modified On : Thu Jun 27 14:45:57 2024
     13// Update Count     : 6705
    1414//
    1515
     
    224224#define UPDOWN( compop, left, right ) (compop == OperKinds::LThan || compop == OperKinds::LEThan ? left : right)
    225225#define MISSING_ANON_FIELD "illegal syntax, missing loop fields with an anonymous loop index is meaningless as loop index is unavailable in loop body."
    226 #define MISSING_LOW "illegal syntax, missing low value for up-to range so index is uninitialized."
    227 #define MISSING_HIGH "illegal syntax, missing high value for down-to range so index is uninitialized."
     226#define MISSING_LOW "illegal syntax, missing low value for ascanding range so index is uninitialized."
     227#define MISSING_HIGH "illegal syntax, missing high value for descending range so index is uninitialized."
    228228
    229229static ForCtrl * makeForCtrl( const CodeLocation & location, DeclarationNode * init, OperKinds compop, ExpressionNode * comp, ExpressionNode * inc ) {
     
    409409%token ANDassign        ERassign        ORassign                                // &=   ^=      |=
    410410
    411 %token ErangeUpEq       ErangeDown      ErangeDownEq                    // ~=   -~      -~=
     411%token ErangeUp         ErangeUpEq      ErangeDown      ErangeDownEq // +~      +~=/~=  -~      -~=
    412412%token ATassign                                                                                 // @=
    413413
     
    15261526                }
    15271527        | comma_expression ';' '@' updowneq '@'                         // CFA, invalid syntax rule
    1528                 { SemanticError( yylloc, "illegal syntax, missing low/high value for up/down-to range so index is uninitialized." ); $$ = nullptr; }
     1528                { SemanticError( yylloc, "illegal syntax, missing low/high value for ascending/descending range so index is uninitialized." ); $$ = nullptr; }
    15291529
    15301530        | comma_expression ';' comma_expression updowneq comma_expression '~' comma_expression // CFA
     
    15551555                }
    15561556        | comma_expression ';' '@' updowneq '@' '~' '@' // CFA
    1557                 { SemanticError( yylloc, "illegal syntax, missing low/high value for up/down-to range so index is uninitialized." ); $$ = nullptr; }
     1557                { SemanticError( yylloc, "illegal syntax, missing low/high value for ascending/descending range so index is uninitialized." ); $$ = nullptr; }
    15581558
    15591559        | declaration comma_expression                                          // CFA
     
    16031603                }
    16041604        | declaration '@' updowneq '@' '~' '@'                          // CFA, invalid syntax rule
    1605                 { SemanticError( yylloc, "illegal syntax, missing low/high value for up/down-to range so index is uninitialized." ); $$ = nullptr; }
     1605                { SemanticError( yylloc, "illegal syntax, missing low/high value for ascending/descending range so index is uninitialized." ); $$ = nullptr; }
    16061606
    16071607        | comma_expression ';' enum_key                                         // CFA, enum type
     
    16321632// it is not possible to just remove the '='. The entire '~=' must be removed.
    16331633downupdowneq:
    1634         ErangeDown
     1634        ErangeUp
     1635                { $$ = OperKinds::LThan; }
     1636        | ErangeDown
    16351637                { $$ = OperKinds::GThan; }
    16361638        | ErangeUpEq
     
    16411643
    16421644updown:
    1643         '~'
     1645        '~'                                                                                                     // shorthand 0 ~ 10 => 0 +~ 10
     1646                { $$ = OperKinds::LThan; }
     1647        | ErangeUp
    16441648                { $$ = OperKinds::LThan; }
    16451649        | ErangeDown
Note: See TracChangeset for help on using the changeset viewer.