Changeset c018b85
- Timestamp:
- Jan 18, 2019, 4:30:07 PM (6 years ago)
- Branches:
- ADT, aaron-thesis, arm-eh, ast-experimental, cleanup-dtors, enum, forall-pointer-decay, jacob/cs343-translation, jenkins-sandbox, master, new-ast, new-ast-unique-expr, no_list, persistent-indexer, pthread-emulation, qualifiedEnum
- Children:
- 0c13238
- Parents:
- e1f7eef (diff), bead1cf (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:
-
- 1 added
- 19 edited
- 1 moved
Legend:
- Unmodified
- Added
- Removed
-
doc/theses/aaron_moss_PhD/phd/background.tex
re1f7eef rc018b85 213 213 The ability of types to begin or cease to satisfy traits when declarations go into or out of scope makes caching of trait satisfaction judgements difficult, and the ability of traits to take multiple type parameters can lead to a combinatorial explosion of work in any attempt to pre-compute trait satisfaction relationships. 214 214 215 \subsection{Implicit Conversions} 215 \subsection{Implicit Conversions} \label{implicit-conv-sec} 216 216 217 217 In addition to the multiple interpretations of an expression produced by name overloading and polymorphic functions, for backward compatibility \CFA{} must support all of the implicit conversions present in C, producing further candidate interpretations for expressions. -
doc/theses/aaron_moss_PhD/phd/resolution-heuristics.tex
re1f7eef rc018b85 2 2 \label{resolution-chap} 3 3 4 Talk about the resolution heuristics. This is the bulk of the thesis. 4 The main task of the \CFACC{} type-checker is \emph{expression resolution}, determining which declarations the identifiers in each expression correspond to. 5 Resolution is a straightforward task in C, as each declaration has a unique identifier, but in \CFA{} the name overloading features discussed in Section~\ref{overloading-sec} generate multiple candidate declarations for each identifier. 6 I refer to a given matching between identifiers and declarations in an expression as an \emph{interpretation}; an interpretation also includes information about polymorphic type bindings and implicit casts to support the \CFA{} features discussed in Sections~\ref{poly-func-sec} and~\ref{implicit-conv-sec}, each of which increase the proportion of feasible candidate interpretations. 7 To choose between feasible interpretations, \CFA{} defines a \emph{conversion cost} to rank interpretations; the expression resolution problem is thus to find the unique minimal-cost interpretation for an expression, reporting an error if no such interpretation exists. 8 9 \section{Conversion Cost} 10 11 5 12 6 13 % Discuss changes to cost model, as promised in Ch. 2 14 15 % Mention relevance of work to C++20 concepts -
doc/working/exception/impl/exception.c
re1f7eef rc018b85 243 243 244 244 // Get a function pointer from the relative offset and call it 245 // _Unwind_Reason_Code (*matcher)() = (_Unwind_Reason_Code (*)())lsd_info.LPStart + imatcher; 245 // _Unwind_Reason_Code (*matcher)() = (_Unwind_Reason_Code (*)())lsd_info.LPStart + imatcher; 246 246 247 247 _Unwind_Reason_Code (*matcher)() = … … 320 320 // on how the assembly works. 321 321 // Setup the personality routine 322 #if defined(__PIC__) 323 asm volatile (".cfi_personality 0x9b,CFA.ref.__gcfa_personality_v0"); 324 // Setup the exception table 325 asm volatile (".cfi_lsda 0x1b, .LLSDACFA2"); 326 #else 322 327 asm volatile (".cfi_personality 0x3,__gcfa_personality_v0"); 323 328 // Setup the exception table 324 329 asm volatile (".cfi_lsda 0x3, .LLSDACFA2"); 330 #endif 325 331 326 332 // Label which defines the start of the area for which the handler is setup … … 356 362 // Some more works need to be done if we want to have a single 357 363 // call to the try routine 364 #if defined(__PIC__) 365 asm ( 366 //HEADER 367 ".LFECFA1:\n" 368 " .globl __gcfa_personality_v0\n" 369 " .section .gcc_except_table,\"a\",@progbits\n" 370 ".LLSDACFA2:\n" //TABLE header 371 " .byte 0xff\n" 372 " .byte 0xff\n" 373 " .byte 0x1\n" 374 " .uleb128 .LLSDACSECFA2-.LLSDACSBCFA2\n" // BODY length 375 // Body uses language specific data and therefore could be modified arbitrarily 376 ".LLSDACSBCFA2:\n" // BODY start 377 " .uleb128 .TRYSTART-__try_terminate\n" // Handled area start (relative to start of function) 378 " .uleb128 .TRYEND-.TRYSTART\n" // Handled area length 379 " .uleb128 .CATCH-__try_terminate\n" // Handler landing pad adress (relative to start of function) 380 " .uleb128 1\n" // Action code, gcc seems to use always 0 381 ".LLSDACSECFA2:\n" // BODY end 382 " .text\n" // TABLE footer 383 " .size __try_terminate, .-__try_terminate\n" 384 ); 385 386 // Somehow this piece of helps with the resolution of debug symbols. 387 __attribute__((unused)) static const int dummy = 0; 388 asm ( 389 " .hidden CFA.ref.__gcfa_personality_v0\n" // Declare an new hidden symbol 390 " .weak CFA.ref.__gcfa_personality_v0\n" 391 " .section .data.rel.local.CFA.ref.__gcfa_personality_v0,\"awG\",@progbits,CFA.ref.__gcfa_personality_v0,comdat\n" // No clue what this does specifically 392 " .align 8\n" 393 " .type CFA.ref.__gcfa_personality_v0, @object\n" // Type of our hidden symbol (it's not actually the function itself) 394 " .size CFA.ref.__gcfa_personality_v0, 8\n" // Size of our hidden symbol 395 "CFA.ref.__gcfa_personality_v0:\n" 396 " .quad __gcfa_personality_v0\n" 397 ); 398 #else 358 399 asm ( 359 400 //HEADER … … 375 416 " .text\n" // TABLE footer 376 417 " .size __try_terminate, .-__try_terminate\n" 377 " .ident \"GCC: (Ubuntu 6.2.0-3ubuntu11~16.04) 6.2.0 20160901\"\n"378 // " .section .note.GNU-stack,\"x\",@progbits\n"379 418 ); 419 #endif -
doc/working/exception/impl/pdc.s
re1f7eef rc018b85 101 101 .text 102 102 .size foo, .-foo 103 .ident "GCC: (Ubuntu 7. 3.0-21ubuntu1~16.04) 7.3.0"103 .ident "GCC: (Ubuntu 7.4.0-1ubuntu1~16.04~ppa1) 7.4.0" 104 104 .section .note.GNU-stack,"",@progbits -
doc/working/exception/impl/pic.s
re1f7eef rc018b85 1 1 .file "test.c" 2 2 .text 3 .Ltext0: 3 4 .globl clean 4 5 .type clean, @function 5 6 clean: 6 7 .LFB0: 8 .file 1 "test.c" 9 .loc 1 1 0 7 10 .cfi_startproc 8 11 pushq %rbp … … 12 15 .cfi_def_cfa_register 6 13 16 movq %rdi, -8(%rbp) 17 .loc 1 1 0 14 18 nop 15 19 popq %rbp … … 23 27 foo: 24 28 .LFB1: 29 .loc 1 4 0 25 30 .cfi_startproc 26 31 .cfi_personality 0x9b,DW.ref.__gcc_personality_v0 … … 39 44 .cfi_offset 3, -40 40 45 movl %edi, -52(%rbp) 46 .loc 1 4 0 41 47 movq %fs:40, %rax 42 48 movq %rax, -40(%rbp) 43 49 xorl %eax, %eax 50 .loc 1 6 0 44 51 movl -52(%rbp), %eax 45 52 movl %eax, %edi … … 50 57 movl $0, %r12d 51 58 .L7: 59 .loc 1 5 0 52 60 leaq -44(%rbp), %rax 53 61 movq %rax, %rdi … … 56 64 cmpl $1, %r12d 57 65 je .L4 66 .loc 1 6 0 58 67 movl %r13d, %eax 68 .loc 1 7 0 59 69 movq -40(%rbp), %rdx 60 70 xorq %fs:40, %rdx … … 64 74 movq %rax, %rbx 65 75 movl $1, %r12d 76 .loc 1 5 0 66 77 jmp .L7 67 78 .L4: … … 71 82 .LEHE1: 72 83 .L10: 84 .loc 1 7 0 73 85 call __stack_chk_fail@PLT 74 86 .L8: … … 101 113 .text 102 114 .size foo, .-foo 115 .Letext0: 116 .section .debug_info,"",@progbits 117 .Ldebug_info0: 118 .long 0x9c 119 .value 0x4 120 .long .Ldebug_abbrev0 121 .byte 0x8 122 .uleb128 0x1 123 .long .LASF0 124 .byte 0xc 125 .long .LASF1 126 .long .LASF2 127 .quad .Ltext0 128 .quad .Letext0-.Ltext0 129 .long .Ldebug_line0 130 .uleb128 0x2 131 .string "foo" 132 .byte 0x1 133 .byte 0x4 134 .long 0x68 135 .quad .LFB1 136 .quad .LFE1-.LFB1 137 .uleb128 0x1 138 .byte 0x9c 139 .long 0x68 140 .uleb128 0x3 141 .string "x" 142 .byte 0x1 143 .byte 0x4 144 .long 0x68 145 .uleb128 0x3 146 .byte 0x91 147 .sleb128 -68 148 .uleb128 0x4 149 .string "i" 150 .byte 0x1 151 .byte 0x5 152 .long 0x68 153 .uleb128 0x2 154 .byte 0x91 155 .sleb128 -60 156 .byte 0 157 .uleb128 0x5 158 .byte 0x4 159 .byte 0x5 160 .string "int" 161 .uleb128 0x6 162 .long .LASF3 163 .byte 0x1 164 .byte 0x1 165 .quad .LFB0 166 .quad .LFE0-.LFB0 167 .uleb128 0x1 168 .byte 0x9c 169 .long 0x99 170 .uleb128 0x3 171 .string "p" 172 .byte 0x1 173 .byte 0x1 174 .long 0x99 175 .uleb128 0x2 176 .byte 0x91 177 .sleb128 -24 178 .byte 0 179 .uleb128 0x7 180 .byte 0x8 181 .long 0x68 182 .byte 0 183 .section .debug_abbrev,"",@progbits 184 .Ldebug_abbrev0: 185 .uleb128 0x1 186 .uleb128 0x11 187 .byte 0x1 188 .uleb128 0x25 189 .uleb128 0xe 190 .uleb128 0x13 191 .uleb128 0xb 192 .uleb128 0x3 193 .uleb128 0xe 194 .uleb128 0x1b 195 .uleb128 0xe 196 .uleb128 0x11 197 .uleb128 0x1 198 .uleb128 0x12 199 .uleb128 0x7 200 .uleb128 0x10 201 .uleb128 0x17 202 .byte 0 203 .byte 0 204 .uleb128 0x2 205 .uleb128 0x2e 206 .byte 0x1 207 .uleb128 0x3f 208 .uleb128 0x19 209 .uleb128 0x3 210 .uleb128 0x8 211 .uleb128 0x3a 212 .uleb128 0xb 213 .uleb128 0x3b 214 .uleb128 0xb 215 .uleb128 0x27 216 .uleb128 0x19 217 .uleb128 0x49 218 .uleb128 0x13 219 .uleb128 0x11 220 .uleb128 0x1 221 .uleb128 0x12 222 .uleb128 0x7 223 .uleb128 0x40 224 .uleb128 0x18 225 .uleb128 0x2116 226 .uleb128 0x19 227 .uleb128 0x1 228 .uleb128 0x13 229 .byte 0 230 .byte 0 231 .uleb128 0x3 232 .uleb128 0x5 233 .byte 0 234 .uleb128 0x3 235 .uleb128 0x8 236 .uleb128 0x3a 237 .uleb128 0xb 238 .uleb128 0x3b 239 .uleb128 0xb 240 .uleb128 0x49 241 .uleb128 0x13 242 .uleb128 0x2 243 .uleb128 0x18 244 .byte 0 245 .byte 0 246 .uleb128 0x4 247 .uleb128 0x34 248 .byte 0 249 .uleb128 0x3 250 .uleb128 0x8 251 .uleb128 0x3a 252 .uleb128 0xb 253 .uleb128 0x3b 254 .uleb128 0xb 255 .uleb128 0x49 256 .uleb128 0x13 257 .uleb128 0x2 258 .uleb128 0x18 259 .byte 0 260 .byte 0 261 .uleb128 0x5 262 .uleb128 0x24 263 .byte 0 264 .uleb128 0xb 265 .uleb128 0xb 266 .uleb128 0x3e 267 .uleb128 0xb 268 .uleb128 0x3 269 .uleb128 0x8 270 .byte 0 271 .byte 0 272 .uleb128 0x6 273 .uleb128 0x2e 274 .byte 0x1 275 .uleb128 0x3f 276 .uleb128 0x19 277 .uleb128 0x3 278 .uleb128 0xe 279 .uleb128 0x3a 280 .uleb128 0xb 281 .uleb128 0x3b 282 .uleb128 0xb 283 .uleb128 0x27 284 .uleb128 0x19 285 .uleb128 0x11 286 .uleb128 0x1 287 .uleb128 0x12 288 .uleb128 0x7 289 .uleb128 0x40 290 .uleb128 0x18 291 .uleb128 0x2117 292 .uleb128 0x19 293 .uleb128 0x1 294 .uleb128 0x13 295 .byte 0 296 .byte 0 297 .uleb128 0x7 298 .uleb128 0xf 299 .byte 0 300 .uleb128 0xb 301 .uleb128 0xb 302 .uleb128 0x49 303 .uleb128 0x13 304 .byte 0 305 .byte 0 306 .byte 0 307 .section .debug_aranges,"",@progbits 308 .long 0x2c 309 .value 0x2 310 .long .Ldebug_info0 311 .byte 0x8 312 .byte 0 313 .value 0 314 .value 0 315 .quad .Ltext0 316 .quad .Letext0-.Ltext0 317 .quad 0 318 .quad 0 319 .section .debug_line,"",@progbits 320 .Ldebug_line0: 321 .section .debug_str,"MS",@progbits,1 322 .LASF0: 323 .string "GNU C11 7.4.0 -mtune=generic -march=x86-64 -g -fexceptions -fPIC -fstack-protector-strong" 324 .LASF2: 325 .string "/home/tdelisle/workspace/cforall/main/doc/working/exception/impl" 326 .LASF1: 327 .string "test.c" 328 .LASF3: 329 .string "clean" 103 330 .hidden DW.ref.__gcc_personality_v0 104 331 .weak DW.ref.__gcc_personality_v0 105 .section .data. DW.ref.__gcc_personality_v0,"awG",@progbits,DW.ref.__gcc_personality_v0,comdat332 .section .data.rel.local.DW.ref.__gcc_personality_v0,"awG",@progbits,DW.ref.__gcc_personality_v0,comdat 106 333 .align 8 107 334 .type DW.ref.__gcc_personality_v0, @object … … 109 336 DW.ref.__gcc_personality_v0: 110 337 .quad __gcc_personality_v0 111 .ident "GCC: (Ubuntu 7. 3.0-21ubuntu1~16.04) 7.3.0"338 .ident "GCC: (Ubuntu 7.4.0-1ubuntu1~16.04~ppa1) 7.4.0" 112 339 .section .note.GNU-stack,"",@progbits -
driver/cfa.cc
re1f7eef rc018b85 10 10 // Created On : Tue Aug 20 13:44:49 2002 11 11 // Last Modified By : Peter A. Buhr 12 // Last Modified On : Fri Sep 14 23:02:59 201813 // Update Count : 2 7712 // Last Modified On : Tue Jan 15 20:56:03 2019 13 // Update Count : 280 14 14 // 15 15 … … 384 384 nargs += 1; 385 385 386 for ( int i = 0; i < nlibs; i += 1 ) { // copy non-user libraries after all user libraries 387 args[nargs] = libs[i]; 388 nargs += 1; 389 } // for 390 386 391 if ( link ) { 387 392 args[nargs] = "-Xlinker"; … … 414 419 nargs += 1; 415 420 args[nargs] = "-lrt"; 421 nargs += 1; 422 args[nargs] = "-lm"; 416 423 nargs += 1; 417 424 } // if … … 498 505 args[nargs] = ( *new string( string("-B") + Bprefix ) ).c_str(); 499 506 nargs += 1; 500 args[nargs] = "-lm";501 nargs += 1;502 507 } else { 503 508 cerr << argv[0] << " error, compiler \"" << compiler_name << "\" unsupported." << endl; 504 509 exit( EXIT_FAILURE ); 505 510 } // if 506 507 for ( int i = 0; i < nlibs; i += 1 ) { // copy non-user libraries after all user libraries508 args[nargs] = libs[i];509 nargs += 1;510 } // for511 511 512 512 args[nargs] = NULL; // terminate with NULL -
libcfa/src/concurrency/coroutine.cfa
re1f7eef rc018b85 83 83 84 84 void ^?{}(coroutine_desc& this) { 85 if(this.state != Halted ) {85 if(this.state != Halted && this.state != Start) { 86 86 coroutine_desc * src = TL_GET( this_coroutine ); 87 87 coroutine_desc * dst = &this; -
src/Concurrency/Keywords.cc
re1f7eef rc018b85 575 575 576 576 //in reverse order : 577 // monitor_ guard_t __guard = { __monitors, #, func };577 // monitor_dtor_guard_t __guard = { __monitors, func }; 578 578 body->push_front( 579 579 new DeclStmt( new ObjectDecl( … … 634 634 assert(generic_func); 635 635 636 // in reverse order :636 // in reverse order : 637 637 // monitor_guard_t __guard = { __monitors, #, func }; 638 638 body->push_front( -
src/Concurrency/Waitfor.cc
re1f7eef rc018b85 66 66 void foo() { 67 67 while( true ) { 68 69 acceptable_t acceptables[3]; 70 if( a < 1 ) { 71 acceptables[0].func = f; 72 acceptables[0].mon = a; 73 } 74 acceptables[1].func = g; 75 acceptables[1].mon = a; 76 77 acceptables[2].func = f; 78 acceptables[2].mon = a; 79 acceptables[2].is_dtor = true; 80 81 int ret = waitfor_internal( acceptables, swagl() ); 82 83 switch( ret ) { 84 case 0: 85 { 86 bar(); 68 { 69 acceptable_t acceptables[3]; 70 if( a < 1 ) { 71 acceptables[0].func = f; 72 acceptables[0].mon = a; 87 73 } 88 case 1: 89 { 90 baz(); 74 acceptables[1].func = g; 75 acceptables[1].mon = a; 76 77 acceptables[2].func = f; 78 acceptables[2].mon = a; 79 acceptables[2].is_dtor = true; 80 81 int ret = waitfor_internal( acceptables, swagl() ); 82 83 switch( ret ) { 84 case 0: 85 { 86 bar(); 87 } 88 case 1: 89 { 90 baz(); 91 } 92 case 2: 93 signal(a); 94 { 95 break; 96 } 91 97 } 92 case 2:93 signal(a);94 {95 break;96 }97 98 } 98 99 } … … 555 556 new ConstantExpr( Constant::from_ulong( i++ ) ), 556 557 { 557 clause.statement, 558 new BranchStmt( 559 "", 560 BranchStmt::Break 561 ) 558 new CompoundStmt({ 559 clause.statement, 560 new BranchStmt( 561 "", 562 BranchStmt::Break 563 ) 564 }) 562 565 } 563 566 ) … … 570 573 new ConstantExpr( Constant::from_int( -2 ) ), 571 574 { 572 waitfor->timeout.statement, 573 new BranchStmt( 574 "", 575 BranchStmt::Break 576 ) 575 new CompoundStmt({ 576 waitfor->timeout.statement, 577 new BranchStmt( 578 "", 579 BranchStmt::Break 580 ) 581 }) 577 582 } 578 583 ) … … 585 590 new ConstantExpr( Constant::from_int( -1 ) ), 586 591 { 587 waitfor->orelse.statement, 588 new BranchStmt( 589 "", 590 BranchStmt::Break 591 ) 592 new CompoundStmt({ 593 waitfor->orelse.statement, 594 new BranchStmt( 595 "", 596 BranchStmt::Break 597 ) 598 }) 592 599 } 593 600 ) -
src/Parser/TypeData.cc
re1f7eef rc018b85 322 322 function.params->printList( os, indent + 4 ); 323 323 } else { 324 os << string( indent + 2, ' ' ) << "with no parameters 324 os << string( indent + 2, ' ' ) << "with no parameters" << endl; 325 325 } // if 326 326 if ( function.idList ) { … … 347 347 os << DeclarationNode::aggregateNames[ aggregate.kind ] << ' ' << *aggregate.name << endl; 348 348 if ( aggregate.params ) { 349 os << string( indent + 2, ' ' ) << "with type parameters 349 os << string( indent + 2, ' ' ) << "with type parameters" << endl; 350 350 aggregate.params->printList( os, indent + 4 ); 351 351 } // if 352 352 if ( aggregate.actuals ) { 353 os << string( indent + 2, ' ' ) << "instantiated with actual parameters 353 os << string( indent + 2, ' ' ) << "instantiated with actual parameters" << endl; 354 354 aggregate.actuals->printList( os, indent + 4 ); 355 355 } // if 356 356 if ( aggregate.fields ) { 357 os << string( indent + 2, ' ' ) << "with members 357 os << string( indent + 2, ' ' ) << "with members" << endl; 358 358 aggregate.fields->printList( os, indent + 4 ); 359 359 } // if 360 360 if ( aggregate.body ) { 361 os << string( indent + 2, ' ' ) << " with body 361 os << string( indent + 2, ' ' ) << " with body" << endl; 362 362 } // if 363 363 break; … … 370 370 } // if 371 371 if ( aggInst.params ) { 372 os << string( indent + 2, ' ' ) << "with parameters 372 os << string( indent + 2, ' ' ) << "with parameters" << endl; 373 373 aggInst.params->printList( os, indent + 2 ); 374 374 } // if … … 381 381 } // if 382 382 if ( enumeration.body ) { 383 os << string( indent + 2, ' ' ) << " with body 383 os << string( indent + 2, ' ' ) << " with body" << endl; 384 384 } // if 385 385 break; … … 418 418 os << "tuple "; 419 419 if ( tuple ) { 420 os << "with members 420 os << "with members" << endl; 421 421 tuple->printList( os, indent + 2 ); 422 422 } // if … … 942 942 assert( td->typeexpr ); 943 943 // assert( td->typeexpr->expr ); 944 return new TypeofType{ 944 return new TypeofType{ 945 945 buildQualifiers( td ), td->typeexpr->build(), td->kind == TypeData::Basetypeof }; 946 946 } // buildTypeof -
src/ResolvExpr/AlternativeFinder.cc
re1f7eef rc018b85 474 474 } 475 475 476 // mark specialization cost of return types 477 for ( DeclarationWithType* returnVal : function->returnVals ) { 478 convCost.decSpec( specCost( returnVal->get_type() ) ); 479 } 476 // specialization cost of return types can't be accounted for directly, it disables 477 // otherwise-identical calls, like this example based on auto-newline in the I/O lib: 478 // 479 // forall(otype OS) { 480 // void ?|?(OS&, int); // with newline 481 // OS& ?|?(OS&, int); // no newline, always chosen due to more specialization 482 // } 480 483 481 484 // mark type variable and specialization cost of forall clause … … 483 486 for ( TypeDecl* td : function->forall ) { 484 487 convCost.decSpec( td->assertions.size() ); 485 }486 487 // xxx -- replace with new costs in resolver488 for ( InferredParams::const_iterator assert = appExpr->inferParams.begin(); assert != appExpr->inferParams.end(); ++assert ) {489 convCost += computeConversionCost( assert->second.actualType, assert->second.formalType, indexer, alt.env );490 488 } 491 489 … … 1229 1227 Alternative newAlt{ 1230 1228 restructureCast( alt.expr->clone(), toType, castExpr->isGenerated ), 1231 alt.env, openVars, needAssertions, alt.cost + thisCost,thisCost };1229 alt.env, openVars, needAssertions, alt.cost, alt.cost + thisCost }; 1232 1230 inferParameters( newAlt, back_inserter( candidates ) ); 1233 1231 } // if -
src/SynTree/Expression.cc
re1f7eef rc018b85 456 456 457 457 void UntypedExpr::print( std::ostream &os, Indenter indent ) const { 458 os << "Applying untyped: 458 os << "Applying untyped:" << std::endl; 459 459 os << indent+1; 460 460 function->print(os, indent+1); 461 os << std::endl << indent << "...to: 461 os << std::endl << indent << "...to:" << std::endl; 462 462 printAll(args, os, indent+1); 463 463 Expression::print( os, indent ); -
src/SynTree/ReferenceToType.cc
re1f7eef rc018b85 205 205 206 206 Type::print( os, indent ); 207 os << "instance of " << typeString() << " " << get_name() << " (" << ( isFtype ? "" : "not" ) << " function type) 207 os << "instance of " << typeString() << " " << get_name() << " (" << ( isFtype ? "" : "not" ) << " function type)"; 208 208 if ( ! parameters.empty() ) { 209 209 os << endl << indent << "... with parameters" << endl; -
src/SynTree/Type.cc
re1f7eef rc018b85 118 118 119 119 void QualifiedType::print( std::ostream & os, Indenter indent ) const { 120 os << "Qualified Type: 120 os << "Qualified Type:" << endl; 121 121 os << indent+1; 122 122 parent->print( os, indent+1 ); -
src/main.cc
re1f7eef rc018b85 10 10 // Created On : Fri May 15 23:12:02 2015 11 11 // Last Modified By : Peter A. Buhr 12 // Last Modified On : Wed Jun 6 15:51:47201813 // Update Count : 49 812 // Last Modified On : Wed Dec 26 08:11:19 2018 13 // Update Count : 499 14 14 // 15 15 … … 371 371 } 372 372 } catch(const std::exception& e) { 373 std::cerr << "Un aught Exception \"" << e.what() << "\"\n";373 std::cerr << "Uncaught Exception \"" << e.what() << "\"\n"; 374 374 } 375 375 return 1; -
tests/.expect/alloc-ERROR.txt
re1f7eef rc018b85 1 alloc.cfa:265:1 error: No reasonable alternatives for expression Applying untyped: 1 alloc.cfa:265:1 error: No reasonable alternatives for expression Applying untyped: 2 2 Name: ?=? 3 ...to: 3 ...to: 4 4 Name: p 5 Applying untyped: 5 Applying untyped: 6 6 Name: realloc 7 ...to: 7 ...to: 8 8 Name: stp 9 Applying untyped: 9 Applying untyped: 10 10 Name: ?*? 11 ...to: 11 ...to: 12 12 Name: dim 13 Sizeof Expression on: Applying untyped: 13 Sizeof Expression on: Applying untyped: 14 14 Name: *? 15 ...to: 15 ...to: 16 16 Name: stp 17 17 … … 19 19 20 20 21 alloc.cfa:266:1 error: No reasonable alternatives for expression Applying untyped: 21 alloc.cfa:266:1 error: No reasonable alternatives for expression Applying untyped: 22 22 Name: ?=? 23 ...to: 23 ...to: 24 24 Name: p 25 Applying untyped: 25 Applying untyped: 26 26 Name: alloc 27 ...to: 27 ...to: 28 28 Name: stp 29 Applying untyped: 29 Applying untyped: 30 30 Name: ?*? 31 ...to: 31 ...to: 32 32 Name: dim 33 Sizeof Expression on: Applying untyped: 33 Sizeof Expression on: Applying untyped: 34 34 Name: *? 35 ...to: 35 ...to: 36 36 Name: stp 37 37 … … 39 39 40 40 41 alloc.cfa:267:1 error: No reasonable alternatives for expression Applying untyped: 41 alloc.cfa:267:1 error: No reasonable alternatives for expression Applying untyped: 42 42 Name: ?=? 43 ...to: 43 ...to: 44 44 Name: p 45 Applying untyped: 45 Applying untyped: 46 46 Name: memset 47 ...to: 47 ...to: 48 48 Name: stp 49 49 constant expression (10 10: signed int) 50 50 51 51 52 alloc.cfa:268:1 error: No reasonable alternatives for expression Applying untyped: 52 alloc.cfa:268:1 error: No reasonable alternatives for expression Applying untyped: 53 53 Name: ?=? 54 ...to: 54 ...to: 55 55 Name: p 56 Applying untyped: 56 Applying untyped: 57 57 Name: memcpy 58 ...to: 58 ...to: 59 59 Address of: 60 60 Name: st1 -
tests/.expect/completeTypeError.txt
re1f7eef rc018b85 1 completeTypeError.cfa:33:1 error: No reasonable alternatives for expression Applying untyped: 1 completeTypeError.cfa:33:1 error: No reasonable alternatives for expression Applying untyped: 2 2 Name: *? 3 ...to: 3 ...to: 4 4 Name: v 5 5 6 completeTypeError.cfa:34:1 error: No reasonable alternatives for expression Applying untyped: 6 completeTypeError.cfa:34:1 error: No reasonable alternatives for expression Applying untyped: 7 7 Name: *? 8 ...to: 8 ...to: 9 9 Name: y 10 10 11 completeTypeError.cfa:35:1 error: No reasonable alternatives for expression Applying untyped: 11 completeTypeError.cfa:35:1 error: No reasonable alternatives for expression Applying untyped: 12 12 Name: foo 13 ...to: 13 ...to: 14 14 Name: v 15 15 16 completeTypeError.cfa:36:1 error: No reasonable alternatives for expression Applying untyped: 16 completeTypeError.cfa:36:1 error: No reasonable alternatives for expression Applying untyped: 17 17 Name: baz 18 ...to: 18 ...to: 19 19 Name: v 20 20 21 completeTypeError.cfa:37:1 error: No reasonable alternatives for expression Applying untyped: 21 completeTypeError.cfa:37:1 error: No reasonable alternatives for expression Applying untyped: 22 22 Name: quux 23 ...to: 23 ...to: 24 24 Name: v 25 25 26 completeTypeError.cfa:58:1 error: No reasonable alternatives for expression Applying untyped: 26 completeTypeError.cfa:58:1 error: No reasonable alternatives for expression Applying untyped: 27 27 Name: baz 28 ...to: 28 ...to: 29 29 Name: y 30 30 31 completeTypeError.cfa:59:1 error: No reasonable alternatives for expression Applying untyped: 31 completeTypeError.cfa:59:1 error: No reasonable alternatives for expression Applying untyped: 32 32 Name: quux 33 ...to: 33 ...to: 34 34 Name: y 35 35 36 completeTypeError.cfa:60:1 error: No reasonable alternatives for expression Applying untyped: 36 completeTypeError.cfa:60:1 error: No reasonable alternatives for expression Applying untyped: 37 37 Name: *? 38 ...to: 38 ...to: 39 39 Name: y 40 40 41 completeTypeError.cfa:72:1 error: No resolvable alternatives for expression Applying untyped: 41 completeTypeError.cfa:72:1 error: No resolvable alternatives for expression Applying untyped: 42 42 Name: baz 43 ...to: 43 ...to: 44 44 Name: z 45 45 … … 51 51 ?=?: pointer to function 52 52 ... with parameters 53 reference to instance of type T (not function type) 54 instance of type T (not function type) 53 reference to instance of type T (not function type) 54 instance of type T (not function type) 55 55 ... returning 56 _retval__operator_assign: instance of type T (not function type) 56 _retval__operator_assign: instance of type T (not function type) 57 57 ... with attributes: 58 58 Attribute with name: unused … … 61 61 ?{}: pointer to function 62 62 ... with parameters 63 reference to instance of type T (not function type) 63 reference to instance of type T (not function type) 64 64 ... returning nothing 65 65 66 66 ?{}: pointer to function 67 67 ... with parameters 68 reference to instance of type T (not function type) 69 instance of type T (not function type) 68 reference to instance of type T (not function type) 69 instance of type T (not function type) 70 70 ... returning nothing 71 71 72 72 ^?{}: pointer to function 73 73 ... with parameters 74 reference to instance of type T (not function type) 74 reference to instance of type T (not function type) 75 75 ... returning nothing 76 76 … … 78 78 function 79 79 ... with parameters 80 pointer to instance of type T (not function type) 80 pointer to instance of type T (not function type) 81 81 ... returning nothing 82 82 83 83 ... to arguments 84 Variable Expression: z: pointer to instance of type T (not function type) 84 Variable Expression: z: pointer to instance of type T (not function type) 85 85 86 86 (types: 87 87 void 88 88 ) 89 Environment:( _73_0_T ) -> instance of type T (not function type) 89 Environment:( _73_0_T ) -> instance of type T (not function type) (no widening) 90 90 91 91 -
tests/.expect/declarationErrors.txt
re1f7eef rc018b85 6 6 7 7 declarationErrors.cfa:19:1 error: duplicate static in declaration of x4: static const volatile instance of const volatile struct __anonymous0 8 with members 8 with members 9 9 i: int 10 with body 10 with body 11 11 12 12 13 13 declarationErrors.cfa:20:1 error: duplicate const, duplicate static, duplicate volatile in declaration of x5: static const volatile instance of const volatile struct __anonymous1 14 with members 14 with members 15 15 i: int 16 with body 16 with body 17 17 18 18 … … 20 20 21 21 declarationErrors.cfa:24:1 error: duplicate const in declaration of f01: static inline function 22 with no parameters 22 with no parameters 23 23 returning const volatile int 24 24 25 25 26 26 declarationErrors.cfa:25:1 error: duplicate volatile in declaration of f02: static inline function 27 with no parameters 27 with no parameters 28 28 returning const volatile int 29 29 30 30 31 31 declarationErrors.cfa:26:1 error: duplicate const in declaration of f03: static inline function 32 with no parameters 32 with no parameters 33 33 returning const volatile int 34 34 35 35 36 36 declarationErrors.cfa:27:1 error: duplicate volatile in declaration of f04: static inline function 37 with no parameters 37 with no parameters 38 38 returning const volatile int 39 39 40 40 41 41 declarationErrors.cfa:28:1 error: duplicate const in declaration of f05: static inline function 42 with no parameters 42 with no parameters 43 43 returning const volatile int 44 44 45 45 46 46 declarationErrors.cfa:29:1 error: duplicate volatile in declaration of f06: static inline function 47 with no parameters 47 with no parameters 48 48 returning const volatile int 49 49 50 50 51 51 declarationErrors.cfa:30:1 error: duplicate const in declaration of f07: static inline function 52 with no parameters 52 with no parameters 53 53 returning const volatile int 54 54 55 55 56 56 declarationErrors.cfa:31:1 error: duplicate const, duplicate volatile in declaration of f08: static inline function 57 with no parameters 57 with no parameters 58 58 returning const volatile int 59 59 60 60 61 61 declarationErrors.cfa:33:1 error: duplicate const, duplicate volatile in declaration of f09: static inline function 62 with no parameters 62 with no parameters 63 63 returning const volatile int 64 64 65 65 66 66 declarationErrors.cfa:34:1 error: duplicate const, duplicate _Atomic, duplicate _Atomic, duplicate const, duplicate restrict, duplicate volatile in declaration of f09: static inline function 67 with no parameters 67 with no parameters 68 68 returning const restrict volatile _Atomic int 69 69 -
tests/.expect/nested-types-ERR2.txt
re1f7eef rc018b85 1 1 nested-types.cfa:73:1 error: Use of undefined global type Z 2 2 nested-types.cfa:74:1 error: Qualified type requires an aggregate on the left, but has: signed int 3 nested-types.cfa:75:1 error: Undefined type in qualified type: Qualified Type: 3 nested-types.cfa:75:1 error: Undefined type in qualified type: Qualified Type: 4 4 instance of struct S with body 1 5 instance of type Z (not function type) 5 instance of type Z (not function type) 6 6 -
tests/concurrent/examples/datingService.cfa
re1f7eef rc018b85 33 33 signal_block( Boys[ccode] ); // restart boy to set phone number 34 34 } // if 35 sout | "Girl:" | PhoneNo | "is dating Boy at" | BoyPhoneNo | "with ccode" | ccode; 35 36 return BoyPhoneNo; 36 37 } // DatingService girl … … 44 45 signal_block( Girls[ccode] ); // restart girl to set phone number 45 46 } // if 47 sout | " Boy:" | PhoneNo | "is dating Girl" | GirlPhoneNo | "with ccode" | ccode; 46 48 return GirlPhoneNo; 47 49 } // DatingService boy … … 58 60 yield( random( 100 ) ); // don't all start at the same time 59 61 unsigned int partner = girl( TheExchange, id, ccode ); 60 sout | "Girl:" | id | "is dating Boy at" | partner | "with ccode" | ccode;61 62 girlck[id] = partner; 62 63 } // Girl main … … 76 77 yield( random( 100 ) ); // don't all start at the same time 77 78 unsigned int partner = boy( TheExchange, id, ccode ); 78 sout | " Boy:" | id | "is dating Girl" | partner | "with ccode" | ccode;79 79 boyck[id] = partner; 80 80 } // Boy main
Note: See TracChangeset
for help on using the changeset viewer.