 |
Changeset 5012
- Timestamp:
- 10/17/09 06:45:38
(3 years ago)
- Author:
- larsivi
- Message:
Remove cImports and references to it.
-
Files:
-
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
| r4970 |
r5012 |
|
| 40 | 40 | private |
|---|
| 41 | 41 | { |
|---|
| 42 | | import rt.compiler.cImports: memcmp,memcpy,memmove,calloc,realloc,free,onOutOfMemoryError, |
|---|
| 43 | | sprintf; |
|---|
| | 42 | import tango.stdc.string : memcmp, memcpy, memmove; |
|---|
| | 43 | import tango.stdc.stdlib : calloc, realloc, free; |
|---|
| | 44 | import tango.stdc.stdio : sprintf; |
|---|
| | 45 | import tango.core.Exception : onOutOfMemoryError; |
|---|
| 44 | 46 | import rt.compiler.util.string; |
|---|
| 45 | 47 | import rt.compiler.util.hash; |
|---|
| r4970 |
r5012 |
|
| 37 | 37 | { |
|---|
| 38 | 38 | import tango.stdc.stdarg; |
|---|
| 39 | | import rt.compiler.cImports: memcmp,memcpy; |
|---|
| | 39 | import tango.stdc.string : memcmp,memcpy; |
|---|
| 40 | 40 | |
|---|
| 41 | 41 | enum BlkAttr : uint |
|---|
| r4970 |
r5012 |
|
| 39 | 39 | private |
|---|
| 40 | 40 | { |
|---|
| 41 | | import rt.compiler.cImports: memcpy,memmove,memcmp,alloca; |
|---|
| | 41 | import tango.stdc.string : memcpy, memmove, memcmp; |
|---|
| | 42 | import tango.stdc.stdlib : alloca; |
|---|
| 42 | 43 | import rt.compiler.util.utf; |
|---|
| 43 | 44 | |
|---|
| r4970 |
r5012 |
|
| 34 | 34 | private |
|---|
| 35 | 35 | { |
|---|
| 36 | | import rt.compiler.cImports: memcpy; |
|---|
| 37 | | debug import rt.compiler.cImports: printf; |
|---|
| | 36 | import tango.stdc.string : memcpy; |
|---|
| | 37 | debug import tango.stdc.stdio : printf; |
|---|
| 38 | 38 | } |
|---|
| 39 | 39 | |
|---|
| r4970 |
r5012 |
|
| 18 | 18 | { |
|---|
| 19 | 19 | version( Win32 ) { |
|---|
| 20 | | //import tango.sys.win32.UserGdi; |
|---|
| 21 | | import rt.compiler.cImports: HANDLE,THANDLE,LPCWSTR,DWORD,LPSECURITY_ATTRIBUTES,WINBOOL, |
|---|
| 22 | | GENERIC_READ,FILE_SHARE_READ,OPEN_EXISTING,FILE_ATTRIBUTE_NORMAL,FILE_FLAG_SEQUENTIAL_SCAN, |
|---|
| 23 | | INVALID_HANDLE_VALUE,POVERLAPPED,CreateFileW,CloseHandle,ReadFile; |
|---|
| | 20 | import tango.sys.win32.UserGdi : HANDLE,THANDLE,LPCWSTR,DWORD, |
|---|
| | 21 | LPSECURITY_ATTRIBUTES,WINBOOL, GENERIC_READ, |
|---|
| | 22 | FILE_SHARE_READ,OPEN_EXISTING, |
|---|
| | 23 | FILE_ATTRIBUTE_NORMAL,FILE_FLAG_SEQUENTIAL_SCAN, |
|---|
| | 24 | INVALID_HANDLE_VALUE,POVERLAPPED,CreateFileW, |
|---|
| | 25 | CloseHandle,ReadFile; |
|---|
| 24 | 26 | } else version( Posix ) { |
|---|
| 25 | | import rt.compiler.cImports: open,close,read,fcntl_O_RDONLY; |
|---|
| 26 | | //import tango.stdc.posix.fcntl; |
|---|
| 27 | | //import tango.stdc.posix.unistd; |
|---|
| | 27 | import tango.stdc.posix.fcntl : open, O_RDONLY; |
|---|
| | 28 | import tango.stdc.posix.unistd : close, read; |
|---|
| 28 | 29 | } |
|---|
| 29 | 30 | import tango.core.BitManip; |
|---|
| 30 | | import rt.compiler.cImports: fopen,fclose,fprintf,FILE_P; |
|---|
| 31 | | // import tango.stdc.stdio; |
|---|
| | 31 | import tango.stdc.stdio : fopen,fclose,fprintf,FILE; |
|---|
| 32 | 32 | import rt.compiler.util.utf; |
|---|
| 33 | 33 | |
|---|
| … | … | |
| 165 | 165 | } |
|---|
| 166 | 166 | |
|---|
| 167 | | FILE_P flst = fopen( (addExt( baseName( c.filename ), "lst\0" )).ptr, "wb" ); |
|---|
| | 167 | FILE* flst = fopen( (addExt( baseName( c.filename ), "lst\0" )).ptr, "wb" ); |
|---|
| 168 | 168 | |
|---|
| 169 | 169 | if( !flst ) |
|---|
| … | … | |
| 354 | 354 | namez[0 .. name.length] = name; |
|---|
| 355 | 355 | namez[$ - 1] = 0; |
|---|
| 356 | | int file = open( namez.ptr, fcntl_O_RDONLY() ); |
|---|
| | 356 | int file = open( namez.ptr, O_RDONLY ); |
|---|
| 357 | 357 | |
|---|
| 358 | 358 | delete namez; |
|---|
| r4970 |
r5012 |
|
| 15 | 15 | import rt.compiler.util.console; |
|---|
| 16 | 16 | |
|---|
| 17 | | // import tango.stdc.stddef; |
|---|
| 18 | | import rt.compiler.cImports: malloc,free,exit,strlen,EXIT_FAILURE,printf; |
|---|
| 19 | | //import tango.stdc.stdlib; |
|---|
| 20 | | //import tango.stdc.string; |
|---|
| | 17 | import tango.stdc.stdlib : malloc, free, exit, EXIT_FAILURE; |
|---|
| | 18 | import tango.stdc.string : strlen; |
|---|
| | 19 | import tango.stdc.stdio : printf; |
|---|
| 21 | 20 | } |
|---|
| 22 | 21 | |
|---|
| r4970 |
r5012 |
|
| 30 | 30 | private |
|---|
| 31 | 31 | { |
|---|
| 32 | | import rt.compiler.cImports: memcpy,memset,memcmp,free,malloc; |
|---|
| 33 | | //import tango.stdc.stdlib; |
|---|
| 34 | | //import tango.stdc.string; |
|---|
| | 32 | import tango.stdc.stdlib : free, malloc; |
|---|
| | 33 | import tango.stdc.string : memcpy, memset, memcmp; |
|---|
| 35 | 34 | import tango.stdc.stdarg; |
|---|
| 36 | | debug(PRINTF) import rt.compiler.cImports:printf; |
|---|
| 37 | | //import tango.stdc.stdio; |
|---|
| | 35 | debug(PRINTF) import tango.stdc.stdio : printf; |
|---|
| 38 | 36 | } |
|---|
| 39 | 37 | |
|---|
| r4970 |
r5012 |
|
| 26 | 26 | */ |
|---|
| 27 | 27 | module rt.switch_; |
|---|
| 28 | | private import rt.compiler.cImports: memcmp; |
|---|
| | 28 | private import tango.stdc.string : memcmp; |
|---|
| 29 | 29 | |
|---|
| 30 | 30 | /****************************************************** |
|---|
| r4970 |
r5012 |
|
| 17 | 17 | { |
|---|
| 18 | 18 | import rt.compiler.util.string; |
|---|
| 19 | | //import tango.stdc.ctype; |
|---|
| 20 | | //import tango.stdc.stdio; |
|---|
| 21 | | //import tango.stdc.string; |
|---|
| 22 | | //import tango.stdc.stdlib; |
|---|
| 23 | | import rt.compiler.cImports: memset,memcpy,malloc,free,exit,fopen,fclose,fprintf,fgetc,FILE_P, |
|---|
| 24 | | isspace,isalpha,isgraph,qsort,EXIT_FAILURE,EOF,strtoul,strtoull,strlen; |
|---|
| | 19 | import tango.stdc.string : memset, memcpy, strlen; |
|---|
| | 20 | import tango.stdc.stdlib : malloc, free, exit, strtoul, strtoull, qsort, |
|---|
| | 21 | EXIT_FAILURE; |
|---|
| | 22 | import tango.stdc.ctype : isspace, isalpha, isgraph; |
|---|
| | 23 | import tango.stdc.stdio : fopen, fclose, fprintf, fgetc, FILE, EOF; |
|---|
| 25 | 24 | } |
|---|
| 26 | 25 | |
|---|
| … | … | |
| 80 | 79 | |
|---|
| 81 | 80 | static char[] trace_logfilename = "trace.log"; |
|---|
| 82 | | static FILE_P fplog; |
|---|
| | 81 | static FILE* fplog; |
|---|
| 83 | 82 | |
|---|
| 84 | 83 | static char[] trace_deffilename = "trace.def"; |
|---|
| 85 | | static FILE_P fpdef; |
|---|
| | 84 | static FILE* fpdef; |
|---|
| 86 | 85 | |
|---|
| 87 | 86 | |
|---|
| … | … | |
| 631 | 630 | // null if end of file |
|---|
| 632 | 631 | |
|---|
| 633 | | static char* trace_readline(FILE_P fp) |
|---|
| | 632 | static char* trace_readline(FILE* fp) |
|---|
| 634 | 633 | { int c; |
|---|
| 635 | 634 | int dim; |
|---|
| … | … | |
| 688 | 687 | |
|---|
| 689 | 688 | static void trace_merge() |
|---|
| 690 | | { FILE_P fp; |
|---|
| | 689 | { FILE* fp; |
|---|
| 691 | 690 | char *buf; |
|---|
| 692 | 691 | char *p; |
|---|
| r4974 |
r5012 |
|
| 4 | 4 | private import rt.compiler.util.string; |
|---|
| 5 | 5 | private import rt.compiler.util.hash; |
|---|
| 6 | | private import rt.compiler.cImports: memcmp; |
|---|
| | 6 | private import tango.stdc.string : memcmp; |
|---|
| 7 | 7 | |
|---|
| 8 | 8 | // byte[] |
|---|
| r4974 |
r5012 |
|
| 2 | 2 | module rt.compiler.dmd.typeinfo.ti_Aint; |
|---|
| 3 | 3 | |
|---|
| 4 | | private import rt.compiler.cImports:memcmp; |
|---|
| | 4 | private import tango.stdc.string : memcmp; |
|---|
| 5 | 5 | private import rt.compiler.util.hash; |
|---|
| 6 | 6 | |
|---|
| r4974 |
r5012 |
|
| 2 | 2 | module rt.compiler.dmd.typeinfo.ti_Along; |
|---|
| 3 | 3 | |
|---|
| 4 | | private import rt.compiler.cImports:memcmp; |
|---|
| | 4 | private import tango.stdc.string : memcmp; |
|---|
| 5 | 5 | private import rt.compiler.util.hash; |
|---|
| 6 | 6 | |
|---|
| r4974 |
r5012 |
|
| 2 | 2 | module rt.compiler.dmd.typeinfo.ti_Ashort; |
|---|
| 3 | 3 | |
|---|
| 4 | | private import rt.compiler.cImports:memcmp; |
|---|
| | 4 | private import tango.stdc.string : memcmp; |
|---|
| 5 | 5 | private import rt.compiler.util.hash; |
|---|
| 6 | 6 | |
|---|
| r4970 |
r5012 |
|
| 40 | 40 | private |
|---|
| 41 | 41 | { |
|---|
| 42 | | import rt.compiler.cImports: memcmp, memcpy, memmove, calloc, realloc, free,sprintf,strlen; |
|---|
| | 42 | import tango.stdc.string : memcmp, memcpy, memmove, strlen; |
|---|
| | 43 | import tango.stdc.stdlib : calloc, realloc, free; |
|---|
| | 44 | import tango.stdc.stdio : sprintf; |
|---|
| 43 | 45 | import rt.compiler.util.string; |
|---|
| 44 | 46 | import rt.compiler.util.hash; |
|---|
| r4970 |
r5012 |
|
| 4 | 4 | private import rt.compiler.util.string; |
|---|
| 5 | 5 | private import rt.compiler.util.hash; |
|---|
| 6 | | private import rt.compiler.cImports: memcmp; |
|---|
| | 6 | private import tango.stdc.string : memcmp; |
|---|
| 7 | 7 | |
|---|
| 8 | 8 | // byte[] |
|---|
| r4970 |
r5012 |
|
| 2 | 2 | module rt.compiler.typeinfo.ti_Aint; |
|---|
| 3 | 3 | |
|---|
| 4 | | private import rt.compiler.cImports:memcmp; |
|---|
| | 4 | private import tango.stdc.string : memcmp; |
|---|
| 5 | 5 | private import rt.compiler.util.hash; |
|---|
| 6 | 6 | |
|---|
| r4970 |
r5012 |
|
| 2 | 2 | module rt.compiler.typeinfo.ti_Along; |
|---|
| 3 | 3 | |
|---|
| 4 | | private import rt.compiler.cImports:memcmp; |
|---|
| | 4 | private import tango.stdc.string : memcmp; |
|---|
| 5 | 5 | private import rt.compiler.util.hash; |
|---|
| 6 | 6 | |
|---|
| r4970 |
r5012 |
|
| 2 | 2 | module rt.compiler.typeinfo.ti_Ashort; |
|---|
| 3 | 3 | |
|---|
| 4 | | private import rt.compiler.cImports:memcmp; |
|---|
| | 4 | private import tango.stdc.string : memcmp; |
|---|
| 5 | 5 | private import rt.compiler.util.hash; |
|---|
| 6 | 6 | |
|---|
| r4970 |
r5012 |
|
| 43 | 43 | private |
|---|
| 44 | 44 | { |
|---|
| 45 | | import rt.compiler.cImports: memcmp,memcpy,memmove,calloc,realloc,free,onOutOfMemoryError, |
|---|
| 46 | | sprintf; |
|---|
| | 45 | import tango.stdc.string : memcmp, memcpy, memmove; |
|---|
| | 46 | import tango.stdc.stdlib : calloc, realloc, free; |
|---|
| | 47 | import tango.stdc.stdio : sprintf; |
|---|
| 47 | 48 | import rt.compiler.util.string; |
|---|
| 48 | 49 | import rt.compiler.util.hash; |
|---|
| 49 | 50 | import rt.aaA; |
|---|
| 50 | | debug(PRINTF) import rt.compiler.cImports: printf; |
|---|
| | 51 | import tango.core.Exception : onOutOfMemoryError; |
|---|
| | 52 | debug(PRINTF) import tango.stdc.stdio : printf; |
|---|
| 51 | 53 | extern (C) Object _d_allocclass(ClassInfo ci); |
|---|
| 52 | 54 | } |
|---|
| r4513 |
r5012 |
|
| 35 | 35 | */ |
|---|
| 36 | 36 | module rt.aApply; |
|---|
| 37 | | private import rt.util.utf; |
|---|
| | 37 | private import rt.compiler.util.utf; |
|---|
| 38 | 38 | |
|---|
| 39 | 39 | //debug = apply; |
|---|
| r4513 |
r5012 |
|
| 36 | 36 | */ |
|---|
| 37 | 37 | module rt.aApplyR; |
|---|
| 38 | | private import rt.util.utf; |
|---|
| | 38 | private import rt.compiler.util.utf; |
|---|
| 39 | 39 | |
|---|
| 40 | 40 | /**********************************************/ |
|---|
| r4970 |
r5012 |
|
| 37 | 37 | { |
|---|
| 38 | 38 | import tango.stdc.stdarg; |
|---|
| 39 | | import rt.compiler.cImports: memcmp, memcpy; |
|---|
| | 39 | import tango.stdc.string : memcmp, memcpy; |
|---|
| 40 | 40 | |
|---|
| 41 | 41 | enum BlkAttr : uint |
|---|
| r4970 |
r5012 |
|
| 38 | 38 | private |
|---|
| 39 | 39 | { |
|---|
| 40 | | import rt.compiler.cImports: memcpy,memmove, memcmp, printf; |
|---|
| 41 | | import rt.util.utf; |
|---|
| | 40 | import tango.stdc.string : memcpy, memmove, memcmp; |
|---|
| | 41 | import tango.stdc.stdio : printf; |
|---|
| | 42 | import rt.compiler.util.utf; |
|---|
| 42 | 43 | |
|---|
| 43 | 44 | enum BlkAttr : uint |
|---|
| r4970 |
r5012 |
|
| 12 | 12 | private |
|---|
| 13 | 13 | { |
|---|
| 14 | | import rt.util.console; |
|---|
| 15 | | import rt.compiler.cImports: malloc,free,exit,strlen,EXIT_FAILURE,printf; |
|---|
| | 14 | import rt.compiler.util.console; |
|---|
| | 15 | import tango.stdc.stdlib : malloc, free, exit, EXIT_FAILURE; |
|---|
| | 16 | import tango.stdc.string : strlen; |
|---|
| | 17 | import tango.stdc.stdio : printf; |
|---|
| 16 | 18 | import rt.memory; |
|---|
| 17 | 19 | } |
|---|
| r4737 |
r5012 |
|
| 5 | 5 | module rt.eh; |
|---|
| 6 | 6 | |
|---|
| 7 | | import rt.util.console; |
|---|
| | 7 | import rt.compiler.util.console; |
|---|
| 8 | 8 | import ldc.cstdarg; |
|---|
| 9 | 9 | |
|---|
| r4970 |
r5012 |
|
| 32 | 32 | private |
|---|
| 33 | 33 | { |
|---|
| 34 | | import rt.compiler.cImports: memcpy,memset,memcmp,free,malloc; |
|---|
| 35 | | debug(PRINTF) import rt.compiler.cImports:printf; |
|---|
| 36 | | else debug(PRINTF2) import rt.compiler.cImports:printf; |
|---|
| | 34 | import tango.stdc.string : memcpy, memset, memcmp; |
|---|
| | 35 | import tango.stdc.stdlib : free, malloc; |
|---|
| | 36 | debug(PRINTF) import tango.stdc.stdio : printf; |
|---|
| | 37 | else debug(PRINTF2) import tango.stdc.stdio : printf; |
|---|
| 37 | 38 | } |
|---|
| 38 | 39 | |
|---|
| r4970 |
r5012 |
|
| 32 | 32 | version = GC_Use_Data_Dyld; |
|---|
| 33 | 33 | version = GC_Use_Dynamic_Ranges; |
|---|
| 34 | | import rt.compiler.cImports: c_ulong; |
|---|
| | 34 | import tango.stdc.config : c_ulong; |
|---|
| 35 | 35 | } |
|---|
| 36 | 36 | else version(Posix) |
|---|
| … | … | |
| 48 | 48 | static assert(false, "Proc Maps only supported on Posix systems"); |
|---|
| 49 | 49 | } |
|---|
| 50 | | //private import tango.stdc.posix.unistd; |
|---|
| 51 | | //private import tango.stdc.posix.fcntl; |
|---|
| 52 | | //private import tango.stdc.string; |
|---|
| 53 | | import rt.compiler.cImports: memmove,open,close,read,fcntl_O_RDONLY; |
|---|
| | 50 | import tango.stdc.string : memmove; |
|---|
| | 51 | import tango.stdc.posix.fcntl : open, O_RDONLY; |
|---|
| | 52 | import tango.stdc.posix.unistd : close, read; |
|---|
| 54 | 53 | |
|---|
| 55 | 54 | version = GC_Use_Dynamic_Ranges; |
|---|
| … | … | |
| 347 | 346 | prmap pr; |
|---|
| 348 | 347 | |
|---|
| 349 | | int fd = open("/proc/self/map", fcntl_O_RDONLY); |
|---|
| | 348 | int fd = open("/proc/self/map", O_RDONLY); |
|---|
| 350 | 349 | scope (exit) close(fd); |
|---|
| 351 | 350 | |
|---|
| … | … | |
| 379 | 378 | // TODO: Exclude zero-mapped regions |
|---|
| 380 | 379 | |
|---|
| 381 | | int fd = open("/proc/self/maps", fcntl_O_RDONLY); |
|---|
| | 380 | int fd = open("/proc/self/maps", O_RDONLY); |
|---|
| 382 | 381 | ptrdiff_t count; // %% need to configure ret for read.. |
|---|
| 383 | 382 | char buf[2024]; |
|---|
| r4970 |
r5012 |
|
| 17 | 17 | //debug=qsort; |
|---|
| 18 | 18 | |
|---|
| 19 | | private import rt.compiler.cImports:qsort; |
|---|
| | 19 | private import tango.stdc.stdlib : qsort; |
|---|
| 20 | 20 | |
|---|
| 21 | 21 | private TypeInfo tiglobal; |
|---|
| r4970 |
r5012 |
|
| 27 | 27 | module rt.switch_; |
|---|
| 28 | 28 | |
|---|
| 29 | | private import rt.compiler.cImports: memcmp; |
|---|
| | 29 | private import tango.stdc.string : memcmp; |
|---|
| 30 | 30 | |
|---|
| 31 | 31 | /****************************************************** |
|---|
| r4974 |
r5012 |
|
| 4 | 4 | private import rt.compiler.util.string; |
|---|
| 5 | 5 | private import rt.compiler.util.hash; |
|---|
| 6 | | private import rt.compiler.cImports: memcmp; |
|---|
| | 6 | private import tango.stdc.string : memcmp; |
|---|
| 7 | 7 | |
|---|
| 8 | 8 | // byte[] |
|---|
| r4974 |
r5012 |
|
| 2 | 2 | module rt.compiler.ldc.typeinfo.ti_Aint; |
|---|
| 3 | 3 | |
|---|
| 4 | | private import rt.compiler.cImports:memcmp; |
|---|
| | 4 | private import tango.stdc.string : memcmp; |
|---|
| 5 | 5 | private import rt.compiler.util.hash; |
|---|
| 6 | 6 | |
|---|
| r4974 |
r5012 |
|
| 2 | 2 | module rt.compiler.ldc.typeinfo.ti_Along; |
|---|
| 3 | 3 | |
|---|
| 4 | | private import rt.compiler.cImports:memcmp; |
|---|
| | 4 | private import tango.stdc.string : memcmp; |
|---|
| 5 | 5 | private import rt.compiler.util.hash; |
|---|
| 6 | 6 | |
|---|
| r4974 |
r5012 |
|
| 2 | 2 | module rt.compiler.ldc.typeinfo.ti_Ashort; |
|---|
| 3 | 3 | |
|---|
| 4 | | private import rt.compiler.cImports:memcmp; |
|---|
| | 4 | private import tango.stdc.string : memcmp; |
|---|
| 5 | 5 | private import rt.compiler.util.hash; |
|---|
| 6 | 6 | |
|---|
| r4970 |
r5012 |
|
| 41 | 41 | module rt.compiler.util.cpuid; |
|---|
| 42 | 42 | |
|---|
| 43 | | private import rt.compiler.cImports : strlen; |
|---|
| | 43 | private import tango.stdc.string : strlen; |
|---|
| 44 | 44 | |
|---|
| 45 | 45 | version(D_InlineAsm_X86) |
|---|
| r4970 |
r5012 |
|
| 14 | 14 | module rt.compiler.util.string; |
|---|
| 15 | 15 | |
|---|
| 16 | | private import rt.compiler.cImports: memcmp; |
|---|
| | 16 | private import tango.stdc.string : memcmp; |
|---|
| 17 | 17 | |
|---|
| 18 | 18 | // convert uint to char[], within the given buffer |
|---|
| r4971 |
r5012 |
|
| 27 | 27 | |
|---|
| 28 | 28 | private import tango.core.BitManip; |
|---|
| 29 | | private import rt.compiler.cImports: memset, memcpy, free, calloc; |
|---|
| 30 | | private import tango.stdc.string; |
|---|
| 31 | | //private import tango.stdc.stdlib; |
|---|
| | 29 | private import tango.stdc.string : memset, memcpy; |
|---|
| | 30 | private import tango.stdc.stdlib : free, calloc; |
|---|
| 32 | 31 | private extern (C) void onOutOfMemoryError(); |
|---|
| 33 | 32 | |
|---|
Download in other formats:
|
 |