Changeset 4e13e2a
- Timestamp:
- Sep 17, 2019, 12:56:32 PM (6 years ago)
- Branches:
- ADT, arm-eh, ast-experimental, enum, forall-pointer-decay, jacob/cs343-translation, master, new-ast, new-ast-unique-expr, pthread-emulation, qualifiedEnum
- Children:
- 8e1467d
- Parents:
- a6f26ca
- Files:
-
- 6 edited
Legend:
- Unmodified
- Added
- Removed
-
TabularUnified benchmark/Makefile.in ¶
ra6f26ca r4e13e2a 380 380 BENCH_V_JAVAC = $(__bench_v_JAVAC_$(__quiet)) 381 381 BENCH_V_UPP = $(__bench_v_UPP_$(__quiet)) 382 BENCH_V_QTHREAD = $(__bench_v_QTHREAD_$(__quiet))383 382 __quiet = verbose 384 383 __bench_v_CC_quiet = @ … … 394 393 __bench_v_JAVAC_verbose = $(AM_V_JAVAC) 395 394 __bench_v_UPP_verbose = $(AM_V_UPP) 396 __bench_v_QTHREAD_verbose = $(AM_V_CC)397 395 TOOLSDIR = ${abs_top_builddir}/tools/ 398 396 REPEAT = ${abs_top_builddir}/tools/repeat … … 410 408 ctxswitch-upp_coroutine.run ctxswitch-upp_thread.run \ 411 409 ctxswitch-goroutine.run ctxswitch-java_thread.run \ 412 ctxswitch-qthreads.run$(am__append_1)410 $(am__append_1) 413 411 testdir = $(top_srcdir)/tests 414 412 all: all-am … … 860 858 @chmod a+x a.out 861 859 862 ctxswitch-qthreads$(EXEEXT):863 $(BENCH_V_QTHREADS)$(COMPILE) -DBENCH_N=50000000 -I/u/pabuhr/software/qthreads/include -L/u/pabuhr/software/qthreads/lib -Xlinker -R/u/pabuhr/software/qthreads/lib $(srcdir)/ctxswitch/qthreads.c -lqthread864 865 860 mutex$(EXEEXT) :\ 866 861 loop.run \ … … 950 945 creation-upp_thread.run \ 951 946 creation-goroutine.run \ 952 creation-java_thread.run \ 953 creation-qthreads.run 947 creation-java_thread.run 954 948 955 949 creation-cfa_coroutine$(EXEEXT): … … 979 973 @echo "java JavaThread" >> a.out 980 974 @chmod a+x a.out 981 982 creation-qthreads$(EXEEXT):983 $(BENCH_V_QTHREADS)$(COMPILE) -DBENCH_N=50000000 -I/u/pabuhr/software/qthreads/include -L/u/pabuhr/software/qthreads/lib -Xlinker -R/u/pabuhr/software/qthreads/lib $(srcdir)/ctxswitch/qthreads.c -lqthread984 975 985 976 compile$(EXEEXT) :\ -
TabularUnified src/AST/Expr.hpp ¶
ra6f26ca r4e13e2a 541 541 542 542 CommaExpr( const CodeLocation & loc, const Expr * a1, const Expr * a2 ) 543 : Expr( loc ), arg1( a1 ), arg2( a2 ) {} 543 : Expr( loc ), arg1( a1 ), arg2( a2 ) { 544 this->result = a2->result; 545 } 544 546 545 547 const Expr * accept( Visitor & v ) const override { return v.visit( this ); } -
TabularUnified src/AST/ForallSubstitutionTable.cpp ¶
ra6f26ca r4e13e2a 19 19 #include <vector> 20 20 21 #include "Copy.hpp" // for shallowCopy 21 22 #include "Decl.hpp" 22 23 #include "Node.hpp" … … 26 27 namespace ast { 27 28 28 std::vector< ptr< TypeDecl > > ForallSubstitutionTable::clone( 29 const std::vector< ptr< TypeDecl > > & forall, Visitor & v 29 std::vector< ptr< TypeDecl > > ForallSubstitutionTable::clone( 30 const std::vector< ptr< TypeDecl > > & forall, Visitor & v 30 31 ) { 31 32 std::vector< ptr< TypeDecl > > new_forall; … … 34 35 for ( const ast::TypeDecl * d : forall ) { 35 36 // create cloned type decl and insert into substitution map before further mutation 36 auto new_d = new ast::TypeDecl{ 37 d->location, d->name, d->storage, d->base, d->kind, d->sized, d->init }; 37 auto new_d = shallowCopy( d ); 38 38 decls.insert( d, new_d ); 39 39 // perform other mutations and add to output -
TabularUnified src/ResolvExpr/Candidate.hpp ¶
ra6f26ca r4e13e2a 51 51 52 52 Candidate( const ast::Expr * x, const ast::TypeEnvironment & e ) 53 : expr( x ), cost( Cost::zero ), cvtCost( Cost::zero ), env( e ), open(), need() {} 53 : expr( x ), cost( Cost::zero ), cvtCost( Cost::zero ), env( e ), open(), need() { 54 assert(x->result); 55 } 54 56 55 57 Candidate( const Candidate & o, const ast::Expr * x, const Cost & addedCost = Cost::zero ) 56 58 : expr( x ), cost( o.cost + addedCost ), cvtCost( Cost::zero ), env( o.env ), open( o.open ), 57 need( o.need ) {} 59 need( o.need ) { 60 assert(x->result); 61 } 58 62 59 63 Candidate( 60 const ast::Expr * x, const ast::TypeEnvironment & e, const ast::OpenVarSet & o, 64 const ast::Expr * x, const ast::TypeEnvironment & e, const ast::OpenVarSet & o, 61 65 const ast::AssertionSet & n, const Cost & c, const Cost & cvt = Cost::zero ) 62 : expr( x ), cost( c ), cvtCost( cvt ), env( e ), open( o ), need( n.begin(), n.end() ) {} 66 : expr( x ), cost( c ), cvtCost( cvt ), env( e ), open( o ), need( n.begin(), n.end() ) { 67 assert(x->result); 68 } 63 69 64 70 Candidate( … … 66 72 ast::AssertionSet && n, const Cost & c, const Cost & cvt = Cost::zero ) 67 73 : expr( x ), cost( c ), cvtCost( cvt ), env( std::move( e ) ), open( std::move( o ) ), 68 need( n.begin(), n.end() ) {} 74 need( n.begin(), n.end() ) { 75 assert(x->result); 76 } 69 77 }; 70 78 -
TabularUnified src/ResolvExpr/CandidateFinder.cpp ¶
ra6f26ca r4e13e2a 1485 1485 { 1486 1486 ast::ptr< ast::Type > newType = candidate->expr->result; 1487 assertf(candidate->expr->result, "Result of expression %p for candidate is null", candidate->expr.get()); 1487 1488 candidate->env.apply( newType ); 1488 1489 mangleName = Mangle::mangle( newType ); -
TabularUnified src/ResolvExpr/RenameVars.cc ¶
ra6f26ca r4e13e2a 83 83 auto it = nameMap.find( type->name ); 84 84 if ( it != nameMap.end() ) { 85 // unconditionally mutate because map will *always* have different name, 85 // unconditionally mutate because map will *always* have different name, 86 86 // if this mutates, will *always* have been mutated by ForallSubstitutor above 87 87 ast::TypeInstType * mut = ast::mutate( type ); … … 96 96 const NodeT * openLevel( const NodeT * type ) { 97 97 if ( type->forall.empty() ) return type; 98 98 99 99 nameMap.beginScope(); 100 100 … … 121 121 void closeLevel( const ast::ParameterizedType * type ) { 122 122 if ( type->forall.empty() ) return; 123 123 124 124 nameMap.endScope(); 125 125 } … … 141 141 } 142 142 }; 143 143 144 144 struct RenameVars_new /*: public ast::WithForallSubstitutor*/ { 145 145 #warning when old RenameVars goes away, replace hack below with global pass inheriting from WithForallSubstitutor
Note: See TracChangeset
for help on using the changeset viewer.