| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
|
|
|
|
| |
Move implementation notes for Integer to Haddock named section
Revert documentation named chunk change [skip ci]
Haddock's named chunk feature was not used correctly in this case,
as it cannot export only parts of a Haddock top level comment.
As such, it was removed and replaced by a message informing the end-
user to browse the source code for detailed information.
|
|
|
|
|
|
| |
Although we should use 'AC_ARG_ENABLE' for boolean flags, it also
means options get named '--enable-*', not '--with-*'. This should
unbreak the --with-intree-gmp option.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Summary:
This adds top-level configure flags '--with-intree-gmp' and
'--with-framework-preferred', both of which are especially relevant
on MacOS.
Besides gaining two new flags, Hadrian also had to be taught what to
do with the 'framework' in .cabal files.
Test Plan:
./boot && ./configure --with-intree-gmp && ./hadrian/build.sh
./boot && ./configure --with-gmp-framework-preferred && ./hadrian/build.sh # on macos
Reviewers: carter, snowleopard, alpmestan, hvr, goldfire, bgamari
Subscribers: rwbarton, erikd
GHC Trac Issues: #16001
Differential Revision: https://phabricator.haskell.org/D5417
|
|
|
|
|
|
|
|
| |
In `integer-simple`:
* Added an efficient `popCountInteger` and `bitInteger`
* Added an efficient `gcdInteger` and `lcmInteger`
* Made `testBitInteger` more efficient
|
|
|
|
| |
GHC Trac Issues: #15447
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
| |
Reviewers: hvr, bgamari, monoidal
Reviewed By: monoidal
Subscribers: rwbarton, carter
GHC Trac Issues: #15350
Differential Revision: https://phabricator.haskell.org/D5091
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Summary:
We have more and more users of GHC as a library, for example the
Haskell-to-WebAssembly-compiler https://github.com/tweag/asterius.
These need to make different decisions about various aspects of
code generation than the host compiler, and ideally GHC-the-library
allows them to set the `DynFlags` as needed.
This patch adds a new `DynFlag` that configures which `integer`
library to use. This flag is initialized by `cIntegerLibraryType`
(as before), and is only used in `CorePrep` to decide whether to
use `S#` or not.
The other code paths that were varying based on `cIntegerLibraryType`
are no now longer varying: The trick is to use `integer-wired-in`
as the `-this-unit-id` when compiling either `integer-gmp` or
`integer-simple`.
Test Plan: Validate is happy.
Reviewers: hvr, bgamari
Reviewed By: bgamari
Subscribers: TerrorJack, adamse, simonpj, rwbarton, carter
GHC Trac Issues: #13477
Differential Revision: https://phabricator.haskell.org/D5079
|
|
|
|
|
|
|
|
|
|
|
|
| |
Reviewers: hvr, bgamari, monoidal
Reviewed By: monoidal
Subscribers: monoidal, rwbarton, thomie, carter
GHC Trac Issues: #15350
Differential Revision: https://phabricator.haskell.org/D5042
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* All the tests in tests/ghci.debugger now pass with
-fexternal-interpreter. These tests are now run with the ghci-ext way
in addition to the normal way so we won't break it in the future.
* I removed all the unsafeCoerce# calls from RtClosureInspect. Yay!
The main changes are:
* New messages: GetClosure and Seq. GetClosure is a remote interface to
GHC.Exts.Heap.getClosureData, which required Binary instances for
various datatypes. Fortunately this wasn't too painful thanks to
DeriveGeneric.
* No cheating by unsafeCoercing values when printing them. Now we have
to turn the Closure representation back into the native representation
when printing Int, Float, Double, Integer and Char. Of these, Integer
was the most painful - we now have a dependency on integer-gmp due to
needing access to the representation.
* Fixed a bug in rts/Heap.c - it was bogusly returning stack content as
pointers for an AP_STACK closure.
Test Plan:
* `cd testsuite/tests/ghci.debugger && make`
* validate
Reviewers: bgamari, patrickdoc, nomeata, angerman, hvr, erikd, goldfire
Subscribers: alpmestan, snowleopard, rwbarton, thomie, carter
GHC Trac Issues: #13184
Differential Revision: https://phabricator.haskell.org/D4955
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This takes care of bumping the `base` and `integer-gmp`
minor version numbers in anticipation of a GHC 8.4.2 release.
While I was in town, I also filled in a `@since TODO` Haddock
annotation for `powModSecInteger` in `integer-gmp` with
`1.0.2.0`, and updated the changelog accordingly.
Test Plan: ./validate
Reviewers: hvr, goldfire, bgamari
Reviewed By: bgamari
Subscribers: thomie, carter
GHC Trac Issues: #15025
Differential Revision: https://phabricator.haskell.org/D4586
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Here's how the rube goldberg machine triggered the old bug:
1. If you have a file gmp/config.mk.in, then Cabal will
create a generated file in $DIST/build/gmp/config.mk
2. When you attempt to load inplace integer-gmp via GHCi, it will
ask gcc (aka clang on OS X) for the file name of 'gmp', with
base directory set to $DIST/build
3. There is a folder named 'gmp', and so this folder is returned
as the 'library' for gmp
4. GHCi loadArchive chokes to death trying to open a library
that is actually a folder
This patch solves the problem by breaking the chain at (1): if we
don't put config.mk in a folder named gmp, NO PROBLEM.
Signed-off-by: Edward Z. Yang <ezyang@fb.com>
Test Plan: validate
Reviewers: angerman, hvr, bgamari
Reviewed By: angerman
Subscribers: erikd, thomie, carter
GHC Trac Issues: #14972
Differential Revision: https://phabricator.haskell.org/D4552
|
|
|
|
|
|
|
|
|
|
| |
Reviewers: hvr
Subscribers: rwbarton, thomie, erikd, carter
GHC Trac Issues: #14910
Differential Revision: https://phabricator.haskell.org/D4495
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Summary:
This came up when trying to build GHC HEAD with nix. We
do not set CCX for integer-gmp when running ./configure. We do
this however for libffi.
The result is, that if CCX is not set, we default to the system
one, of which there might be none (as in nixos's case). This
will not show on a debian+nix or similar setup, where the system
`cxx` is still in place, and only shows up when the system tries
hard to sandbox everything (even cxx) as nixOS does.
We use `CXX`, which is set to either `clang` or `CC_STAGE1`, and
also usedfor `CC`, similar to what we do for libffi.c
Test Plan: ./validate
Reviewers: bgamari, hvr
Reviewed By: hvr
Subscribers: rwbarton, thomie, carter
Differential Revision: https://phabricator.haskell.org/D4473
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This wasn't spotted rightaway in
8f0b2f5eadf0fcb47c581907205a9db686214a69
because the include-site deliberately ignored include-errors as
a Hack with the justification below:
> Hack. The file gmp/config.mk doesn't exist yet after running ./configure in
> the toplevel (ghc) directory. To let some toplevel make commands such as
> sdist go through, right after ./configure, don't consider this an error.
This may have contributed to #14891.
|
|
|
|
|
|
|
|
|
|
|
| |
There weas lots of historical cruft to be found here. The `export
SHELLOPTS` breaks on NixOS due to bash syntax in the gcc wrapper script.
Reviewers: hvr
Subscribers: rwbarton, thomie, carter
Differential Revision: https://phabricator.haskell.org/D4347
|
|
|
|
| |
(cherry picked from commit 3fa061a647d2fdc182eff9296eea02d6a7d516cd)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This implements the missing `{set,clear,complement}BitBigNat` primitives
and hooks them up to `Natural`'s `Bits` instance.
This doesn't yet benefit `Integer`, as we still need "negative" `BigNat`
variants of those primitives.
Addresses #7860 (partly)
Reviewed By: bgamari
Differential Revision: https://phabricator.haskell.org/D3415
|
|
|
|
|
|
|
|
|
|
|
|
| |
Just fix a few inconsistencies that I encountered.
[skip ci]
Reviewers: austin, hvr, goldfire
Subscribers: rwbarton, thomie
Differential Revision: https://phabricator.haskell.org/D4024
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The function existed in integer-gmp-0.5.1.0 but was removed as
part of integer-gmp2 rewrite in #9281. This is to bring it back.
Test Plan: Case integerGmpInternals, with GMP 4.3.2 and GMP 6.1.2
Reviewers: austin, hvr, goldfire, bgamari
Reviewed By: bgamari
Subscribers: rwbarton, thomie
Differential Revision: https://phabricator.haskell.org/D3947
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Impacts only functions gcdExtInteger, powModInteger and
recipModInteger which gave invalid results on negative S# inputs.
Also fixes gcdExtInteger assertion when first argument is negative.
Test Plan: Updated test case integerGmpInternals
Reviewers: austin, hvr, goldfire, bgamari
Reviewed By: bgamari
Subscribers: rwbarton, thomie
GHC Trac Issues: #14085
Differential Revision: https://phabricator.haskell.org/D3826
|
|
|
|
| |
(cherry picked from commit 09396ec3bb672e761c3e627484dd02c5a3a76c77)
|
|
|
|
| |
Scripts taken from autoconf 81497f5aaf50a12a9fe0cba30ef18bda46b62959
|
| |
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
There is no new autoconf release, and it seems like there will unlikely be one
<http://lists.gnu.org/archive/html/autoconf/2016-07/msg00017.html>.
This will allow us to support <arch>-apple-ios properly.
These have been taken from
- http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.guess
- http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.sub
Reviewers: austin, hvr, bgamari
Reviewed By: bgamari
Subscribers: rwbarton, thomie
Differential Revision: https://phabricator.haskell.org/D3558
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This both says what we mean and silences a bunch of spurious CPP linting
warnings. This pragma is supported by all CPP implementations which we
support.
Reviewers: austin, erikd, simonmar, hvr
Reviewed By: simonmar
Subscribers: rwbarton, thomie
Differential Revision: https://phabricator.haskell.org/D3482
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The submodule repository contains the latest version of the GMP source
distribution (6.1.2) with the doc/ subdirectory removed, as described
in gmp/ghc.mk. Rather than applying the old patch from gmp/tarball/patch
I moved its contents into gmp/gmpsrc.patch, canceling a patch related to
memory management there. Experimentally, the PIC-related patch for OS X
is still necessary.
The upgrade to GMP 6.1.2 fixes #7655.
Test Plan:
Built on OS X with in-tree gmp and tested that the command
`ghc -e 'length (show (2^(5*10^6) :: Integer))'` no longer segfaults.
Reviewers: mpickering, hvr, austin, bgamari
Reviewed By: bgamari
Subscribers: mpickering, thomie
Differential Revision: https://phabricator.haskell.org/D3044
GHC Trac Issues: #7655
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
These two special cases were created in D2278 by mechanically
inlining negateInteger into plusInteger. They aren't needed
(the `minusInteger (S# x#) (S# y#)` case already handles all values
correctly), and they can never help by avoiding an allocation,
unlike the original special case in plusInteger, since we still
have to allocate the result.
Removing these special cases will save a couple comparisons and
conditional branches in the common case of subtracting two small
Integers.
Test Plan:
Existing test `plusMinusInteger` already tests
the values in question.
Reviewers: bgamari, goldfire, austin, hvr
Reviewed By: bgamari, hvr
Subscribers: thomie
Differential Revision: https://phabricator.haskell.org/D3034
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
In `x shiftR y`, any of the following conditions cause an abort:
- `x` is a negative big integer
- The size of `x` and `y` is a multiple of `GMP_NUMB_BITS`
- The bit of the absolute value of `x` is filled with `1`
For example:
Assuming `GMP_NUMB_BITS = 2`, the processing of `-15 shiftR 2` is as
follows:
1. -15 = -1111 (twos complement: 10001)
2. right shift 2 (as a positive number) -> 0011
3. Due to the shift larger than GMP_NUMB_BITS, the size of the
destination is decreasing (2bit) -> 11
4. Add 1, and get carry: (1) 00
5. abort
I fixed it that the destination size does not decrease in such a case.
Test Plan: I tested the specific case being reported.
Reviewers: goldfire, austin, hvr, bgamari, rwbarton
Reviewed By: bgamari, rwbarton
Subscribers: mpickering, rwbarton, thomie
Differential Revision: https://phabricator.haskell.org/D2998
GHC Trac Issues: #12136
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This commit implements the proposal in
https://github.com/ghc-proposals/ghc-proposals/pull/29 and
https://github.com/ghc-proposals/ghc-proposals/pull/35.
Here are some of the pieces of that proposal:
* Some of RuntimeRep's constructors have been shortened.
* TupleRep and SumRep are now parameterized over a list of RuntimeReps.
* This
means that two types with the same kind surely have the same
representation.
Previously, all unboxed tuples had the same kind, and thus the fact
above was
false.
* RepType.typePrimRep and friends now return a *list* of PrimReps. These
functions can now work successfully on unboxed tuples. This change is
necessary because we allow abstraction over unboxed tuple types and so
cannot
always handle unboxed tuples specially as we did before.
* We sometimes have to create an Id from a PrimRep. I thus split PtrRep
* into
LiftedRep and UnliftedRep, so that the created Ids have the right
strictness.
* The RepType.RepType type was removed, as it didn't seem to help with
* much.
* The RepType.repType function is also removed, in favor of typePrimRep.
* I have waffled a good deal on whether or not to keep VoidRep in
TyCon.PrimRep. In the end, I decided to keep it there. PrimRep is *not*
represented in RuntimeRep, and typePrimRep will never return a list
including
VoidRep. But it's handy to have in, e.g., ByteCodeGen and friends. I can
imagine another design choice where we have a PrimRepV type that is
PrimRep
with an extra constructor. That seemed to be a heavier design, though,
and I'm
not sure what the benefit would be.
* The last, unused vestiges of # (unliftedTypeKind) have been removed.
* There were several pretty-printing bugs that this change exposed;
* these are fixed.
* We previously checked for levity polymorphism in the types of binders.
* But we
also must exclude levity polymorphism in function arguments. This is
hard to check
for, requiring a good deal of care in the desugarer. See Note [Levity
polymorphism
checking] in DsMonad.
* In order to efficiently check for levity polymorphism in functions, it
* was necessary
to add a new bit of IdInfo. See Note [Levity info] in IdInfo.
* It is now safe for unlifted types to be unsaturated in Core. Core Lint
* is updated
accordingly.
* We can only know strictness after zonking, so several checks around
* strictness
in the type-checker (checkStrictBinds, the check for unlifted variables
under a ~
pattern) have been moved to the desugarer.
* Along the way, I improved the treatment of unlifted vs. banged
* bindings. See
Note [Strict binds checks] in DsBinds and #13075.
* Now that we print type-checked source, we must be careful to print
* ConLikes correctly.
This is facilitated by a new HsConLikeOut constructor to HsExpr.
Particularly troublesome
are unlifted pattern synonyms that get an extra void# argument.
* Includes a submodule update for haddock, getting rid of #.
* New testcases:
typecheck/should_fail/StrictBinds
typecheck/should_fail/T12973
typecheck/should_run/StrictPats
typecheck/should_run/T12809
typecheck/should_fail/T13105
patsyn/should_fail/UnliftedPSBind
typecheck/should_fail/LevPolyBounded
typecheck/should_compile/T12987
typecheck/should_compile/T11736
* Fixed tickets:
#12809
#12973
#11736
#13075
#12987
* This also adds a test case for #13105. This test case is
* "compile_fail" and
succeeds, because I want the testsuite to monitor the error message.
When #13105 is fixed, the test case will compile cleanly.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Give `minusInteger` its own implementation.
Previously `minusInteger` used `plusInteger` and `negateInteger`, which
meant it always allocated. Now it works more like `plusInteger`.
Reviewers: goldfire, hvr, bgamari, austin
Reviewed By: hvr, bgamari, austin
Subscribers: thomie
Differential Revision: https://phabricator.haskell.org/D2278
GHC Trac Issues: #12129
|
|
|
|
|
|
|
|
|
|
|
|
| |
Reviewers: austin, goldfire, bgamari
Reviewed By: bgamari
Subscribers: thomie
Differential Revision: https://phabricator.haskell.org/D1984
GHC Trac Issues: #10691
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
When building the bundled GMP sources, the `HOSTPLATFORM` value was
passed to the `--host` flag of the `./configure` call. This is
incorrect: when building a cross-compiler, e.g. a compiler targeting
ARM but running on X86, the host on which GMP will run is ARM, i.e.
the target platform of the compiler, and the host platform (i.e. the
platform on which the compiler will run) is X86.
See e.g. [1] for more information about the meaning of and relation
between build, host and target.
[1] https://www.gnu.org/software/autoconf/manual/
autoconf-2.65/html_node/Specifying-Target-Triplets.html
Test Plan: Building ARM cross-compiler with `integer-gmp`
Reviewers: thomie, gracjan, austin, erikd, Phyx, hvr, bgamari
Reviewed By: erikd, bgamari
Subscribers: erikd, gracjan
Differential Revision: https://phabricator.haskell.org/D1960
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
A small cosmetic change, but we have to do a bit of work to
actually support it:
- Cabal submodule update, so that Cabal passes us
-this-unit-id when we ask for it. This includes
a Cabal renaming to be consistent with Unit ID, which
makes ghc-pkg a bit more scrutable.
- Build system is updated to use -this-unit-id rather than
-this-package-key, to avoid deprecation warnings. Needs
a version test so I resurrected the old test we had
(sorry rwbarton!)
- I've *undeprecated* -package-name, so that we are in the same
state as GHC 7.10, since the "correct" flag will have only
entered circulation in GHC 8.0.
- I removed -package-key. Since we didn't deprecate -package-id
I think this should not cause any problems for users; they
can just change their code to use -package-id.
- The package database is indexed by UNIT IDs, not component IDs.
I updated the naming here.
- I dropped the signatures field from ExposedModule; nothing
was using it, and instantiatedWith from the package database
field.
- ghc-pkg was updated to use unit ID nomenclature, I removed
the -package-key flags but I decided not to add any new flags
for now.
Signed-off-by: Edward Z. Yang <ezyang@cs.stanford.edu>
Test Plan: validate
Reviewers: austin, hvr, bgamari
Reviewed By: bgamari
Subscribers: 23Skidoo, thomie, erikd
Differential Revision: https://phabricator.haskell.org/D1780
|
|
|
|
| |
and update changelog.md
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This was introduced by a mental fumble in
9e8562ae02701270e2c1dfcee3279d862dc5b7b6 wherein I replaced
`getSizeofMutableByteArray` with `getSizeofMutBigNat`. This was noticed
by invalid integers being produced on 32-bit machines in #11296.
Test Plan: Validate
Reviewers: hvr, goldfire, austin
Reviewed By: hvr
Subscribers: thomie
Differential Revision: https://phabricator.haskell.org/D1707
GHC Trac Issues: #11296
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The non-idiomatic `--with-cc` flag was added via
5c789e424c1461c1dadfd38c44fcb9e8f38bf755
However, `--with-cc` seems rather fragile and support for `--with-cc` needs
to be added explicitly to autoconf-based Cabal packages. The `CC=` flag, however,
is supported natively by GNU Autoconf, so let's use the standard facility for that.
Relatedly, Cabal prior to version 1.24 used a similiar flag `--with-gcc=...`,
but starting with Cabal-1.24 this has been changed to use `CC=...` instead as well
(see https://github.com/haskell/cabal/pull/2946)
This also updates a few submodules removing the now obsolete `--with-cc` flag
support.
Reviewed By: trofi, thomie, erikd
Differential Revision: https://phabricator.haskell.org/D1608
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This makes sure that `AC_USE_SYSTEM_EXTENSIONS` (which
implies `AC_PROG_CC`) is called after the
`AC_ARG_WITH([cc],,)` invocation, so that the proper
CC setting is in scope. Otherwise this can break cross-compilation.
This also needs to pull in a submodule update for `unix`
This is a follow-up commit to
7af29da05d2e5a5e311a5f73f20d0f232035973b
which hopefully fixes #11168
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Test Plan: validate
Reviewers: goldfire, erikd, rwbarton, simonpj, austin, simonmar, hvr
Reviewed By: simonpj
Subscribers: simonmar, thomie
Differential Revision: https://phabricator.haskell.org/D1103
GHC Trac Issues: #10678
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This adds a subWordC# primop which implements subtraction with overflow
reporting.
Reviewers: tibbe, goldfire, rwbarton, bgamari, austin, hvr
Reviewed By: bgamari
Subscribers: thomie
Differential Revision: https://phabricator.haskell.org/D1334
GHC Trac Issues: #10962
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This is a somewhat minor optimisation exploiting the static knowledge
of the operands involved allowing to save a few allocations.
Reviewers: austin, rwbarton, goldfire, bgamari
Reviewed By: bgamari
Subscribers: thomie
Differential Revision: https://phabricator.haskell.org/D1179
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Now since ByteArrays are mutable we need to be more explicit about when
the size is queried.
Test Plan: Add testcase and validate
Reviewers: goldfire, hvr, austin
Subscribers: thomie
Differential Revision: https://phabricator.haskell.org/D1139
GHC Trac Issues: #9447
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
We only support building GHC on mys2 nowadays, see
https://ghc.haskell.org/trac/ghc/wiki/Building/Preparation/Windows.
This (partially) reverts various commits from a few years ago, among which:
* 5775d5142da227d65fb86994d363eb16841ee642
"Add OSTYPE build-system variable, and use it"
* 3fb8c431824aa2f3bd979e35d1a283546fcfbe74
"Fix building libgmp on cygwin"
* cdbb4720c424500adb57cbbef69721d0b039fa46
"Fix cmd invocation by libffi cuild system on Windows 7 cygwin"
* e8121501ee3549a35e954726ccfd871ac9d51f83
"Fix dblatex and xml* tool detection on Windows"
Reviewed by: austin, Phyx
Differential Revision: https://phabricator.haskell.org/D1155
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Summary:
I'm pretty sure that parentheses were intended here. But oddly, they
make very little difference.
The presumably intended expression
(sizeofBigNat# bn ==# 1#) `andI#` (bigNatToWord bn `eqWord#` w#)
is 1# exactly when bn consists of a single limb equal to w#, clearly.
In the original expression
sizeofBigNat# bn ==# 1# `andI#` (bigNatToWord bn `eqWord#` w#)
the right-hand side of ==# is always 0# or 1#. So it is 1# when bn
consists of a single limb equal to w#. It is also 1# when bn has
zero limbs and the word past the end of bn does not happen to be
equal to w#. So in practice the difference is that nullBigNat was
eqBigNatWord# to almost everything, but eqBigNatWord# is never
supposed to be called on nullBigNat anyways.
Note that even the corrected version might perform an out-of-bounds
memory access if passed nullBigNat, because `andI#` is not guaranteed
to short-circuit, though in fact GHC does convert isZeroBigNat to a
series of branches in my local build.
Test Plan: validate
Reviewers: hvr, bgamari, goldfire, austin
Reviewed By: hvr, bgamari
Subscribers: thomie
Differential Revision: https://phabricator.haskell.org/D1095
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Summary:
The form
case na# ==# nb# of
0# -> ...
_ -> ...
sometimes generates convoluted assembly, see #10676.
timesInt2Integer was the most spectacular offender, especially as
it is a rather cheap function overall (no calls to gmp).
I checked a few instances and some of the old generated assembly
was fine already, but I changed them all for consistency. The new
form is also more consistent with use of these primops in general.
Test Plan: validate
Reviewers: hvr, bgamari, goldfire, austin
Reviewed By: hvr
Subscribers: thomie
Differential Revision: https://phabricator.haskell.org/D1094
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Make it possible to run `make sdist` right after configure, without completing
a complete build first.
Test Plan:
I compared the contents of the created `.tar.bz2` files in the `sdistprep`
directory, after running `make sdist` both before and after completing a full
build, using `diff -r`. There weren't any differences (after applying the
patches from D914).
Note that the `.tar.bz2` files were not exactly the same size, but they aren't
either when tarring and bzipping the same directory twice. It seems tarring
and bzipping is not deterministic (on my system).
Differential Revision: https://phabricator.haskell.org/D917
|