Ignore:
Timestamp:
Jul 12, 2024, 3:30:06 PM (4 months ago)
Author:
JiadaL <j82liang@…>
Branches:
master
Children:
76b507d
Parents:
9c447e2
Message:
  1. Add bound check to Serial function: now compiler generates the unchecked functions in ImplementEnumFunc?, and enum.hfa implements the bound check on top. Todo: Wrapped the checked version into a trait; 2. countof is now works on any type that implement Countof(). Because Countof() is implemented in enum.hfa for all CfaEnum?, we can call countof on { T | CfaEnum?(T) }
File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/AST/Pass.impl.hpp

    r9c447e2 r0c327ce  
    13391339                        maybe_accept( node, &CountExpr::result );
    13401340                }
    1341                 maybe_accept( node, &CountExpr::type );
     1341                if ( node->type ) {
     1342                        maybe_accept( node, &CountExpr::type );
     1343                } else {
     1344                        maybe_accept( node, &CountExpr::expr );
     1345                }
    13421346        }
    13431347        VISIT_END( Expr, node );
Note: See TracChangeset for help on using the changeset viewer.