Commit graph

2412 commits

Author SHA1 Message Date
Peter Alexander
8eb953ef1e Raw write fix and more appropriate function names.
Moved the raw write back into formatValue as it
would cause issues on big endian systems. Also
renamed formatInt to formatIntegral and formatUInt
to formatUnsigned to better signify their purpose.
2011-12-03 13:01:02 +00:00
Peter Alexander
685ebcdaea Size optimisations on std.format
std.format.formatValue was duplicating a lot of
code when formatting various sized, signed and 
unsigned ints, so I shuffled the templates around
to re-use more code. For a Hello World program on
OSX x86 this saved me ~7KB.
2011-12-02 20:50:32 +00:00
Peter Alexander
88ad91f47a Size optimisation of std.datetime (saves 12KB)
Large switch statements have been replaced by data-driven array lookups to reduce the amount of code generated and also improve performance. Using DMD 2.056 on OSX x86 this cuts 12KB off of a Hello World program.

The motivation for this change is to try and reduce the size of small D programs as their large size is a common (and valid) complaint amongst newcomers.
2011-12-01 21:13:16 +00:00
Brad Roberts
3980990974 fix 32 vs 64bit-ism in bituintcore.d 2011-11-26 14:42:31 -08:00
k-hara
3331f1fe97 Issue 6973 - static assert(isOutputRange!(OutputRange!int, int)) is false 2011-11-25 19:45:10 +09:00
Richard Webb
caa43790d7 add missing import of std.stdio 2011-11-24 18:29:53 +00:00
jmdavis
5d90bc3f10 Minor fix to deprecation message on std.string.splitLines.
http://d.puremagic.com/issues/show_bug.cgi?id=6990
2011-11-22 19:04:03 -08:00
jmdavis
b4751aae0b Deprecated overloads for std.conv.to which use typedef. 2011-11-20 05:19:00 -08:00
jmdavis
1d54bfafb9 Removed typedef tests in std.conv.
Now that typedef has been deprecated, having it in std.conv's tests
results in any code which imports std.conv and builds with -unittest
having to build with -d, which is unacceptable IMHO. I don't like
getting rid of the tests, but they were passing, and presumably, the
overloads of std.conv.to which use typedef will be deprecated shortly as
well.
2011-11-20 05:09:44 -08:00
jmdavis
100733041f Made core.thread import in std.file non-selective.
Bug# 314 just makes it create import conflicts when compiling with
-unittest. It works just as well (better given bug# 314) as a normal
import.
2011-11-14 20:27:53 -08:00
Denis Shelomovskij
e8712ed9e1 Documentation and struct staticness in std.algorithm fixes 2011-11-14 17:10:19 +03:00
k-hara
1eba4fa9bb Fix std/internal/uni for Posix unit test breaking 2011-11-14 19:15:52 +09:00
Walter Bright
eaeb1a1516 Merge pull request #325 from klickverbot/file-osx64
Fix std.file on OS X x86_64.
2011-11-14 02:01:09 -08:00
k-hara
fa5794770a Issue 6902 - Different "pure nothrow int()" types 2011-11-14 17:48:22 +09:00
jmdavis
9824a5bbae Added a clarifying note to std.file.symlink. 2011-11-13 17:17:22 -08:00
k-hara
58170c198c Revert "Issue 6902 - Different "pure nothrow int()" types"
This reverts commit d26c719634.

The pull 322 was merged in an accident, and it breaks Phobos.
2011-11-14 09:07:14 +09:00
Kato Shoichi
bd5141b027 Merge pull request #324 from 9rnsr/fix6935
Issue 6935 - struct with @disable this cannot make range
2011-11-13 08:04:14 -08:00
k-hara
5e83c0020d Issue 6935 - struct with @disable this cannot make range 2011-11-13 17:04:19 +09:00
Andrei Alexandrescu
703f612973 Fixed wrong C library lookups 2011-11-12 21:55:22 -06:00
David Nadlinger
5099cf7fad Fix std.file on OS X x86_64.
The previous translation of struct_stat64 did not account for LP64 changes in C types.
2011-11-12 22:14:09 +01:00
k-hara
d26c719634 Issue 6902 - Different "pure nothrow int()" types 2011-11-12 13:59:50 +09:00
David Simcha
0ee6a1afbd Merge pull request #315 from MaksimZh/fix-6888
Fix issue 6888.
2011-11-09 20:34:33 -08:00
David Nadlinger
0c15936c23 Build fix for OS X (fixes IPPROTO_RAW, … std.socket ambiguity errors).
Fixes the socket symbol ambiguities by importing the same symbols from std.c.osx.socket as done on Linux from std.c.linux.socket.

Test suite still not green due to std.regex/FReD breakage.
2011-11-07 22:44:42 +01:00
Jonathan M Davis
f4616f887e Merge pull request #299 from dawgfoto/master
UTF decoding optimizations
2011-11-07 02:00:37 -08:00
k-hara
89b986a855 Fix std.traits.isAbstractFunction breaking 2011-11-07 18:17:46 +09:00
Maksim Zholudev
180839bc10 Unittest for bugzilla 6888. 2011-11-07 08:11:55 +01:00
dawg
1b0edb728c optimize std.utf.decode
- Use fast path tests for non-complex unicode sequences that can be
   inlined. These rely on the built-in array bounds check.

 - Factor out complex cases into separate functions that do exception
   based validity checks.  The char[] and wchar[] versions use
   pointers to avoid redundant array bounds checks, thus they can only
   be trusted.

 - Complete rewrite of decode for char[] to use less branching and
   unrolled loops. This requires less registers AND less instructions.
   The overlong check is done much cheaper on the code point.

 - The decode functions were made templates to short circuit the very
   restricted function inlining possibilities.
2011-11-07 07:16:37 +01:00
David Simcha
4546b3a493 Merge pull request #318 from denis-sh/templates-improvement
Templates improvement
2011-11-06 14:58:38 -08:00
David Simcha
8204fd26e4 Merge pull request #320 from simendsjo/master
Removed some old workarounds for resolved bugs
2011-11-06 14:52:32 -08:00
simendsjo
fdca5dde0d Bug 4414 has been fixed 2011-11-06 17:01:17 +01:00
simendsjo
db8a7b4e51 Bug 2128 has been resolved 2011-11-06 16:53:23 +01:00
simendsjo
f0502b99df Bug 1904 has been fixed. Might brake existing code. 2011-11-06 16:43:04 +01:00
simendsjo
1e9994f7c3 The comment type //:::// confuses the vim syntax plugin making it very difficult to work with the file. 2011-11-06 15:55:37 +01:00
Denis Shelomovskij
064fc770d8 Get rid of fixed bugs mentions in std.traits
Workarounds removed for 4217, 4333, 2509
Mentioning removed for 4732, unittest is added instead
Corrected bug number from 2234 to 2997
2011-11-06 12:06:55 +03:00
jmdavis
25df7d748b Fix build breakage due to std.zlib changes. 2011-11-06 01:01:31 -08:00
Jonathan M Davis
a627abd391 Merge pull request #310 from blackwhale/fred-regex
FReD,  replacement engine for std.regex
2011-11-06 01:52:04 -07:00
Jonathan M Davis
0486a0853c Merge pull request #303 from redstar/zlib
Small fixes to std.zlib.
2011-11-06 01:50:20 -07:00
Denis Shelomovskij
0c760dabd4 std.traits.FunctionTypeOf and isSomeFunction fixes to support nested @property functions 2011-11-06 11:03:57 +03:00
Vladimir Panteleev
94850c1cb5 std.conv: Fix to!float("-0") 2011-11-05 23:31:29 +02:00
Denis Shelomovskij
6e88523269 std.typetuple.isSame fix 2011-11-05 13:57:40 +03:00
Maksim Zholudev
fe1c21d04d Fix issue 6888. 2011-11-04 08:23:42 +01:00
Hara Kenji
4f085eca7f Merge pull request #291 from NilsBossung/master
make to!(dstring) work with structs
2011-11-03 16:51:01 -07:00
Nils Boßung
a54503556b add a unittest for the conversion from typedef to another string type than string 2011-11-03 20:23:23 +01:00
Andrei Alexandrescu
276c84c574 Merge pull request #304 from kyllingstad/path-improvements
std.path improvements
2011-11-03 08:54:40 -07:00
shoo
b3f5e396cf Fixed issue 6887
http://d.puremagic.com/issues/show_bug.cgi?id=6887
2011-11-03 23:35:46 +09:00
Nils Boßung
d64af831d0 convert the default value to T instead of using string as type 2011-11-02 18:34:43 +01:00
Nils Boßung
e6ff8ca7f2 Merge branch 'master' of git://github.com/D-Programming-Language/phobos
Conflicts:
	std/conv.d
2011-11-02 18:25:52 +01:00
Lars T. Kyllingstad
2c682cf0c1 Remove unsafe casts in std.path 2011-11-01 08:04:18 +01:00
Lars T. Kyllingstad
4c4c46b578 Revert "Change basename() to @trusted until 6169 is fixed"
This reverts commit 081113c024.
2011-11-01 07:54:00 +01:00
Dmitry Olshansky
8d6852f221 fix build bug on win32 2011-11-01 01:57:30 +04:00