Changes in / [5ddb8bf:81da3da4]
- Files:
-
- 22 added
- 22 deleted
- 49 edited
-
.gitignore (modified) (2 diffs)
-
configure.ac (modified) (2 diffs)
-
libcfa/src/bits/random.hfa (modified) (3 diffs)
-
src/AST/Chain.hpp (modified) (1 diff)
-
src/AST/Decl.cpp (modified) (2 diffs)
-
src/AST/Decl.hpp (modified) (2 diffs)
-
src/AST/Expr.cpp (modified) (2 diffs)
-
src/AST/Expr.hpp (modified) (5 diffs)
-
src/CodeGen/CodeGenerator.cpp (added)
-
src/CodeGen/CodeGenerator.hpp (added)
-
src/CodeGen/CodeGeneratorNew.cpp (deleted)
-
src/CodeGen/CodeGeneratorNew.hpp (deleted)
-
src/CodeGen/GenType.cc (modified) (1 diff)
-
src/CodeGen/GenType.h (modified) (2 diffs)
-
src/CodeGen/Generate.cc (modified) (1 diff)
-
src/CodeGen/module.mk (modified) (1 diff)
-
src/Common/Assert.cc (modified) (2 diffs)
-
src/Concurrency/Actors.cpp (modified) (6 diffs)
-
src/Concurrency/Corun.cpp (modified) (2 diffs)
-
src/Concurrency/Keywords.cpp (added)
-
src/Concurrency/KeywordsNew.cpp (deleted)
-
src/Concurrency/Waitfor.cpp (added)
-
src/Concurrency/WaitforNew.cpp (deleted)
-
src/Concurrency/Waituntil.cpp (modified) (2 diffs)
-
src/Concurrency/module.mk (modified) (1 diff)
-
src/ControlStruct/ExceptDecl.cpp (added)
-
src/ControlStruct/ExceptDecl.h (modified) (2 diffs)
-
src/ControlStruct/ExceptDeclNew.cpp (deleted)
-
src/ControlStruct/ExceptTranslate.cpp (added)
-
src/ControlStruct/ExceptTranslate.h (modified) (2 diffs)
-
src/ControlStruct/ExceptTranslateNew.cpp (deleted)
-
src/ControlStruct/LabelGenerator.cpp (added)
-
src/ControlStruct/LabelGenerator.hpp (added)
-
src/ControlStruct/LabelGeneratorNew.cpp (deleted)
-
src/ControlStruct/LabelGeneratorNew.hpp (deleted)
-
src/ControlStruct/MultiLevelExit.cpp (modified) (1 diff)
-
src/ControlStruct/module.mk (modified) (2 diffs)
-
src/GenPoly/Box.cpp (added)
-
src/GenPoly/BoxNew.cpp (deleted)
-
src/GenPoly/FindFunction.cc (modified) (1 diff)
-
src/GenPoly/InstantiateGeneric.cpp (added)
-
src/GenPoly/InstantiateGenericNew.cpp (deleted)
-
src/GenPoly/Lvalue.cpp (added)
-
src/GenPoly/LvalueNew.cpp (deleted)
-
src/GenPoly/ScrubTyVars.cc (deleted)
-
src/GenPoly/ScrubTyVars.h (deleted)
-
src/GenPoly/ScrubTypeVars.cpp (added)
-
src/GenPoly/ScrubTypeVars.hpp (added)
-
src/GenPoly/Specialize.cpp (added)
-
src/GenPoly/SpecializeNew.cpp (deleted)
-
src/GenPoly/module.mk (modified) (1 diff)
-
src/InitTweak/FixGlobalInit.cc (modified) (2 diffs)
-
src/InitTweak/FixInit.cpp (added)
-
src/InitTweak/FixInitNew.cpp (deleted)
-
src/InitTweak/InitTweak.cc (modified) (1 diff)
-
src/InitTweak/module.mk (modified) (1 diff)
-
src/MakeLibCfa.cpp (added)
-
src/MakeLibCfaNew.cpp (deleted)
-
src/Makefile.am (modified) (2 diffs)
-
src/Parser/ParseNode.h (modified) (1 diff)
-
src/Parser/TypeData.h (modified) (1 diff)
-
src/ResolvExpr/CandidateFinder.cpp (modified) (19 diffs)
-
src/ResolvExpr/CandidateFinder.hpp (modified) (2 diffs)
-
src/ResolvExpr/CandidatePrinter.cpp (modified) (3 diffs)
-
src/ResolvExpr/CurrentObject.cc (modified) (2 diffs)
-
src/ResolvExpr/ResolvMode.h (deleted)
-
src/ResolvExpr/ResolveMode.hpp (added)
-
src/ResolvExpr/Resolver.cc (modified) (7 diffs)
-
src/ResolvExpr/module.mk (modified) (1 diff)
-
src/Tuples/TupleAssignment.cc (modified) (3 diffs)
-
src/Tuples/TupleExpansion.cc (deleted)
-
src/Tuples/TupleExpansion.cpp (added)
-
src/Tuples/TupleExpansionNew.cpp (deleted)
-
src/Tuples/module.mk (modified) (1 diff)
-
src/Validate/FindSpecialDecls.cpp (added)
-
src/Validate/FindSpecialDeclsNew.cpp (deleted)
-
src/Validate/FixReturnTypes.cpp (modified) (1 diff)
-
src/Validate/LinkInstanceTypes.cpp (added)
-
src/Validate/LinkInstanceTypes.hpp (added)
-
src/Validate/LinkReferenceToTypes.cpp (deleted)
-
src/Validate/LinkReferenceToTypes.hpp (deleted)
-
src/Validate/module.mk (modified) (2 diffs)
-
src/Virtual/Tables.cc (modified) (1 diff)
-
src/Virtual/VirtualDtor.cpp (modified) (2 diffs)
-
src/include/cassert (modified) (2 diffs)
-
src/main.cc (modified) (2 diffs)
-
tests/.expect/PRNG.arm64.txt (added)
-
tests/.expect/PRNG.x64.txt (modified) (3 diffs)
-
tests/.expect/PRNG.x86.txt (modified) (3 diffs)
-
tests/.expect/functions.arm64.txt (modified) (2 diffs)
-
tests/.expect/functions.x64.txt (modified) (2 diffs)
-
tests/.expect/functions.x86.txt (modified) (2 diffs)
-
tests/PRNG.cfa (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
.gitignore
r5ddb8bf r81da3da4 39 39 driver/cfa-cpp 40 40 driver/cc1 41 driver/demangler 41 42 42 43 libcfa/prelude/bootloader.c … … 59 60 src/Parser/parser.h 60 61 src/Parser/parser.hh 61 src/demangler62 62 63 63 tools/prettyprinter/parser.output -
configure.ac
r5ddb8bf r81da3da4 244 244 if test "x$enable_demangler" == xyes; then 245 245 LIBDEMANGLE="libdemangle.a" 246 DEMANGLER=" demangler"246 DEMANGLER="../driver/demangler" 247 247 else 248 248 LIBDEMANGLE="" … … 273 273 libcfa/Makefile:libcfa/Makefile.dist.in 274 274 tests/Makefile 275 ])275 ]) 276 276 277 277 # Some of our makefile don't need to be distributed -
libcfa/src/bits/random.hfa
r5ddb8bf r81da3da4 10 10 // Created On : Fri Jan 14 07:18:11 2022 11 11 // Last Modified By : Peter A. Buhr 12 // Last Modified On : Sat Sep 2 18:04:12 202313 // Update Count : 1 8712 // Last Modified On : Tue Dec 5 08:58:52 2023 13 // Update Count : 190 14 14 // 15 15 … … 22 22 23 23 // Set default PRNG for architecture size. 24 #if defined( __x86_64__ ) || defined( __a rm_64__ ) // 64-bit architecture24 #if defined( __x86_64__ ) || defined( __aarch64__ ) // 64-bit architecture 25 25 // 64-bit generators 26 26 //#define LEHMER64 … … 112 112 113 113 // Default PRNG used by runtime. 114 #if defined( __x86_64__ ) || defined( __a rm_64__ ) // 64-bit architecture114 #if defined( __x86_64__ ) || defined( __aarch64__ ) // 64-bit architecture 115 115 #define PRNG_NAME PRNG_NAME_64 116 116 #define PRNG_STATE_T PRNG_STATE_64_T -
src/AST/Chain.hpp
r5ddb8bf r81da3da4 33 33 template<typename actual_node_t, typename child_t> 34 34 auto operator()( child_t actual_node_t::*child ) { 35 auto n = mutate(base.get());35 node_t * n = base.get_and_mutate(); 36 36 actual_node_t * node = strict_dynamic_cast<actual_node_t *>(n); 37 base = node;38 37 return _chain_mutator< typename std::remove_reference< decltype(node->*child) >::type >{node->*child}; 39 38 } 40 39 41 40 node_t * operator->() { 42 auto n = mutate(base.get()); 43 base = n; 44 return n; 41 return base.get_and_mutate(); 45 42 } 46 43 }; -
src/AST/Decl.cpp
r5ddb8bf r81da3da4 21 21 22 22 #include "Common/Eval.h" // for eval 23 #include "Common/SemanticError.h" 23 24 24 25 #include "Fwd.hpp" // for UniqueId … … 41 42 42 43 FunctionDecl::FunctionDecl( const CodeLocation & loc, const std::string & name, 43 std::vector<ptr<TypeDecl>>&& forall,44 44 std::vector<ptr<DeclWithType>>&& params, std::vector<ptr<DeclWithType>>&& returns, 45 45 CompoundStmt * stmts, Storage::Classes storage, Linkage::Spec linkage, 46 46 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 ) { 64 49 } 65 50 -
src/AST/Decl.hpp
r5ddb8bf r81da3da4 30 30 #include "Visitor.hpp" 31 31 #include "Common/utility.h" 32 #include "Common/SemanticError.h" // error_str33 32 34 33 // Must be included in *all* AST classes; should be #undef'd at the end of the file … … 135 134 std::vector< ptr<Expr> > withExprs; 136 135 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, 144 138 std::vector<ptr<DeclWithType>>&& params, std::vector<ptr<DeclWithType>>&& returns, 145 139 CompoundStmt * stmts, Storage::Classes storage = {}, Linkage::Spec linkage = Linkage::Cforall, 146 140 std::vector<ptr<Attribute>>&& attrs = {}, Function::Specs fs = {}, ArgumentFlag isVarArgs = FixedArgs ); 147 141 142 /// Polymorphic Function Constructor: 148 143 FunctionDecl( const CodeLocation & location, const std::string & name, 149 144 std::vector<ptr<TypeDecl>>&& forall, std::vector<ptr<DeclWithType>>&& assertions, -
src/AST/Expr.cpp
r5ddb8bf r81da3da4 222 222 } 223 223 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 233 224 bool MemberExpr::get_lvalue() const { 234 225 // This is actually wrong by C, but it works with our current set-up. … … 388 379 stmts.emplace_back( new ExprStmt{ loc, tupleExpr } ); 389 380 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;396 381 } 397 382 -
src/AST/Expr.hpp
r5ddb8bf r81da3da4 35 35 template<typename node_t> friend node_t * shallowCopy(const node_t * node); 36 36 37 38 class ConverterOldToNew;39 class ConverterNewToOld;40 41 37 namespace ast { 42 38 … … 439 435 MemberExpr * clone() const override { return new MemberExpr{ *this }; } 440 436 MUTATE_FRIEND 441 442 // Custructor overload meant only for AST conversion443 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;448 437 }; 449 438 … … 458 447 ConstantExpr( 459 448 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 ) {} 462 451 463 452 /// Gets the integer value of this constant, if one is appropriate to its type. … … 483 472 484 473 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.type489 ptr<Type> underlyer;490 friend class ::ConverterOldToNew;491 friend class ::ConverterNewToOld;492 474 }; 493 475 … … 779 761 const Expr * accept( Visitor & v ) const override { return v.visit( this ); } 780 762 781 friend class ::ConverterOldToNew;782 783 763 private: 784 764 TupleAssignExpr * clone() const override { return new TupleAssignExpr{ *this }; } 785 TupleAssignExpr( const CodeLocation & loc, const Type * result, const StmtExpr * s );786 787 765 MUTATE_FRIEND 788 766 }; -
src/CodeGen/GenType.cc
r5ddb8bf r81da3da4 21 21 #include "AST/Print.hpp" // for print 22 22 #include "AST/Vector.hpp" // for vector 23 #include "CodeGenerator New.hpp"// for CodeGenerator23 #include "CodeGenerator.hpp" // for CodeGenerator 24 24 #include "Common/UniqueName.h" // for UniqueName 25 25 -
src/CodeGen/GenType.h
r5ddb8bf r81da3da4 20 20 #include "CodeGen/Options.h" // for Options 21 21 22 class Type;23 22 namespace ast { 24 23 class Type; … … 26 25 27 26 namespace 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 );31 27 32 28 std::string genType( ast::Type const * type, const std::string & base, const Options & options ); -
src/CodeGen/Generate.cc
r5ddb8bf r81da3da4 19 19 #include <string> // for operator<< 20 20 21 #include "CodeGenerator New.hpp"// for CodeGenerator, doSemicolon, ...21 #include "CodeGenerator.hpp" // for CodeGenerator, doSemicolon, ... 22 22 #include "GenType.h" // for genPrettyType 23 23 -
src/CodeGen/module.mk
r5ddb8bf r81da3da4 16 16 17 17 SRC_CODEGEN = \ 18 CodeGen/CodeGenerator New.cpp \19 CodeGen/CodeGenerator New.hpp \18 CodeGen/CodeGenerator.cpp \ 19 CodeGen/CodeGenerator.hpp \ 20 20 CodeGen/GenType.cc \ 21 21 CodeGen/GenType.h \ -
src/Common/Assert.cc
r5ddb8bf r81da3da4 10 10 // Created On : Thu Aug 18 13:26:59 2016 11 11 // Last Modified By : Peter A. Buhr 12 // Last Modified On : Fri Aug 19 17:07:08 201613 // Update Count : 1 012 // Last Modified On : Mon Nov 20 22:57:18 2023 13 // Update Count : 11 14 14 // 15 15 … … 39 39 } 40 40 41 void abort(const char *fmt, ... ) noexcept __attribute__((noreturn, format(printf, 1, 2)));42 void abort(const char *fmt, ... ) noexcept {41 void abort(const char *fmt, ... ) noexcept __attribute__((noreturn, format(printf, 1, 2))); 42 void abort(const char *fmt, ... ) noexcept { 43 43 va_list args; 44 44 va_start( args, fmt ); -
src/Concurrency/Actors.cpp
r5ddb8bf r81da3da4 265 265 decl->location, 266 266 "__CFA_receive_wrap", 267 {}, // forall268 267 { 269 268 new ObjectDecl( … … 288 287 ) 289 288 }, // params 290 { 289 { 291 290 new ObjectDecl( 292 291 decl->location, … … 400 399 ) 401 400 )); 402 401 403 402 // Generates: return receiver; 404 403 sendBody->push_back( new ReturnStmt( decl->location, new NameExpr( decl->location, "receiver" ) ) ); … … 408 407 decl->location, 409 408 "?|?", 410 {}, // forall411 409 { 412 410 new ObjectDecl( … … 421 419 ) 422 420 }, // params 423 { 421 { 424 422 new ObjectDecl( 425 423 decl->location, … … 434 432 { Function::Inline } 435 433 ); 436 434 437 435 // forward decls to resolve use before decl problem for '|' routines 438 436 forwardDecls.insertDecl( *actorIter, *messageIter , ast::deepCopy( sendOperatorFunction ) ); -
src/Concurrency/Corun.cpp
r5ddb8bf r81da3da4 113 113 new FunctionDecl( loc, 114 114 fnName, // name 115 {}, // forall116 115 { 117 116 new ObjectDecl( loc, … … 261 260 new FunctionDecl( loc, 262 261 fnName, // name 263 {}, // forall264 262 {}, // params 265 263 {}, // return -
src/Concurrency/Waituntil.cpp
r5ddb8bf r81da3da4 553 553 return new FunctionDecl( loc, 554 554 predName, 555 {}, // forall556 555 { 557 556 new ObjectDecl( loc, … … 560 559 ) 561 560 }, 562 { 561 { 563 562 new ObjectDecl( loc, 564 563 "sat_ret", -
src/Concurrency/module.mk
r5ddb8bf r81da3da4 20 20 Concurrency/Corun.cpp \ 21 21 Concurrency/Corun.hpp \ 22 Concurrency/Keywords New.cpp \22 Concurrency/Keywords.cpp \ 23 23 Concurrency/Keywords.h \ 24 Concurrency/Waitfor New.cpp \24 Concurrency/Waitfor.cpp \ 25 25 Concurrency/Waitfor.h \ 26 26 Concurrency/Waituntil.cpp \ -
src/ControlStruct/ExceptDecl.h
r5ddb8bf r81da3da4 16 16 #pragma once 17 17 18 #include <list> // for list19 20 class Declaration;21 22 18 namespace ast { 23 19 class TranslationUnit; … … 25 21 26 22 namespace ControlStruct { 23 27 24 /// Unfold exception declarations into raw structure declarations. 28 25 /// Also builds vtable declarations and converts vtable types. 29 void translateExcept( std::list< Declaration *> & translationUnit );30 26 void translateExcept( ast::TranslationUnit & translationUnit ); 27 31 28 } -
src/ControlStruct/ExceptTranslate.h
r5ddb8bf r81da3da4 16 16 #pragma once 17 17 18 #include <list> // for list19 20 class Declaration;21 18 namespace ast { 22 19 class TranslationUnit; … … 24 21 25 22 namespace 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 */31 23 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 */ 24 void 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 29 void 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 38 35 } 39 36 -
src/ControlStruct/MultiLevelExit.cpp
r5ddb8bf r81da3da4 16 16 #include "MultiLevelExit.hpp" 17 17 18 #include <set> 19 18 20 #include "AST/Pass.hpp" 19 21 #include "AST/Stmt.hpp" 20 #include "LabelGeneratorNew.hpp" 21 22 #include <set> 22 #include "LabelGenerator.hpp" 23 23 24 using namespace std; 24 25 using namespace ast; -
src/ControlStruct/module.mk
r5ddb8bf r81da3da4 16 16 17 17 SRC += \ 18 ControlStruct/ExceptDecl New.cpp \18 ControlStruct/ExceptDecl.cpp \ 19 19 ControlStruct/ExceptDecl.h \ 20 ControlStruct/ExceptTranslate New.cpp \20 ControlStruct/ExceptTranslate.cpp \ 21 21 ControlStruct/ExceptTranslate.h \ 22 22 ControlStruct/FixLabels.cpp \ … … 24 24 ControlStruct/HoistControlDecls.cpp \ 25 25 ControlStruct/HoistControlDecls.hpp \ 26 ControlStruct/LabelGenerator New.cpp \27 ControlStruct/LabelGenerator New.hpp \26 ControlStruct/LabelGenerator.cpp \ 27 ControlStruct/LabelGenerator.hpp \ 28 28 ControlStruct/MultiLevelExit.cpp \ 29 29 ControlStruct/MultiLevelExit.hpp -
src/GenPoly/FindFunction.cc
r5ddb8bf r81da3da4 22 22 #include "GenPoly/ErasableScopedMap.h" // for ErasableScopedMap<>::iterator 23 23 #include "GenPoly/GenPoly.h" // for TyVarMap 24 #include "ScrubTy Vars.h" // for ScrubTyVars24 #include "ScrubTypeVars.hpp" // for scrubTypeVars 25 25 26 26 namespace GenPoly { -
src/GenPoly/module.mk
r5ddb8bf r81da3da4 22 22 23 23 SRC += $(SRC_GENPOLY) \ 24 GenPoly/Box New.cpp \24 GenPoly/Box.cpp \ 25 25 GenPoly/Box.h \ 26 26 GenPoly/ErasableScopedMap.h \ 27 27 GenPoly/FindFunction.cc \ 28 28 GenPoly/FindFunction.h \ 29 GenPoly/InstantiateGeneric New.cpp \29 GenPoly/InstantiateGeneric.cpp \ 30 30 GenPoly/InstantiateGeneric.h \ 31 GenPoly/Lvalue New.cpp \31 GenPoly/Lvalue.cpp \ 32 32 GenPoly/ScopedSet.h \ 33 GenPoly/ScrubTy Vars.cc\34 GenPoly/ScrubTy Vars.h\35 GenPoly/Specialize New.cpp \33 GenPoly/ScrubTypeVars.cpp \ 34 GenPoly/ScrubTypeVars.hpp \ 35 GenPoly/Specialize.cpp \ 36 36 GenPoly/Specialize.h 37 37 -
src/InitTweak/FixGlobalInit.cc
r5ddb8bf r81da3da4 84 84 if (inLibrary) ctorParams.emplace_back(ast::ConstantExpr::from_int(location, 200)); 85 85 auto initFunction = new ast::FunctionDecl(location, 86 "__global_init__", {}, {}, {}, 86 "__global_init__", {}, {}, {}, {}, 87 87 new ast::CompoundStmt(location, std::move(fixer.core.initStmts)), 88 88 ast::Storage::Static, ast::Linkage::C, … … 96 96 if (inLibrary) dtorParams.emplace_back(ast::ConstantExpr::from_int(location, 200)); 97 97 auto destroyFunction = new ast::FunctionDecl( location, 98 "__global_destroy__", {}, {}, {}, 98 "__global_destroy__", {}, {}, {}, {}, 99 99 new ast::CompoundStmt(location, std::move(fixer.core.destroyStmts)), 100 100 ast::Storage::Static, ast::Linkage::C, -
src/InitTweak/InitTweak.cc
r5ddb8bf r81da3da4 342 342 if (!assign) { 343 343 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}, {}, 345 345 { new ast::ObjectDecl(CodeLocation(), "_dst", new ast::ReferenceType(new ast::TypeInstType("T", td))), 346 346 new ast::ObjectDecl(CodeLocation(), "_src", new ast::TypeInstType("T", td))}, -
src/InitTweak/module.mk
r5ddb8bf r81da3da4 24 24 InitTweak/FixGlobalInit.cc \ 25 25 InitTweak/FixGlobalInit.h \ 26 InitTweak/FixInit. h\27 InitTweak/FixInit New.cpp26 InitTweak/FixInit.cpp \ 27 InitTweak/FixInit.h 28 28 29 29 SRCDEMANGLE += $(SRC_INITTWEAK) -
src/Makefile.am
r5ddb8bf r81da3da4 22 22 CompilationState.cc \ 23 23 CompilationState.h \ 24 MakeLibCfa New.cpp \24 MakeLibCfa.cpp \ 25 25 MakeLibCfa.h 26 26 … … 72 72 73 73 cfa_cpplib_PROGRAMS += $(DEMANGLER) 74 EXTRA_PROGRAMS = demangler75 demangler_SOURCES = SymTab/demangler.cc # test driver for the demangler, also useful as a sanity check that libdemangle.a is complete76 demangler_LDADD = libdemangle.a -ldl # yywrap74 EXTRA_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 77 77 noinst_LIBRARIES = $(LIBDEMANGLE) 78 78 EXTRA_LIBRARIES = libdemangle.a -
src/Parser/ParseNode.h
r5ddb8bf r81da3da4 33 33 #include "Parser/parserutility.h" // for maybeBuild, maybeCopy 34 34 35 class Attribute;36 class Declaration;37 35 struct DeclarationNode; 38 class DeclarationWithType;39 class Initializer;40 36 class InitializerNode; 41 37 class ExpressionNode; -
src/Parser/TypeData.h
r5ddb8bf r81da3da4 133 133 ast::Init * init = nullptr, std::vector<ast::ptr<ast::Attribute>> && attributes = std::vector<ast::ptr<ast::Attribute>>() ); 134 134 ast::FunctionType * buildFunctionType( const TypeData * ); 135 ast::Decl * addEnumBase( Declaration *, const TypeData * );136 135 void buildKRFunction( const TypeData::Function_t & function ); 137 136 -
src/ResolvExpr/CandidateFinder.cpp
r5ddb8bf r81da3da4 105 105 106 106 // CandidateFinder finder{ symtab, env }; 107 // finder.find( arg, Resolv Mode::withAdjustment() );107 // finder.find( arg, ResolveMode::withAdjustment() ); 108 108 // assertf( finder.candidates.size() > 0, 109 109 // "Somehow castable expression failed to find alternatives." ); … … 974 974 // xxx - is it possible that handleTupleAssignment and main finder both produce candidates? 975 975 // this means there exists ctor/assign functions with a tuple as first parameter. 976 Resolv Mode mode = {976 ResolveMode mode = { 977 977 true, // adjust 978 978 !untypedExpr->func.as<ast::NameExpr>(), // prune if not calling by name … … 989 989 CandidateFinder opFinder( context, tenv ); 990 990 // okay if there aren't any function operations 991 opFinder.find( opExpr, Resolv Mode::withoutFailFast() );991 opFinder.find( opExpr, ResolveMode::withoutFailFast() ); 992 992 PRINT( 993 993 std::cerr << "known function ops:" << std::endl; … … 1175 1175 if ( castExpr->kind == ast::CastExpr::Return ) { 1176 1176 finder.strictMode = true; 1177 finder.find( castExpr->arg, Resolv Mode::withAdjustment() );1177 finder.find( castExpr->arg, ResolveMode::withAdjustment() ); 1178 1178 1179 1179 // return casts are eliminated (merely selecting an overload, no actual operation) 1180 1180 candidates = std::move(finder.candidates); 1181 1181 } 1182 finder.find( castExpr->arg, Resolv Mode::withAdjustment() );1182 finder.find( castExpr->arg, ResolveMode::withAdjustment() ); 1183 1183 1184 1184 if ( !finder.candidates.empty() ) reason.code = NoMatch; … … 1251 1251 CandidateFinder finder( context, tenv ); 1252 1252 // don't prune here, all alternatives guaranteed to have same type 1253 finder.find( castExpr->arg, Resolv Mode::withoutPrune() );1253 finder.find( castExpr->arg, ResolveMode::withoutPrune() ); 1254 1254 for ( CandidateRef & r : finder.candidates ) { 1255 1255 addCandidate( … … 1298 1298 1299 1299 // don't prune here, since it's guaranteed all alternatives will have the same type 1300 finder.find( tech1.get(), Resolv Mode::withoutPrune() );1300 finder.find( tech1.get(), ResolveMode::withoutPrune() ); 1301 1301 pick_alternatives(finder.candidates, false); 1302 1302 … … 1307 1307 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 })) }; 1308 1308 // don't prune here, since it's guaranteed all alternatives will have the same type 1309 finder.find( fallback.get(), Resolv Mode::withoutPrune() );1309 finder.find( fallback.get(), ResolveMode::withoutPrune() ); 1310 1310 1311 1311 pick_alternatives(finder.candidates, true); … … 1316 1316 void Finder::postvisit( const ast::UntypedMemberExpr * memberExpr ) { 1317 1317 CandidateFinder aggFinder( context, tenv ); 1318 aggFinder.find( memberExpr->aggregate, Resolv Mode::withAdjustment() );1318 aggFinder.find( memberExpr->aggregate, ResolveMode::withAdjustment() ); 1319 1319 for ( CandidateRef & agg : aggFinder.candidates ) { 1320 1320 // it's okay for the aggregate expression to have reference type -- cast it to the … … 1475 1475 void Finder::postvisit( const ast::LogicalExpr * logicalExpr ) { 1476 1476 CandidateFinder finder1( context, tenv ); 1477 finder1.find( logicalExpr->arg1, Resolv Mode::withAdjustment() );1477 finder1.find( logicalExpr->arg1, ResolveMode::withAdjustment() ); 1478 1478 if ( finder1.candidates.empty() ) return; 1479 1479 1480 1480 CandidateFinder finder2( context, tenv ); 1481 finder2.find( logicalExpr->arg2, Resolv Mode::withAdjustment() );1481 finder2.find( logicalExpr->arg2, ResolveMode::withAdjustment() ); 1482 1482 if ( finder2.candidates.empty() ) return; 1483 1483 … … 1505 1505 // candidates for condition 1506 1506 CandidateFinder finder1( context, tenv ); 1507 finder1.find( conditionalExpr->arg1, Resolv Mode::withAdjustment() );1507 finder1.find( conditionalExpr->arg1, ResolveMode::withAdjustment() ); 1508 1508 if ( finder1.candidates.empty() ) return; 1509 1509 … … 1511 1511 CandidateFinder finder2( context, tenv ); 1512 1512 finder2.allowVoid = true; 1513 finder2.find( conditionalExpr->arg2, Resolv Mode::withAdjustment() );1513 finder2.find( conditionalExpr->arg2, ResolveMode::withAdjustment() ); 1514 1514 if ( finder2.candidates.empty() ) return; 1515 1515 … … 1517 1517 CandidateFinder finder3( context, tenv ); 1518 1518 finder3.allowVoid = true; 1519 finder3.find( conditionalExpr->arg3, Resolv Mode::withAdjustment() );1519 finder3.find( conditionalExpr->arg3, ResolveMode::withAdjustment() ); 1520 1520 if ( finder3.candidates.empty() ) return; 1521 1521 … … 1570 1570 1571 1571 CandidateFinder finder2( context, env ); 1572 finder2.find( commaExpr->arg2, Resolv Mode::withAdjustment() );1572 finder2.find( commaExpr->arg2, ResolveMode::withAdjustment() ); 1573 1573 1574 1574 for ( const CandidateRef & r2 : finder2.candidates ) { … … 1584 1584 CandidateFinder finder( context, tenv ); 1585 1585 finder.allowVoid = true; 1586 finder.find( ctorExpr->callExpr, Resolv Mode::withoutPrune() );1586 finder.find( ctorExpr->callExpr, ResolveMode::withoutPrune() ); 1587 1587 for ( CandidateRef & r : finder.candidates ) { 1588 1588 addCandidate( *r, new ast::ConstructorExpr{ ctorExpr->location, r->expr } ); … … 1593 1593 // resolve low and high, accept candidates where low and high types unify 1594 1594 CandidateFinder finder1( context, tenv ); 1595 finder1.find( rangeExpr->low, Resolv Mode::withAdjustment() );1595 finder1.find( rangeExpr->low, ResolveMode::withAdjustment() ); 1596 1596 if ( finder1.candidates.empty() ) return; 1597 1597 1598 1598 CandidateFinder finder2( context, tenv ); 1599 finder2.find( rangeExpr->high, Resolv Mode::withAdjustment() );1599 finder2.find( rangeExpr->high, ResolveMode::withAdjustment() ); 1600 1600 if ( finder2.candidates.empty() ) return; 1601 1601 … … 1673 1673 void Finder::postvisit( const ast::UniqueExpr * unqExpr ) { 1674 1674 CandidateFinder finder( context, tenv ); 1675 finder.find( unqExpr->expr, Resolv Mode::withAdjustment() );1675 finder.find( unqExpr->expr, ResolveMode::withAdjustment() ); 1676 1676 for ( CandidateRef & r : finder.candidates ) { 1677 1677 // ensure that the the id is passed on so that the expressions are "linked" … … 1699 1699 // only open for the duration of resolving the UntypedExpr. 1700 1700 CandidateFinder finder( context, tenv, toType ); 1701 finder.find( initExpr->expr, Resolv Mode::withAdjustment() );1701 finder.find( initExpr->expr, ResolveMode::withAdjustment() ); 1702 1702 1703 1703 Cost minExprCost = Cost::infinity; … … 1889 1889 } 1890 1890 1891 void CandidateFinder::find( const ast::Expr * expr, Resolv Mode mode ) {1891 void CandidateFinder::find( const ast::Expr * expr, ResolveMode mode ) { 1892 1892 // Find alternatives for expression 1893 1893 ast::Pass<Finder> finder{ *this }; … … 2004 2004 for ( const auto & x : xs ) { 2005 2005 out.emplace_back( context, env ); 2006 out.back().find( x, Resolv Mode::withAdjustment() );2006 out.back().find( x, ResolveMode::withAdjustment() ); 2007 2007 2008 2008 PRINT( -
src/ResolvExpr/CandidateFinder.hpp
r5ddb8bf r81da3da4 17 17 18 18 #include "Candidate.hpp" 19 #include "Resolv Mode.h"19 #include "ResolveMode.hpp" 20 20 #include "AST/Fwd.hpp" 21 21 #include "AST/Node.hpp" … … 43 43 44 44 /// Fill candidates with feasible resolutions for `expr` 45 void find( const ast::Expr * expr, Resolv Mode mode = {} );45 void find( const ast::Expr * expr, ResolveMode mode = {} ); 46 46 bool pruneCandidates( CandidateList & candidates, CandidateList & out, std::vector<std::string> & errors ); 47 47 -
src/ResolvExpr/CandidatePrinter.cpp
r5ddb8bf r81da3da4 16 16 #include "CandidatePrinter.hpp" 17 17 18 #include <iostream> 19 18 20 #include "AST/Expr.hpp" 19 21 #include "AST/Pass.hpp" … … 23 25 #include "ResolvExpr/CandidateFinder.hpp" 24 26 #include "ResolvExpr/Resolver.h" 25 26 #include <iostream>27 27 28 28 namespace ResolvExpr { … … 39 39 ast::TypeEnvironment env; 40 40 CandidateFinder finder( { symtab, transUnit().global }, env ); 41 finder.find( stmt->expr, Resolv Mode::withAdjustment() );41 finder.find( stmt->expr, ResolveMode::withAdjustment() ); 42 42 int count = 1; 43 43 os << "There are " << finder.candidates.size() << " candidates\n"; -
src/ResolvExpr/CurrentObject.cc
r5ddb8bf r81da3da4 498 498 PRINT( std::cerr << "____untyped: " << expr << std::endl; ) 499 499 auto dit = desigAlts.begin(); 500 auto nexpr = dynamic_cast< const NameExpr * >( expr ); 500 501 501 502 for ( const Type * t : curTypes ) { 502 503 assert( dit != desigAlts.end() ); 503 504 DesignatorChain & d = *dit; 504 if ( auto nexpr = dynamic_cast< const NameExpr *>( expr ) ) { 505 // Name Designation: 506 if ( nexpr ) { 505 507 PRINT( std::cerr << "____actual: " << t << std::endl; ) 506 508 if ( auto refType = dynamic_cast< const BaseInstType * >( t ) ) { … … 515 517 } 516 518 } 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 }527 519 } 528 520 529 521 ++dit; 522 // Index Designation: 530 523 } else { 531 524 if ( auto at = dynamic_cast< const ArrayType * >( t ) ) { -
src/ResolvExpr/Resolver.cc
r5ddb8bf r81da3da4 25 25 #include "Resolver.h" 26 26 #include "ResolveTypeof.h" 27 #include "Resolv Mode.h" // for ResolvMode27 #include "ResolveMode.hpp" // for ResolveMode 28 28 #include "typeops.h" // for extractResultType 29 29 #include "Unify.h" // for unify 30 30 #include "CompilationState.h" 31 #include "AST/Chain.hpp"32 31 #include "AST/Decl.hpp" 33 32 #include "AST/Init.hpp" … … 104 103 } 105 104 } 106 } 107 } 105 } 106 } 108 107 visit_children = false; 109 108 } … … 123 122 CandidateRef findUnfinishedKindExpression( 124 123 const ast::Expr * untyped, const ResolveContext & context, const std::string & kind, 125 std::function<bool(const Candidate &)> pred = anyCandidate, Resolv Mode mode = {}124 std::function<bool(const Candidate &)> pred = anyCandidate, ResolveMode mode = {} 126 125 ) { 127 126 if ( ! untyped ) return nullptr; … … 263 262 ast::ptr< ast::CastExpr > untyped = new ast::CastExpr{ expr }; 264 263 CandidateRef choice = findUnfinishedKindExpression( 265 untyped, context, "", anyCandidate, Resolv Mode::withAdjustment() );264 untyped, context, "", anyCandidate, ResolveMode::withAdjustment() ); 266 265 267 266 // a cast expression has either 0 or 1 interpretations (by language rules); … … 292 291 const ast::Expr * untyped, const ResolveContext & context, 293 292 std::function<bool(const Candidate &)> pred = anyCandidate, 294 const std::string & kind = "", Resolv Mode mode = {}293 const std::string & kind = "", ResolveMode mode = {} 295 294 ) { 296 295 if ( ! untyped ) return {}; … … 607 606 ( objectDecl->get_type() )->base->base ) { 608 607 objectDecl = fixObjectType( objectDecl, context ); 609 currentObject = ast::CurrentObject{ 610 objectDecl->location, 608 currentObject = ast::CurrentObject{ 609 objectDecl->location, 611 610 enumBase 612 611 }; … … 860 859 861 860 // Find all candidates for a function in canonical form 862 funcFinder.find( clause.target, Resolv Mode::withAdjustment() );861 funcFinder.find( clause.target, ResolveMode::withAdjustment() ); 863 862 864 863 if ( funcFinder.candidates.empty() ) { -
src/ResolvExpr/module.mk
r5ddb8bf r81da3da4 47 47 ResolvExpr/ResolveTypeof.cc \ 48 48 ResolvExpr/ResolveTypeof.h \ 49 ResolvExpr/Resolv Mode.h\49 ResolvExpr/ResolveMode.hpp \ 50 50 ResolvExpr/SatisfyAssertions.cpp \ 51 51 ResolvExpr/SatisfyAssertions.hpp \ -
src/Tuples/TupleAssignment.cc
r5ddb8bf r81da3da4 13 13 // Update Count : 10 14 14 // 15 16 #include "Tuples.h" 15 17 16 18 #include <algorithm> // for transform … … 224 226 // by the cast type as needed, and transfer the resulting environment. 225 227 ResolvExpr::CandidateFinder finder( spotter.crntFinder.context, env ); 226 finder.find( rhsCand->expr, ResolvExpr::Resolv Mode::withAdjustment() );228 finder.find( rhsCand->expr, ResolvExpr::ResolveMode::withAdjustment() ); 227 229 assert( 1 == finder.candidates.size() ); 228 230 env = std::move( finder.candidates.front()->env ); … … 345 347 346 348 try { 347 finder.find( expr, ResolvExpr::Resolv Mode::withAdjustment() );349 finder.find( expr, ResolvExpr::ResolveMode::withAdjustment() ); 348 350 } catch (...) { 349 351 // No match is not failure, just that this tuple assignment is invalid. -
src/Tuples/module.mk
r5ddb8bf r81da3da4 19 19 Tuples/Explode.h \ 20 20 Tuples/TupleAssignment.cc \ 21 Tuples/TupleExpansion.cc \ 22 Tuples/TupleExpansionNew.cpp \ 21 Tuples/TupleExpansion.cpp \ 23 22 Tuples/Tuples.cc \ 24 23 Tuples/Tuples.h -
src/Validate/FixReturnTypes.cpp
r5ddb8bf r81da3da4 19 19 #include "AST/Pass.hpp" 20 20 #include "AST/Type.hpp" 21 #include "CodeGen/CodeGenerator New.hpp"21 #include "CodeGen/CodeGenerator.hpp" 22 22 #include "ResolvExpr/Unify.h" 23 24 namespace ast {25 class TranslationUnit;26 }27 23 28 24 namespace Validate { -
src/Validate/module.mk
r5ddb8bf r81da3da4 27 27 Validate/EnumAndPointerDecay.cpp \ 28 28 Validate/EnumAndPointerDecay.hpp \ 29 Validate/FindSpecialDecls New.cpp \29 Validate/FindSpecialDecls.cpp \ 30 30 Validate/FixQualifiedTypes.cpp \ 31 31 Validate/FixQualifiedTypes.hpp \ … … 44 44 Validate/LabelAddressFixer.cpp \ 45 45 Validate/LabelAddressFixer.hpp \ 46 Validate/Link ReferenceToTypes.cpp \47 Validate/Link ReferenceToTypes.hpp \46 Validate/LinkInstanceTypes.cpp \ 47 Validate/LinkInstanceTypes.hpp \ 48 48 Validate/NoIdSymbolTable.hpp \ 49 49 Validate/ReplaceTypedef.cpp \ -
src/Virtual/Tables.cc
r5ddb8bf r81da3da4 165 165 location, 166 166 functionName, 167 { /* forall */ },168 167 { new ast::ObjectDecl( 169 168 location, -
src/Virtual/VirtualDtor.cpp
r5ddb8bf r81da3da4 248 248 decl->location, 249 249 "__CFA_set_dtor", 250 {}, // forall251 250 { 252 251 new ObjectDecl( … … 320 319 decl->location, 321 320 "delete", 322 {}, // forall323 321 { 324 322 new ObjectDecl( -
src/include/cassert
r5ddb8bf r81da3da4 9 9 // Author : Peter A. Buhr 10 10 // Created On : Thu Aug 18 13:19:26 2016 11 // Last Modified By : Andrew Beach12 // Last Modified On : Mon Jun 3 13:11:00 201713 // Update Count : 1 811 // Last Modified By : Peter A. Buhr 12 // Last Modified On : Mon Nov 20 23:12:34 2023 13 // Update Count : 19 14 14 // 15 15 … … 53 53 } 54 54 55 extern void abort(const char *fmt, ... ) noexcept __attribute__((noreturn, format(printf, 1, 2)));55 extern void abort(const char *fmt, ... ) noexcept __attribute__((noreturn, format(printf, 1, 2))); 56 56 // Local Variables: // 57 57 // tab-width: 4 // -
src/main.cc
r5ddb8bf r81da3da4 78 78 #include "Validate/InitializerLength.hpp" // for setLengthFromInitializer 79 79 #include "Validate/LabelAddressFixer.hpp" // for fixLabelAddresses 80 #include "Validate/Link ReferenceToTypes.hpp" // for linkReferenceToTypes80 #include "Validate/LinkInstanceTypes.hpp" // for linkInstanceTypes 81 81 #include "Validate/ReplaceTypedef.hpp" // for replaceTypedef 82 82 #include "Validate/ReturnCheck.hpp" // for checkReturnStatements 83 83 #include "Validate/VerifyCtorDtorAssign.hpp" // for verifyCtorDtorAssign 84 84 #include "Virtual/ExpandCasts.h" // for expandCasts 85 #include "Virtual/VirtualDtor.hpp" // for implementVirtDtors85 #include "Virtual/VirtualDtor.hpp" // for implementVirtDtors 86 86 87 87 using namespace std; … … 318 318 PASS( "Enum and Pointer Decay", Validate::decayEnumsAndPointers, transUnit ); 319 319 320 PASS( "Link Reference To Types", Validate::linkReferenceToTypes, transUnit );320 PASS( "Link Instance Types", Validate::linkInstanceTypes, transUnit ); 321 321 322 322 PASS( "Forall Pointer Decay", Validate::decayForallPointers, transUnit ); -
tests/.expect/PRNG.x64.txt
r5ddb8bf r81da3da4 26 26 27 27 Sequential 28 trials 10000000 0 buckets 100000 min 875 max 1146 avg 1000.0 std 31.6 rstd 3.2%28 trials 10000000 buckets 100000 min 59 max 145 avg 100.0 std 10.0 rstd 10.0% 29 29 30 30 Concurrent 31 trials 10000000 0 buckets 100000 min 875 max 1146 avg 1000.0 std 31.6 rstd 3.2%32 trials 10000000 0 buckets 100000 min 875 max 1146 avg 1000.0 std 31.6 rstd 3.2%33 trials 10000000 0 buckets 100000 min 875 max 1146 avg 1000.0 std 31.6 rstd 3.2%34 trials 10000000 0 buckets 100000 min 875 max 1146 avg 1000.0 std 31.6 rstd 3.2%31 trials 10000000 buckets 100000 min 59 max 145 avg 100.0 std 10.0 rstd 10.0% 32 trials 10000000 buckets 100000 min 59 max 145 avg 100.0 std 10.0 rstd 10.0% 33 trials 10000000 buckets 100000 min 59 max 145 avg 100.0 std 10.0 rstd 10.0% 34 trials 10000000 buckets 100000 min 59 max 145 avg 100.0 std 10.0 rstd 10.0% 35 35 36 36 prng() prng(5) prng(0,5) … … 58 58 59 59 Sequential 60 trials 2000000 0 buckets 100000 min 139 max 265 avg 200.0 std 14.1 rstd 7.0%60 trials 2000000 buckets 100000 min 4 max 46 avg 20.0 std 4.5 rstd 22.3% 61 61 62 62 Concurrent 63 trials 2000000 0 buckets 100000 min 139 max 265 avg 200.0 std 14.1 rstd 7.0%64 trials 2000000 0 buckets 100000 min 139 max 265 avg 200.0 std 14.1 rstd 7.0%65 trials 2000000 0 buckets 100000 min 139 max 265 avg 200.0 std 14.1 rstd 7.0%66 trials 2000000 0 buckets 100000 min 139 max 265 avg 200.0 std 14.1 rstd 7.0%63 trials 2000000 buckets 100000 min 4 max 46 avg 20.0 std 4.5 rstd 22.3% 64 trials 2000000 buckets 100000 min 4 max 46 avg 20.0 std 4.5 rstd 22.3% 65 trials 2000000 buckets 100000 min 4 max 46 avg 20.0 std 4.5 rstd 22.3% 66 trials 2000000 buckets 100000 min 4 max 46 avg 20.0 std 4.5 rstd 22.3% 67 67 68 68 prng(t) prng(t,5) prng(t,0,5) … … 90 90 91 91 Sequential 92 trials 10000000 0 buckets 100000 min 875 max 1146 avg 1000.0 std 31.6 rstd 3.2%92 trials 10000000 buckets 100000 min 59 max 145 avg 100.0 std 10.0 rstd 10.0% 93 93 94 94 Concurrent 95 trials 10000000 0 buckets 100000 min 875 max 1146 avg 1000.0 std 31.6 rstd 3.2%96 trials 10000000 0 buckets 100000 min 875 max 1146 avg 1000.0 std 31.6 rstd 3.2%97 trials 10000000 0 buckets 100000 min 875 max 1146 avg 1000.0 std 31.6 rstd 3.2%98 trials 10000000 0 buckets 100000 min 875 max 1146 avg 1000.0 std 31.6 rstd 3.2%95 trials 10000000 buckets 100000 min 59 max 145 avg 100.0 std 10.0 rstd 10.0% 96 trials 10000000 buckets 100000 min 59 max 145 avg 100.0 std 10.0 rstd 10.0% 97 trials 10000000 buckets 100000 min 59 max 145 avg 100.0 std 10.0 rstd 10.0% 98 trials 10000000 buckets 100000 min 59 max 145 avg 100.0 std 10.0 rstd 10.0% -
tests/.expect/PRNG.x86.txt
r5ddb8bf r81da3da4 26 26 27 27 Sequential 28 trials 10000000 0 buckets 100000 min 858 max 1147 avg 1000.0 std 31.5 rstd 3.2%28 trials 10000000 buckets 100000 min 62 max 144 avg 100.0 std 10.0 rstd 10.0% 29 29 30 30 Concurrent 31 trials 10000000 0 buckets 100000 min 858 max 1147 avg 1000.0 std 31.5 rstd 3.2%32 trials 10000000 0 buckets 100000 min 858 max 1147 avg 1000.0 std 31.5 rstd 3.2%33 trials 10000000 0 buckets 100000 min 858 max 1147 avg 1000.0 std 31.5 rstd 3.2%34 trials 10000000 0 buckets 100000 min 858 max 1147 avg 1000.0 std 31.5 rstd 3.2%31 trials 10000000 buckets 100000 min 62 max 144 avg 100.0 std 10.0 rstd 10.0% 32 trials 10000000 buckets 100000 min 62 max 144 avg 100.0 std 10.0 rstd 10.0% 33 trials 10000000 buckets 100000 min 62 max 144 avg 100.0 std 10.0 rstd 10.0% 34 trials 10000000 buckets 100000 min 62 max 144 avg 100.0 std 10.0 rstd 10.0% 35 35 36 36 prng() prng(5) prng(0,5) … … 58 58 59 59 Sequential 60 trials 2000000 0 buckets 100000 min 144 max 270 avg 200.0 std 14.1 rstd 7.1%60 trials 2000000 buckets 100000 min 3 max 42 avg 20.0 std 4.5 rstd 22.4% 61 61 62 62 Concurrent 63 trials 2000000 0 buckets 100000 min 144 max 270 avg 200.0 std 14.1 rstd 7.1%64 trials 2000000 0 buckets 100000 min 144 max 270 avg 200.0 std 14.1 rstd 7.1%65 trials 2000000 0 buckets 100000 min 144 max 270 avg 200.0 std 14.1 rstd 7.1%66 trials 2000000 0 buckets 100000 min 144 max 270 avg 200.0 std 14.1 rstd 7.1%63 trials 2000000 buckets 100000 min 3 max 42 avg 20.0 std 4.5 rstd 22.4% 64 trials 2000000 buckets 100000 min 3 max 42 avg 20.0 std 4.5 rstd 22.4% 65 trials 2000000 buckets 100000 min 3 max 42 avg 20.0 std 4.5 rstd 22.4% 66 trials 2000000 buckets 100000 min 3 max 42 avg 20.0 std 4.5 rstd 22.4% 67 67 68 68 prng(t) prng(t,5) prng(t,0,5) … … 90 90 91 91 Sequential 92 trials 10000000 0 buckets 100000 min 858 max 1147 avg 1000.0 std 31.5 rstd 3.2%92 trials 10000000 buckets 100000 min 62 max 144 avg 100.0 std 10.0 rstd 10.0% 93 93 94 94 Concurrent 95 trials 10000000 0 buckets 100000 min 858 max 1147 avg 1000.0 std 31.5 rstd 3.2%96 trials 10000000 0 buckets 100000 min 858 max 1147 avg 1000.0 std 31.5 rstd 3.2%97 trials 10000000 0 buckets 100000 min 858 max 1147 avg 1000.0 std 31.5 rstd 3.2%98 trials 10000000 0 buckets 100000 min 858 max 1147 avg 1000.0 std 31.5 rstd 3.2%95 trials 10000000 buckets 100000 min 62 max 144 avg 100.0 std 10.0 rstd 10.0% 96 trials 10000000 buckets 100000 min 62 max 144 avg 100.0 std 10.0 rstd 10.0% 97 trials 10000000 buckets 100000 min 62 max 144 avg 100.0 std 10.0 rstd 10.0% 98 trials 10000000 buckets 100000 min 62 max 144 avg 100.0 std 10.0 rstd 10.0% -
tests/.expect/functions.arm64.txt
r5ddb8bf r81da3da4 105 105 struct _tuple2_ { 106 106 }; 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){107 static 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){ 108 108 ((void)((*_sizeof__tuple2_)=0)); 109 109 ((void)((*_alignof__tuple2_)=1)); … … 136 136 struct _tuple3_ { 137 137 }; 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){138 static 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){ 139 139 ((void)((*_sizeof__tuple3_)=0)); 140 140 ((void)((*_alignof__tuple3_)=1)); -
tests/.expect/functions.x64.txt
r5ddb8bf r81da3da4 105 105 struct _tuple2_ { 106 106 }; 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){107 static 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){ 108 108 ((void)((*_sizeof__tuple2_)=0)); 109 109 ((void)((*_alignof__tuple2_)=1)); … … 136 136 struct _tuple3_ { 137 137 }; 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){138 static 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){ 139 139 ((void)((*_sizeof__tuple3_)=0)); 140 140 ((void)((*_alignof__tuple3_)=1)); -
tests/.expect/functions.x86.txt
r5ddb8bf r81da3da4 105 105 struct _tuple2_ { 106 106 }; 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){107 static 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){ 108 108 ((void)((*_sizeof__tuple2_)=0)); 109 109 ((void)((*_alignof__tuple2_)=1)); … … 136 136 struct _tuple3_ { 137 137 }; 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){138 static 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){ 139 139 ((void)((*_sizeof__tuple3_)=0)); 140 140 ((void)((*_alignof__tuple3_)=1)); -
tests/PRNG.cfa
r5ddb8bf r81da3da4 10 10 // Created On : Wed Dec 29 09:38:12 2021 11 11 // Last Modified By : Peter A. Buhr 12 // Last Modified On : Mon Aug 14 08:49:53202313 // Update Count : 42 512 // Last Modified On : Tue Dec 5 08:14:57 2023 13 // Update Count : 428 14 14 // 15 15 … … 32 32 #define STARTTIME start = timeHiRes() 33 33 #define ENDTIME( extra ) sout | wd(0,1, (timeHiRes() - start)`ms / 1000.) | extra "seconds" 34 enum { BUCKETS = 100_000, TRIALS = 1 _000_000_000 };34 enum { BUCKETS = 100_000, TRIALS = 100_000_000 }; 35 35 #else 36 36 #define STARTTIME 37 37 #define ENDTIME( extra ) 38 enum { BUCKETS = 100_000, TRIALS = 10 0_000_000 };38 enum { BUCKETS = 100_000, TRIALS = 10_000_000 }; 39 39 #endif // TIME 40 40
Note:
See TracChangeset
for help on using the changeset viewer.