Commit graph

263 commits

Author SHA1 Message Date
Sebastian Wilzbach
c352281212 Enforce Allman style for do { 2016-12-09 17:40:50 +01:00
somzzz
682536d586 fix issue 155421 2016-12-08 13:43:56 -08:00
Jack Stouffer
0fed86c07b Removed uses of the delete keyword from std.internal.math.biguintcore.d 2016-10-26 08:59:44 +01:00
Martin Nowak
9d73d18c0c fix Issue 16291 - EncodingScheme.create fails
- add EncodingScheme.register overload that references the registered class
- just adding the FQN name of a class does not reference that class, so
  it must not end up in the binary and subsequently EncodingScheme.create failed
- This used to work by chance b/c all the EncodingScheme implementations
  were in a module w/ static ctor. Any user of std.encoding did drag in
  that ModuleInfo, which in turn referenced all classes of std.encoding.
  Since moving the static ctor to std.internal.phobosinit to break a
  cycle, the classes were no longer referenced by a ModuleInfo w/ shared
  ctor, so they wouldn't end up in the binary unless explicitly
  referenced elsewhere.
- deprecate the old EncodingScheme.register(string fqn) b/c relying on
  Object.factory is slow, error prone (linkage), and really unnecessary
- import encodinginit in std.encoding so that the
  std_encoding_shared_static_this callback actually gets run
2016-10-05 01:54:22 +02:00
Martin Nowak
ebbdf21a7e fix Issue 16580 - spawnShell segfaults on macOS
- partially Revert "Merge pull request #4493 from schveiguy/fixcycles2"
- recreate processinit (and import it from std.process)
  to call std.process shared ctor w/o creating a cycle
- keep it separate from phobosinit to not drag std.encoding
  into any binary using std.process
2016-10-04 23:56:38 +02:00
Andrei Alexandrescu
1efaba0af3 Merge pull request #4786 from WalterBright/cstring-array
cstring: add opIndex to result
2016-09-16 07:45:01 -04:00
Jack Stouffer
0cb88c508d Mark the internal unicode code as package 2016-09-15 08:42:57 +01:00
Walter Bright
60d6169d70 csting: add opIndex to result 2016-09-14 12:49:07 -07:00
Walter Bright
9c5401ce92 fix tempCString() to follow strict scope rules 2016-08-24 01:34:57 -07:00
Jack Stouffer
4f81cb0f63 Added const and immutable to several variables in std.internal.math.biguintcore 2016-07-26 15:54:26 -04:00
Walter Bright
821283c592 cstring.d: fix unsafe use of .ptr 2016-07-25 12:57:46 -07:00
Jack Stouffer
880b13313c Remove too broad local import from phobosinit 2016-07-06 10:00:39 -04:00
Steven Schveighoffer
df168487fc Fix cycles in Phobos 2016-06-28 15:00:01 -04:00
Sebastian Wilzbach
ec47ac4224 Remove the WEB macro in favor of HTTP
replacement: sed 's/\$(WEB/\$(HTTP/g' -i **/*.d
2016-06-16 00:14:51 +02:00
Sebastian Wilzbach
1d34a121e9 apply all-man braces in Phobos
// find common cases
sed -E "s/^(\s*)((if|static if|for|foreach|foreach_reverse|while|unittest|switch|else|version).*)\s*\{$/\1\2\n\1{/" -i **/*.d
// catch else-if
sed -E "s/^(\s*)} (else static if| if|else if|else)(.*)\s*\{$/\1}\n\1\2\3\n\1{/" -i **/*.d
// remove created trailing whitespace
sed -i 's/[ \t]*$//' **/*.d
2016-05-31 13:07:53 +02:00
Sebastian Wilzbach
2dfbc51f17 Standardize whitespace after imports
Unified with:

sed -E "s/import\s*([^ ]+)\s*:\s*(.*(,|;))/import \1 : \2/" -i **/*.d
2016-05-29 22:09:56 +02:00
Jack Stouffer
fafb15bf1c Fixed long lines in unicode_norm.d 2016-05-10 20:51:39 -04:00
Jack Stouffer
547d9aad14 Fixed long lines in unicode_decomp.d 2016-05-10 20:51:39 -04:00
Jack Stouffer
8cd97964a7 Fixed long lines in std/internal/unicode_tables.d 2016-05-10 20:51:39 -04:00
Jack Stouffer
fcfc903b05 Fixed long lines in std/internal/unicode_grapheme.d 2016-05-10 20:51:39 -04:00
Jack Stouffer
60481373f0 Fixed long lines in std/internal/unicode_comp.d 2016-05-10 20:51:39 -04:00
Jack Stouffer
db33adc2ec Fixed long lines in std/internal/math/gammafunction.d 2016-05-10 20:51:39 -04:00
Jack Stouffer
531ae8e998 Fixed long lines in std/internal/math/biguintx86.d 2016-05-10 20:51:39 -04:00
Dmitry Olshansky
8c3f343237 Merge pull request #3876 from JackStouffer/bigint2
[issue 15229] Range-ified BigInt's Ctor to Accept Ranges of Characters
2016-04-29 15:18:54 +04:00
Jack Stouffer
dd0d139831 Fix Issue 15229: Refactored BigInt code to work with character ranges 2016-04-28 09:51:24 -04:00
Dmitry Olshansky
c1027f1970 Merge pull request #4246 from wilzbach/sed_spaces_part_2
style fix: add space after 'for' operator
2016-04-27 16:17:18 +04:00
Sebastian Wilzbach
d1714c9afb minor style fixes 2016-04-27 04:18:22 +03:00
Sebastian Wilzbach
5a8988c149 style fix: add space after for operator 2016-04-27 02:04:02 +03:00
Sebastian Wilzbach
3d67cd228c style fix: space between operators 2016-04-26 22:26:20 +03:00
Steven Schveighoffer
630e227c5a Merge pull request #3992 from quickfur/bigint_octal
Issue 14503: Implement formatting BigInt in octal
2016-03-31 16:56:40 -04:00
H. S. Teoh
b12b767b7c output() should take unsigned parameter. 2016-03-31 11:05:59 -07:00
Dan Olson
b938a74628 Fix NaN payload unittest in errorfunction
For some platforms, math on a NaN may change the sign.  This is
ok according to C99.  Replaced with test that ignores signbit.
2016-03-19 15:29:00 -07:00
Sebastian Wilzbach
d81030ab8a convert docstring examples to unittests 2016-03-03 15:24:26 +02:00
H. S. Teoh
6282dda407 Implement conversion of biguint to octal.
Carried bits in last word must be output at the end.

Add unittest for 3rd/4th word no-carry boundary.

Implement 'o' format specifier in BigInt.toString().
2016-02-25 13:30:35 -08:00
Ilya Yaroshenko
1e665d24b2 Merge pull request #3928 from burner/dummyrange_variable_type
Make DummyRange work this types other than uint
2016-02-23 15:19:36 +02:00
Martin Nowak
ce2ac192c9 fix incorrect imports/fqn usages
- mostly of the form `import a.b : sym; a.b.sym();`, which is wrong b/c
  selective imports do not add the module to the current scope
2016-02-20 14:41:44 +01:00
Lars T. Kyllingstad
50e3fc6b74 Merge pull request #3989 from WalterBright/zipprocess
fix problems that prevent implementing import shadowing protection
2016-02-12 08:45:46 +01:00
Walter Bright
8e6faa560f fix problems that prevent implementing import shadowing protection 2016-02-11 22:38:53 -08:00
Robert burner Schadek
fd55091784 Make DummyRange work this types other than uint
* fixating the current DummyRange behaviour in a unittest.
* structured the tests a little
* DummyRange with custom types

style

style again

even more style

spaces
2016-01-13 21:26:21 +01:00
JakobOvrum
644cec80ba Merge pull request #3874 from JackStouffer/bigint
Added ReferenceBidirectionalRange to std.internal.test.dummyrange
2016-01-09 18:12:21 +09:00
Benjamin L. Merritt
5f08c058ab Changed "Examples:" in Ddoc to "Example:" 2015-12-17 18:32:41 -08:00
Jack Stouffer
467276cc92 added ReferenceBidirectionalRange to std.internal.test.dummyrange 2015-12-16 16:55:29 -05:00
Ryan Roden-Corrent
79fd6aac79 Enable getSymbolsByUDA to retrieve private members.
Resolves #15335: getSymbolsByUDA fails if type has private members.
Generous (ab)use of mixins allows getSymbolsByUDA to reference symbols
without trying to access them, allowing it to inspect private members
without failing.

Testing this required private symbols defined outside of std.traits.
This adds std.internal.test.uda, which defines a struct containing
private members that is used in a unittest added to std.traits.
2015-11-28 07:14:47 -05:00
Robert Schadek
f5ce17346d Merge pull request #3806 from 9il/dr
update dummyrange.d
2015-11-12 16:03:14 +01:00
Ilya Yaroshenko
efd177e092 update dummyrange.d 2015-11-11 22:44:07 -08:00
Martin
a3035d7d77 Slightly relax std.internal.math.gammafunction unittest for 64-bit reals
Using LDC master on Win64, I get a relative diff of 1.068e-15 for the
second tuple (input = 1/8), exceeding the allowed upper bound by not even
7%. I chose to be generous and doubled the limit. ;)

More details for the 2nd tuple:
actual:   0x1.0a333fd8b6880p+2
expected: 0x1.0a333fd8b687bp+2
rel diff: 1.067682e-15

The other 4 tuples are perfect matches.
2015-11-08 15:27:34 +01:00
Walter Bright
cf22992cbb Merge pull request #3768 from CyberShadow/pull-20151024-051829
HTML fixes
2015-10-24 15:05:00 -07:00
Vladimir Panteleev
86cf380007 HTML fixes 2015-10-24 06:19:23 +00:00
Brian Schott
c33306d2ca Merge pull request #3750 from WalterBright/sha_SSSE3
sha_SSSE3.d: small optimization
2015-10-19 11:30:58 -07:00
Walter Bright
7fe9cc897c sha_SSSE3.d: small optimization 2015-10-19 07:12:27 -07:00