| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
|
|
|
|
|
| |
`MkT` is the name of the constructor whilst `T` is the name of
the type.
Reviewers: bgamari, austin
Subscribers: thomie
Differential Revision: https://phabricator.haskell.org/D1191
GHC Trac Issues: #10787
|
|
|
|
|
|
|
|
|
|
| |
Reviewers: austin, bgamari
Reviewed By: bgamari
Subscribers: thomie
Differential Revision: https://phabricator.haskell.org/D1190
|
|
|
|
|
|
|
| |
This should at least help alleviate the annoyance of #4505. This
reintroduces a compile-time check originally added in
a278f3f02d09bc32b0a75d4a04d710090cde250f but dropped with the new code
generator.
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
|
|
|
|
|
|
| |
Test Plan: validate
Reviewers: simonmar, bgamari, austin
Reviewed By: bgamari, austin
Subscribers: thomie
Differential Revision: https://phabricator.haskell.org/D1177
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Now identifiers can start with a package key, which is a hash, so they
may also start with a digit. Identifiers always appear at the beginning
of a line, and numbers never appear here, soit's safe to allow
identifiers to start with a digit.
Test Plan: `concprog002` passes under `threaded2_hT` way
Reviewers: austin, bgamari, thomie
Reviewed By: austin, bgamari, thomie
Differential Revision: https://phabricator.haskell.org/D1175
GHC Trac Issues: #10661
|
|
|
|
|
|
|
|
|
|
| |
Test Plan: Check with `readelf --debug-dump=ranges`
Reviewers: scpmw, austin
Subscribers: thomie
Differential Revision: https://phabricator.haskell.org/D1174
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Some libraries (e.g. elfutils) need these otherwise they ignore our
DWARF annotations.
Test Plan: Test with elfutils' `readelf --debug-dump=cu_index`
Reviewers: scpmw, austin
Subscribers: thomie
Differential Revision: https://phabricator.haskell.org/D1173
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Previously this was given in the body but not in the abbreviation table.
Who knows what sort of havoc this was wrecking.
Test Plan: Verify against DWARF4 specification
Reviewers: scpmw, austin
Subscribers: Tarrasch, thomie
Differential Revision: https://phabricator.haskell.org/D1172
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Only supports UTF-8 as a value right now. I expect some discussion to go
on around the naming of this variable and whether it's valid to backport
it to GHC 7.10 (which would be my preference). The motivation here is
that, when capturing the output of GHC to a file, we often want to
ensure that the output is UTF-8, regardless of the actual character
encoding of the terminal/console.
On the other hand, we don't want to necessary change the
terminal/console encoding. The reason being:
* On Windows, this requires a global-esque change to the console
codepage, which adversely affects other processes in the same console
* On all OSes, this can break features like smart quote auto-detection.
Test Plan:
Set LANG to C, GHC_CHARENC to UTF-8, and compile a Haskell source
file with a non-ASCII warning produced. The output who include the UTF-8
sequence instead of replacing it with ?.
Reviewers: austin, rwbarton, bgamari
Reviewed By: bgamari
Subscribers: hsyl20, thomie
Differential Revision: https://phabricator.haskell.org/D1167
GHC Trac Issues: #10762
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This amounts to enabling PolyKinds in GHC.Generics. However, explicit
kind signatures must be applied to the datatypes and typeclasses in
GHC.Generics to ensure that the Core which TcGenGenerics generates
is properly kinded.
Several of the typeclasses in GHC.Generics could be poly-kinded, but
this differential does not attempt to address this, since D493 already
addresses this.
Test Plan: ./validate
Reviewers: hvr, austin, dreixel, bgamari
Reviewed By: austin, dreixel, bgamari
Subscribers: goldfire, thomie
Differential Revision: https://phabricator.haskell.org/D1166
GHC Trac Issues: #10775
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Commit 0d1a8d09f4 added a two step allocator for 64 bit systems. This
allocator mmaps a huge (1 TB) chunk of memory out of which it does
smaller allocations. On AArch64/Arm64 linux, this mmap was failing
due to the Arm64 Linux kernel parameter CONFIG_ARM64_VA_BITS
defaulting to 39 bits.
Therefore reducing the AArch64 value for MBLOCK_SPACE_SIZE to make
this allocation 1/4 TB while remaining 1 TB for other archs.
Reviewers: ezyang, austin, bgamari
Subscribers: thomie
Differential Revision: https://phabricator.haskell.org/D1171
GHC Trac Issues: #10682
|
| |
|
| |
|
|
|
|
|
| |
Currently we don't persist these three "advisory" IdInfos through
interface files. We easily could if needed.
|
| |
|
| |
|
| |
|
|
|
|
|
|
|
| |
This reverts commit 792446906c718a08f0870b58acbdf2cfdeb77770.
This commit was a failed part of an effort to split up D757. I'll need
to try again and make sure I build-test next time.
|
| |
|
| |
|
| |
|
| |
|
|
|
|
|
| |
I'm not sure why tcRnDeclsi didn't call tcRnSrcDecls before, but now it
does. About 20 lines of code vanish. Hooray.
|
|
|
|
|
| |
This localises the (revolting) initTcForLookup function, exposing
instead the more civilised interface for lookupGlobal
|
| |
|
|
|
|
| |
Signed-off-by: Edward Z. Yang <ezyang@cs.stanford.edu>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Recent changes (commit 0d1a8d09f4) for 64 bit platforms allowed GHC
to mmap one huge (currently 1 terrabyte) memory region from which to
do its own allocations. This is enabled by default, but it would be
nice (even just from the point of view of testing) to be able to
disable this at configure time.
Test Plan: configure and grep mk/config.h for USE_LARGE_ADDRESS_SPACE
Reviewers: austin, ezyang, bgamari, rwbarton
Subscribers: thomie
Differential Revision: https://phabricator.haskell.org/D1170
GHC Trac Issues: #10791
|
|
|
|
|
|
|
|
|
|
| |
Test Plan: tested on Solaris 11/AMD64 when previous build failed
Reviewers: bgamari, austin, simonmar, gcampax, ezyang
Subscribers: thomie
Differential Revision: https://phabricator.haskell.org/D1169
|
|
|
|
|
|
| |
We require ghc-7.8 to build HEAD (ghc-7.11).
Differential Revision: https://phabricator.haskell.org/D1165
|
|
|
|
|
|
|
|
|
|
|
|
| |
Summary: Fixes T10637
Reviewers: austin, bgamari, thomie
Subscribers: dfordivam, simonpj, thomie
Differential Revision: https://phabricator.haskell.org/D1157
GHC Trac Issues: #10637
|
| |
|
|
|
|
|
|
|
|
|
|
| |
This will allow fixing #1851 more easily
("make install-strip" should work).
This reverts 57e2a81c589103b50da80a9e378b1a11285bd521:
"On Cygwin, use a Cygwin-style path for /bin/install's destination"
Update submodule haddock and hsc2hs.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This reverses some of the work done in #1405, and goes back to the
assumption that the bootstrap compiler understands GHC-haskell.
In particular:
* use MagicHash instead of _ILIT and _CLIT
* pattern matching on I# if possible, instead of using iUnbox
unnecessarily
* use Int#/Char#/Addr# instead of the following type synonyms:
- type FastInt = Int#
- type FastChar = Char#
- type FastPtr a = Addr#
* inline the following functions:
- iBox = I#
- cBox = C#
- fastChr = chr#
- fastOrd = ord#
- eqFastChar = eqChar#
- shiftLFastInt = uncheckedIShiftL#
- shiftR_FastInt = uncheckedIShiftRL#
- shiftRLFastInt = uncheckedIShiftRL#
* delete the following unused functions:
- minFastInt
- maxFastInt
- uncheckedIShiftRA#
- castFastPtr
- panicDocFastInt and pprPanicFastInt
* rename panicFastInt back to panic#
These functions remain, since they actually do something:
* iUnbox
* bitAndFastInt
* bitOrFastInt
Test Plan: validate
Reviewers: austin, bgamari
Subscribers: rwbarton
Differential Revision: https://phabricator.haskell.org/D1141
GHC Trac Issues: #1405
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This reverses some of the work done in Trac #1405, and assumes GHC is
smart enough to do its own unboxing of booleans now.
I would like to do some more performance measurements, but the code
changes can be reviewed already.
Test Plan:
With a perf build:
./inplace/bin/ghc-stage2 nofib/spectral/simple/Main.hs -fforce-recomp
+RTS -t --machine-readable
before:
```
[("bytes allocated", "1300744864")
,("num_GCs", "302")
,("average_bytes_used", "8811118")
,("max_bytes_used", "24477464")
,("num_byte_usage_samples", "9")
,("peak_megabytes_allocated", "64")
,("init_cpu_seconds", "0.001")
,("init_wall_seconds", "0.001")
,("mutator_cpu_seconds", "2.833")
,("mutator_wall_seconds", "4.283")
,("GC_cpu_seconds", "0.960")
,("GC_wall_seconds", "0.961")
]
```
after:
```
[("bytes allocated", "1301088064")
,("num_GCs", "310")
,("average_bytes_used", "8820253")
,("max_bytes_used", "24539904")
,("num_byte_usage_samples", "9")
,("peak_megabytes_allocated", "64")
,("init_cpu_seconds", "0.001")
,("init_wall_seconds", "0.001")
,("mutator_cpu_seconds", "2.876")
,("mutator_wall_seconds", "4.474")
,("GC_cpu_seconds", "0.965")
,("GC_wall_seconds", "0.979")
]
```
CPU time seems to be up a bit, but I'm not sure. Unfortunately CPU time
measurements are rather noisy.
Reviewers: austin, bgamari, rwbarton
Subscribers: nomeata
Differential Revision: https://phabricator.haskell.org/D1143
GHC Trac Issues: #1405
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
|
|
|
|
| |
Reviewers: austin, bgamari
Reviewed By: bgamari
Subscribers: thomie
Differential Revision: https://phabricator.haskell.org/D1145
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
When pattern synonyms were introduced a new sum type was used
in places where DataCon used to be used. PatSyn and DataCon share many
of the same fields, this patch adds selectors to ConLike for these
fields.
Reviewers: austin, goldfire, bgamari
Subscribers: thomie
Differential Revision: https://phabricator.haskell.org/D1154
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Patch switches from linear lookup in unordered array
to a hash table lookup.
When debugging GHC array contains 658_445 elements.
Found performance gap when tried to debug blackholes.
Signed-off-by: Sergei Trofimovich <siarheit@google.com>
Reviewers: simonmar, austin, bgamari
Subscribers: thomie
Differential Revision: https://phabricator.haskell.org/D1150
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The rdynamic tests and feature are marked broken on windows.
This is because the flag used doesn't exist and the symbol lookup
in the test did not account for platform differences in name mangling.
This commit fixes the flag and tests for rdynamic on windows.
Test Plan:
make TEST="rdynamic"
on both x86 and x86_64
Reviewers: austin, thomie, bgamari
Reviewed By: thomie, bgamari
Subscribers: #ghc_windows_task_force
Differential Revision: https://phabricator.haskell.org/D1149
GHC Trac Issues: #9381
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
When the Windows codepage or *nix LANG variable is something besides
UTF-8, dumping to file can cause GHC to exit currently. This changes the
output encoding for files to match the defined input encoding for
Haskell source code (UTF-8), making it easier for users and build tools
to capture this output.
Test Plan:
Create a Haskell source file with non-Latin characters for identifier
names and
compile with:
LANG=C ghc -ddump-to-file -ddump-hi filename.hs -fforce-recomp
Without this patch, it will fail. With this patch, it succeeds
Reviewers: austin, rwbarton, bgamari
Reviewed By: bgamari
Subscribers: thomie
Differential Revision: https://phabricator.haskell.org/D1151
GHC Trac Issues: #10762
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This avoids the compiler from crashing when, for example, a warning
contains a non-Latin identifier and the LANG variable is set to C.
Fixes #6037.
Test Plan:
Create a Haskell source file containing an identifier with non-Latin
characters and no type signature. Compile with `LANG=C ghc -Wall
foo.hs`, and it should fail. With this patch, it will succeed.
Reviewers: austin, rwbarton, bgamari
Subscribers: thomie
Differential Revision: https://phabricator.haskell.org/D1153
GHC Trac Issues: #6037, #10762
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
rts/ThreadLabels.c has a global hashtable for each
running haskell thread. It's not synchronized across
OS threads.
Was discovered when ran -debug build of ghc itself as:
$ ghc-stage2 -j8 +RTS -A256M -l
and glibc detected double-free corruption:
#2 in __libc_message (do_abort=do_abort@entry=2,
fmt=fmt@entry=0x7fe0bcebf368 "*** Error in `%s': %s: 0x%s ***\n")
#3 in malloc_printerr (action=3, str=0x7fe0bcebf4c0 "double free or corruption (fasttop)",
ptr=<optimized out>)
#4 in _int_free (av=<optimized out>, p=<optimized out>, have_lock=0)
#5 in stgFree (p=0x7fe060001820) at rts/RtsUtils.c:108
#6 in freeHashTable (table=0x5929320, freeDataFun=0x36374df <stgFree>) at rts/Hash.c:360
#7 in freeThreadLabelTable () at rts/ThreadLabels.c:37
#8 in hs_exit_ (wait_foreign=rtsFalse) at rts/RtsStartup.c:403
#9 in shutdownHaskellAndExit (n=0, fastExit=0) at rts/RtsStartup.c:481
#10 in hs_main (...) at rts/RtsMain.c:91
#11 in main (...) at ghc/hschooks.c:63
Exposed itself after commit:
> commit f6866824ce5cdf5359f0cad78c49d65f6d43af12
> Author: Sergei Trofimovich <slyfox@gentoo.org>
> Date: Mon Aug 4 08:10:33 2014 -0500
>
> ghc --make: add nicer names to RTS threads (threaded IO manager, make workers)
Signed-off-by: Sergei Trofimovich <siarheit@google.com>
Reviewers: austin, simonmar, ezyang, bgamari
Reviewed By: ezyang, bgamari
Subscribers: thomie
Differential Revision: https://phabricator.haskell.org/D1146
|
| |
|
|
|
|
|
|
| |
Benchmark: in rootdirectory, run `time make test TEST=dummy VERBOSE=0`
Before this commit: 2.6s
After this commit: 0.7s
|