Changeset 299bd989 for src/ControlStruct


Ignore:
Timestamp:
Jan 10, 2025, 3:40:21 PM (8 months ago)
Author:
Andrew Beach <ajbeach@…>
Branches:
master
Children:
c44f1f9
Parents:
d6c59bce
Message:

Looking over some virtual cast related code to reduce the forall list of type-ids down to a minimal form. You could repeat this with virtual tables, although that might conflict with some proposed features, using the same pattern.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/ControlStruct/ExceptDecl.cpp

    rd6c59bce r299bd989  
    55// file "LICENCE" distributed with Cforall.
    66//
    7 // ExceptDecl.cpp --
     7// ExceptDecl.cpp -- Translate "exception" and exception related declarations.
    88//
    99// Author           : Andrew Beach
    1010// Created On       : Tue Jul 12 15:50:00 2022
    11 // Last Modified By : Peter A. Buhr
    12 // Last Modified On : Sat Sep  7 12:05:55 2024
    13 // Update Count     : 1
     11// Last Modified By : Andrew Beach
     12// Last Modified On : Fri Jan 10 15:35:55 2024
     13// Update Count     : 2
    1414//
    1515
     
    117117        decl->body = true;
    118118        for ( ast::ptr<ast::TypeDecl> const & param : forallClause ) {
    119                 decl->params.push_back( ast::deepCopy( param ) );
     119                // Create an unsized and assertionless copy of the parameter.
     120                decl->params.push_back( new ast::TypeDecl(
     121                        param->location,
     122                        param->name,
     123                        param->storage,
     124                        param->base ? ast::deepCopy( param->base ) : nullptr,
     125                        ast::TypeDecl::Dtype,
     126                        false,
     127                        nullptr
     128                ) );
    120129        }
    121130        return decl;
Note: See TracChangeset for help on using the changeset viewer.