comparison runtime/ldc.diff @ 822:43178a913a28

Removed PAGESIZE part of Tango patch, it works for me when the check is removed. Updated Tango patch to latest Tango revision.
author Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
date Tue, 02 Dec 2008 02:45:31 +0100
parents e8f8cafcaa62
children e66c627c177e
comparison
equal deleted inserted replaced
821:8f0b24bc55f0 822:43178a913a28
1 Index: lib/unittest.sh
2 ===================================================================
3 --- lib/unittest.sh (revision 4134)
4 +++ lib/unittest.sh (working copy)
5 @@ -18,8 +18,9 @@
6 --help: This message
7 --run-all: Reports result instead of breaking. Do not use this if you want to
8 run unittest runner through a debugger.
9 - dmd: Builds unittests for dmd
10 - gdc: Builds unittests for gdc
11 + dmd: Builds unittests for dmd
12 + gdc: Builds unittests for gdc
13 + ldc: Builds unittests for ldc
14
15 <none>: Builds unittests for all known compilers.'
16 exit 0
17 @@ -86,7 +87,7 @@
18 void main() {}
19 EOF
20
21 - rebuild -w -d -g -L-ldl -L-lz -L-lbz2 -debug=UnitTest -debug -full -clean -unittest \
22 + rebuild -w -d -L-ldl -L-lz -L-lbz2 -debug=UnitTest -debug -full -clean -unittest \
23 -version=UnitTest $EXE.d tango/core/*.d tango/core/sync/*.d tango/io/digest/*.d \
24 tango/io/model/*.d tango/io/protocol/*.d tango/io/selector/*.d tango/io/*.d \
25 tango/io/vfs/*.d tango/io/vfs/model/*.d \
26 @@ -125,6 +126,9 @@
27 gdc)
28 GDC=1
29 ;;
30 + ldc)
31 + LDC=1
32 + ;;
33 *)
34 usage
35 ;;
36 @@ -132,10 +136,11 @@
37 shift
38 done
39
40 -if [ ! "$DMD" -a ! "$GDC" ]
41 +if [ ! "$DMD" -a ! "$GDC" -a ! "$LDC" ]
42 then
43 DMD=1
44 GDC=1
45 + LDC=1
46 fi
47
48 if [ "$DMD" = "1" ]
49 @@ -146,4 +151,7 @@
50 then
51 compile gdc runUnitTest_gdc
52 fi
53 -
54 +if [ "$LDC" = "1" ]
55 +then
56 + compile ldc runUnitTest_ldc
57 +fi
58 Index: lib/common/tango/core/BitManip.d 1 Index: lib/common/tango/core/BitManip.d
59 =================================================================== 2 ===================================================================
60 --- lib/common/tango/core/BitManip.d (revision 4134) 3 --- lib/common/tango/core/BitManip.d (revision 4145)
61 +++ lib/common/tango/core/BitManip.d (working copy) 4 +++ lib/common/tango/core/BitManip.d (working copy)
62 @@ -171,6 +171,10 @@ 5 @@ -171,6 +171,10 @@
63 */ 6 */
64 uint outpl( uint port_address, uint value ); 7 uint outpl( uint port_address, uint value );
65 } 8 }
70 else 13 else
71 { 14 {
72 public import std.intrinsic; 15 public import std.intrinsic;
73 Index: lib/common/tango/core/Thread.d 16 Index: lib/common/tango/core/Thread.d
74 =================================================================== 17 ===================================================================
75 --- lib/common/tango/core/Thread.d (revision 4134) 18 --- lib/common/tango/core/Thread.d (revision 4145)
76 +++ lib/common/tango/core/Thread.d (working copy) 19 +++ lib/common/tango/core/Thread.d (working copy)
77 @@ -273,8 +273,50 @@ 20 @@ -273,8 +273,50 @@
78 } 21 }
79 body 22 body
80 { 23 {
168 +//TODO: Enable when x86-64 Posix supports fibers 111 +//TODO: Enable when x86-64 Posix supports fibers
169 +// version( LLVM_AsmX86_64_Posix ) {} else 112 +// version( LLVM_AsmX86_64_Posix ) {} else
170 { 113 {
171 // NOTE: The ucontext implementation requires architecture specific 114 // NOTE: The ucontext implementation requires architecture specific
172 // data definitions to operate so testing for it must be done 115 // data definitions to operate so testing for it must be done
173 @@ -2367,9 +2429,11 @@ 116 @@ -2510,6 +2572,28 @@
174 import tango.stdc.posix.ucontext;
175 }
176 }
177 - const size_t PAGESIZE;
178 }
179
180 +// this currently need to be public for LDC
181 +const size_t PAGESIZE;
182 +
183 static this()
184 {
185 static if( is( typeof( GetSystemInfo ) ) )
186 @@ -2510,6 +2574,28 @@
187 ret; 117 ret;
188 } 118 }
189 } 119 }
190 + else version( LLVM_AsmX86_Posix ) 120 + else version( LLVM_AsmX86_Posix )
191 + { 121 + {
210 + } 140 + }
211 ++/ 141 ++/
212 else static if( is( ucontext_t ) ) 142 else static if( is( ucontext_t ) )
213 { 143 {
214 Fiber cfib = Fiber.getThis(); 144 Fiber cfib = Fiber.getThis();
215 @@ -2522,7 +2608,7 @@ 145 @@ -2522,7 +2606,7 @@
216 } 146 }
217 } 147 }
218 148
219 - 149 -
220 +extern(C) int printf(char*, ...); 150 +extern(C) int printf(char*, ...);
221 //////////////////////////////////////////////////////////////////////////////// 151 ////////////////////////////////////////////////////////////////////////////////
222 // Fiber 152 // Fiber
223 //////////////////////////////////////////////////////////////////////////////// 153 ////////////////////////////////////////////////////////////////////////////////
224 @@ -3177,6 +3263,22 @@ 154 @@ -3177,6 +3261,22 @@
225 push( 0x00000000 ); // ESI 155 push( 0x00000000 ); // ESI
226 push( 0x00000000 ); // EDI 156 push( 0x00000000 ); // EDI
227 } 157 }
228 + else version( LLVM_AsmX86_Posix ) 158 + else version( LLVM_AsmX86_Posix )
229 + { 159 + {
242 + } 172 + }
243 ++/ 173 ++/
244 else version( AsmPPC_Posix ) 174 else version( AsmPPC_Posix )
245 { 175 {
246 version( StackGrowsDown ) 176 version( StackGrowsDown )
177 Index: lib/unittest.sh
178 ===================================================================
179 --- lib/unittest.sh (revision 4145)
180 +++ lib/unittest.sh (working copy)
181 @@ -18,8 +18,9 @@
182 --help: This message
183 --run-all: Reports result instead of breaking. Do not use this if you want to
184 run unittest runner through a debugger.
185 - dmd: Builds unittests for dmd
186 - gdc: Builds unittests for gdc
187 + dmd: Builds unittests for dmd
188 + gdc: Builds unittests for gdc
189 + ldc: Builds unittests for ldc
190
191 <none>: Builds unittests for all known compilers.'
192 exit 0
193 @@ -86,7 +87,7 @@
194 void main() {}
195 EOF
196
197 - rebuild -w -d -g -L-ldl -L-lz -L-lbz2 -debug=UnitTest -debug -full -clean -unittest \
198 + rebuild -w -d -L-ldl -L-lz -L-lbz2 -debug=UnitTest -debug -full -clean -unittest \
199 -version=UnitTest $EXE.d tango/core/*.d tango/core/sync/*.d tango/io/digest/*.d \
200 tango/io/model/*.d tango/io/protocol/*.d tango/io/selector/*.d tango/io/*.d \
201 tango/io/vfs/*.d tango/io/vfs/model/*.d \
202 @@ -125,6 +126,9 @@
203 gdc)
204 GDC=1
205 ;;
206 + ldc)
207 + LDC=1
208 + ;;
209 *)
210 usage
211 ;;
212 @@ -132,10 +136,11 @@
213 shift
214 done
215
216 -if [ ! "$DMD" -a ! "$GDC" ]
217 +if [ ! "$DMD" -a ! "$GDC" -a ! "$LDC" ]
218 then
219 DMD=1
220 GDC=1
221 + LDC=1
222 fi
223
224 if [ "$DMD" = "1" ]
225 @@ -146,4 +151,7 @@
226 then
227 compile gdc runUnitTest_gdc
228 fi
229 -
230 +if [ "$LDC" = "1" ]
231 +then
232 + compile ldc runUnitTest_ldc
233 +fi
247 Index: lib/gc/basic/gcx.d 234 Index: lib/gc/basic/gcx.d
248 =================================================================== 235 ===================================================================
249 --- lib/gc/basic/gcx.d (revision 4134) 236 --- lib/gc/basic/gcx.d (revision 4145)
250 +++ lib/gc/basic/gcx.d (working copy) 237 +++ lib/gc/basic/gcx.d (working copy)
251 @@ -65,6 +65,13 @@ 238 @@ -65,6 +65,13 @@
252 } 239 }
253 240
254 241
337 else 324 else
338 { 325 {
339 asm 326 asm
340 Index: lib/gc/basic/gcbits.d 327 Index: lib/gc/basic/gcbits.d
341 =================================================================== 328 ===================================================================
342 --- lib/gc/basic/gcbits.d (revision 4134) 329 --- lib/gc/basic/gcbits.d (revision 4145)
343 +++ lib/gc/basic/gcbits.d (working copy) 330 +++ lib/gc/basic/gcbits.d (working copy)
344 @@ -39,6 +39,10 @@ 331 @@ -39,6 +39,10 @@
345 { 332 {
346 // use the unoptimized version 333 // use the unoptimized version
347 } 334 }
352 else version (D_InlineAsm_X86) 339 else version (D_InlineAsm_X86)
353 { 340 {
354 version = Asm86; 341 version = Asm86;
355 Index: lib/build-tango.sh 342 Index: lib/build-tango.sh
356 =================================================================== 343 ===================================================================
357 --- lib/build-tango.sh (revision 4134) 344 --- lib/build-tango.sh (revision 4145)
358 +++ lib/build-tango.sh (working copy) 345 +++ lib/build-tango.sh (working copy)
359 @@ -23,7 +23,7 @@ 346 @@ -23,7 +23,7 @@
360 --debug: Will enable debug info 347 --debug: Will enable debug info
361 --warn: Will enable warnings 348 --warn: Will enable warnings
362 --verbose: Increase verbosity 349 --verbose: Increase verbosity
384 mac) 371 mac)
385 # build Universal Binary version of the Tango library 372 # build Universal Binary version of the Tango library
386 build powerpc-apple-darwin8-gdmd libgtango.a.ppc libgphobos.a.ppc 373 build powerpc-apple-darwin8-gdmd libgtango.a.ppc libgphobos.a.ppc
387 Index: tango/text/convert/Layout.d 374 Index: tango/text/convert/Layout.d
388 =================================================================== 375 ===================================================================
389 --- tango/text/convert/Layout.d (revision 4134) 376 --- tango/text/convert/Layout.d (revision 4145)
390 +++ tango/text/convert/Layout.d (working copy) 377 +++ tango/text/convert/Layout.d (working copy)
391 @@ -47,6 +47,12 @@ 378 @@ -47,6 +47,12 @@
392 alias void* Arg; 379 alias void* Arg;
393 alias va_list ArgList; 380 alias va_list ArgList;
394 } 381 }
410 } 397 }
411 } 398 }
412 return parse (formatStr, arguments, arglist, sink); 399 return parse (formatStr, arguments, arglist, sink);
413 Index: tango/net/cluster/CacheInvalidator.d 400 Index: tango/net/cluster/CacheInvalidator.d
414 =================================================================== 401 ===================================================================
415 --- tango/net/cluster/CacheInvalidator.d (revision 4134) 402 --- tango/net/cluster/CacheInvalidator.d (revision 4145)
416 +++ tango/net/cluster/CacheInvalidator.d (working copy) 403 +++ tango/net/cluster/CacheInvalidator.d (working copy)
417 @@ -79,7 +79,7 @@ 404 @@ -79,7 +79,7 @@
418 405
419 *******************************************************************************/ 406 *******************************************************************************/
420 407
423 { 410 {
424 private char[] key_; 411 private char[] key_;
425 412
426 Index: tango/core/Vararg.d 413 Index: tango/core/Vararg.d
427 =================================================================== 414 ===================================================================
428 --- tango/core/Vararg.d (revision 4134) 415 --- tango/core/Vararg.d (revision 4145)
429 +++ tango/core/Vararg.d (working copy) 416 +++ tango/core/Vararg.d (working copy)
430 @@ -15,6 +15,10 @@ 417 @@ -15,6 +15,10 @@
431 { 418 {
432 public import std.stdarg; 419 public import std.stdarg;
433 } 420 }
438 else 425 else
439 { 426 {
440 /** 427 /**
441 Index: tango/core/sync/Semaphore.d 428 Index: tango/core/sync/Semaphore.d
442 =================================================================== 429 ===================================================================
443 --- tango/core/sync/Semaphore.d (revision 4134) 430 --- tango/core/sync/Semaphore.d (revision 4145)
444 +++ tango/core/sync/Semaphore.d (working copy) 431 +++ tango/core/sync/Semaphore.d (working copy)
445 @@ -380,7 +380,8 @@ 432 @@ -384,7 +384,8 @@
446 { 433 {
447 synchronized( synComplete ) 434 synchronized( synComplete )
448 { 435 {
449 - if( numComplete == numConsumers ) 436 - if( numComplete == numConsumers )
450 + // if( numComplete == numConsumers ) 437 + // if( numComplete == numConsumers )
451 + if( numComplete == numToProduce ) 438 + if( numComplete == numToProduce )
452 break; 439 break;
453 } 440 }
454 Thread.yield(); 441 Thread.yield();
455 @@ -388,9 +389,9 @@ 442 @@ -392,9 +393,9 @@
456 443
457 synchronized( synComplete ) 444 synchronized( synComplete )
458 { 445 {
459 - assert( numComplete == numConsumers ); 446 - assert( numComplete == numConsumers );
460 + assert( numComplete == numToProduce ); 447 + assert( numComplete == numToProduce );
462 } 449 }
463 - 450 -
464 synchronized( synConsumed ) 451 synchronized( synConsumed )
465 { 452 {
466 assert( numConsumed == numToProduce ); 453 assert( numConsumed == numToProduce );
467 @@ -451,7 +452,8 @@ 454 @@ -455,7 +456,8 @@
468 455
469 unittest 456 unittest
470 { 457 {
471 + version(darwin){}else{ 458 + version(darwin){}else{
472 testWait(); 459 testWait();
474 + testWaitTimeout();} 461 + testWaitTimeout();}
475 } 462 }
476 } 463 }
477 Index: tango/core/sync/Condition.d 464 Index: tango/core/sync/Condition.d
478 =================================================================== 465 ===================================================================
479 --- tango/core/sync/Condition.d (revision 4134) 466 --- tango/core/sync/Condition.d (revision 4145)
480 +++ tango/core/sync/Condition.d (working copy) 467 +++ tango/core/sync/Condition.d (working copy)
481 @@ -553,8 +553,11 @@ 468 @@ -553,8 +553,11 @@
482 469
483 unittest 470 unittest
484 { 471 {
490 + } 477 + }
491 } 478 }
492 } 479 }
493 Index: tango/core/Atomic.d 480 Index: tango/core/Atomic.d
494 =================================================================== 481 ===================================================================
495 --- tango/core/Atomic.d (revision 4134) 482 --- tango/core/Atomic.d (revision 4145)
496 +++ tango/core/Atomic.d (working copy) 483 +++ tango/core/Atomic.d (working copy)
497 @@ -270,6 +270,167 @@ 484 @@ -270,6 +270,167 @@
498 485
499 486
500 //////////////////////////////////////////////////////////////////////////////// 487 ////////////////////////////////////////////////////////////////////////////////
662 // x86 Atomic Function Implementation 649 // x86 Atomic Function Implementation
663 //////////////////////////////////////////////////////////////////////////////// 650 ////////////////////////////////////////////////////////////////////////////////
664 651
665 Index: tango/math/IEEE.d 652 Index: tango/math/IEEE.d
666 =================================================================== 653 ===================================================================
667 --- tango/math/IEEE.d (revision 4134) 654 --- tango/math/IEEE.d (revision 4145)
668 +++ tango/math/IEEE.d (working copy) 655 +++ tango/math/IEEE.d (working copy)
669 @@ -1554,7 +1554,12 @@ 656 @@ -1554,7 +1554,12 @@
670 return (bitsdiff == 0 && !((pa[F.EXPPOS_SHORT] ^ pb[F.EXPPOS_SHORT])& F.EXPMASK)) ? 1 : 0; 657 return (bitsdiff == 0 && !((pa[F.EXPPOS_SHORT] ^ pb[F.EXPPOS_SHORT])& F.EXPMASK)) ? 1 : 0;
671 } 658 }
672 } else { 659 } else {
680 } 667 }
681 } 668 }
682 669
683 Index: tango/math/Math.d 670 Index: tango/math/Math.d
684 =================================================================== 671 ===================================================================
685 --- tango/math/Math.d (revision 4134) 672 --- tango/math/Math.d (revision 4145)
686 +++ tango/math/Math.d (working copy) 673 +++ tango/math/Math.d (working copy)
687 @@ -76,6 +76,14 @@ 674 @@ -76,6 +76,14 @@
688 version = DigitalMars_D_InlineAsm_X86; 675 version = DigitalMars_D_InlineAsm_X86;
689 } 676 }
690 } 677 }
829 } 816 }
830 817
831 debug(UnitTest) { 818 debug(UnitTest) {
832 Index: tango/stdc/posix/sys/types.d 819 Index: tango/stdc/posix/sys/types.d
833 =================================================================== 820 ===================================================================
834 --- tango/stdc/posix/sys/types.d (revision 4134) 821 --- tango/stdc/posix/sys/types.d (revision 4145)
835 +++ tango/stdc/posix/sys/types.d (working copy) 822 +++ tango/stdc/posix/sys/types.d (working copy)
836 @@ -422,7 +422,11 @@ 823 @@ -422,7 +422,11 @@
837 } 824 }
838 else version( darwin ) 825 else version( darwin )
839 { 826 {
846 } 833 }
847 else version( freebsd ) 834 else version( freebsd )
848 { 835 {
849 Index: tango/stdc/stdlib.d 836 Index: tango/stdc/stdlib.d
850 =================================================================== 837 ===================================================================
851 --- tango/stdc/stdlib.d (revision 4134) 838 --- tango/stdc/stdlib.d (revision 4145)
852 +++ tango/stdc/stdlib.d (working copy) 839 +++ tango/stdc/stdlib.d (working copy)
853 @@ -94,6 +94,11 @@ 840 @@ -94,6 +94,11 @@
854 { 841 {
855 void* alloca(size_t size); 842 void* alloca(size_t size);
856 } 843 }
862 else version( GNU ) 849 else version( GNU )
863 { 850 {
864 private import gcc.builtins; 851 private import gcc.builtins;
865 Index: tango/stdc/stdarg.d 852 Index: tango/stdc/stdarg.d
866 =================================================================== 853 ===================================================================
867 --- tango/stdc/stdarg.d (revision 4134) 854 --- tango/stdc/stdarg.d (revision 4145)
868 +++ tango/stdc/stdarg.d (working copy) 855 +++ tango/stdc/stdarg.d (working copy)
869 @@ -13,6 +13,10 @@ 856 @@ -13,6 +13,10 @@
870 { 857 {
871 public import std.c.stdarg; 858 public import std.c.stdarg;
872 } 859 }