Changeset 508
- Timestamp:
- 01/14/11 10:52:15 (14 years ago)
- Files:
-
- trunk/src/core/thread.d (modified) (2 diffs)
- trunk/src/rt/dmain2.d (modified) (1 diff)
- trunk/src/rt/util/utf.d (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
trunk/src/core/thread.d
r496 r508 192 192 { 193 193 rt_moduleTlsCtor(); 194 194 try 195 195 { 196 196 obj.run(); 197 197 } 198 198 catch( Throwable t ) 199 199 { 200 200 append( t ); 201 201 } 202 catch( Object o )203 {204 // TODO: Remove this once the compiler prevents it.205 }206 202 rt_moduleTlsDtor(); 207 203 } 208 204 catch( Throwable t ) 209 205 { 210 206 append( t ); 211 }212 catch( Object o )213 {214 // TODO: Remove this once the compiler prevents it.215 207 } 216 208 return 0; 217 209 } 218 210 219 211 220 212 HANDLE GetCurrentThreadHandle() 221 213 { 222 214 const uint DUPLICATE_SAME_ACCESS = 0x00000002; 223 215 224 216 HANDLE curr = GetCurrentThread(), … … 2853 2845 obj.m_ctxt.tstack = obj.m_ctxt.bstack; 2854 2846 obj.m_state = Fiber.State.EXEC; 2855 2847 2856 2848 try 2857 2849 { 2858 2850 obj.run(); 2859 2851 } 2860 2852 catch( Throwable t ) 2861 2853 { 2862 2854 obj.m_unhandled = t; 2863 }2864 catch( Object o )2865 {2866 // TODO: Remove this once the compiler prevents it.2867 2855 } 2868 2856 2869 2857 static if( __traits( compiles, ucontext_t ) ) 2870 2858 obj.m_ucur = &obj.m_utxt; 2871 2859 2872 2860 obj.m_state = Fiber.State.TERM; 2873 2861 obj.switchOut(); 2874 2862 } 2875 2863 2876 2864 trunk/src/rt/dmain2.d
r507 r508 435 435 console (t)("\n"); 436 436 } 437 437 if (e.next) 438 438 console ("\n"); 439 439 e = e.next; 440 440 } 441 441 +/ 442 442 console (e.toString)("\n"); 443 443 result = EXIT_FAILURE; 444 444 } 445 catch (Object o)446 {447 // fprintf(stderr, "%.*s\n", o.toString());448 console (o.toString)("\n");449 result = EXIT_FAILURE;450 }451 445 } 452 446 else 453 447 { 454 448 dg(); 455 449 } 456 450 } 457 451 458 452 // NOTE: The lifetime of a process is much like the lifetime of an object: 459 453 // it is initialized, then used, then destroyed. If initialization 460 454 // fails, the successive two steps are never reached. However, if trunk/src/rt/util/utf.d
r441 r508 328 328 ]; 329 329 330 330 for (int j = 0; j < s4.length; j++) 331 331 { 332 332 try 333 333 { 334 334 i = 0; 335 335 c = decode(s4[j], i); 336 336 assert(0); 337 337 } 338 catch ( Objecto)338 catch (Throwable o) 339 339 { 340 340 i = 23; 341 341 } 342 342 assert(i == 23); 343 343 } 344 344 } 345 345 346 346 /** ditto */ 347 347 348 348 dchar decode(in wchar[] s, ref size_t idx)
