Changes in / [5ddb8bf:81da3da4]


Ignore:
Files:
22 added
22 deleted
49 edited

Legend:

Unmodified
Added
Removed
  • .gitignore

    r5ddb8bf r81da3da4  
    3939driver/cfa-cpp
    4040driver/cc1
     41driver/demangler
    4142
    4243libcfa/prelude/bootloader.c
     
    5960src/Parser/parser.h
    6061src/Parser/parser.hh
    61 src/demangler
    6262
    6363tools/prettyprinter/parser.output
  • configure.ac

    r5ddb8bf r81da3da4  
    244244if test "x$enable_demangler" == xyes; then
    245245        LIBDEMANGLE="libdemangle.a"
    246         DEMANGLER="demangler"
     246        DEMANGLER="../driver/demangler"
    247247else
    248248        LIBDEMANGLE=""
     
    273273        libcfa/Makefile:libcfa/Makefile.dist.in
    274274        tests/Makefile
    275         ])
     275])
    276276
    277277# Some of our makefile don't need to be distributed
  • libcfa/src/bits/random.hfa

    r5ddb8bf r81da3da4  
    1010// Created On       : Fri Jan 14 07:18:11 2022
    1111// Last Modified By : Peter A. Buhr
    12 // Last Modified On : Sat Sep  2 18:04:12 2023
    13 // Update Count     : 187
     12// Last Modified On : Tue Dec  5 08:58:52 2023
     13// Update Count     : 190
    1414//
    1515
     
    2222
    2323// Set default PRNG for architecture size.
    24 #if defined( __x86_64__ ) || defined( __arm_64__ )              // 64-bit architecture
     24#if defined( __x86_64__ ) || defined( __aarch64__ )             // 64-bit architecture
    2525        // 64-bit generators
    2626        //#define LEHMER64
     
    112112
    113113// Default PRNG used by runtime.
    114 #if defined( __x86_64__ ) || defined( __arm_64__ )              // 64-bit architecture
     114#if defined( __x86_64__ ) || defined( __aarch64__ )             // 64-bit architecture
    115115#define PRNG_NAME PRNG_NAME_64
    116116#define PRNG_STATE_T PRNG_STATE_64_T
  • src/AST/Chain.hpp

    r5ddb8bf r81da3da4  
    3333        template<typename actual_node_t, typename child_t>
    3434        auto operator()( child_t actual_node_t::*child ) {
    35                 auto n = mutate(base.get());
     35                node_t * n = base.get_and_mutate();
    3636                actual_node_t * node = strict_dynamic_cast<actual_node_t *>(n);
    37                 base = node;
    3837                return _chain_mutator< typename std::remove_reference< decltype(node->*child) >::type >{node->*child};
    3938        }
    4039
    4140        node_t * operator->() {
    42                 auto n = mutate(base.get());
    43                 base = n;
    44                 return n;
     41                return base.get_and_mutate();
    4542        }
    4643};
  • src/AST/Decl.cpp

    r5ddb8bf r81da3da4  
    2121
    2222#include "Common/Eval.h"       // for eval
     23#include "Common/SemanticError.h"
    2324
    2425#include "Fwd.hpp"             // for UniqueId
     
    4142
    4243FunctionDecl::FunctionDecl( const CodeLocation & loc, const std::string & name,
    43         std::vector<ptr<TypeDecl>>&& forall,
    4444        std::vector<ptr<DeclWithType>>&& params, std::vector<ptr<DeclWithType>>&& returns,
    4545        CompoundStmt * stmts, Storage::Classes storage, Linkage::Spec linkage,
    4646        std::vector<ptr<Attribute>>&& attrs, Function::Specs fs, ArgumentFlag isVarArgs )
    47 : DeclWithType( loc, name, storage, linkage, std::move(attrs), fs ),
    48         type_params(std::move(forall)), assertions(),
    49         params(std::move(params)), returns(std::move(returns)), stmts( stmts ) {
    50         FunctionType * ftype = new FunctionType( isVarArgs );
    51         for (auto & param : this->params) {
    52                 ftype->params.emplace_back(param->get_type());
    53         }
    54         for (auto & ret : this->returns) {
    55                 ftype->returns.emplace_back(ret->get_type());
    56         }
    57         for (auto & tp : this->type_params) {
    58                 ftype->forall.emplace_back(new TypeInstType(tp));
    59                 for (auto & ap: tp->assertions) {
    60                         ftype->assertions.emplace_back(new VariableExpr(loc, ap));
    61                 }
    62         }
    63         this->type = ftype;
     47: FunctionDecl( loc, name, {}, {}, std::move(params), std::move(returns),
     48                stmts, storage, linkage, std::move(attrs), fs, isVarArgs ) {
    6449}
    6550
  • src/AST/Decl.hpp

    r5ddb8bf r81da3da4  
    3030#include "Visitor.hpp"
    3131#include "Common/utility.h"
    32 #include "Common/SemanticError.h"                                               // error_str
    3332
    3433// Must be included in *all* AST classes; should be #undef'd at the end of the file
     
    135134        std::vector< ptr<Expr> > withExprs;
    136135
    137         // The difference between the two constructors is in how they handle
    138         // assertions. The first constructor uses the assertions from the type
    139         // parameters, in the style of the old ast, and puts them on the type.
    140         // The second takes an explicite list of assertions and builds a list of
    141         // references to them on the type.
    142 
    143         FunctionDecl( const CodeLocation & loc, const std::string & name, std::vector<ptr<TypeDecl>>&& forall,
     136        /// Monomorphic Function Constructor:
     137        FunctionDecl( const CodeLocation & locaction, const std::string & name,
    144138                std::vector<ptr<DeclWithType>>&& params, std::vector<ptr<DeclWithType>>&& returns,
    145139                CompoundStmt * stmts, Storage::Classes storage = {}, Linkage::Spec linkage = Linkage::Cforall,
    146140                std::vector<ptr<Attribute>>&& attrs = {}, Function::Specs fs = {}, ArgumentFlag isVarArgs = FixedArgs );
    147141
     142        /// Polymorphic Function Constructor:
    148143        FunctionDecl( const CodeLocation & location, const std::string & name,
    149144                std::vector<ptr<TypeDecl>>&& forall, std::vector<ptr<DeclWithType>>&& assertions,
  • src/AST/Expr.cpp

    r5ddb8bf r81da3da4  
    222222}
    223223
    224 MemberExpr::MemberExpr( const CodeLocation & loc, const DeclWithType * mem, const Expr * agg,
    225     MemberExpr::NoOpConstruction overloadSelector )
    226 : Expr( loc ), member( mem ), aggregate( agg ) {
    227         assert( member );
    228         assert( aggregate );
    229         assert( aggregate->result );
    230         (void) overloadSelector;
    231 }
    232 
    233224bool MemberExpr::get_lvalue() const {
    234225        // This is actually wrong by C, but it works with our current set-up.
     
    388379        stmts.emplace_back( new ExprStmt{ loc, tupleExpr } );
    389380        stmtExpr = new StmtExpr{ loc, new CompoundStmt{ loc, std::move(stmts) } };
    390 }
    391 
    392 TupleAssignExpr::TupleAssignExpr(
    393         const CodeLocation & loc, const Type * result, const StmtExpr * s )
    394 : Expr( loc, result ), stmtExpr() {
    395         stmtExpr = s;
    396381}
    397382
  • src/AST/Expr.hpp

    r5ddb8bf r81da3da4  
    3535        template<typename node_t> friend node_t * shallowCopy(const node_t * node);
    3636
    37 
    38 class ConverterOldToNew;
    39 class ConverterNewToOld;
    40 
    4137namespace ast {
    4238
     
    439435        MemberExpr * clone() const override { return new MemberExpr{ *this }; }
    440436        MUTATE_FRIEND
    441 
    442         // Custructor overload meant only for AST conversion
    443         enum NoOpConstruction { NoOpConstructionChosen };
    444         MemberExpr( const CodeLocation & loc, const DeclWithType * mem, const Expr * agg,
    445             NoOpConstruction overloadSelector );
    446         friend class ::ConverterOldToNew;
    447         friend class ::ConverterNewToOld;
    448437};
    449438
     
    458447        ConstantExpr(
    459448                const CodeLocation & loc, const Type * ty, const std::string & r,
    460                         std::optional<unsigned long long> i )
    461         : Expr( loc, ty ), rep( r ), ival( i ), underlyer(ty) {}
     449                        const std::optional<unsigned long long> & i )
     450        : Expr( loc, ty ), rep( r ), ival( i ) {}
    462451
    463452        /// Gets the integer value of this constant, if one is appropriate to its type.
     
    483472
    484473        std::optional<unsigned long long> ival;
    485 
    486         // Intended only for legacy support of roundtripping the old AST.
    487         // Captures the very-locally inferred type, before the resolver modifies the type of this ConstantExpression.
    488         // In the old AST it's constExpr->constant.type
    489         ptr<Type> underlyer;
    490         friend class ::ConverterOldToNew;
    491         friend class ::ConverterNewToOld;
    492474};
    493475
     
    779761        const Expr * accept( Visitor & v ) const override { return v.visit( this ); }
    780762
    781         friend class ::ConverterOldToNew;
    782 
    783763private:
    784764        TupleAssignExpr * clone() const override { return new TupleAssignExpr{ *this }; }
    785     TupleAssignExpr( const CodeLocation & loc, const Type * result, const StmtExpr * s );
    786 
    787765        MUTATE_FRIEND
    788766};
  • src/CodeGen/GenType.cc

    r5ddb8bf r81da3da4  
    2121#include "AST/Print.hpp"          // for print
    2222#include "AST/Vector.hpp"         // for vector
    23 #include "CodeGeneratorNew.hpp"   // for CodeGenerator
     23#include "CodeGenerator.hpp"      // for CodeGenerator
    2424#include "Common/UniqueName.h"    // for UniqueName
    2525
  • src/CodeGen/GenType.h

    r5ddb8bf r81da3da4  
    2020#include "CodeGen/Options.h" // for Options
    2121
    22 class Type;
    2322namespace ast {
    2423        class Type;
     
    2625
    2726namespace CodeGen {
    28         std::string genType( Type *type, const std::string &baseString, const Options &options );
    29         std::string genType( Type *type, const std::string &baseString, bool pretty = false, bool genC = false, bool lineMarks = false );
    30         std::string genPrettyType( Type * type, const std::string & baseString );
    3127
    3228std::string genType( ast::Type const * type, const std::string & base, const Options & options );
  • src/CodeGen/Generate.cc

    r5ddb8bf r81da3da4  
    1919#include <string>                    // for operator<<
    2020
    21 #include "CodeGeneratorNew.hpp"      // for CodeGenerator, doSemicolon, ...
     21#include "CodeGenerator.hpp"         // for CodeGenerator, doSemicolon, ...
    2222#include "GenType.h"                 // for genPrettyType
    2323
  • src/CodeGen/module.mk

    r5ddb8bf r81da3da4  
    1616
    1717SRC_CODEGEN = \
    18         CodeGen/CodeGeneratorNew.cpp \
    19         CodeGen/CodeGeneratorNew.hpp \
     18        CodeGen/CodeGenerator.cpp \
     19        CodeGen/CodeGenerator.hpp \
    2020        CodeGen/GenType.cc \
    2121        CodeGen/GenType.h \
  • src/Common/Assert.cc

    r5ddb8bf r81da3da4  
    1010// Created On       : Thu Aug 18 13:26:59 2016
    1111// Last Modified By : Peter A. Buhr
    12 // Last Modified On : Fri Aug 19 17:07:08 2016
    13 // Update Count     : 10
     12// Last Modified On : Mon Nov 20 22:57:18 2023
     13// Update Count     : 11
    1414//
    1515
     
    3939}
    4040
    41 void abort(const char *fmt, ... ) noexcept __attribute__((noreturn, format(printf, 1, 2)));
    42 void abort(const char *fmt, ... ) noexcept {
     41void abort(const char *fmt, ... ) noexcept __attribute__((noreturn, format(printf, 1, 2)));
     42void abort(const char *fmt, ... ) noexcept {
    4343        va_list args;
    4444        va_start( args, fmt );
  • src/Concurrency/Actors.cpp

    r5ddb8bf r81da3da4  
    265265                decl->location,
    266266                "__CFA_receive_wrap",
    267                 {},                     // forall
    268267                {
    269268                    new ObjectDecl(
     
    288287                    )
    289288                },                      // params
    290                 { 
     289                {
    291290                    new ObjectDecl(
    292291                        decl->location,
     
    400399                                )
    401400                        ));
    402            
     401
    403402            // Generates: return receiver;
    404403            sendBody->push_back( new ReturnStmt( decl->location, new NameExpr( decl->location, "receiver" ) ) );
     
    408407                decl->location,
    409408                "?|?",
    410                 {},                     // forall
    411409                {
    412410                    new ObjectDecl(
     
    421419                    )
    422420                },                      // params
    423                 { 
     421                {
    424422                    new ObjectDecl(
    425423                        decl->location,
     
    434432                { Function::Inline }
    435433            );
    436            
     434
    437435            // forward decls to resolve use before decl problem for '|' routines
    438436            forwardDecls.insertDecl( *actorIter, *messageIter , ast::deepCopy( sendOperatorFunction ) );
  • src/Concurrency/Corun.cpp

    r5ddb8bf r81da3da4  
    113113            new FunctionDecl( loc,
    114114                fnName,                                             // name
    115                 {},                                                 // forall
    116115                {
    117116                    new ObjectDecl( loc,
     
    261260            new FunctionDecl( loc,
    262261                fnName,                                             // name
    263                 {},                                                 // forall
    264262                {},                                                 // params
    265263                {},                                                 // return
  • src/Concurrency/Waituntil.cpp

    r5ddb8bf r81da3da4  
    553553    return new FunctionDecl( loc,
    554554        predName,
    555         {},                     // forall
    556555        {
    557556            new ObjectDecl( loc,
     
    560559            )
    561560        },
    562         { 
     561        {
    563562            new ObjectDecl( loc,
    564563                "sat_ret",
  • src/Concurrency/module.mk

    r5ddb8bf r81da3da4  
    2020        Concurrency/Corun.cpp \
    2121        Concurrency/Corun.hpp \
    22         Concurrency/KeywordsNew.cpp \
     22        Concurrency/Keywords.cpp \
    2323        Concurrency/Keywords.h \
    24         Concurrency/WaitforNew.cpp \
     24        Concurrency/Waitfor.cpp \
    2525        Concurrency/Waitfor.h \
    2626        Concurrency/Waituntil.cpp \
  • src/ControlStruct/ExceptDecl.h

    r5ddb8bf r81da3da4  
    1616#pragma once
    1717
    18 #include <list>  // for list
    19 
    20 class Declaration;
    21 
    2218namespace ast {
    2319        class TranslationUnit;
     
    2521
    2622namespace ControlStruct {
     23
    2724/// Unfold exception declarations into raw structure declarations.
    2825/// Also builds vtable declarations and converts vtable types.
    29 void translateExcept( std::list< Declaration *> & translationUnit );
    3026void translateExcept( ast::TranslationUnit & translationUnit );
     27
    3128}
  • src/ControlStruct/ExceptTranslate.h

    r5ddb8bf r81da3da4  
    1616#pragma once
    1717
    18 #include <list>  // for list
    19 
    20 class Declaration;
    2118namespace ast {
    2219        class TranslationUnit;
     
    2421
    2522namespace ControlStruct {
    26         void translateThrows( std::list< Declaration *> & translationUnit );
    27         void translateThrows( ast::TranslationUnit & transUnit );
    28         /* Replaces all throw & throwResume statements with function calls.
    29          * These still need to be resolved, so call this before the reslover.
    30          */
    3123
    32         void translateTries( std::list< Declaration *> & translationUnit );
    33         void translateTries( ast::TranslationUnit & transUnit );
    34         /* Replaces all try blocks (and their many clauses) with function definitions and calls.
    35          * This uses the exception built-ins to produce typed output and should take place after
    36          * the resolver. It also produces virtual casts and should happen before they are expanded.
    37          */
     24void translateThrows( ast::TranslationUnit & transUnit );
     25/* Replaces all throw & throwResume statements with function calls.
     26 * These still need to be resolved, so call this before the reslover.
     27 */
     28
     29void translateTries( ast::TranslationUnit & transUnit );
     30/* Replaces all try blocks (and their many clauses) with function definitions and calls.
     31 * This uses the exception built-ins to produce typed output and should take place after
     32 * the resolver. It also produces virtual casts and should happen before they are expanded.
     33 */
     34
    3835}
    3936
  • src/ControlStruct/MultiLevelExit.cpp

    r5ddb8bf r81da3da4  
    1616#include "MultiLevelExit.hpp"
    1717
     18#include <set>
     19
    1820#include "AST/Pass.hpp"
    1921#include "AST/Stmt.hpp"
    20 #include "LabelGeneratorNew.hpp"
    21 
    22 #include <set>
     22#include "LabelGenerator.hpp"
     23
    2324using namespace std;
    2425using namespace ast;
  • src/ControlStruct/module.mk

    r5ddb8bf r81da3da4  
    1616
    1717SRC += \
    18         ControlStruct/ExceptDeclNew.cpp \
     18        ControlStruct/ExceptDecl.cpp \
    1919        ControlStruct/ExceptDecl.h \
    20         ControlStruct/ExceptTranslateNew.cpp \
     20        ControlStruct/ExceptTranslate.cpp \
    2121        ControlStruct/ExceptTranslate.h \
    2222        ControlStruct/FixLabels.cpp \
     
    2424        ControlStruct/HoistControlDecls.cpp \
    2525        ControlStruct/HoistControlDecls.hpp \
    26         ControlStruct/LabelGeneratorNew.cpp \
    27         ControlStruct/LabelGeneratorNew.hpp \
     26        ControlStruct/LabelGenerator.cpp \
     27        ControlStruct/LabelGenerator.hpp \
    2828        ControlStruct/MultiLevelExit.cpp \
    2929        ControlStruct/MultiLevelExit.hpp
  • src/GenPoly/FindFunction.cc

    r5ddb8bf r81da3da4  
    2222#include "GenPoly/ErasableScopedMap.h"  // for ErasableScopedMap<>::iterator
    2323#include "GenPoly/GenPoly.h"            // for TyVarMap
    24 #include "ScrubTyVars.h"                // for ScrubTyVars
     24#include "ScrubTypeVars.hpp"            // for scrubTypeVars
    2525
    2626namespace GenPoly {
  • src/GenPoly/module.mk

    r5ddb8bf r81da3da4  
    2222
    2323SRC += $(SRC_GENPOLY) \
    24         GenPoly/BoxNew.cpp \
     24        GenPoly/Box.cpp \
    2525        GenPoly/Box.h \
    2626        GenPoly/ErasableScopedMap.h \
    2727        GenPoly/FindFunction.cc \
    2828        GenPoly/FindFunction.h \
    29         GenPoly/InstantiateGenericNew.cpp \
     29        GenPoly/InstantiateGeneric.cpp \
    3030        GenPoly/InstantiateGeneric.h \
    31         GenPoly/LvalueNew.cpp \
     31        GenPoly/Lvalue.cpp \
    3232        GenPoly/ScopedSet.h \
    33         GenPoly/ScrubTyVars.cc \
    34         GenPoly/ScrubTyVars.h \
    35         GenPoly/SpecializeNew.cpp \
     33        GenPoly/ScrubTypeVars.cpp \
     34        GenPoly/ScrubTypeVars.hpp \
     35        GenPoly/Specialize.cpp \
    3636        GenPoly/Specialize.h
    3737
  • src/InitTweak/FixGlobalInit.cc

    r5ddb8bf r81da3da4  
    8484                if (inLibrary) ctorParams.emplace_back(ast::ConstantExpr::from_int(location, 200));
    8585                auto initFunction = new ast::FunctionDecl(location,
    86                         "__global_init__", {}, {}, {},
     86                        "__global_init__", {}, {}, {}, {},
    8787                        new ast::CompoundStmt(location, std::move(fixer.core.initStmts)),
    8888                        ast::Storage::Static, ast::Linkage::C,
     
    9696                if (inLibrary) dtorParams.emplace_back(ast::ConstantExpr::from_int(location, 200));
    9797                auto destroyFunction = new ast::FunctionDecl( location,
    98                         "__global_destroy__", {}, {}, {},
     98                        "__global_destroy__", {}, {}, {}, {},
    9999                        new ast::CompoundStmt(location, std::move(fixer.core.destroyStmts)),
    100100                        ast::Storage::Static, ast::Linkage::C,
  • src/InitTweak/InitTweak.cc

    r5ddb8bf r81da3da4  
    342342        if (!assign) {
    343343                auto td = new ast::TypeDecl(CodeLocation(), "T", {}, nullptr, ast::TypeDecl::Dtype, true);
    344                 assign = new ast::FunctionDecl(CodeLocation(), "?=?", {td},
     344                assign = new ast::FunctionDecl(CodeLocation(), "?=?", {td}, {},
    345345                { new ast::ObjectDecl(CodeLocation(), "_dst", new ast::ReferenceType(new ast::TypeInstType("T", td))),
    346346                  new ast::ObjectDecl(CodeLocation(), "_src", new ast::TypeInstType("T", td))},
  • src/InitTweak/module.mk

    r5ddb8bf r81da3da4  
    2424        InitTweak/FixGlobalInit.cc \
    2525        InitTweak/FixGlobalInit.h \
    26         InitTweak/FixInit.h \
    27         InitTweak/FixInitNew.cpp
     26        InitTweak/FixInit.cpp \
     27        InitTweak/FixInit.h
    2828
    2929SRCDEMANGLE += $(SRC_INITTWEAK)
  • src/Makefile.am

    r5ddb8bf r81da3da4  
    2222        CompilationState.cc \
    2323        CompilationState.h \
    24         MakeLibCfaNew.cpp \
     24        MakeLibCfa.cpp \
    2525        MakeLibCfa.h
    2626
     
    7272
    7373cfa_cpplib_PROGRAMS += $(DEMANGLER)
    74 EXTRA_PROGRAMS = demangler
    75 demangler_SOURCES = SymTab/demangler.cc # test driver for the demangler, also useful as a sanity check that libdemangle.a is complete
    76 demangler_LDADD = libdemangle.a -ldl                    # yywrap
     74EXTRA_PROGRAMS = ../driver/demangler
     75___driver_demangler_SOURCES = SymTab/demangler.cc # test driver for the demangler, also useful as a sanity check that libdemangle.a is complete
     76___driver_demangler_LDADD = libdemangle.a -ldl                  # yywrap
    7777noinst_LIBRARIES = $(LIBDEMANGLE)
    7878EXTRA_LIBRARIES = libdemangle.a
  • src/Parser/ParseNode.h

    r5ddb8bf r81da3da4  
    3333#include "Parser/parserutility.h"  // for maybeBuild, maybeCopy
    3434
    35 class Attribute;
    36 class Declaration;
    3735struct DeclarationNode;
    38 class DeclarationWithType;
    39 class Initializer;
    4036class InitializerNode;
    4137class ExpressionNode;
  • src/Parser/TypeData.h

    r5ddb8bf r81da3da4  
    133133        ast::Init * init = nullptr, std::vector<ast::ptr<ast::Attribute>> && attributes = std::vector<ast::ptr<ast::Attribute>>() );
    134134ast::FunctionType * buildFunctionType( const TypeData * );
    135 ast::Decl * addEnumBase( Declaration *, const TypeData * );
    136135void buildKRFunction( const TypeData::Function_t & function );
    137136
  • src/ResolvExpr/CandidateFinder.cpp

    r5ddb8bf r81da3da4  
    105105
    106106                        // CandidateFinder finder{ symtab, env };
    107                         // finder.find( arg, ResolvMode::withAdjustment() );
     107                        // finder.find( arg, ResolveMode::withAdjustment() );
    108108                        // assertf( finder.candidates.size() > 0,
    109109                        //      "Somehow castable expression failed to find alternatives." );
     
    974974                // xxx - is it possible that handleTupleAssignment and main finder both produce candidates?
    975975                // this means there exists ctor/assign functions with a tuple as first parameter.
    976                 ResolvMode mode = {
     976                ResolveMode mode = {
    977977                        true, // adjust
    978978                        !untypedExpr->func.as<ast::NameExpr>(), // prune if not calling by name
     
    989989                CandidateFinder opFinder( context, tenv );
    990990                // okay if there aren't any function operations
    991                 opFinder.find( opExpr, ResolvMode::withoutFailFast() );
     991                opFinder.find( opExpr, ResolveMode::withoutFailFast() );
    992992                PRINT(
    993993                        std::cerr << "known function ops:" << std::endl;
     
    11751175                if ( castExpr->kind == ast::CastExpr::Return ) {
    11761176                        finder.strictMode = true;
    1177                         finder.find( castExpr->arg, ResolvMode::withAdjustment() );
     1177                        finder.find( castExpr->arg, ResolveMode::withAdjustment() );
    11781178
    11791179                        // return casts are eliminated (merely selecting an overload, no actual operation)
    11801180                        candidates = std::move(finder.candidates);
    11811181                }
    1182                 finder.find( castExpr->arg, ResolvMode::withAdjustment() );
     1182                finder.find( castExpr->arg, ResolveMode::withAdjustment() );
    11831183
    11841184                if ( !finder.candidates.empty() ) reason.code = NoMatch;
     
    12511251                CandidateFinder finder( context, tenv );
    12521252                // don't prune here, all alternatives guaranteed to have same type
    1253                 finder.find( castExpr->arg, ResolvMode::withoutPrune() );
     1253                finder.find( castExpr->arg, ResolveMode::withoutPrune() );
    12541254                for ( CandidateRef & r : finder.candidates ) {
    12551255                        addCandidate(
     
    12981298
    12991299                        // don't prune here, since it's guaranteed all alternatives will have the same type
    1300                         finder.find( tech1.get(), ResolvMode::withoutPrune() );
     1300                        finder.find( tech1.get(), ResolveMode::withoutPrune() );
    13011301                        pick_alternatives(finder.candidates, false);
    13021302
     
    13071307                std::unique_ptr<const ast::Expr> fallback { ast::UntypedExpr::createDeref(loc,  new ast::UntypedExpr(loc, new ast::NameExpr(loc, castExpr->concrete_target.getter), { castExpr->arg })) };
    13081308                // don't prune here, since it's guaranteed all alternatives will have the same type
    1309                 finder.find( fallback.get(), ResolvMode::withoutPrune() );
     1309                finder.find( fallback.get(), ResolveMode::withoutPrune() );
    13101310
    13111311                pick_alternatives(finder.candidates, true);
     
    13161316        void Finder::postvisit( const ast::UntypedMemberExpr * memberExpr ) {
    13171317                CandidateFinder aggFinder( context, tenv );
    1318                 aggFinder.find( memberExpr->aggregate, ResolvMode::withAdjustment() );
     1318                aggFinder.find( memberExpr->aggregate, ResolveMode::withAdjustment() );
    13191319                for ( CandidateRef & agg : aggFinder.candidates ) {
    13201320                        // it's okay for the aggregate expression to have reference type -- cast it to the
     
    14751475        void Finder::postvisit( const ast::LogicalExpr * logicalExpr ) {
    14761476                CandidateFinder finder1( context, tenv );
    1477                 finder1.find( logicalExpr->arg1, ResolvMode::withAdjustment() );
     1477                finder1.find( logicalExpr->arg1, ResolveMode::withAdjustment() );
    14781478                if ( finder1.candidates.empty() ) return;
    14791479
    14801480                CandidateFinder finder2( context, tenv );
    1481                 finder2.find( logicalExpr->arg2, ResolvMode::withAdjustment() );
     1481                finder2.find( logicalExpr->arg2, ResolveMode::withAdjustment() );
    14821482                if ( finder2.candidates.empty() ) return;
    14831483
     
    15051505                // candidates for condition
    15061506                CandidateFinder finder1( context, tenv );
    1507                 finder1.find( conditionalExpr->arg1, ResolvMode::withAdjustment() );
     1507                finder1.find( conditionalExpr->arg1, ResolveMode::withAdjustment() );
    15081508                if ( finder1.candidates.empty() ) return;
    15091509
     
    15111511                CandidateFinder finder2( context, tenv );
    15121512                finder2.allowVoid = true;
    1513                 finder2.find( conditionalExpr->arg2, ResolvMode::withAdjustment() );
     1513                finder2.find( conditionalExpr->arg2, ResolveMode::withAdjustment() );
    15141514                if ( finder2.candidates.empty() ) return;
    15151515
     
    15171517                CandidateFinder finder3( context, tenv );
    15181518                finder3.allowVoid = true;
    1519                 finder3.find( conditionalExpr->arg3, ResolvMode::withAdjustment() );
     1519                finder3.find( conditionalExpr->arg3, ResolveMode::withAdjustment() );
    15201520                if ( finder3.candidates.empty() ) return;
    15211521
     
    15701570
    15711571                CandidateFinder finder2( context, env );
    1572                 finder2.find( commaExpr->arg2, ResolvMode::withAdjustment() );
     1572                finder2.find( commaExpr->arg2, ResolveMode::withAdjustment() );
    15731573
    15741574                for ( const CandidateRef & r2 : finder2.candidates ) {
     
    15841584                CandidateFinder finder( context, tenv );
    15851585                finder.allowVoid = true;
    1586                 finder.find( ctorExpr->callExpr, ResolvMode::withoutPrune() );
     1586                finder.find( ctorExpr->callExpr, ResolveMode::withoutPrune() );
    15871587                for ( CandidateRef & r : finder.candidates ) {
    15881588                        addCandidate( *r, new ast::ConstructorExpr{ ctorExpr->location, r->expr } );
     
    15931593                // resolve low and high, accept candidates where low and high types unify
    15941594                CandidateFinder finder1( context, tenv );
    1595                 finder1.find( rangeExpr->low, ResolvMode::withAdjustment() );
     1595                finder1.find( rangeExpr->low, ResolveMode::withAdjustment() );
    15961596                if ( finder1.candidates.empty() ) return;
    15971597
    15981598                CandidateFinder finder2( context, tenv );
    1599                 finder2.find( rangeExpr->high, ResolvMode::withAdjustment() );
     1599                finder2.find( rangeExpr->high, ResolveMode::withAdjustment() );
    16001600                if ( finder2.candidates.empty() ) return;
    16011601
     
    16731673        void Finder::postvisit( const ast::UniqueExpr * unqExpr ) {
    16741674                CandidateFinder finder( context, tenv );
    1675                 finder.find( unqExpr->expr, ResolvMode::withAdjustment() );
     1675                finder.find( unqExpr->expr, ResolveMode::withAdjustment() );
    16761676                for ( CandidateRef & r : finder.candidates ) {
    16771677                        // ensure that the the id is passed on so that the expressions are "linked"
     
    16991699                        // only open for the duration of resolving the UntypedExpr.
    17001700                        CandidateFinder finder( context, tenv, toType );
    1701                         finder.find( initExpr->expr, ResolvMode::withAdjustment() );
     1701                        finder.find( initExpr->expr, ResolveMode::withAdjustment() );
    17021702
    17031703                        Cost minExprCost = Cost::infinity;
     
    18891889}
    18901890
    1891 void CandidateFinder::find( const ast::Expr * expr, ResolvMode mode ) {
     1891void CandidateFinder::find( const ast::Expr * expr, ResolveMode mode ) {
    18921892        // Find alternatives for expression
    18931893        ast::Pass<Finder> finder{ *this };
     
    20042004        for ( const auto & x : xs ) {
    20052005                out.emplace_back( context, env );
    2006                 out.back().find( x, ResolvMode::withAdjustment() );
     2006                out.back().find( x, ResolveMode::withAdjustment() );
    20072007
    20082008                PRINT(
  • src/ResolvExpr/CandidateFinder.hpp

    r5ddb8bf r81da3da4  
    1717
    1818#include "Candidate.hpp"
    19 #include "ResolvMode.h"
     19#include "ResolveMode.hpp"
    2020#include "AST/Fwd.hpp"
    2121#include "AST/Node.hpp"
     
    4343
    4444        /// Fill candidates with feasible resolutions for `expr`
    45         void find( const ast::Expr * expr, ResolvMode mode = {} );
     45        void find( const ast::Expr * expr, ResolveMode mode = {} );
    4646        bool pruneCandidates( CandidateList & candidates, CandidateList & out, std::vector<std::string> & errors );
    4747
  • src/ResolvExpr/CandidatePrinter.cpp

    r5ddb8bf r81da3da4  
    1616#include "CandidatePrinter.hpp"
    1717
     18#include <iostream>
     19
    1820#include "AST/Expr.hpp"
    1921#include "AST/Pass.hpp"
     
    2325#include "ResolvExpr/CandidateFinder.hpp"
    2426#include "ResolvExpr/Resolver.h"
    25 
    26 #include <iostream>
    2727
    2828namespace ResolvExpr {
     
    3939                ast::TypeEnvironment env;
    4040                CandidateFinder finder( { symtab, transUnit().global }, env );
    41                 finder.find( stmt->expr, ResolvMode::withAdjustment() );
     41                finder.find( stmt->expr, ResolveMode::withAdjustment() );
    4242                int count = 1;
    4343                os << "There are " << finder.candidates.size() << " candidates\n";
  • src/ResolvExpr/CurrentObject.cc

    r5ddb8bf r81da3da4  
    498498                PRINT( std::cerr << "____untyped: " << expr << std::endl; )
    499499                auto dit = desigAlts.begin();
     500                auto nexpr = dynamic_cast< const NameExpr * >( expr );
    500501
    501502                for ( const Type * t : curTypes ) {
    502503                        assert( dit != desigAlts.end() );
    503504                        DesignatorChain & d = *dit;
    504                         if ( auto nexpr = dynamic_cast< const NameExpr *>( expr ) ) {
     505                        // Name Designation:
     506                        if ( nexpr ) {
    505507                                PRINT( std::cerr << "____actual: " << t << std::endl; )
    506508                                if ( auto refType = dynamic_cast< const BaseInstType * >( t ) ) {
     
    515517                                                }
    516518                                        }
    517                                 } else if ( auto at = dynamic_cast< const ArrayType * >( t ) ) {
    518                                         auto nexpr = dynamic_cast< const NameExpr *>( expr );
    519                                         for ( const Decl * mem : refType->lookup( nexpr->name ) ) {
    520                                                 if ( auto field = dynamic_cast< const ObjectDecl * >( mem ) ) {
    521                                                         DesignatorChain d2 = d;
    522                                                         d2.emplace_back( new VariableExpr{ expr->location, field } );
    523                                                         newDesigAlts.emplace_back( std::move( d2 ) );
    524                                                         newTypes.emplace_back( at->base );
    525                                                 }
    526                                         }
    527519                                }
    528520
    529521                                ++dit;
     522                        // Index Designation:
    530523                        } else {
    531524                                if ( auto at = dynamic_cast< const ArrayType * >( t ) ) {
  • src/ResolvExpr/Resolver.cc

    r5ddb8bf r81da3da4  
    2525#include "Resolver.h"
    2626#include "ResolveTypeof.h"
    27 #include "ResolvMode.h"                  // for ResolvMode
     27#include "ResolveMode.hpp"               // for ResolveMode
    2828#include "typeops.h"                     // for extractResultType
    2929#include "Unify.h"                       // for unify
    3030#include "CompilationState.h"
    31 #include "AST/Chain.hpp"
    3231#include "AST/Decl.hpp"
    3332#include "AST/Init.hpp"
     
    104103                                                                }
    105104                                                        }
    106                                                 } 
    107                                         } 
     105                                                }
     106                                        }
    108107                                        visit_children = false;
    109108                                }
     
    123122                CandidateRef findUnfinishedKindExpression(
    124123                        const ast::Expr * untyped, const ResolveContext & context, const std::string & kind,
    125                         std::function<bool(const Candidate &)> pred = anyCandidate, ResolvMode mode = {}
     124                        std::function<bool(const Candidate &)> pred = anyCandidate, ResolveMode mode = {}
    126125                ) {
    127126                        if ( ! untyped ) return nullptr;
     
    263262                ast::ptr< ast::CastExpr > untyped = new ast::CastExpr{ expr };
    264263                CandidateRef choice = findUnfinishedKindExpression(
    265                         untyped, context, "", anyCandidate, ResolvMode::withAdjustment() );
     264                        untyped, context, "", anyCandidate, ResolveMode::withAdjustment() );
    266265
    267266                // a cast expression has either 0 or 1 interpretations (by language rules);
     
    292291                        const ast::Expr * untyped, const ResolveContext & context,
    293292                        std::function<bool(const Candidate &)> pred = anyCandidate,
    294                         const std::string & kind = "", ResolvMode mode = {}
     293                        const std::string & kind = "", ResolveMode mode = {}
    295294                ) {
    296295                        if ( ! untyped ) return {};
     
    607606                                ( objectDecl->get_type() )->base->base ) {
    608607                                objectDecl = fixObjectType( objectDecl, context );
    609                                 currentObject = ast::CurrentObject{ 
    610                                         objectDecl->location, 
     608                                currentObject = ast::CurrentObject{
     609                                        objectDecl->location,
    611610                                        enumBase
    612611                                };
     
    860859
    861860                        // Find all candidates for a function in canonical form
    862                         funcFinder.find( clause.target, ResolvMode::withAdjustment() );
     861                        funcFinder.find( clause.target, ResolveMode::withAdjustment() );
    863862
    864863                        if ( funcFinder.candidates.empty() ) {
  • src/ResolvExpr/module.mk

    r5ddb8bf r81da3da4  
    4747      ResolvExpr/ResolveTypeof.cc \
    4848      ResolvExpr/ResolveTypeof.h \
    49       ResolvExpr/ResolvMode.h \
     49      ResolvExpr/ResolveMode.hpp \
    5050      ResolvExpr/SatisfyAssertions.cpp \
    5151      ResolvExpr/SatisfyAssertions.hpp \
  • src/Tuples/TupleAssignment.cc

    r5ddb8bf r81da3da4  
    1313// Update Count     : 10
    1414//
     15
     16#include "Tuples.h"
    1517
    1618#include <algorithm>                       // for transform
     
    224226                                // by the cast type as needed, and transfer the resulting environment.
    225227                                ResolvExpr::CandidateFinder finder( spotter.crntFinder.context, env );
    226                                 finder.find( rhsCand->expr, ResolvExpr::ResolvMode::withAdjustment() );
     228                                finder.find( rhsCand->expr, ResolvExpr::ResolveMode::withAdjustment() );
    227229                                assert( 1 == finder.candidates.size() );
    228230                                env = std::move( finder.candidates.front()->env );
     
    345347
    346348                        try {
    347                                 finder.find( expr, ResolvExpr::ResolvMode::withAdjustment() );
     349                                finder.find( expr, ResolvExpr::ResolveMode::withAdjustment() );
    348350                        } catch (...) {
    349351                                // No match is not failure, just that this tuple assignment is invalid.
  • src/Tuples/module.mk

    r5ddb8bf r81da3da4  
    1919        Tuples/Explode.h \
    2020        Tuples/TupleAssignment.cc \
    21         Tuples/TupleExpansion.cc \
    22         Tuples/TupleExpansionNew.cpp \
     21        Tuples/TupleExpansion.cpp \
    2322        Tuples/Tuples.cc \
    2423        Tuples/Tuples.h
  • src/Validate/FixReturnTypes.cpp

    r5ddb8bf r81da3da4  
    1919#include "AST/Pass.hpp"
    2020#include "AST/Type.hpp"
    21 #include "CodeGen/CodeGeneratorNew.hpp"
     21#include "CodeGen/CodeGenerator.hpp"
    2222#include "ResolvExpr/Unify.h"
    23 
    24 namespace ast {
    25     class TranslationUnit;
    26 }
    2723
    2824namespace Validate {
  • src/Validate/module.mk

    r5ddb8bf r81da3da4  
    2727        Validate/EnumAndPointerDecay.cpp \
    2828        Validate/EnumAndPointerDecay.hpp \
    29         Validate/FindSpecialDeclsNew.cpp \
     29        Validate/FindSpecialDecls.cpp \
    3030        Validate/FixQualifiedTypes.cpp \
    3131        Validate/FixQualifiedTypes.hpp \
     
    4444        Validate/LabelAddressFixer.cpp \
    4545        Validate/LabelAddressFixer.hpp \
    46         Validate/LinkReferenceToTypes.cpp \
    47         Validate/LinkReferenceToTypes.hpp \
     46        Validate/LinkInstanceTypes.cpp \
     47        Validate/LinkInstanceTypes.hpp \
    4848        Validate/NoIdSymbolTable.hpp \
    4949        Validate/ReplaceTypedef.cpp \
  • src/Virtual/Tables.cc

    r5ddb8bf r81da3da4  
    165165                location,
    166166                functionName,
    167                 { /* forall */ },
    168167                { new ast::ObjectDecl(
    169168                        location,
  • src/Virtual/VirtualDtor.cpp

    r5ddb8bf r81da3da4  
    248248            decl->location,
    249249            "__CFA_set_dtor",
    250             {},                     // forall
    251250            {
    252251                new ObjectDecl(
     
    320319            decl->location,
    321320            "delete",
    322             {},                     // forall
    323321            {
    324322                new ObjectDecl(
  • src/include/cassert

    r5ddb8bf r81da3da4  
    99// Author           : Peter A. Buhr
    1010// Created On       : Thu Aug 18 13:19:26 2016
    11 // Last Modified By : Andrew Beach
    12 // Last Modified On : Mon Jun  3 13:11:00 2017
    13 // Update Count     : 18
     11// Last Modified By : Peter A. Buhr
     12// Last Modified On : Mon Nov 20 23:12:34 2023
     13// Update Count     : 19
    1414//
    1515
     
    5353}
    5454
    55 extern void abort(const char *fmt, ...  ) noexcept __attribute__((noreturn, format(printf, 1, 2)));
     55extern void abort(const char *fmt, ... ) noexcept __attribute__((noreturn, format(printf, 1, 2)));
    5656// Local Variables: //
    5757// tab-width: 4 //
  • src/main.cc

    r5ddb8bf r81da3da4  
    7878#include "Validate/InitializerLength.hpp"   // for setLengthFromInitializer
    7979#include "Validate/LabelAddressFixer.hpp"   // for fixLabelAddresses
    80 #include "Validate/LinkReferenceToTypes.hpp" // for linkReferenceToTypes
     80#include "Validate/LinkInstanceTypes.hpp"   // for linkInstanceTypes
    8181#include "Validate/ReplaceTypedef.hpp"      // for replaceTypedef
    8282#include "Validate/ReturnCheck.hpp"         // for checkReturnStatements
    8383#include "Validate/VerifyCtorDtorAssign.hpp" // for verifyCtorDtorAssign
    8484#include "Virtual/ExpandCasts.h"            // for expandCasts
    85 #include "Virtual/VirtualDtor.hpp"           // for implementVirtDtors
     85#include "Virtual/VirtualDtor.hpp"          // for implementVirtDtors
    8686
    8787using namespace std;
     
    318318                PASS( "Enum and Pointer Decay", Validate::decayEnumsAndPointers, transUnit );
    319319
    320                 PASS( "Link Reference To Types", Validate::linkReferenceToTypes, transUnit );
     320                PASS( "Link Instance Types", Validate::linkInstanceTypes, transUnit );
    321321
    322322                PASS( "Forall Pointer Decay", Validate::decayForallPointers, transUnit );
  • tests/.expect/PRNG.x64.txt

    r5ddb8bf r81da3da4  
    2626
    2727Sequential
    28 trials 100000000 buckets 100000 min 875 max 1146 avg 1000.0 std 31.6 rstd 3.2%
     28trials 10000000 buckets 100000 min 59 max 145 avg 100.0 std 10.0 rstd 10.0%
    2929
    3030Concurrent
    31 trials 100000000 buckets 100000 min 875 max 1146 avg 1000.0 std 31.6 rstd 3.2%
    32 trials 100000000 buckets 100000 min 875 max 1146 avg 1000.0 std 31.6 rstd 3.2%
    33 trials 100000000 buckets 100000 min 875 max 1146 avg 1000.0 std 31.6 rstd 3.2%
    34 trials 100000000 buckets 100000 min 875 max 1146 avg 1000.0 std 31.6 rstd 3.2%
     31trials 10000000 buckets 100000 min 59 max 145 avg 100.0 std 10.0 rstd 10.0%
     32trials 10000000 buckets 100000 min 59 max 145 avg 100.0 std 10.0 rstd 10.0%
     33trials 10000000 buckets 100000 min 59 max 145 avg 100.0 std 10.0 rstd 10.0%
     34trials 10000000 buckets 100000 min 59 max 145 avg 100.0 std 10.0 rstd 10.0%
    3535
    3636                    prng()     prng(5)   prng(0,5)
     
    5858
    5959Sequential
    60 trials 20000000 buckets 100000 min 139 max 265 avg 200.0 std 14.1 rstd 7.0%
     60trials 2000000 buckets 100000 min 4 max 46 avg 20.0 std 4.5 rstd 22.3%
    6161
    6262Concurrent
    63 trials 20000000 buckets 100000 min 139 max 265 avg 200.0 std 14.1 rstd 7.0%
    64 trials 20000000 buckets 100000 min 139 max 265 avg 200.0 std 14.1 rstd 7.0%
    65 trials 20000000 buckets 100000 min 139 max 265 avg 200.0 std 14.1 rstd 7.0%
    66 trials 20000000 buckets 100000 min 139 max 265 avg 200.0 std 14.1 rstd 7.0%
     63trials 2000000 buckets 100000 min 4 max 46 avg 20.0 std 4.5 rstd 22.3%
     64trials 2000000 buckets 100000 min 4 max 46 avg 20.0 std 4.5 rstd 22.3%
     65trials 2000000 buckets 100000 min 4 max 46 avg 20.0 std 4.5 rstd 22.3%
     66trials 2000000 buckets 100000 min 4 max 46 avg 20.0 std 4.5 rstd 22.3%
    6767
    6868                   prng(t)   prng(t,5) prng(t,0,5)
     
    9090
    9191Sequential
    92 trials 100000000 buckets 100000 min 875 max 1146 avg 1000.0 std 31.6 rstd 3.2%
     92trials 10000000 buckets 100000 min 59 max 145 avg 100.0 std 10.0 rstd 10.0%
    9393
    9494Concurrent
    95 trials 100000000 buckets 100000 min 875 max 1146 avg 1000.0 std 31.6 rstd 3.2%
    96 trials 100000000 buckets 100000 min 875 max 1146 avg 1000.0 std 31.6 rstd 3.2%
    97 trials 100000000 buckets 100000 min 875 max 1146 avg 1000.0 std 31.6 rstd 3.2%
    98 trials 100000000 buckets 100000 min 875 max 1146 avg 1000.0 std 31.6 rstd 3.2%
     95trials 10000000 buckets 100000 min 59 max 145 avg 100.0 std 10.0 rstd 10.0%
     96trials 10000000 buckets 100000 min 59 max 145 avg 100.0 std 10.0 rstd 10.0%
     97trials 10000000 buckets 100000 min 59 max 145 avg 100.0 std 10.0 rstd 10.0%
     98trials 10000000 buckets 100000 min 59 max 145 avg 100.0 std 10.0 rstd 10.0%
  • tests/.expect/PRNG.x86.txt

    r5ddb8bf r81da3da4  
    2626
    2727Sequential
    28 trials 100000000 buckets 100000 min 858 max 1147 avg 1000.0 std 31.5 rstd 3.2%
     28trials 10000000 buckets 100000 min 62 max 144 avg 100.0 std 10.0 rstd 10.0%
    2929
    3030Concurrent
    31 trials 100000000 buckets 100000 min 858 max 1147 avg 1000.0 std 31.5 rstd 3.2%
    32 trials 100000000 buckets 100000 min 858 max 1147 avg 1000.0 std 31.5 rstd 3.2%
    33 trials 100000000 buckets 100000 min 858 max 1147 avg 1000.0 std 31.5 rstd 3.2%
    34 trials 100000000 buckets 100000 min 858 max 1147 avg 1000.0 std 31.5 rstd 3.2%
     31trials 10000000 buckets 100000 min 62 max 144 avg 100.0 std 10.0 rstd 10.0%
     32trials 10000000 buckets 100000 min 62 max 144 avg 100.0 std 10.0 rstd 10.0%
     33trials 10000000 buckets 100000 min 62 max 144 avg 100.0 std 10.0 rstd 10.0%
     34trials 10000000 buckets 100000 min 62 max 144 avg 100.0 std 10.0 rstd 10.0%
    3535
    3636                    prng()     prng(5)   prng(0,5)
     
    5858
    5959Sequential
    60 trials 20000000 buckets 100000 min 144 max 270 avg 200.0 std 14.1 rstd 7.1%
     60trials 2000000 buckets 100000 min 3 max 42 avg 20.0 std 4.5 rstd 22.4%
    6161
    6262Concurrent
    63 trials 20000000 buckets 100000 min 144 max 270 avg 200.0 std 14.1 rstd 7.1%
    64 trials 20000000 buckets 100000 min 144 max 270 avg 200.0 std 14.1 rstd 7.1%
    65 trials 20000000 buckets 100000 min 144 max 270 avg 200.0 std 14.1 rstd 7.1%
    66 trials 20000000 buckets 100000 min 144 max 270 avg 200.0 std 14.1 rstd 7.1%
     63trials 2000000 buckets 100000 min 3 max 42 avg 20.0 std 4.5 rstd 22.4%
     64trials 2000000 buckets 100000 min 3 max 42 avg 20.0 std 4.5 rstd 22.4%
     65trials 2000000 buckets 100000 min 3 max 42 avg 20.0 std 4.5 rstd 22.4%
     66trials 2000000 buckets 100000 min 3 max 42 avg 20.0 std 4.5 rstd 22.4%
    6767
    6868                   prng(t)   prng(t,5) prng(t,0,5)
     
    9090
    9191Sequential
    92 trials 100000000 buckets 100000 min 858 max 1147 avg 1000.0 std 31.5 rstd 3.2%
     92trials 10000000 buckets 100000 min 62 max 144 avg 100.0 std 10.0 rstd 10.0%
    9393
    9494Concurrent
    95 trials 100000000 buckets 100000 min 858 max 1147 avg 1000.0 std 31.5 rstd 3.2%
    96 trials 100000000 buckets 100000 min 858 max 1147 avg 1000.0 std 31.5 rstd 3.2%
    97 trials 100000000 buckets 100000 min 858 max 1147 avg 1000.0 std 31.5 rstd 3.2%
    98 trials 100000000 buckets 100000 min 858 max 1147 avg 1000.0 std 31.5 rstd 3.2%
     95trials 10000000 buckets 100000 min 62 max 144 avg 100.0 std 10.0 rstd 10.0%
     96trials 10000000 buckets 100000 min 62 max 144 avg 100.0 std 10.0 rstd 10.0%
     97trials 10000000 buckets 100000 min 62 max 144 avg 100.0 std 10.0 rstd 10.0%
     98trials 10000000 buckets 100000 min 62 max 144 avg 100.0 std 10.0 rstd 10.0%
  • tests/.expect/functions.arm64.txt

    r5ddb8bf r81da3da4  
    105105struct _tuple2_ {
    106106};
    107 static inline void _layoutof__tuple2_(unsigned long int *_sizeof__tuple2_, unsigned long int *_alignof__tuple2_, unsigned long int *_offsetof__tuple2_, unsigned long int _sizeof_Y15tuple_param_2_0, unsigned long int _alignof_Y15tuple_param_2_0, unsigned long int _sizeof_Y15tuple_param_2_1, unsigned long int _alignof_Y15tuple_param_2_1){
     107static inline void _layoutof__tuple2_(unsigned long int *_sizeof__tuple2_, unsigned long int *_alignof__tuple2_, unsigned long int *_offsetof__tuple2_, const unsigned long int _sizeof_Y15tuple_param_2_0, const unsigned long int _alignof_Y15tuple_param_2_0, const unsigned long int _sizeof_Y15tuple_param_2_1, const unsigned long int _alignof_Y15tuple_param_2_1){
    108108    ((void)((*_sizeof__tuple2_)=0));
    109109    ((void)((*_alignof__tuple2_)=1));
     
    136136struct _tuple3_ {
    137137};
    138 static inline void _layoutof__tuple3_(unsigned long int *_sizeof__tuple3_, unsigned long int *_alignof__tuple3_, unsigned long int *_offsetof__tuple3_, unsigned long int _sizeof_Y15tuple_param_3_0, unsigned long int _alignof_Y15tuple_param_3_0, unsigned long int _sizeof_Y15tuple_param_3_1, unsigned long int _alignof_Y15tuple_param_3_1, unsigned long int _sizeof_Y15tuple_param_3_2, unsigned long int _alignof_Y15tuple_param_3_2){
     138static inline void _layoutof__tuple3_(unsigned long int *_sizeof__tuple3_, unsigned long int *_alignof__tuple3_, unsigned long int *_offsetof__tuple3_, const unsigned long int _sizeof_Y15tuple_param_3_0, const unsigned long int _alignof_Y15tuple_param_3_0, const unsigned long int _sizeof_Y15tuple_param_3_1, const unsigned long int _alignof_Y15tuple_param_3_1, const unsigned long int _sizeof_Y15tuple_param_3_2, const unsigned long int _alignof_Y15tuple_param_3_2){
    139139    ((void)((*_sizeof__tuple3_)=0));
    140140    ((void)((*_alignof__tuple3_)=1));
  • tests/.expect/functions.x64.txt

    r5ddb8bf r81da3da4  
    105105struct _tuple2_ {
    106106};
    107 static inline void _layoutof__tuple2_(unsigned long int *_sizeof__tuple2_, unsigned long int *_alignof__tuple2_, unsigned long int *_offsetof__tuple2_, unsigned long int _sizeof_Y15tuple_param_2_0, unsigned long int _alignof_Y15tuple_param_2_0, unsigned long int _sizeof_Y15tuple_param_2_1, unsigned long int _alignof_Y15tuple_param_2_1){
     107static inline void _layoutof__tuple2_(unsigned long int *_sizeof__tuple2_, unsigned long int *_alignof__tuple2_, unsigned long int *_offsetof__tuple2_, const unsigned long int _sizeof_Y15tuple_param_2_0, const unsigned long int _alignof_Y15tuple_param_2_0, const unsigned long int _sizeof_Y15tuple_param_2_1, const unsigned long int _alignof_Y15tuple_param_2_1){
    108108    ((void)((*_sizeof__tuple2_)=0));
    109109    ((void)((*_alignof__tuple2_)=1));
     
    136136struct _tuple3_ {
    137137};
    138 static inline void _layoutof__tuple3_(unsigned long int *_sizeof__tuple3_, unsigned long int *_alignof__tuple3_, unsigned long int *_offsetof__tuple3_, unsigned long int _sizeof_Y15tuple_param_3_0, unsigned long int _alignof_Y15tuple_param_3_0, unsigned long int _sizeof_Y15tuple_param_3_1, unsigned long int _alignof_Y15tuple_param_3_1, unsigned long int _sizeof_Y15tuple_param_3_2, unsigned long int _alignof_Y15tuple_param_3_2){
     138static inline void _layoutof__tuple3_(unsigned long int *_sizeof__tuple3_, unsigned long int *_alignof__tuple3_, unsigned long int *_offsetof__tuple3_, const unsigned long int _sizeof_Y15tuple_param_3_0, const unsigned long int _alignof_Y15tuple_param_3_0, const unsigned long int _sizeof_Y15tuple_param_3_1, const unsigned long int _alignof_Y15tuple_param_3_1, const unsigned long int _sizeof_Y15tuple_param_3_2, const unsigned long int _alignof_Y15tuple_param_3_2){
    139139    ((void)((*_sizeof__tuple3_)=0));
    140140    ((void)((*_alignof__tuple3_)=1));
  • tests/.expect/functions.x86.txt

    r5ddb8bf r81da3da4  
    105105struct _tuple2_ {
    106106};
    107 static inline void _layoutof__tuple2_(unsigned long int *_sizeof__tuple2_, unsigned long int *_alignof__tuple2_, unsigned long int *_offsetof__tuple2_, unsigned long int _sizeof_Y15tuple_param_2_0, unsigned long int _alignof_Y15tuple_param_2_0, unsigned long int _sizeof_Y15tuple_param_2_1, unsigned long int _alignof_Y15tuple_param_2_1){
     107static inline void _layoutof__tuple2_(unsigned long int *_sizeof__tuple2_, unsigned long int *_alignof__tuple2_, unsigned long int *_offsetof__tuple2_, const unsigned long int _sizeof_Y15tuple_param_2_0, const unsigned long int _alignof_Y15tuple_param_2_0, const unsigned long int _sizeof_Y15tuple_param_2_1, const unsigned long int _alignof_Y15tuple_param_2_1){
    108108    ((void)((*_sizeof__tuple2_)=0));
    109109    ((void)((*_alignof__tuple2_)=1));
     
    136136struct _tuple3_ {
    137137};
    138 static inline void _layoutof__tuple3_(unsigned long int *_sizeof__tuple3_, unsigned long int *_alignof__tuple3_, unsigned long int *_offsetof__tuple3_, unsigned long int _sizeof_Y15tuple_param_3_0, unsigned long int _alignof_Y15tuple_param_3_0, unsigned long int _sizeof_Y15tuple_param_3_1, unsigned long int _alignof_Y15tuple_param_3_1, unsigned long int _sizeof_Y15tuple_param_3_2, unsigned long int _alignof_Y15tuple_param_3_2){
     138static inline void _layoutof__tuple3_(unsigned long int *_sizeof__tuple3_, unsigned long int *_alignof__tuple3_, unsigned long int *_offsetof__tuple3_, const unsigned long int _sizeof_Y15tuple_param_3_0, const unsigned long int _alignof_Y15tuple_param_3_0, const unsigned long int _sizeof_Y15tuple_param_3_1, const unsigned long int _alignof_Y15tuple_param_3_1, const unsigned long int _sizeof_Y15tuple_param_3_2, const unsigned long int _alignof_Y15tuple_param_3_2){
    139139    ((void)((*_sizeof__tuple3_)=0));
    140140    ((void)((*_alignof__tuple3_)=1));
  • tests/PRNG.cfa

    r5ddb8bf r81da3da4  
    1010// Created On       : Wed Dec 29 09:38:12 2021
    1111// Last Modified By : Peter A. Buhr
    12 // Last Modified On : Mon Aug 14 08:49:53 2023
    13 // Update Count     : 425
     12// Last Modified On : Tue Dec  5 08:14:57 2023
     13// Update Count     : 428
    1414//
    1515
     
    3232#define STARTTIME start = timeHiRes()
    3333#define ENDTIME( extra ) sout | wd(0,1, (timeHiRes() - start)`ms / 1000.) | extra "seconds"
    34 enum { BUCKETS = 100_000, TRIALS = 1_000_000_000 };
     34enum { BUCKETS = 100_000, TRIALS = 100_000_000 };
    3535#else
    3636#define STARTTIME
    3737#define ENDTIME( extra )
    38 enum { BUCKETS = 100_000, TRIALS = 100_000_000 };
     38enum { BUCKETS = 100_000, TRIALS = 10_000_000 };
    3939#endif // TIME
    4040
Note: See TracChangeset for help on using the changeset viewer.