Changeset ee6dbae
- Timestamp:
- Jul 11, 2019, 1:34:37 PM (5 years ago)
- Branches:
- ADT, arm-eh, ast-experimental, enum, forall-pointer-decay, jacob/cs343-translation, jenkins-sandbox, master, new-ast, new-ast-unique-expr, pthread-emulation, qualifiedEnum
- Children:
- 302d84c2, 7870799
- Parents:
- d6a8aef (diff), 1d760934 (diff)
Note: this is a merge changeset, the changes displayed below correspond to the merge itself.
Use the(diff)
links above to see all the changes relative to each parent. - Files:
-
- 2 added
- 9 edited
Legend:
- Unmodified
- Added
- Removed
-
doc/papers/concurrency/Paper.tex
rd6a8aef ree6dbae 2 2 3 3 \articletype{RESEARCH ARTICLE}% 4 5 % Referees 6 % Doug Lea, dl@cs.oswego.edu, SUNY Oswego 7 % Herb Sutter, hsutter@microsoft.com, Microsoft Corp 8 % Gor Nishanov, gorn@microsoft.com, Microsoft Corp 9 % James Noble, kjx@ecs.vuw.ac.nz, Victoria University of Wellington, School of Engineering and Computer Science 4 10 5 11 \received{XXXXX} … … 312 318 As a result, languages like Java, Scala, Objective-C~\cite{obj-c-book}, \CCeleven~\cite{C11}, and C\#~\cite{Csharp} adopt the 1:1 kernel-threading model, with a variety of presentation mechanisms. 313 319 From 2000 onwards, languages like Go~\cite{Go}, Erlang~\cite{Erlang}, Haskell~\cite{Haskell}, D~\cite{D}, and \uC~\cite{uC++,uC++book} have championed the M:N user-threading model, and many user-threading libraries have appeared~\cite{Qthreads,MPC,Marcel}, including putting green threads back into Java~\cite{Quasar}. 314 The main argument for user-level threading is that they are lighter weight than kernel threads(locking and context switching do not cross the kernel boundary), so there is less restriction on programming styles that encourage large numbers of threads performing medium work units to facilitate load balancing by the runtime~\cite{Verch12}.320 The main argument for user-level threading is that it is lighter weight than kernel threading (locking and context switching do not cross the kernel boundary), so there is less restriction on programming styles that encourage large numbers of threads performing medium work units to facilitate load balancing by the runtime~\cite{Verch12}. 315 321 As well, user-threading facilitates a simpler concurrency approach using thread objects that leverage sequential patterns versus events with call-backs~\cite{Adya02,vonBehren03}. 316 322 Finally, performant user-threading implementations (both time and space) meet or exceed direct kernel-threading implementations, while achieving the programming advantages of high concurrency levels and safety. … … 669 675 In contrast, the execution state is large, with one @resume@ and seven @suspend@s. 670 676 Hence, the key benefits of the generator are correctness, safety, and maintenance because the execution states are transcribed directly into the programming language rather than using a table-driven approach. 671 Because FSMs can be complex and frequently occur in important domains, direct support of the generator is crucialin a system programming language.677 Because FSMs can be complex and frequently occur in important domains, direct generator support is important in a system programming language. 672 678 673 679 \begin{figure} … … 796 802 This semantics is basically a tail-call optimization, which compilers already perform. 797 803 The example shows the assembly code to undo the generator's entry code before the direct jump. 798 This assembly code depends on what entry code is generated, specifically if there are local variables ,and the level of optimization.804 This assembly code depends on what entry code is generated, specifically if there are local variables and the level of optimization. 799 805 To provide this new calling convention requires a mechanism built into the compiler, which is beyond the scope of \CFA at this time. 800 806 Nevertheless, it is possible to hand generate any symmetric generators for proof of concept and performance testing. -
libcfa/prelude/builtins.c
rd6a8aef ree6dbae 10 10 // Created On : Fri Jul 21 16:21:03 2017 11 11 // Last Modified By : Peter A. Buhr 12 // Last Modified On : Tue Mar 26 23:10:36201913 // Update Count : 9 512 // Last Modified On : Tue Jun 25 18:06:52 2019 13 // Update Count : 97 14 14 // 15 15 … … 49 49 void abort( const char fmt[], ... ) __attribute__ (( format(printf, 1, 2), __nothrow__, __leaf__, __noreturn__ )); 50 50 51 // i ncrement/decrement unification51 // implicit increment, decrement if += defined, and implicit not if != defined 52 52 53 53 static inline { … … 63 63 forall( dtype DT | sized(DT) | { void ?{}( DT &, DT ); void ^?{}( DT & ); DT & ?-=?( DT &, one_t ); } ) 64 64 DT & ?--( DT & x ) { DT tmp = x; x -= 1; return tmp; } 65 66 forall( dtype DT | { int ?!=?( const DT &, zero_t ); } ) 67 int !?( const DT & x ) { return !( x != 0 ); } 65 68 } // distribution 66 69 -
libcfa/src/bits/containers.hfa
rd6a8aef ree6dbae 9 9 // Author : Thierry Delisle 10 10 // Created On : Tue Oct 31 16:38:50 2017 11 // Last Modified By : --12 // Last Modified On : --13 // Update Count : 011 // Last Modified By : Peter A. Buhr 12 // Last Modified On : Wed Jun 26 08:52:20 2019 13 // Update Count : 4 14 14 15 15 #pragma once … … 115 115 } 116 116 return top; 117 } 118 119 forall(dtype T | is_node(T)) 120 static inline int ?!=?( const __stack(T) & this, __attribute__((unused)) zero_t zero ) { 121 return this.top != 0; 117 122 } 118 123 #endif … … 186 191 187 192 forall(dtype T | is_node(T)) 188 static inline bool ?!=?(__queue(T) & this, __attribute__((unused)) zero_t zero ) {193 static inline int ?!=?( const __queue(T) & this, __attribute__((unused)) zero_t zero ) { 189 194 return this.head != 0; 190 195 } … … 268 273 269 274 forall(dtype T | sized(T)) 270 static inline bool ?!=?(__dllist(T) & this, __attribute__((unused)) zero_t zero ) {275 static inline int ?!=?( const __dllist(T) & this, __attribute__((unused)) zero_t zero ) { 271 276 return this.head != 0; 272 277 } -
libcfa/src/stdlib.cfa
rd6a8aef ree6dbae 10 10 // Created On : Thu Jan 28 17:10:29 2016 11 11 // Last Modified By : Peter A. Buhr 12 // Last Modified On : Thu Jul 12 08:03:59 201813 // Update Count : 4 5812 // Last Modified On : Mon Jun 24 17:34:44 2019 13 // Update Count : 462 14 14 // 15 15 … … 65 65 forall( dtype T | sized(T), ttype Params | { void ?{}( T &, Params ); } ) 66 66 T * anew( size_t dim, Params p ) { 67 T * arr = alloc( dim );67 T * arr = alloc( dim ); 68 68 for ( unsigned int i = 0; i < dim; i += 1 ) { 69 69 (arr[i]){ p }; // run constructor -
src/Parser/LinkageSpec.h
rd6a8aef ree6dbae 9 9 // Author : Rodolfo G. Esteves 10 10 // Created On : Sat May 16 13:24:28 2015 11 // Last Modified By : Andrew Beach12 // Last Modified On : Thr Spt 13 15:59:00 201813 // Update Count : 1 711 // Last Modified By : Peter A. Buhr 12 // Last Modified On : Wed Jul 10 16:02:34 2019 13 // Update Count : 18 14 14 // 15 15 … … 35 35 constexpr Spec( unsigned int val ) : val( val ) {} 36 36 constexpr Spec( Spec const & other ) : val( other.val ) {} 37 constexpr Spec & operator=( const Spec & ) = default; 37 38 // Operators may go here. 38 39 // Supports == and != -
src/ResolvExpr/ResolveAssertions.cc
rd6a8aef ree6dbae 9 9 // Author : Aaron B. Moss 10 10 // Created On : Fri Oct 05 13:46:00 2018 11 // Last Modified By : Aaron B. Moss12 // Last Modified On : Fri Oct 05 13:46:00 201813 // Update Count : 111 // Last Modified By : Peter A. Buhr 12 // Last Modified On : Wed Jul 10 16:10:37 2019 13 // Update Count : 2 14 14 // 15 15 … … 368 368 std::string resKey = SymTab::Mangler::mangleType( resType ); 369 369 delete resType; 370 return std::move( resKey );370 return resKey; 371 371 } 372 372 -
src/SynTree/BaseSyntaxNode.h
rd6a8aef ree6dbae 9 9 // Author : Thierry Delisle 10 10 // Created On : Tue Feb 14 07:44:20 2017 11 // Last Modified By : Andrew Beach12 // Last Modified On : Thr Aug 17 13:44:0013 // Update Count : 111 // Last Modified By : Peter A. Buhr 12 // Last Modified On : Wed Jul 10 16:13:49 2019 13 // Update Count : 4 14 14 // 15 15 … … 25 25 class BaseSyntaxNode { 26 26 public: 27 27 static Stats::Counters::SimpleCounter* new_nodes; 28 28 29 29 CodeLocation location; 30 30 31 BaseSyntaxNode() { ++*new_nodes; } 32 BaseSyntaxNode( const BaseSyntaxNode& o ) : location(o.location) { ++*new_nodes; } 33 31 BaseSyntaxNode() { ++*new_nodes; } 32 BaseSyntaxNode( const BaseSyntaxNode & o ) : location(o.location) { ++*new_nodes; } 33 BaseSyntaxNode & operator=( const BaseSyntaxNode & ) = default; 34 34 35 virtual ~BaseSyntaxNode() {} 35 36 … … 37 38 virtual void accept( Visitor & v ) = 0; 38 39 virtual BaseSyntaxNode * acceptMutator( Mutator & m ) = 0; 39 40 41 40 /// Notes: 41 /// * each node is responsible for indenting its children. 42 /// * Expressions should not finish with a newline, since the expression's parent has better information. 42 43 virtual void print( std::ostream & os, Indenter indent = {} ) const = 0; 43 44 }; -
src/SynTree/Constant.h
rd6a8aef ree6dbae 9 9 // Author : Richard C. Bilson 10 10 // Created On : Mon May 18 07:44:20 2015 11 // Last Modified By : Andrew Beach12 // Last Modified On : Fri Spt 28 14:48:00 201813 // Update Count : 1 811 // Last Modified By : Peter A. Buhr 12 // Last Modified On : Wed Jul 10 15:57:38 2019 13 // Update Count : 19 14 14 // 15 15 … … 30 30 Constant( Type * type, std::string rep, std::optional<unsigned long long> i ); 31 31 Constant( const Constant & other ); 32 Constant & operator=( const Constant & ) = default; 32 33 virtual ~Constant(); 33 34 -
tests/.expect/completeTypeError.txt
rd6a8aef ree6dbae 27 27 void 28 28 ) 29 Environment:( _8 2_4_DT ) -> instance of struct A with body 0 (no widening)29 Environment:( _83_4_DT ) -> instance of struct A with body 0 (no widening) 30 30 31 31 … … 50 50 void 51 51 ) 52 Environment:( _8 2_4_DT ) -> instance of struct B with body 1 (no widening)52 Environment:( _83_4_DT ) -> instance of struct B with body 1 (no widening) 53 53 54 54 … … 127 127 void 128 128 ) 129 Environment:( _10 1_0_T ) -> instance of type T (not function type) (no widening)129 Environment:( _102_0_T ) -> instance of type T (not function type) (no widening) 130 130 131 131 Could not satisfy assertion: 132 132 ?=?: pointer to function 133 133 ... with parameters 134 reference to instance of type _10 1_0_T (not function type)135 instance of type _10 1_0_T (not function type)134 reference to instance of type _102_0_T (not function type) 135 instance of type _102_0_T (not function type) 136 136 ... returning 137 _retval__operator_assign: instance of type _10 1_0_T (not function type)137 _retval__operator_assign: instance of type _102_0_T (not function type) 138 138 ... with attributes: 139 139 Attribute with name: unused
Note: See TracChangeset
for help on using the changeset viewer.