Changeset 299bd989 for src


Ignore:
Timestamp:
Jan 10, 2025, 3:40:21 PM (10 days 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.

Location:
src
Files:
3 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;
  • src/Virtual/ExpandCasts.cpp

    rd6c59bce r299bd989  
    55// file "LICENCE" distributed with Cforall.
    66//
    7 // ExpandCasts.cpp --
     7// ExpandCasts.cpp -- Expand virtual casts into lower level code.
    88//
    99// Author           : Andrew Beach
  • src/Virtual/ExpandCasts.hpp

    rd6c59bce r299bd989  
    55// file "LICENCE" distributed with Cforall.
    66//
    7 // ExpandCasts.hpp --
     7// ExpandCasts.hpp -- Expand virtual casts into lower level code.
    88//
    99// Author           : Andrew Beach
    1010// Created On       : Mon Jul 24 13:54:00 2017
    1111// Last Modified By : Andrew Beach
    12 // Last Modified On : Fri Jul 29 14:40:00 2022
    13 // Update Count     : 1
     12// Last Modified On : Fri Jan 10 14:34:00 2025
     13// Update Count     : 2
    1414//
    1515
    1616#pragma once
    1717
    18 #include <list>  // for list
    19 
    20 class Declaration;
    2118namespace ast {
    2219        class TranslationUnit;
     
    2421
    2522namespace Virtual {
    26 void expandCasts( std::list< Declaration * > & translationUnit );
    2723void expandCasts( ast::TranslationUnit & translationUnit );
    2824// Breaks all virtual cast nodes up into translatable nodes.
    2925
    30 // Later this might just set some information so it can happen at CodeGen.
    31 
    3226}
Note: See TracChangeset for help on using the changeset viewer.