From git at git.haskell.org Sun Nov 1 09:46:49 2015 From: git at git.haskell.org (git at git.haskell.org) Date: Sun, 1 Nov 2015 09:46:49 +0000 (UTC) Subject: [commit: ghc] master: llvmGen: Really fix build with Clang (8fd5cff) Message-ID: <20151101094649.9C2983A300@ghc.haskell.org> Repository : ssh://git at git.haskell.org/ghc On branch : master Link : http://ghc.haskell.org/trac/ghc/changeset/8fd5cff6fa1cd943a90f19df87389d10a2cb27d1/ghc >--------------------------------------------------------------- commit 8fd5cff6fa1cd943a90f19df87389d10a2cb27d1 Author: Erik de Castro Lopo Date: Sun Nov 1 10:15:24 2015 +0100 llvmGen: Really fix build with Clang Test Plan: Build with Clang and GCC Reviewers: austin, thomie, hvr, bgamari Reviewed By: bgamari Differential Revision: https://phabricator.haskell.org/D1414 >--------------------------------------------------------------- 8fd5cff6fa1cd943a90f19df87389d10a2cb27d1 compiler/llvmGen/LlvmCodeGen/CodeGen.hs | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/compiler/llvmGen/LlvmCodeGen/CodeGen.hs b/compiler/llvmGen/LlvmCodeGen/CodeGen.hs index cde3276..aa3a0c3 100644 --- a/compiler/llvmGen/LlvmCodeGen/CodeGen.hs +++ b/compiler/llvmGen/LlvmCodeGen/CodeGen.hs @@ -476,11 +476,12 @@ genCallWithOverflow :: ForeignTarget -> Width -> [CmmFormal] -> [CmmActual] -> LlvmM StmtData genCallWithOverflow t@(PrimTarget op) w [dstV, dstO] [lhs, rhs] = do -- So far this was only tested for the following four CallishMachOps. - MASSERT((op `elem` [ MO_Add2 w - , MO_AddIntC w - , MO_SubIntC w - , MO_SubWordC w - ])) + let valid = op `elem` [ MO_Add2 w + , MO_AddIntC w + , MO_SubIntC w + , MO_SubWordC w + ] + MASSERT(valid) let width = widthToLlvmInt w -- This will do most of the work of generating the call to the intrinsic and -- extracting the values from the struct. From git at git.haskell.org Sun Nov 1 09:46:52 2015 From: git at git.haskell.org (git at git.haskell.org) Date: Sun, 1 Nov 2015 09:46:52 +0000 (UTC) Subject: [commit: ghc] master: Add rts/Linker support for more than 64k sections (3021cc0) Message-ID: <20151101094652.4D1BF3A300@ghc.haskell.org> Repository : ssh://git at git.haskell.org/ghc On branch : master Link : http://ghc.haskell.org/trac/ghc/changeset/3021cc06f84109c6e7a529318d690c520748f936/ghc >--------------------------------------------------------------- commit 3021cc06f84109c6e7a529318d690c520748f936 Author: Simon Brenner Date: Sun Nov 1 10:15:31 2015 +0100 Add rts/Linker support for more than 64k sections Since some ELF fields ran out of range to represent that many sections, they've been extended with magic numbers that indicate that the full value is stored in another field. This will be necessary for GHCi with -split-sections on ELF platforms that don't use GNU ld. Reviewers: austin, bgamari, simonmar, erikd Reviewed By: bgamari, simonmar, erikd Subscribers: thomie Differential Revision: https://phabricator.haskell.org/D1357 GHC Trac Issues: #8405 >--------------------------------------------------------------- 3021cc06f84109c6e7a529318d690c520748f936 rts/Linker.c | 180 ++++++++++++++++++++++++++++++++++++++++++++++------------- 1 file changed, 141 insertions(+), 39 deletions(-) Diff suppressed because of size. To see it, use: git diff-tree --root --patch-with-stat --no-color --find-copies-harder --ignore-space-at-eol --cc 3021cc06f84109c6e7a529318d690c520748f936 From git at git.haskell.org Sun Nov 1 09:46:54 2015 From: git at git.haskell.org (git at git.haskell.org) Date: Sun, 1 Nov 2015 09:46:54 +0000 (UTC) Subject: [commit: ghc] master: Apply WERROR only to stage2 HC options (31bcf9b) Message-ID: <20151101094654.E200C3A300@ghc.haskell.org> Repository : ssh://git at git.haskell.org/ghc On branch : master Link : http://ghc.haskell.org/trac/ghc/changeset/31bcf9b62ceaed98bdd3b7605e68d315bcff0c8a/ghc >--------------------------------------------------------------- commit 31bcf9b62ceaed98bdd3b7605e68d315bcff0c8a Author: Ben Gamari Date: Sun Nov 1 10:18:07 2015 +0100 Apply WERROR only to stage2 HC options Otherwise validate unnecessarily may fail during the stage1 build when booting with an older compiler. Test Plan: Try it Reviewers: thomie, austin Reviewed By: thomie, austin Differential Revision: https://phabricator.haskell.org/D1390 >--------------------------------------------------------------- 31bcf9b62ceaed98bdd3b7605e68d315bcff0c8a ghc.mk | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/ghc.mk b/ghc.mk index bf521b2..07e1edc 100644 --- a/ghc.mk +++ b/ghc.mk @@ -143,7 +143,8 @@ include mk/warnings.mk # (Optional) build-specific configuration include mk/custom-settings.mk SRC_CC_OPTS += $(WERROR) -SRC_HC_OPTS += $(WERROR) +GhcStage2HcOpts += $(WERROR) +GhcLibHcOpts += $(WERROR) # ----------------------------------------------------------------------------- # Check for inconsistent settings, after reading mk/build.mk. From git at git.haskell.org Sun Nov 1 09:46:57 2015 From: git at git.haskell.org (git at git.haskell.org) Date: Sun, 1 Nov 2015 09:46:57 +0000 (UTC) Subject: [commit: ghc] master: Provide a utility to check API Annotations docs (c3b0215) Message-ID: <20151101094657.A331C3A300@ghc.haskell.org> Repository : ssh://git at git.haskell.org/ghc On branch : master Link : http://ghc.haskell.org/trac/ghc/changeset/c3b02150b516963422ed4b9b200a38814a35b535/ghc >--------------------------------------------------------------- commit c3b02150b516963422ed4b9b200a38814a35b535 Author: Alan Zimmerman Date: Sun Nov 1 10:18:25 2015 +0100 Provide a utility to check API Annotations docs A utility to check API Annotations was provided in https://git.haskell.org/ghc.git/commitdiff/43751b2436f370d956d8021b3cdd3 eb77801470b This commit had poor documentation. This patch improves the output generated by the utility as well as supplying better documentation Test Plan: ./validate Reviewers: simonpj, austin, bgamari Reviewed By: austin, bgamari Subscribers: thomie, mpickering Differential Revision: https://phabricator.haskell.org/D1397 GHC Trac Issues: #10917 >--------------------------------------------------------------- c3b02150b516963422ed4b9b200a38814a35b535 compiler/parser/Parser.y | 5 + testsuite/tests/ghc-api/annotations/Makefile | 3 +- testsuite/tests/ghc-api/annotations/T10255.stdout | 57 +- testsuite/tests/ghc-api/annotations/T10268.stdout | 81 +-- testsuite/tests/ghc-api/annotations/T10269.stdout | 51 +- testsuite/tests/ghc-api/annotations/T10278.stdout | 252 +++---- testsuite/tests/ghc-api/annotations/T10280.stdout | 54 +- testsuite/tests/ghc-api/annotations/T10307.stdout | 52 +- testsuite/tests/ghc-api/annotations/T10309.stdout | 55 +- testsuite/tests/ghc-api/annotations/T10312.stdout | 729 +++++++-------------- testsuite/tests/ghc-api/annotations/T10354.stdout | 129 ++-- testsuite/tests/ghc-api/annotations/T10357.stdout | 162 ++--- testsuite/tests/ghc-api/annotations/T10358.stdout | 84 +-- testsuite/tests/ghc-api/annotations/T10396.stdout | 60 +- testsuite/tests/ghc-api/annotations/T10399.stdout | 225 +++---- .../tests/ghc-api/annotations/boolFormula.stdout | 335 ++++------ .../tests/ghc-api/annotations/exampleTest.stdout | 231 +++---- utils/check-api-annotations/Main.hs | 34 +- utils/check-api-annotations/README | 85 +++ 19 files changed, 974 insertions(+), 1710 deletions(-) Diff suppressed because of size. To see it, use: git diff-tree --root --patch-with-stat --no-color --find-copies-harder --ignore-space-at-eol --cc c3b02150b516963422ed4b9b200a38814a35b535 From git at git.haskell.org Sun Nov 1 09:47:00 2015 From: git at git.haskell.org (git at git.haskell.org) Date: Sun, 1 Nov 2015 09:47:00 +0000 (UTC) Subject: [commit: ghc] master: rts/posix: Reduce heap allocation amount on mmap failure (4ad2a8f) Message-ID: <20151101094700.50F193A300@ghc.haskell.org> Repository : ssh://git at git.haskell.org/ghc On branch : master Link : http://ghc.haskell.org/trac/ghc/changeset/4ad2a8f9a503a5ee060eb8e0d5ae71b98d605cfa/ghc >--------------------------------------------------------------- commit 4ad2a8f9a503a5ee060eb8e0d5ae71b98d605cfa Author: Ben Gamari Date: Sun Nov 1 10:18:41 2015 +0100 rts/posix: Reduce heap allocation amount on mmap failure Since the two-step allocator the RTS asks the kernel for a large upfront mmap'd region of memory (on the order of terabytes). While we have no expectation that this entire region will be backed by physical memory, this scheme nevertheless fails on some systems with resource limits. Here we use a back-off scheme to reduce our allocation request until we find a size agreeable to the kernel. Fixes #10877. This also fixes a latent bug wherein the heap reservation retry logic would fail to free the previously reserved address space, which would likely result in a heap allocation failure. Test Plan: set address space limit with `ulimit -v 67108864` and try running a compiled program Reviewers: simonmar, austin Reviewed By: simonmar Subscribers: thomie, RyanGlScott Differential Revision: https://phabricator.haskell.org/D1405 GHC Trac Issues: #10877 >--------------------------------------------------------------- 4ad2a8f9a503a5ee060eb8e0d5ae71b98d605cfa rts/posix/OSMem.c | 61 +++++++++++++++++++++++++++++++++++++++++++++++-------- rts/sm/MBlock.c | 2 +- rts/sm/OSMem.h | 6 +++++- rts/win32/OSMem.c | 4 ++-- 4 files changed, 61 insertions(+), 12 deletions(-) diff --git a/rts/posix/OSMem.c b/rts/posix/OSMem.c index 43c7831..274d5ad 100644 --- a/rts/posix/OSMem.c +++ b/rts/posix/OSMem.c @@ -102,6 +102,7 @@ enum MEM_RESERVE_AND_COMMIT = MEM_RESERVE | MEM_COMMIT }; +/* Returns NULL on failure; errno set */ static void * my_mmap (void *addr, W_ size, int operation) { @@ -196,6 +197,19 @@ my_mmap (void *addr, W_ size, int operation) #endif if (ret == (void *)-1) { + return NULL; + } + + return ret; +} + +/* Variant of my_mmap which aborts in the case of an error */ +static void * +my_mmap_or_barf (void *addr, W_ size, int operation) +{ + void *ret = my_mmap(addr, size, operation); + + if (ret == NULL) { if (errno == ENOMEM || (errno == EINVAL && sizeof(void*)==4 && size >= 0xc0000000)) { // If we request more than 3Gig, then we get EINVAL @@ -222,7 +236,7 @@ gen_map_mblocks (W_ size) // Try to map a larger block, and take the aligned portion from // it (unmap the rest). size += MBLOCK_SIZE; - ret = my_mmap(0, size, MEM_RESERVE_AND_COMMIT); + ret = my_mmap_or_barf(0, size, MEM_RESERVE_AND_COMMIT); // unmap the slop bits around the chunk we allocated slop = (W_)ret & MBLOCK_MASK; @@ -261,7 +275,7 @@ osGetMBlocks(nat n) // use gen_map_mblocks the first time. ret = gen_map_mblocks(size); } else { - ret = my_mmap(next_request, size, MEM_RESERVE_AND_COMMIT); + ret = my_mmap_or_barf(next_request, size, MEM_RESERVE_AND_COMMIT); if (((W_)ret & MBLOCK_MASK) != 0) { // misaligned block! @@ -387,6 +401,9 @@ osTryReserveHeapMemory (W_ len, void *hint) and then we discard what we don't need */ base = my_mmap(hint, len + MBLOCK_SIZE, MEM_RESERVE); + if (base == NULL) + return NULL; + top = (void*)((W_)base + len + MBLOCK_SIZE); if (((W_)base & MBLOCK_MASK) != 0) { @@ -407,7 +424,7 @@ osTryReserveHeapMemory (W_ len, void *hint) return start; } -void *osReserveHeapMemory(W_ len) +void *osReserveHeapMemory(W_ *len) { int attempt; void *at; @@ -419,15 +436,43 @@ void *osReserveHeapMemory(W_ len) libraries are position independent but cannot be loaded about 4GB. We do so with a hint to the mmap, and we verify the OS satisfied our - hint. We loop a few times in case there is already something allocated - there, but we bail if we cannot allocate at all. + hint. We loop, shifting our hint by 1 BLOCK_SIZE every time, in case + there is already something allocated there. + + Some systems impose resource limits restricting the amount of memory we + can request (see, e.g. #10877). If mmap fails we halve our allocation + request and try again. If our request size gets absurdly small we simply + give up. + */ attempt = 0; - do { + while (1) { + if (*len < MBLOCK_SIZE) { + // Give up if the system won't even give us 16 blocks worth of heap + barf("osReserveHeapMemory: Failed to allocate heap storage"); + } + void *hint = (void*)((W_)8 * (1 << 30) + attempt * BLOCK_SIZE); - at = osTryReserveHeapMemory(len, hint); - } while ((W_)at < ((W_)8 * (1 << 30))); + at = osTryReserveHeapMemory(*len, hint); + if (at == NULL) { + // This means that mmap failed which we take to mean that we asked + // for too much memory. This can happen due to POSIX resource + // limits. In this case we reduce our allocation request by a factor + // of two and try again. + *len /= 2; + } else if ((W_)at >= ((W_)8 * (1 << 30))) { + // Success! We were given a block of memory starting above the 8 GB + // mark, which is what we were looking for. + break; + } else { + // We got addressing space but it wasn't above the 8GB mark. + // Try again. + if (munmap(at, *len) < 0) { + sysErrorBelch("unable to release reserved heap"); + } + } + } return at; } diff --git a/rts/sm/MBlock.c b/rts/sm/MBlock.c index e1daa71..2131ae6 100644 --- a/rts/sm/MBlock.c +++ b/rts/sm/MBlock.c @@ -645,7 +645,7 @@ initMBlocks(void) #else size = (W_)1 << 40; // 1 TByte #endif - void *addr = osReserveHeapMemory(size); + void *addr = osReserveHeapMemory(&size); mblock_address_space.begin = (W_)addr; mblock_address_space.end = (W_)addr + size; diff --git a/rts/sm/OSMem.h b/rts/sm/OSMem.h index 6bcaf65..533f6f7 100644 --- a/rts/sm/OSMem.h +++ b/rts/sm/OSMem.h @@ -34,8 +34,12 @@ void setExecutable (void *p, W_ len, rtsBool exec); // pointed to by the return value, until that memory is committed using // osCommitMemory(). // +// The value pointed to by len will be filled by the caller with an upper +// bound on the amount of memory to reserve. On return this will be set +// to the amount of memory actually reserved. +// // This function is called once when the block allocator is initialized. -void *osReserveHeapMemory(W_ len); +void *osReserveHeapMemory(W_ *len); // Commit (allocate memory for) a piece of address space, which must // be within the previously reserved space After this call, it is safe diff --git a/rts/win32/OSMem.c b/rts/win32/OSMem.c index 2d2af0d..47e24f0 100644 --- a/rts/win32/OSMem.c +++ b/rts/win32/OSMem.c @@ -429,11 +429,11 @@ void setExecutable (void *p, W_ len, rtsBool exec) static void* heap_base = NULL; -void *osReserveHeapMemory (W_ len) +void *osReserveHeapMemory (W_ *len) { void *start; - heap_base = VirtualAlloc(NULL, len + MBLOCK_SIZE, + heap_base = VirtualAlloc(NULL, *len + MBLOCK_SIZE, MEM_RESERVE, PAGE_READWRITE); if (heap_base == NULL) { if (GetLastError() == ERROR_NOT_ENOUGH_MEMORY) { From git at git.haskell.org Sun Nov 1 09:47:03 2015 From: git at git.haskell.org (git at git.haskell.org) Date: Sun, 1 Nov 2015 09:47:03 +0000 (UTC) Subject: [commit: ghc] master: Enforce linkage with pthread library on OpenBSD (c8e866a) Message-ID: <20151101094703.13C883A300@ghc.haskell.org> Repository : ssh://git at git.haskell.org/ghc On branch : master Link : http://ghc.haskell.org/trac/ghc/changeset/c8e866a190d4d5866bf364ee794db28b227a2e0e/ghc >--------------------------------------------------------------- commit c8e866a190d4d5866bf364ee794db28b227a2e0e Author: Karel Gardas Date: Sun Nov 1 10:18:55 2015 +0100 Enforce linkage with pthread library on OpenBSD This patch enforces linkage with pthread library on OpenBSD. This is done in order to avoid linker errors when linking with libffi which requires POSIX threading but itself is not linked with libpthread directly. So client binaries (of libffi) needs to link against libpthread explicitly Reviewers: austin, bgamari Reviewed By: bgamari Subscribers: thomie, erikd Differential Revision: https://phabricator.haskell.org/D1410 >--------------------------------------------------------------- c8e866a190d4d5866bf364ee794db28b227a2e0e configure.ac | 9 +++++++++ rts/package.conf.in | 8 ++++++++ 2 files changed, 17 insertions(+) diff --git a/configure.ac b/configure.ac index bc18c12..6bd2103 100644 --- a/configure.ac +++ b/configure.ac @@ -919,6 +919,15 @@ AS_IF([test "$UseSystemLibFFI" = "YES"], [ CFLAGS="$LIBFFI_CFLAGS $CFLAGS" LDFLAGS2="$LDFLAGS" LDFLAGS="$LIBFFI_LDFLAGS $LDFLAGS" + if test "$HostOS" = "openbsd"; + then + # OpenBSD's libffi is not directly linked to the libpthread but + # still requires pthread functionality. This means that any client + # binary which links with libffi also needs to link with + # libpthread. If it does not, then linking fails with unresolved + # symbols. + LDFLAGS="$LDFLAGS -lpthread" + fi AC_CHECK_LIB(ffi, ffi_call, [AC_CHECK_HEADERS([ffi.h], [break], []) AC_DEFINE([HAVE_LIBFFI], [1], [Define to 1 if you have libffi.])], diff --git a/rts/package.conf.in b/rts/package.conf.in index 97cc4f9..fff645d 100644 --- a/rts/package.conf.in +++ b/rts/package.conf.in @@ -45,6 +45,14 @@ extra-libraries: #ifdef freebsd_HOST_OS , "pthread" /* for pthread_getthreadid_np() */ #endif +#ifdef openbsd_HOST_OS +/* OpenBSD's libffi is not directly linked to the libpthread but still requires +pthread functionality. This means that any client binary which links with libffi +also need to link with libpthread. If it does not, then linking fails with +unresolved symbols. */ + , "pthread" + +#endif #if defined(DEBUG) && defined(HAVE_LIBBFD) ,"bfd", "iberty" /* for debugging */ #endif From git at git.haskell.org Sun Nov 1 09:47:05 2015 From: git at git.haskell.org (git at git.haskell.org) Date: Sun, 1 Nov 2015 09:47:05 +0000 (UTC) Subject: [commit: ghc] master: Linker: More uint64_t to uintptr_t fixes (184dfce) Message-ID: <20151101094705.AF6883A300@ghc.haskell.org> Repository : ssh://git at git.haskell.org/ghc On branch : master Link : http://ghc.haskell.org/trac/ghc/changeset/184dfced1b07e1b178e98ae55f293187844b3105/ghc >--------------------------------------------------------------- commit 184dfced1b07e1b178e98ae55f293187844b3105 Author: Erik de Castro Lopo Date: Sun Nov 1 10:19:15 2015 +0100 Linker: More uint64_t to uintptr_t fixes Need to use `uintptr_t` on PowerPC and possibly other 32 bit architectures. Test Plan: Validate on x86_64 and powerpc Linux Reviewers: austin, hvr, bgamari Reviewed By: bgamari Subscribers: thomie Differential Revision: https://phabricator.haskell.org/D1412 >--------------------------------------------------------------- 184dfced1b07e1b178e98ae55f293187844b3105 rts/Linker.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/rts/Linker.c b/rts/Linker.c index af3854f..cd94561 100644 --- a/rts/Linker.c +++ b/rts/Linker.c @@ -1300,7 +1300,7 @@ m32_alloc(m32_allocator m32, unsigned int size, void * addr = (char*)m32->pages[i].base_addr + alsize; m32->pages[i].current_size = alsize + size; // increment the counter atomically - __sync_fetch_and_add((uint64_t*)m32->pages[i].base_addr, 1); + __sync_fetch_and_add((uintptr_t*)m32->pages[i].base_addr, 1); return addr; } // most filled? @@ -1329,7 +1329,7 @@ m32_alloc(m32_allocator m32, unsigned int size, m32->pages[empty].current_size = size+ROUND_UP(8,alignment); // Initialize the counter: // 1 for the allocator + 1 for the returned allocated memory - *((uint64_t*)addr) = 2; + *((uintptr_t*)addr) = 2; return (char*)addr + ROUND_UP(8,alignment); } } From git at git.haskell.org Sun Nov 1 09:47:08 2015 From: git at git.haskell.org (git at git.haskell.org) Date: Sun, 1 Nov 2015 09:47:08 +0000 (UTC) Subject: [commit: ghc] master: ghc-prim: Fix hs_ctz64 for powerpc (9f0ecb4) Message-ID: <20151101094708.589353A300@ghc.haskell.org> Repository : ssh://git at git.haskell.org/ghc On branch : master Link : http://ghc.haskell.org/trac/ghc/changeset/9f0ecb41c288aacec43c5f736cb7aeaa469c9801/ghc >--------------------------------------------------------------- commit 9f0ecb41c288aacec43c5f736cb7aeaa469c9801 Author: Erik de Castro Lopo Date: Sun Nov 1 10:19:23 2015 +0100 ghc-prim: Fix hs_ctz64 for powerpc Test Plan: Test on powerpc/linux Reviewers: austin, hvr, bgamari Reviewed By: bgamari Subscribers: thomie Differential Revision: https://phabricator.haskell.org/D1413 >--------------------------------------------------------------- 9f0ecb41c288aacec43c5f736cb7aeaa469c9801 libraries/ghc-prim/cbits/ctz.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libraries/ghc-prim/cbits/ctz.c b/libraries/ghc-prim/cbits/ctz.c index f68f628..95f327a 100644 --- a/libraries/ghc-prim/cbits/ctz.c +++ b/libraries/ghc-prim/cbits/ctz.c @@ -31,7 +31,7 @@ hs_ctz32(StgWord x) StgWord hs_ctz64(StgWord64 x) { -#if defined(__GNUC__) && defined(i386_HOST_ARCH) +#if defined(__GNUC__) && (defined(i386_HOST_ARCH) || defined(powerpc_HOST_ARCH)) /* On Linux/i386, the 64bit `__builtin_ctzll()` instrinsic doesn't get inlined by GCC but rather a short `__ctzdi2` runtime function is inserted when needed into compiled object files. From git at git.haskell.org Sun Nov 1 10:58:50 2015 From: git at git.haskell.org (git at git.haskell.org) Date: Sun, 1 Nov 2015 10:58:50 +0000 (UTC) Subject: [commit: hsc2hs] master: Reduce CPP need (f91c12c) Message-ID: <20151101105850.EA2B53A300@ghc.haskell.org> Repository : ssh://git at git.haskell.org/hsc2hs On branch : master Link : http://git.haskell.org/hsc2hs.git/commitdiff/f91c12c4749068a5b38bb536a021b5896f033dc0 >--------------------------------------------------------------- commit f91c12c4749068a5b38bb536a021b5896f033dc0 Author: Herbert Valerio Riedel Date: Sun Nov 1 11:19:47 2015 +0100 Reduce CPP need >--------------------------------------------------------------- f91c12c4749068a5b38bb536a021b5896f033dc0 CrossCodegen.hs | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/CrossCodegen.hs b/CrossCodegen.hs index a8a7f3d..d30e145 100644 --- a/CrossCodegen.hs +++ b/CrossCodegen.hs @@ -28,9 +28,7 @@ import System.Directory (removeFile) import Data.Char (toLower,toUpper,isSpace) import Control.Exception (assert, onException) import Control.Monad (when, liftM, forM, ap) -#if __GLASGOW_HASKELL__ < 709 -import Control.Applicative (Applicative(..)) -#endif +import Control.Applicative as AP (Applicative(..)) import Data.Foldable (concatMap) import Data.Maybe (fromMaybe) import qualified Data.Sequence as S @@ -56,7 +54,7 @@ instance Applicative TestMonad where (<*>) = ap instance Monad TestMonad where - return = pure + return = AP.pure x >>= fn = TestMonad (\e c -> (runTest x e c) >>= (\(a,c') -> either (\err -> return (Left err, c')) (\result -> runTest (fn result) e c') From git at git.haskell.org Sun Nov 1 10:58:52 2015 From: git at git.haskell.org (git at git.haskell.org) Date: Sun, 1 Nov 2015 10:58:52 +0000 (UTC) Subject: [commit: hsc2hs] master: Update bounds on `process` (ff34f78) Message-ID: <20151101105852.EEF993A300@ghc.haskell.org> Repository : ssh://git at git.haskell.org/hsc2hs On branch : master Link : http://git.haskell.org/hsc2hs.git/commitdiff/ff34f784abc868b22003717c1265d59af1c43a9f >--------------------------------------------------------------- commit ff34f784abc868b22003717c1265d59af1c43a9f Author: Herbert Valerio Riedel Date: Sun Nov 1 11:20:09 2015 +0100 Update bounds on `process` While at it, reduce need for CPP in CrossCodegen module >--------------------------------------------------------------- ff34f784abc868b22003717c1265d59af1c43a9f CrossCodegen.hs | 8 +------- hsc2hs.cabal | 2 +- 2 files changed, 2 insertions(+), 8 deletions(-) diff --git a/CrossCodegen.hs b/CrossCodegen.hs index d30e145..30bb438 100644 --- a/CrossCodegen.hs +++ b/CrossCodegen.hs @@ -1,4 +1,3 @@ -{-# LANGUAGE CPP #-} {-# LANGUAGE NoMonomorphismRestriction #-} module CrossCodegen where @@ -561,12 +560,7 @@ runCompileTest testStr = do runCompiler :: FilePath -> [String] -> Maybe FilePath -> TestMonad Bool runCompiler prog args mStdoutFile = do - let cmdLine = -#if MIN_VERSION_process(1,1,0) - showCommandForUser prog args -#else - unwords (prog : args) -#endif + let cmdLine = showCommandForUser prog args testLog ("executing: " ++ cmdLine) $ liftTestIO $ do mHOut <- case mStdoutFile of Nothing -> return Nothing diff --git a/hsc2hs.cabal b/hsc2hs.cabal index 0d5e3b2..3da739b 100644 --- a/hsc2hs.cabal +++ b/hsc2hs.cabal @@ -40,5 +40,5 @@ Executable hsc2hs containers >= 0.2 && < 0.6, directory >= 1 && < 1.3, filepath >= 1 && < 1.5, - process >= 1 && < 1.3 + process >= 1.1 && < 1.4 From git at git.haskell.org Sun Nov 1 11:00:34 2015 From: git at git.haskell.org (git at git.haskell.org) Date: Sun, 1 Nov 2015 11:00:34 +0000 (UTC) Subject: [commit: ghc] master: Update directory submodule (d2a7fb9) Message-ID: <20151101110034.29C5F3A300@ghc.haskell.org> Repository : ssh://git at git.haskell.org/ghc On branch : master Link : http://ghc.haskell.org/trac/ghc/changeset/d2a7fb9715799b6f420241a4647bdb113a0a928e/ghc >--------------------------------------------------------------- commit d2a7fb9715799b6f420241a4647bdb113a0a928e Author: Herbert Valerio Riedel Date: Sun Nov 1 10:13:01 2015 +0100 Update directory submodule This is needed to prepare for #11026 as this update relaxes the upper bounds on `base` to allow for `base-4.9.0.0` >--------------------------------------------------------------- d2a7fb9715799b6f420241a4647bdb113a0a928e libraries/directory | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libraries/directory b/libraries/directory index 7233248..a7a5b0b 160000 --- a/libraries/directory +++ b/libraries/directory @@ -1 +1 @@ -Subproject commit 7233248952648ed4dd213f91ed52af2317a3f23b +Subproject commit a7a5b0b738aad432a9cad512a26d7564120ef0e8 From git at git.haskell.org Sun Nov 1 11:00:36 2015 From: git at git.haskell.org (git at git.haskell.org) Date: Sun, 1 Nov 2015 11:00:36 +0000 (UTC) Subject: [commit: ghc] master: Update filepath submodule (12abc77) Message-ID: <20151101110036.BA0453A300@ghc.haskell.org> Repository : ssh://git at git.haskell.org/ghc On branch : master Link : http://ghc.haskell.org/trac/ghc/changeset/12abc77386751f7aa9fa6e8731fd1eabc52397f2/ghc >--------------------------------------------------------------- commit 12abc77386751f7aa9fa6e8731fd1eabc52397f2 Author: Herbert Valerio Riedel Date: Sun Nov 1 10:21:15 2015 +0100 Update filepath submodule This is needed to prepare for #11026 as this update relaxes the upper bounds on `base` to allow for `base-4.9.0.0` >--------------------------------------------------------------- 12abc77386751f7aa9fa6e8731fd1eabc52397f2 libraries/filepath | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libraries/filepath b/libraries/filepath index 81375ae..32e8dba 160000 --- a/libraries/filepath +++ b/libraries/filepath @@ -1 +1 @@ -Subproject commit 81375ae0c892b5951f2c1184c655a8f3a5193c9c +Subproject commit 32e8dba40bd2ff3ae0b1c16ea2c0db05c5d4b63c From git at git.haskell.org Sun Nov 1 11:00:39 2015 From: git at git.haskell.org (git at git.haskell.org) Date: Sun, 1 Nov 2015 11:00:39 +0000 (UTC) Subject: [commit: ghc] master: Update array/stm/hpc/haddock submodules (62e1b35) Message-ID: <20151101110039.5637E3A300@ghc.haskell.org> Repository : ssh://git at git.haskell.org/ghc On branch : master Link : http://ghc.haskell.org/trac/ghc/changeset/62e1b3594c233d333e87e72d57c1e182d0aa0802/ghc >--------------------------------------------------------------- commit 62e1b3594c233d333e87e72d57c1e182d0aa0802 Author: Herbert Valerio Riedel Date: Sun Nov 1 10:35:02 2015 +0100 Update array/stm/hpc/haddock submodules This is needed to prepare for #11026 as these updates relax the upper bounds on `base` to allow for `base-4.9.0.0` >--------------------------------------------------------------- 62e1b3594c233d333e87e72d57c1e182d0aa0802 libraries/array | 2 +- libraries/hpc | 2 +- libraries/stm | 2 +- utils/haddock | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/libraries/array b/libraries/array index 2f5b772..dd75c73 160000 --- a/libraries/array +++ b/libraries/array @@ -1 +1 @@ -Subproject commit 2f5b772f4475d70a68c6f9d10390ac9812afdb7d +Subproject commit dd75c73d191b3f07209c38f78ebe9dcc26fc5ed4 diff --git a/libraries/hpc b/libraries/hpc index 886429b..e20c61c 160000 --- a/libraries/hpc +++ b/libraries/hpc @@ -1 +1 @@ -Subproject commit 886429bf84097bbc16cdb6602b60ba1b9156cf6a +Subproject commit e20c61c358e749ea62f6687089ad2a878d5d1a66 diff --git a/libraries/stm b/libraries/stm index f7db2c3d..e917b59 160000 --- a/libraries/stm +++ b/libraries/stm @@ -1 +1 @@ -Subproject commit f7db2c3df86ec644e5e06baa8090a1cb525754e2 +Subproject commit e917b5944ce0a5b4e32dcc8f00eaddbec1256e98 diff --git a/utils/haddock b/utils/haddock index 174f236..987b506 160000 --- a/utils/haddock +++ b/utils/haddock @@ -1 +1 @@ -Subproject commit 174f23631a0a8de7dc0f3cd67c393a5ca88c4a2b +Subproject commit 987b5062482e20a032fb6358e655265b0b7a3cd2 From git at git.haskell.org Sun Nov 1 11:00:41 2015 From: git at git.haskell.org (git at git.haskell.org) Date: Sun, 1 Nov 2015 11:00:41 +0000 (UTC) Subject: [commit: ghc] master: Bump `base` version to 4.9.0.0 (closes #11026) (f8ba4b5) Message-ID: <20151101110041.F2B593A300@ghc.haskell.org> Repository : ssh://git at git.haskell.org/ghc On branch : master Link : http://ghc.haskell.org/trac/ghc/changeset/f8ba4b55cc3a061458f5cfabf17de96128defbbb/ghc >--------------------------------------------------------------- commit f8ba4b55cc3a061458f5cfabf17de96128defbbb Author: Herbert Valerio Riedel Date: Sun Nov 1 10:54:32 2015 +0100 Bump `base` version to 4.9.0.0 (closes #11026) This also relaxes a few upper bounds on base in the ghc.git repo; This required a mass-rewrite in testsuite/ sed -i s,base-4.8.2.0,base-4.9.0.0,g $(git grep -Fl 'base-4.8.2.0') because it turns out the testsuite is still sensitive to package version changes. >--------------------------------------------------------------- f8ba4b55cc3a061458f5cfabf17de96128defbbb libraries/base/base.cabal | 2 +- libraries/base/changelog.md | 6 +++--- libraries/template-haskell/template-haskell.cabal | 2 +- testsuite/tests/ado/ado004.stderr | 2 +- testsuite/tests/cabal/cabal06/q/q-1.0.conf | 2 +- testsuite/tests/ghci/scripts/ghci008.stdout | 2 +- .../tests/indexed-types/should_compile/T3017.stderr | 2 +- testsuite/tests/partial-sigs/should_compile/ADT.stderr | 2 +- .../tests/partial-sigs/should_compile/AddAndOr1.stderr | 2 +- .../tests/partial-sigs/should_compile/AddAndOr2.stderr | 2 +- .../tests/partial-sigs/should_compile/AddAndOr3.stderr | 2 +- .../tests/partial-sigs/should_compile/AddAndOr4.stderr | 2 +- .../tests/partial-sigs/should_compile/AddAndOr5.stderr | 2 +- .../tests/partial-sigs/should_compile/AddAndOr6.stderr | 2 +- .../tests/partial-sigs/should_compile/BoolToBool.stderr | 2 +- .../should_compile/DataFamilyInstanceLHS.stderr | 2 +- .../partial-sigs/should_compile/Defaulting1MROn.stderr | 2 +- .../partial-sigs/should_compile/Defaulting2MROff.stderr | 2 +- .../partial-sigs/should_compile/Defaulting2MROn.stderr | 2 +- .../tests/partial-sigs/should_compile/Either.stderr | 2 +- .../should_compile/EqualityConstraint.stderr | 2 +- testsuite/tests/partial-sigs/should_compile/Every.stderr | 2 +- .../tests/partial-sigs/should_compile/EveryNamed.stderr | 2 +- .../partial-sigs/should_compile/ExpressionSig.stderr | 2 +- .../should_compile/ExpressionSigNamed.stderr | 2 +- .../partial-sigs/should_compile/ExtraConstraints1.stderr | 2 +- .../partial-sigs/should_compile/ExtraConstraints2.stderr | 2 +- .../partial-sigs/should_compile/ExtraConstraints3.stderr | 2 +- .../partial-sigs/should_compile/ExtraNumAMROff.stderr | 2 +- .../partial-sigs/should_compile/ExtraNumAMROn.stderr | 2 +- .../tests/partial-sigs/should_compile/Forall1.stderr | 2 +- .../tests/partial-sigs/should_compile/GenNamed.stderr | 2 +- .../tests/partial-sigs/should_compile/HigherRank1.stderr | 2 +- .../tests/partial-sigs/should_compile/HigherRank2.stderr | 2 +- .../should_compile/LocalDefinitionBug.stderr | 2 +- .../tests/partial-sigs/should_compile/Meltdown.stderr | 2 +- .../partial-sigs/should_compile/MonoLocalBinds.stderr | 2 +- .../tests/partial-sigs/should_compile/NamedTyVar.stderr | 2 +- .../should_compile/ParensAroundContext.stderr | 2 +- .../tests/partial-sigs/should_compile/PatBind.stderr | 2 +- .../tests/partial-sigs/should_compile/PatBind2.stderr | 2 +- .../tests/partial-sigs/should_compile/PatternSig.stderr | 2 +- .../tests/partial-sigs/should_compile/Recursive.stderr | 2 +- .../should_compile/ScopedNamedWildcards.stderr | 2 +- .../should_compile/ScopedNamedWildcardsGood.stderr | 2 +- .../tests/partial-sigs/should_compile/ShowNamed.stderr | 2 +- .../tests/partial-sigs/should_compile/SimpleGen.stderr | 2 +- .../tests/partial-sigs/should_compile/SkipMany.stderr | 2 +- .../partial-sigs/should_compile/SomethingShowable.stderr | 2 +- .../should_compile/TypeFamilyInstanceLHS.stderr | 2 +- .../tests/partial-sigs/should_compile/Uncurry.stderr | 2 +- .../partial-sigs/should_compile/UncurryNamed.stderr | 2 +- .../should_compile/WarningWildcardInstantiations.stderr | 2 +- .../plugins/annotation-plugin/annotation-plugin.cabal | 2 +- testsuite/tests/rename/should_fail/rnfail040.stderr | 2 +- testsuite/tests/roles/should_compile/Roles1.stderr | 2 +- testsuite/tests/roles/should_compile/Roles14.stderr | 2 +- testsuite/tests/roles/should_compile/Roles2.stderr | 2 +- testsuite/tests/roles/should_compile/Roles3.stderr | 2 +- testsuite/tests/roles/should_compile/Roles4.stderr | 2 +- testsuite/tests/roles/should_compile/T8958.stderr | 2 +- testsuite/tests/safeHaskell/check/Check01.stderr | 2 +- testsuite/tests/safeHaskell/check/Check06.stderr | 2 +- testsuite/tests/safeHaskell/check/Check08.stderr | 2 +- testsuite/tests/safeHaskell/check/Check09.stderr | 2 +- testsuite/tests/safeHaskell/check/pkg01/ImpSafe01.stderr | 2 +- testsuite/tests/safeHaskell/check/pkg01/ImpSafe04.stderr | 2 +- .../tests/safeHaskell/check/pkg01/ImpSafeOnly07.stderr | 2 +- .../tests/safeHaskell/check/pkg01/ImpSafeOnly08.stderr | 2 +- testsuite/tests/safeHaskell/check/pkg01/safePkg01.stdout | 16 ++++++++-------- testsuite/tests/safeHaskell/flags/SafeFlags17.stderr | 2 +- testsuite/tests/th/TH_Roles2.stderr | 2 +- testsuite/tests/typecheck/should_compile/tc231.stderr | 2 +- testsuite/tests/typecheck/should_fail/tcfail182.stderr | 2 +- 74 files changed, 83 insertions(+), 83 deletions(-) Diff suppressed because of size. To see it, use: git diff-tree --root --patch-with-stat --no-color --find-copies-harder --ignore-space-at-eol --cc f8ba4b55cc3a061458f5cfabf17de96128defbbb From git at git.haskell.org Sun Nov 1 11:00:44 2015 From: git at git.haskell.org (git at git.haskell.org) Date: Sun, 1 Nov 2015 11:00:44 +0000 (UTC) Subject: [commit: ghc] master: Update process submodule (de8443c) Message-ID: <20151101110044.909F03A300@ghc.haskell.org> Repository : ssh://git at git.haskell.org/ghc On branch : master Link : http://ghc.haskell.org/trac/ghc/changeset/de8443c1a26276dc33a97ecdb9ec5c67f61ff969/ghc >--------------------------------------------------------------- commit de8443c1a26276dc33a97ecdb9ec5c67f61ff969 Author: Herbert Valerio Riedel Date: Sun Nov 1 10:32:31 2015 +0100 Update process submodule This is needed to prepare for #11026 as this update relaxes the upper bounds on `base` to allow for `base-4.9.0.0` This also needs to relax a few upper bounds on process in some cabal files (there will be another process submodule update soon, as a major version bump of process' version is still pending) >--------------------------------------------------------------- de8443c1a26276dc33a97ecdb9ec5c67f61ff969 compiler/ghc.cabal.in | 2 +- ghc/ghc-bin.cabal.in | 2 +- libraries/process | 2 +- utils/ghc-pkg/ghc-pkg.cabal | 2 +- utils/hsc2hs | 2 +- utils/runghc/runghc.cabal.in | 2 +- 6 files changed, 6 insertions(+), 6 deletions(-) diff --git a/compiler/ghc.cabal.in b/compiler/ghc.cabal.in index 45dcaa9..f5a3c55 100644 --- a/compiler/ghc.cabal.in +++ b/compiler/ghc.cabal.in @@ -46,7 +46,7 @@ Library Build-Depends: base >= 4 && < 5, directory >= 1 && < 1.3, - process >= 1 && < 1.3, + process >= 1 && < 1.4, bytestring >= 0.9 && < 0.11, time < 1.6, containers >= 0.5 && < 0.6, diff --git a/ghc/ghc-bin.cabal.in b/ghc/ghc-bin.cabal.in index 30eb7a7..0c9998d 100644 --- a/ghc/ghc-bin.cabal.in +++ b/ghc/ghc-bin.cabal.in @@ -31,7 +31,7 @@ Executable ghc array >= 0.1 && < 0.6, bytestring >= 0.9 && < 0.11, directory >= 1 && < 1.3, - process >= 1 && < 1.3, + process >= 1 && < 1.4, filepath >= 1 && < 1.5, ghc if os(windows) diff --git a/libraries/process b/libraries/process index e0983fb..4853d8f 160000 --- a/libraries/process +++ b/libraries/process @@ -1 +1 @@ -Subproject commit e0983fbbfa8a3d81c7b99e83a3169fc686caab62 +Subproject commit 4853d8f78a6831f4567ff0c2880298c9c70a5203 diff --git a/utils/ghc-pkg/ghc-pkg.cabal b/utils/ghc-pkg/ghc-pkg.cabal index 742e296..a2a0bdd 100644 --- a/utils/ghc-pkg/ghc-pkg.cabal +++ b/utils/ghc-pkg/ghc-pkg.cabal @@ -20,7 +20,7 @@ Executable ghc-pkg Build-Depends: base >= 4 && < 5, directory >= 1 && < 1.3, - process >= 1 && < 1.3, + process >= 1 && < 1.4, containers, filepath, Cabal, diff --git a/utils/hsc2hs b/utils/hsc2hs index 293f41c..ff34f78 160000 --- a/utils/hsc2hs +++ b/utils/hsc2hs @@ -1 +1 @@ -Subproject commit 293f41c78e956b78363ede463e7ff52eb6bc997d +Subproject commit ff34f784abc868b22003717c1265d59af1c43a9f diff --git a/utils/runghc/runghc.cabal.in b/utils/runghc/runghc.cabal.in index 89f9e05..15ec2f6 100644 --- a/utils/runghc/runghc.cabal.in +++ b/utils/runghc/runghc.cabal.in @@ -18,5 +18,5 @@ Executable runghc Build-Depends: base >= 3 && < 5, directory >= 1 && < 1.3, - process >= 1 && < 1.3, + process >= 1 && < 1.4, filepath From git at git.haskell.org Sun Nov 1 11:00:47 2015 From: git at git.haskell.org (git at git.haskell.org) Date: Sun, 1 Nov 2015 11:00:47 +0000 (UTC) Subject: [commit: ghc] master: Update hoopl submodule (32f92a3) Message-ID: <20151101110047.2FCF83A300@ghc.haskell.org> Repository : ssh://git at git.haskell.org/ghc On branch : master Link : http://ghc.haskell.org/trac/ghc/changeset/32f92a33b786cd70222393726aeb08ba2b9d63db/ghc >--------------------------------------------------------------- commit 32f92a33b786cd70222393726aeb08ba2b9d63db Author: Herbert Valerio Riedel Date: Sun Nov 1 10:49:00 2015 +0100 Update hoopl submodule This is needed to prepare for #11026 as this update relaxes the upper bounds on `base` to allow for `base-4.9.0.0` >--------------------------------------------------------------- 32f92a33b786cd70222393726aeb08ba2b9d63db libraries/hoopl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libraries/hoopl b/libraries/hoopl index b38e92f..84255f0 160000 --- a/libraries/hoopl +++ b/libraries/hoopl @@ -1 +1 @@ -Subproject commit b38e92f67cabfa0d0ed12ac93c2d431f2391de70 +Subproject commit 84255f0fe07f3fd1f5bc96e60b64c582394edcf1 From git at git.haskell.org Sun Nov 1 11:00:49 2015 From: git at git.haskell.org (git at git.haskell.org) Date: Sun, 1 Nov 2015 11:00:49 +0000 (UTC) Subject: [commit: ghc] master: Update unix submodule (3238ef7) Message-ID: <20151101110049.C6C883A300@ghc.haskell.org> Repository : ssh://git at git.haskell.org/ghc On branch : master Link : http://ghc.haskell.org/trac/ghc/changeset/3238ef7f834ede18f076d4e8c72b9a119e4499b6/ghc >--------------------------------------------------------------- commit 3238ef7f834ede18f076d4e8c72b9a119e4499b6 Author: Herbert Valerio Riedel Date: Sun Nov 1 10:36:33 2015 +0100 Update unix submodule This is needed to prepare for #11026 as this update relaxes the upper bounds on `base` to allow for `base-4.9.0.0` >--------------------------------------------------------------- 3238ef7f834ede18f076d4e8c72b9a119e4499b6 libraries/unix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libraries/unix b/libraries/unix index 4260c25..137fa1b 160000 --- a/libraries/unix +++ b/libraries/unix @@ -1 +1 @@ -Subproject commit 4260c25687d3a4bc1ffacdacfbe7e47082ff2550 +Subproject commit 137fa1b06a79a9baa0d5fcf2ec11f964c3423f6a From git at git.haskell.org Sun Nov 1 11:06:44 2015 From: git at git.haskell.org (git at git.haskell.org) Date: Sun, 1 Nov 2015 11:06:44 +0000 (UTC) Subject: [commit: ghc] ghc-7.10: Only apply WERROR to Stage2HcOpts and LibHcOpts (8199609) Message-ID: <20151101110644.47BC03A300@ghc.haskell.org> Repository : ssh://git at git.haskell.org/ghc On branch : ghc-7.10 Link : http://ghc.haskell.org/trac/ghc/changeset/81996094fc5514c186681b37c6dbe0f47afa9237/ghc >--------------------------------------------------------------- commit 81996094fc5514c186681b37c6dbe0f47afa9237 Author: Ben Gamari Date: Fri Oct 30 09:53:19 2015 -0500 Only apply WERROR to Stage2HcOpts and LibHcOpts This prevents warnings from the bootstrap compiler from killing validation >--------------------------------------------------------------- 81996094fc5514c186681b37c6dbe0f47afa9237 mk/validate-settings.mk | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/mk/validate-settings.mk b/mk/validate-settings.mk index 351ea83..7c75bd4 100644 --- a/mk/validate-settings.mk +++ b/mk/validate-settings.mk @@ -31,10 +31,10 @@ SRC_CC_WARNING_OPTS += -Wno-unknown-pragmas endif SRC_CC_OPTS += $(WERROR) -Wall -SRC_HC_OPTS += $(WERROR) -Wall - +SRC_HC_OPTS += -Wall GhcStage1HcOpts += -fwarn-tabs -GhcStage2HcOpts += -fwarn-tabs +GhcStage2HcOpts += -fwarn-tabs $(WERROR) +GhcLibHcOpts += $(WERROR) utils/hpc_dist-install_EXTRA_HC_OPTS += -fwarn-tabs From git at git.haskell.org Sun Nov 1 11:36:31 2015 From: git at git.haskell.org (git at git.haskell.org) Date: Sun, 1 Nov 2015 11:36:31 +0000 (UTC) Subject: [commit: ghc] master: ghc-prim: add API delta as changelog (re #11043) (4b8b934) Message-ID: <20151101113631.28A913A300@ghc.haskell.org> Repository : ssh://git at git.haskell.org/ghc On branch : master Link : http://ghc.haskell.org/trac/ghc/changeset/4b8b9347f19c6a260c9f93032447bc82f6457912/ghc >--------------------------------------------------------------- commit 4b8b9347f19c6a260c9f93032447bc82f6457912 Author: Herbert Valerio Riedel Date: Sun Nov 1 12:34:56 2015 +0100 ghc-prim: add API delta as changelog (re #11043) [skip ci] >--------------------------------------------------------------- 4b8b9347f19c6a260c9f93032447bc82f6457912 libraries/ghc-prim/changelog.md | 37 +++++++++++++++++++++++++++++++++++++ libraries/ghc-prim/ghc-prim.cabal | 2 ++ 2 files changed, 39 insertions(+) diff --git a/libraries/ghc-prim/changelog.md b/libraries/ghc-prim/changelog.md new file mode 100644 index 0000000..2e42886 --- /dev/null +++ b/libraries/ghc-prim/changelog.md @@ -0,0 +1,37 @@ +## 0.5.0.0 + +- `GHC.Classes`: new `class IP (a :: Symbol) b | a -> b` + +- `GHC.Prim`: changed type signatures from + + check# :: (State# RealWorld -> (# State# RealWorld, a #)) -> State# RealWorld -> (# State# RealWorld, () #) + finalizeWeak# :: Weak# a -> State# RealWorld -> (# State# RealWorld, Int#, State# RealWorld -> (# State# RealWorld, () #) #) + mkWeak# :: a -> b -> c -> State# RealWorld -> (# State# RealWorld, Weak# b #) + + to + + check# :: (State# RealWorld -> (# State# RealWorld, a #)) -> State# RealWorld -> State# RealWorld + finalizeWeak# :: Weak# a -> State# RealWorld -> (# State# RealWorld, Int#, State# RealWorld -> (# State# RealWorld, b #) #) + mkWeak# :: a -> b -> (State# RealWorld -> (# State# RealWorld, c #)) -> State# RealWorld -> (# State# RealWorld, Weak# b #) + +- Removed from `GHC.Prim`: + + parAt# :: b -> a -> Int# -> Int# -> Int# -> Int# -> c -> Int# + parAtAbs# :: a -> Int# -> Int# -> Int# -> Int# -> Int# -> b -> Int# + parAtForNow# :: b -> a -> Int# -> Int# -> Int# -> Int# -> c -> Int# + parAtRel# :: a -> Int# -> Int# -> Int# -> Int# -> Int# -> b -> Int# + parGlobal# :: a -> Int# -> Int# -> Int# -> Int# -> b -> Int# + parLocal# :: a -> Int# -> Int# -> Int# -> Int# -> b -> Int# + +- Added to `GHC.Prim`: + + getSizeofMutableByteArray# :: MutableByteArray# d -> State# d -> (# State# d, Int# #) + subWordC# :: Word# -> Word# -> (# Word#, Int# #) + +- Added to `GHC.Types`: + + data Module = Module TrName TrName + data Nat + data Symbol + data TrName = TrNameS Addr# | TrNameD [Char] + data TyCon = TyCon Word# Word# Module TrName diff --git a/libraries/ghc-prim/ghc-prim.cabal b/libraries/ghc-prim/ghc-prim.cabal index ab59a93..90841ca 100644 --- a/libraries/ghc-prim/ghc-prim.cabal +++ b/libraries/ghc-prim/ghc-prim.cabal @@ -12,6 +12,8 @@ build-type: Custom description: GHC primitives. +extra-source-files: changelog.md + source-repository head type: git location: http://git.haskell.org/ghc.git From git at git.haskell.org Sun Nov 1 12:17:26 2015 From: git at git.haskell.org (git at git.haskell.org) Date: Sun, 1 Nov 2015 12:17:26 +0000 (UTC) Subject: [commit: ghc] master: Bump ghc-prim version to 0.5.0.0 (closes #11043) (84bf1eb) Message-ID: <20151101121726.C44643A300@ghc.haskell.org> Repository : ssh://git at git.haskell.org/ghc On branch : master Link : http://ghc.haskell.org/trac/ghc/changeset/84bf1ebae75bff6c1e37382bc348850d17f3f2c0/ghc >--------------------------------------------------------------- commit 84bf1ebae75bff6c1e37382bc348850d17f3f2c0 Author: Herbert Valerio Riedel Date: Sun Nov 1 12:38:42 2015 +0100 Bump ghc-prim version to 0.5.0.0 (closes #11043) This also needs to update the primitive/vector submodules in order to relax upper bounds on ghc-prim. Like in f8ba4b55cc3a061458f5cfabf17de96128defbbb, a mass-rewrite in testsuite/ via sed -i s,ghc-prim-0.4.0.0,ghc-prim-0.5.0.0,g $(git grep -Fl 'ghc-prim-0.4.0.0') was performed. >--------------------------------------------------------------- 84bf1ebae75bff6c1e37382bc348850d17f3f2c0 libraries/base/base.cabal | 2 +- libraries/ghc-prim/ghc-prim.cabal | 4 ++-- libraries/primitive | 2 +- libraries/vector | 2 +- testsuite/tests/ado/ado004.stderr | 2 +- .../tests/indexed-types/should_compile/T3017.stderr | 2 +- testsuite/tests/partial-sigs/should_compile/ADT.stderr | 2 +- .../tests/partial-sigs/should_compile/AddAndOr1.stderr | 2 +- .../tests/partial-sigs/should_compile/AddAndOr2.stderr | 2 +- .../tests/partial-sigs/should_compile/AddAndOr3.stderr | 2 +- .../tests/partial-sigs/should_compile/AddAndOr4.stderr | 2 +- .../tests/partial-sigs/should_compile/AddAndOr5.stderr | 2 +- .../tests/partial-sigs/should_compile/AddAndOr6.stderr | 2 +- .../tests/partial-sigs/should_compile/BoolToBool.stderr | 2 +- .../should_compile/DataFamilyInstanceLHS.stderr | 2 +- .../partial-sigs/should_compile/Defaulting1MROn.stderr | 2 +- .../partial-sigs/should_compile/Defaulting2MROff.stderr | 2 +- .../partial-sigs/should_compile/Defaulting2MROn.stderr | 2 +- .../tests/partial-sigs/should_compile/Either.stderr | 2 +- testsuite/tests/partial-sigs/should_compile/Every.stderr | 2 +- .../tests/partial-sigs/should_compile/EveryNamed.stderr | 2 +- .../partial-sigs/should_compile/ExpressionSig.stderr | 2 +- .../should_compile/ExpressionSigNamed.stderr | 2 +- .../partial-sigs/should_compile/ExtraConstraints1.stderr | 2 +- .../partial-sigs/should_compile/ExtraConstraints2.stderr | 2 +- .../partial-sigs/should_compile/ExtraConstraints3.stderr | 2 +- .../partial-sigs/should_compile/ExtraNumAMROff.stderr | 2 +- .../tests/partial-sigs/should_compile/Forall1.stderr | 2 +- .../tests/partial-sigs/should_compile/GenNamed.stderr | 2 +- .../tests/partial-sigs/should_compile/HigherRank1.stderr | 2 +- .../tests/partial-sigs/should_compile/HigherRank2.stderr | 2 +- .../should_compile/LocalDefinitionBug.stderr | 2 +- .../tests/partial-sigs/should_compile/Meltdown.stderr | 2 +- .../partial-sigs/should_compile/MonoLocalBinds.stderr | 2 +- .../tests/partial-sigs/should_compile/NamedTyVar.stderr | 2 +- .../should_compile/ParensAroundContext.stderr | 2 +- .../tests/partial-sigs/should_compile/PatBind.stderr | 2 +- .../tests/partial-sigs/should_compile/PatternSig.stderr | 2 +- .../tests/partial-sigs/should_compile/Recursive.stderr | 2 +- .../should_compile/ScopedNamedWildcards.stderr | 2 +- .../should_compile/ScopedNamedWildcardsGood.stderr | 2 +- .../tests/partial-sigs/should_compile/ShowNamed.stderr | 2 +- .../tests/partial-sigs/should_compile/SimpleGen.stderr | 2 +- .../tests/partial-sigs/should_compile/SkipMany.stderr | 2 +- .../partial-sigs/should_compile/SomethingShowable.stderr | 2 +- .../should_compile/TypeFamilyInstanceLHS.stderr | 2 +- .../tests/partial-sigs/should_compile/Uncurry.stderr | 2 +- .../partial-sigs/should_compile/UncurryNamed.stderr | 2 +- .../should_compile/WarningWildcardInstantiations.stderr | 2 +- testsuite/tests/roles/should_compile/Roles1.stderr | 2 +- testsuite/tests/roles/should_compile/Roles14.stderr | 2 +- testsuite/tests/roles/should_compile/Roles2.stderr | 2 +- testsuite/tests/roles/should_compile/Roles3.stderr | 2 +- testsuite/tests/roles/should_compile/Roles4.stderr | 2 +- testsuite/tests/roles/should_compile/T8958.stderr | 2 +- testsuite/tests/safeHaskell/check/pkg01/safePkg01.stdout | 16 ++++++++-------- testsuite/tests/th/TH_Roles2.stderr | 2 +- testsuite/tests/typecheck/should_compile/tc231.stderr | 2 +- 58 files changed, 66 insertions(+), 66 deletions(-) Diff suppressed because of size. To see it, use: git diff-tree --root --patch-with-stat --no-color --find-copies-harder --ignore-space-at-eol --cc 84bf1ebae75bff6c1e37382bc348850d17f3f2c0 From git at git.haskell.org Sun Nov 1 12:43:00 2015 From: git at git.haskell.org (git at git.haskell.org) Date: Sun, 1 Nov 2015 12:43:00 +0000 (UTC) Subject: [commit: ghc] master: ApiAnnotations: BooleanFormula is not properly Located (f16827f) Message-ID: <20151101124300.7C4E93A300@ghc.haskell.org> Repository : ssh://git at git.haskell.org/ghc On branch : master Link : http://ghc.haskell.org/trac/ghc/changeset/f16827f84855bef94b1b69f49bd1734627946f02/ghc >--------------------------------------------------------------- commit f16827f84855bef94b1b69f49bd1734627946f02 Author: Alan Zimmerman Date: Sun Nov 1 11:13:21 2015 +0100 ApiAnnotations: BooleanFormula is not properly Located At the moment BooleanFormula is defined as data BooleanFormula a = Var a | And [BooleanFormula a] | Or [BooleanFormula a] deriving (Eq, Data, Typeable, Functor, Foldable, Traversable) An API Annotation can only be attached to an item of the form Located a. Replace this with a properly Located version, and attach the appropriate API Annotations to it Updates haddock submodule. Test Plan: ./validate Reviewers: austin, bgamari Reviewed By: bgamari Subscribers: thomie, mpickering Differential Revision: https://phabricator.haskell.org/D1384 GHC Trac Issues: #11017 >--------------------------------------------------------------- f16827f84855bef94b1b69f49bd1734627946f02 compiler/hsSyn/HsBinds.hs | 8 +-- compiler/parser/Parser.y | 27 +++++---- compiler/rename/RnBinds.hs | 4 +- compiler/typecheck/TcClassDcl.hs | 6 +- compiler/utils/BooleanFormula.hs | 67 +++++++++++++--------- .../tests/ghc-api/annotations/boolFormula.stdout | 31 ++++++---- utils/haddock | 2 +- 7 files changed, 82 insertions(+), 63 deletions(-) Diff suppressed because of size. To see it, use: git diff-tree --root --patch-with-stat --no-color --find-copies-harder --ignore-space-at-eol --cc f16827f84855bef94b1b69f49bd1734627946f02 From git at git.haskell.org Sun Nov 1 12:43:03 2015 From: git at git.haskell.org (git at git.haskell.org) Date: Sun, 1 Nov 2015 12:43:03 +0000 (UTC) Subject: [commit: ghc] master: keepCAFsForGHCi was broken (5a48180) Message-ID: <20151101124303.345B03A300@ghc.haskell.org> Repository : ssh://git at git.haskell.org/ghc On branch : master Link : http://ghc.haskell.org/trac/ghc/changeset/5a4818039ff4419372744b395e6fc904b4bd9a1d/ghc >--------------------------------------------------------------- commit 5a4818039ff4419372744b395e6fc904b4bd9a1d Author: Simon Marlow Date: Sun Nov 1 12:25:39 2015 +0100 keepCAFsForGHCi was broken Buggy Makefile code meant it was always included, instead of being included only for the dyn ways. Test Plan: validate Reviewers: hvr, austin, bgamari Reviewed By: bgamari Subscribers: thomie Differential Revision: https://phabricator.haskell.org/D1400 >--------------------------------------------------------------- 5a4818039ff4419372744b395e6fc904b4bd9a1d compiler/ghc.mk | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/compiler/ghc.mk b/compiler/ghc.mk index 26e22b4..e3ea52a 100644 --- a/compiler/ghc.mk +++ b/compiler/ghc.mk @@ -664,8 +664,8 @@ $(eval $(call build-package,compiler,stage3,2)) define keepCAFsForGHCiDynOnly # $1 = stage # $2 = way -ifeq "$$(findstring dyn, $1)" "" -compiler_stage$1_$2_C_OBJS := $$(filter-out %/keepCAFsForGHCi.o,$$(compiler_stage$1_$2_C_OBJS)) +ifeq "$$(findstring dyn, $2)" "" +compiler_stage$1_$2_C_OBJS := $$(filter-out %/keepCAFsForGHCi.$$($2_osuf),$$(compiler_stage$1_$2_C_OBJS)) endif endef $(foreach w,$(compiler_stage1_WAYS),$(eval $(call keepCAFsForGHCiDynOnly,1,$w))) From git at git.haskell.org Sun Nov 1 12:43:05 2015 From: git at git.haskell.org (git at git.haskell.org) Date: Sun, 1 Nov 2015 12:43:05 +0000 (UTC) Subject: [commit: ghc] master: DynFlags: -freverse-errors should be defFlag (677d768) Message-ID: <20151101124305.CD3123A300@ghc.haskell.org> Repository : ssh://git at git.haskell.org/ghc On branch : master Link : http://ghc.haskell.org/trac/ghc/changeset/677d7687f26dae9ac7c054c030d32f59a1460c72/ghc >--------------------------------------------------------------- commit 677d7687f26dae9ac7c054c030d32f59a1460c72 Author: Ben Gamari Date: Sun Nov 1 12:28:10 2015 +0100 DynFlags: -freverse-errors should be defFlag This flag works under both GHC and GHCi, as pointed out on D1367. Thanks to @thomie for pointing this out. >--------------------------------------------------------------- 677d7687f26dae9ac7c054c030d32f59a1460c72 compiler/main/DynFlags.hs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/compiler/main/DynFlags.hs b/compiler/main/DynFlags.hs index 0c1facc..fb6265c 100644 --- a/compiler/main/DynFlags.hs +++ b/compiler/main/DynFlags.hs @@ -2410,9 +2410,9 @@ dynamic_flags = [ deprecate "Use -fno-force-recomp instead")) , defGhcFlag "no-recomp" (NoArg (do setGeneralFlag Opt_ForceRecomp deprecate "Use -fforce-recomp instead")) - , defGhcFlag "freverse-errors" + , defFlag "freverse-errors" (noArg (\d -> d {reverseErrors = True} )) - , defGhcFlag "fno-reverse-errors" + , defFlag "fno-reverse-errors" (noArg (\d -> d {reverseErrors = False} )) ------ HsCpp opts --------------------------------------------------- From git at git.haskell.org Sun Nov 1 13:06:08 2015 From: git at git.haskell.org (git at git.haskell.org) Date: Sun, 1 Nov 2015 13:06:08 +0000 (UTC) Subject: [commit: ghc] master: Update Cabal submodule (3431ad6) Message-ID: <20151101130608.B22A73A300@ghc.haskell.org> Repository : ssh://git at git.haskell.org/ghc On branch : master Link : http://ghc.haskell.org/trac/ghc/changeset/3431ad6faeb2b74e10c8ac4d42bdbc4521e07e33/ghc >--------------------------------------------------------------- commit 3431ad6faeb2b74e10c8ac4d42bdbc4521e07e33 Author: Herbert Valerio Riedel Date: Sun Nov 1 14:03:44 2015 +0100 Update Cabal submodule This allows us to remove 4 newly added language pragmas from the T4437 test-case as they were recently added to Cabal 1.23 >--------------------------------------------------------------- 3431ad6faeb2b74e10c8ac4d42bdbc4521e07e33 libraries/Cabal | 2 +- testsuite/tests/driver/T4437.hs | 6 +----- 2 files changed, 2 insertions(+), 6 deletions(-) diff --git a/libraries/Cabal b/libraries/Cabal index b083151..fada4c8 160000 --- a/libraries/Cabal +++ b/libraries/Cabal @@ -1 +1 @@ -Subproject commit b083151f2a01ad7245f21502fd20f21189ab7665 +Subproject commit fada4c87bf76254b85703671fbb1f05bb73f0869 diff --git a/testsuite/tests/driver/T4437.hs b/testsuite/tests/driver/T4437.hs index 48ad93c..f345ce6 100644 --- a/testsuite/tests/driver/T4437.hs +++ b/testsuite/tests/driver/T4437.hs @@ -32,11 +32,7 @@ check title expected got expectedGhcOnlyExtensions :: [String] expectedGhcOnlyExtensions = ["RelaxedLayout", "AlternativeLayoutRule", - "AlternativeLayoutRuleTransitional", - "DuplicateRecordFields", - "StaticPointers", - "StrictData", - "ApplicativeDo"] -- TODO add this to Cabal + "AlternativeLayoutRuleTransitional"] expectedCabalOnlyExtensions :: [String] expectedCabalOnlyExtensions = ["Generics", From git at git.haskell.org Sun Nov 1 14:20:47 2015 From: git at git.haskell.org (git at git.haskell.org) Date: Sun, 1 Nov 2015 14:20:47 +0000 (UTC) Subject: [commit: ghc] master: StgStartup: Setup unwinding for stg_stop_thread (d9f8862) Message-ID: <20151101142047.762593A300@ghc.haskell.org> Repository : ssh://git at git.haskell.org/ghc On branch : master Link : http://ghc.haskell.org/trac/ghc/changeset/d9f886282c605e5f4b74126b3af8f23771ef03f1/ghc >--------------------------------------------------------------- commit d9f886282c605e5f4b74126b3af8f23771ef03f1 Author: Ben Gamari Date: Sun Aug 30 14:11:56 2015 +0200 StgStartup: Setup unwinding for stg_stop_thread This is a bit ugly as we need to assume the structure of the C stack as left by StgRun. Nevertheless, it allows us to unwind all the way back to `_start` on my machine. ``` Stack trace: set_initial_registers (rts/Libdw.c:272.0) dwfl_thread_getframes dwfl_getthreads dwfl_getthread_frames libdw_get_backtrace (rts/Libdw.c:243.0) base_GHCziExecutionStack_getStackTrace1_info (libraries/base/GHC/ExecutionStack.hs:43.1) base_GHCziExecutionStack_showStackTrace1_info (libraries/base/GHC/ExecutionStack.hs:47.1) base_GHCziBase_bindIO1_info (libraries/base/GHC/Base.hs:1085.1) base_GHCziBase_thenIO1_info (libraries/base/GHC/Base.hs:1088.1) base_GHCziBase_thenIO1_info (libraries/base/GHC/Base.hs:1088.1) base_GHCziBase_thenIO1_info (libraries/base/GHC/Base.hs:1088.1) base_GHCziBase_thenIO1_info (libraries/base/GHC/Base.hs:1088.1) base_GHCziBase_thenIO1_info (libraries/base/GHC/Base.hs:1088.1) stg_catch_frame_info (rts/Exception.cmm:370.1) stg_stop_thread_info (rts/StgStartup.cmm:42.1) scheduleWaitThread (rts/Schedule.c:465.0) hs_main (rts/RtsMain.c:65.0) __libc_start_main (/tmp/buildd/glibc-2.19/csu/libc-start.c:321.0) _start ``` >--------------------------------------------------------------- d9f886282c605e5f4b74126b3af8f23771ef03f1 rts/StgCRun.c | 2 ++ rts/StgStartup.cmm | 12 ++++++++++++ 2 files changed, 14 insertions(+) diff --git a/rts/StgCRun.c b/rts/StgCRun.c index 6448509..0a010d4 100644 --- a/rts/StgCRun.c +++ b/rts/StgCRun.c @@ -159,6 +159,8 @@ StgWord8 *win32AllocStack(void) * stack isn't aligned, and calling exitWith from Haskell invokes * shutdownHaskellAndExit using a C call. * + * If you edit the sequence below be sure to update the unwinding information + * for stg_stop_thread in StgStartup.cmm. */ static void GNUC3_ATTRIBUTE(used) diff --git a/rts/StgStartup.cmm b/rts/StgStartup.cmm index 2a245b0..aad4fab 100644 --- a/rts/StgStartup.cmm +++ b/rts/StgStartup.cmm @@ -62,6 +62,18 @@ INFO_TABLE_RET(stg_stop_thread, STOP_FRAME, be an info table on top of the stack). */ + /* + Here we setup the stack unwinding annotation necessary to allow + debuggers to find their way back to the C stack. + + This is a bit fiddly as we assume the layout of the stack prepared + for us by StgRun. + */ +#ifdef x86_64_HOST_ARCH + unwind MachSp = MachSp + RESERVED_C_STACK_BYTES + 0x38 + 8 + unwind UnwindReturnReg = W_[MachSp + RESERVED_C_STACK_BYTES + 0x38] +#endif + Sp = Sp + SIZEOF_StgStopFrame - WDS(2); Sp(1) = R1; Sp(0) = stg_enter_info; From git at git.haskell.org Sun Nov 1 14:20:50 2015 From: git at git.haskell.org (git at git.haskell.org) Date: Sun, 1 Nov 2015 14:20:50 +0000 (UTC) Subject: [commit: ghc] master: Dwarf.Types: Fix comment style (76611d7) Message-ID: <20151101142050.1C4E93A300@ghc.haskell.org> Repository : ssh://git at git.haskell.org/ghc On branch : master Link : http://ghc.haskell.org/trac/ghc/changeset/76611d750247c1f6fd1323ef5564af16b97e8157/ghc >--------------------------------------------------------------- commit 76611d750247c1f6fd1323ef5564af16b97e8157 Author: Ben Gamari Date: Fri Oct 30 21:02:07 2015 +0100 Dwarf.Types: Fix comment style >--------------------------------------------------------------- 76611d750247c1f6fd1323ef5564af16b97e8157 compiler/nativeGen/Dwarf/Types.hs | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/compiler/nativeGen/Dwarf/Types.hs b/compiler/nativeGen/Dwarf/Types.hs index d558c2d..bd423b6 100644 --- a/compiler/nativeGen/Dwarf/Types.hs +++ b/compiler/nativeGen/Dwarf/Types.hs @@ -43,7 +43,7 @@ import Data.Char import CodeGen.Platform -- | Individual dwarf records. Each one will be encoded as an entry in --- the .debug_info section. +-- the @.debug_info@ section. data DwarfInfo = DwarfCompileUnit { dwChildren :: [DwarfInfo] , dwName :: String @@ -60,7 +60,7 @@ data DwarfInfo , dwMarker :: CLabel } -- | Abbreviation codes used for encoding above records in the --- .debug_info section. +-- @.debug_info@ section. data DwarfAbbrev = DwAbbrNull -- ^ Pseudo, used for marking the end of lists | DwAbbrCompileUnit @@ -218,7 +218,7 @@ data DwarfFrameBlock , dwFdeUnwind :: UnwindTable } --- | Header for the .debug_frame section. Here we emit the "Common +-- | Header for the @.debug_frame@ section. Here we emit the "Common -- Information Entry" record that etablishes general call frame -- parameters and the default stack layout. pprDwarfFrame :: DwarfFrame -> SDoc @@ -315,7 +315,7 @@ pprFrameBlock oldUws (DwarfFrameBlock blockLbl hasInfo uws) vcat (map (uncurry $ pprSetUnwind plat) changed) $$ vcat (map (pprUndefUnwind plat . fst) died) --- [Note: Info Offset] +-- Note [Info Offset] -- -- GDB was pretty much written with C-like programs in mind, and as a -- result they assume that once you have a return address, it is a @@ -398,7 +398,7 @@ pprUnwindExpr spIsCFA expr ptext (sLit "1:") -- | Generate code for re-setting the unwind information for a --- register to "undefined" +-- register to @undefined@ pprUndefUnwind :: Platform -> GlobalReg -> SDoc pprUndefUnwind _ Sp = panic "pprUndefUnwind Sp" -- should never happen pprUndefUnwind plat g = pprByte dW_CFA_undefined $$ From git at git.haskell.org Sun Nov 1 14:20:52 2015 From: git at git.haskell.org (git at git.haskell.org) Date: Sun, 1 Nov 2015 14:20:52 +0000 (UTC) Subject: [commit: ghc] master: cmm: Expose machine's stack and return address register (159a1a2) Message-ID: <20151101142052.BA7533A300@ghc.haskell.org> Repository : ssh://git at git.haskell.org/ghc On branch : master Link : http://ghc.haskell.org/trac/ghc/changeset/159a1a2b7501b149fadfc0cd1940fab6bf030691/ghc >--------------------------------------------------------------- commit 159a1a2b7501b149fadfc0cd1940fab6bf030691 Author: Ben Gamari Date: Thu Aug 27 00:36:59 2015 +0200 cmm: Expose machine's stack and return address register We will need to use these to setup proper unwinding information for the stg_stop_thread closure. This pokes a hole in the STG abstraction, exposing the machine's stack pointer register so that we can accomplish this. We also expose a dummy return address register, which corresponds to the register used to hold the DWARF return address. Differential Revision: https://phabricator.haskell.org/D1225 >--------------------------------------------------------------- 159a1a2b7501b149fadfc0cd1940fab6bf030691 compiler/cmm/CmmExpr.hs | 17 +++++++++++++++++ compiler/cmm/CmmLex.x | 2 ++ compiler/cmm/PprCmmExpr.hs | 2 ++ compiler/codeGen/CgUtils.hs | 2 ++ compiler/llvmGen/LlvmCodeGen/Regs.hs | 1 + compiler/nativeGen/Dwarf/Types.hs | 3 ++- includes/CodeGen.Platform.hs | 3 +++ includes/stg/MachRegs.h | 2 ++ 8 files changed, 31 insertions(+), 1 deletion(-) diff --git a/compiler/cmm/CmmExpr.hs b/compiler/cmm/CmmExpr.hs index 10d0874..8a86bb4 100644 --- a/compiler/cmm/CmmExpr.hs +++ b/compiler/cmm/CmmExpr.hs @@ -459,6 +459,15 @@ data GlobalReg -- (where necessary) in the native code generator. | BaseReg + -- The register used by the platform for the C stack pointer. This is + -- a break in the STG abstraction used exclusively to setup stack unwinding + -- information. + | MachSp + + -- The is a dummy register used to indicate to the stack unwinder where + -- a routine would return to. + | UnwindReturnReg + -- Base Register for PIC (position-independent code) calculations -- Only used inside the native code generator. It's exact meaning differs -- from platform to platform (see module PositionIndependentCode). @@ -486,6 +495,8 @@ instance Eq GlobalReg where GCEnter1 == GCEnter1 = True GCFun == GCFun = True BaseReg == BaseReg = True + MachSp == MachSp = True + UnwindReturnReg == UnwindReturnReg = True PicBaseReg == PicBaseReg = True _r1 == _r2 = False @@ -510,6 +521,8 @@ instance Ord GlobalReg where compare GCEnter1 GCEnter1 = EQ compare GCFun GCFun = EQ compare BaseReg BaseReg = EQ + compare MachSp MachSp = EQ + compare UnwindReturnReg UnwindReturnReg = EQ compare PicBaseReg PicBaseReg = EQ compare (VanillaReg _ _) _ = LT compare _ (VanillaReg _ _) = GT @@ -547,6 +560,10 @@ instance Ord GlobalReg where compare _ GCFun = GT compare BaseReg _ = LT compare _ BaseReg = GT + compare MachSp _ = LT + compare _ MachSp = GT + compare UnwindReturnReg _ = LT + compare _ UnwindReturnReg = GT compare EagerBlackholeInfo _ = LT compare _ EagerBlackholeInfo = GT diff --git a/compiler/cmm/CmmLex.x b/compiler/cmm/CmmLex.x index a9ad3e5..175259a 100644 --- a/compiler/cmm/CmmLex.x +++ b/compiler/cmm/CmmLex.x @@ -110,6 +110,8 @@ $white_no_nl+ ; CurrentNursery { global_reg CurrentNursery } HpAlloc { global_reg HpAlloc } BaseReg { global_reg BaseReg } + MachSp { global_reg MachSp } + UnwindReturnReg { global_reg UnwindReturnReg } $namebegin $namechar* { name } diff --git a/compiler/cmm/PprCmmExpr.hs b/compiler/cmm/PprCmmExpr.hs index 0bb79ac..1f1c7f8 100644 --- a/compiler/cmm/PprCmmExpr.hs +++ b/compiler/cmm/PprCmmExpr.hs @@ -262,6 +262,8 @@ pprGlobalReg gr SpLim -> ptext (sLit "SpLim") Hp -> ptext (sLit "Hp") HpLim -> ptext (sLit "HpLim") + MachSp -> ptext (sLit "MachSp") + UnwindReturnReg-> ptext (sLit "UnwindReturnReg") CCCS -> ptext (sLit "CCCS") CurrentTSO -> ptext (sLit "CurrentTSO") CurrentNursery -> ptext (sLit "CurrentNursery") diff --git a/compiler/codeGen/CgUtils.hs b/compiler/codeGen/CgUtils.hs index 51b8ed9..a197312 100644 --- a/compiler/codeGen/CgUtils.hs +++ b/compiler/codeGen/CgUtils.hs @@ -86,6 +86,8 @@ baseRegOffset dflags GCEnter1 = oFFSET_stgGCEnter1 dflags baseRegOffset dflags GCFun = oFFSET_stgGCFun dflags baseRegOffset _ BaseReg = panic "baseRegOffset:BaseReg" baseRegOffset _ PicBaseReg = panic "baseRegOffset:PicBaseReg" +baseRegOffset _ MachSp = panic "baseRegOffset:MachSp" +baseRegOffset _ UnwindReturnReg = panic "baseRegOffset:UnwindReturnReg" -- ----------------------------------------------------------------------------- diff --git a/compiler/llvmGen/LlvmCodeGen/Regs.hs b/compiler/llvmGen/LlvmCodeGen/Regs.hs index 0048659..8ac4153 100644 --- a/compiler/llvmGen/LlvmCodeGen/Regs.hs +++ b/compiler/llvmGen/LlvmCodeGen/Regs.hs @@ -76,6 +76,7 @@ lmGlobalReg dflags suf reg ZmmReg 4 -> zmmGlobal $ "ZMM4" ++ suf ZmmReg 5 -> zmmGlobal $ "ZMM5" ++ suf ZmmReg 6 -> zmmGlobal $ "ZMM6" ++ suf + MachSp -> wordGlobal $ "MachSp" ++ suf _other -> panic $ "LlvmCodeGen.Reg: GlobalReg (" ++ (show reg) ++ ") not supported!" -- LongReg, HpLim, CCSS, CurrentTSO, CurrentNusery, HpAlloc diff --git a/compiler/nativeGen/Dwarf/Types.hs b/compiler/nativeGen/Dwarf/Types.hs index bd423b6..abded88 100644 --- a/compiler/nativeGen/Dwarf/Types.hs +++ b/compiler/nativeGen/Dwarf/Types.hs @@ -337,7 +337,8 @@ pprFrameBlock oldUws (DwarfFrameBlock blockLbl hasInfo uws) -- | Get DWARF register ID for a given GlobalReg dwarfGlobalRegNo :: Platform -> GlobalReg -> Word8 -dwarfGlobalRegNo p = maybe 0 (dwarfRegNo p . RegReal) . globalRegMaybe p +dwarfGlobalRegNo p UnwindReturnReg = dwarfReturnRegNo p +dwarfGlobalRegNo p reg = maybe 0 (dwarfRegNo p . RegReal) $ globalRegMaybe p reg -- | Generate code for setting the unwind information for a register, -- optimized using its known old value in the table. Note that "Sp" is diff --git a/includes/CodeGen.Platform.hs b/includes/CodeGen.Platform.hs index b41ad54..46550af 100644 --- a/includes/CodeGen.Platform.hs +++ b/includes/CodeGen.Platform.hs @@ -815,6 +815,9 @@ globalRegMaybe CurrentTSO = Just (RealRegSingle REG_CurrentTSO) # ifdef REG_CurrentNursery globalRegMaybe CurrentNursery = Just (RealRegSingle REG_CurrentNursery) # endif +# ifdef REG_MachSp +globalRegMaybe MachSp = Just (RealRegSingle REG_MachSp) +# endif globalRegMaybe _ = Nothing #elif MACHREGS_NO_REGS globalRegMaybe _ = Nothing diff --git a/includes/stg/MachRegs.h b/includes/stg/MachRegs.h index b709027..b1a0ef0 100644 --- a/includes/stg/MachRegs.h +++ b/includes/stg/MachRegs.h @@ -102,6 +102,7 @@ #if STOLEN_X86_REGS >= 4 # define REG_Hp edi #endif +#define REG_MachSp esp #define REG_XMM1 xmm0 #define REG_XMM2 xmm1 @@ -169,6 +170,7 @@ #define REG_R5 r8 #define REG_R6 r9 #define REG_SpLim r15 +#define REG_MachSp rsp /* Map both Fn and Dn to register xmmn so that we can pass a function any From git at git.haskell.org Sun Nov 1 14:20:55 2015 From: git at git.haskell.org (git at git.haskell.org) Date: Sun, 1 Nov 2015 14:20:55 +0000 (UTC) Subject: [commit: ghc] master: Libdw: Remove special treatment for stg_stop_thread (bb446b2) Message-ID: <20151101142055.603E73A300@ghc.haskell.org> Repository : ssh://git at git.haskell.org/ghc On branch : master Link : http://ghc.haskell.org/trac/ghc/changeset/bb446b2636da7f3eda240863a0369396c4c2e419/ghc >--------------------------------------------------------------- commit bb446b2636da7f3eda240863a0369396c4c2e419 Author: Ben Gamari Date: Sat Sep 5 13:51:27 2015 +0200 Libdw: Remove special treatment for stg_stop_thread This is no longer necessary since this symbol can be unwound through with its DWARF information. >--------------------------------------------------------------- bb446b2636da7f3eda240863a0369396c4c2e419 rts/Libdw.c | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/rts/Libdw.c b/rts/Libdw.c index 70aee75..c8f945a 100644 --- a/rts/Libdw.c +++ b/rts/Libdw.c @@ -230,10 +230,7 @@ static int frame_cb(Dwfl_Frame *frame, void *arg) { backtrace_push(session->cur_bt, (StgPtr) pc); } - if ((void *) pc == &stg_stop_thread_info) - return DWARF_CB_ABORT; - else - return DWARF_CB_OK; + return DWARF_CB_OK; } Backtrace *libdw_get_backtrace(LibDwSession *session) { From git at git.haskell.org Sun Nov 1 14:20:58 2015 From: git at git.haskell.org (git at git.haskell.org) Date: Sun, 1 Nov 2015 14:20:58 +0000 (UTC) Subject: [commit: ghc] master: Dwarf: Preserve stack pointer register (6fb0ba6) Message-ID: <20151101142058.032C53A300@ghc.haskell.org> Repository : ssh://git at git.haskell.org/ghc On branch : master Link : http://ghc.haskell.org/trac/ghc/changeset/6fb0ba65d27602ae9a81fe142936b06d54b20b2e/ghc >--------------------------------------------------------------- commit 6fb0ba65d27602ae9a81fe142936b06d54b20b2e Author: Ben Gamari Date: Fri Oct 30 20:49:35 2015 +0100 Dwarf: Preserve stack pointer register Here we add a `same_value $sp` instruction to our default unwinding rules to ensure that the implicit `$sp = CFA` rule (which `libdw` appears to exhibit on x86_64) doesn't overwrite it (necessary since we don't use $sp to track our call stack). See Phab Diff D1189 for details on how we arrived at this resolution. Reviewers: scpmw, austin, simonmar Reviewed By: austin, simonmar Subscribers: thomie, simonmar Differential Revision: https://phabricator.haskell.org/D1224 >--------------------------------------------------------------- 6fb0ba65d27602ae9a81fe142936b06d54b20b2e compiler/nativeGen/Dwarf/Types.hs | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/compiler/nativeGen/Dwarf/Types.hs b/compiler/nativeGen/Dwarf/Types.hs index a2d07b8..d558c2d 100644 --- a/compiler/nativeGen/Dwarf/Types.hs +++ b/compiler/nativeGen/Dwarf/Types.hs @@ -231,6 +231,13 @@ pprDwarfFrame DwarfFrame{dwCieLabel=cieLabel,dwCieInit=cieInit,dwCieProcs=procs} retReg = dwarfReturnRegNo plat wordSize = platformWordSize plat pprInit (g, uw) = pprSetUnwind plat g (Nothing, uw) + + -- Preserve C stack pointer: This necessary to override that default + -- unwinding behavior of setting $sp = CFA. + preserveSp = case platformArch plat of + ArchX86 -> pprByte dW_CFA_same_value $$ pprLEBWord 4 + ArchX86_64 -> pprByte dW_CFA_same_value $$ pprLEBWord 7 + _ -> empty in vcat [ ppr cieLabel <> colon , pprData4' length -- Length of CIE , ppr cieStartLabel <> colon @@ -250,8 +257,11 @@ pprDwarfFrame DwarfFrame{dwCieLabel=cieLabel,dwCieInit=cieInit,dwCieProcs=procs} pprByte (dW_CFA_offset+retReg) , pprByte 0 + -- Preserve C stack pointer + , preserveSp + -- Sp' = CFA - -- (we need to set this manually as our Sp register is + -- (we need to set this manually as our (STG) Sp register is -- often not the architecture's default stack register) , pprByte dW_CFA_val_offset , pprLEBWord (fromIntegral spReg) From git at git.haskell.org Sun Nov 1 14:21:00 2015 From: git at git.haskell.org (git at git.haskell.org) Date: Sun, 1 Nov 2015 14:21:00 +0000 (UTC) Subject: [commit: ghc] master: Dwarf.Constants: Introduce Haddock sections (b8df858) Message-ID: <20151101142100.A78E83A300@ghc.haskell.org> Repository : ssh://git at git.haskell.org/ghc On branch : master Link : http://ghc.haskell.org/trac/ghc/changeset/b8df858301317fcdcbe4285cea748f7f1d4438c4/ghc >--------------------------------------------------------------- commit b8df858301317fcdcbe4285cea748f7f1d4438c4 Author: Ben Gamari Date: Fri Oct 30 21:22:17 2015 +0100 Dwarf.Constants: Introduce Haddock sections >--------------------------------------------------------------- b8df858301317fcdcbe4285cea748f7f1d4438c4 compiler/nativeGen/Dwarf/Constants.hs | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/compiler/nativeGen/Dwarf/Constants.hs b/compiler/nativeGen/Dwarf/Constants.hs index 9fe1297..a46d113 100644 --- a/compiler/nativeGen/Dwarf/Constants.hs +++ b/compiler/nativeGen/Dwarf/Constants.hs @@ -17,7 +17,7 @@ dW_LANG_Haskell :: Word dW_LANG_Haskell = 0x18 -- Thanks to Nathan Howell for getting us our very own language ID! --- | Dwarf tags +-- * Dwarf tags dW_TAG_compile_unit, dW_TAG_subroutine_type, dW_TAG_file_type, dW_TAG_subprogram, dW_TAG_lexical_block, dW_TAG_base_type, dW_TAG_structure_type, dW_TAG_pointer_type, @@ -38,7 +38,7 @@ dW_TAG_variable = 52 dW_TAG_auto_variable = 256 dW_TAG_arg_variable = 257 --- | Dwarf attributes +-- * Dwarf attributes dW_AT_name, dW_AT_stmt_list, dW_AT_low_pc, dW_AT_high_pc, dW_AT_language, dW_AT_comp_dir, dW_AT_producer, dW_AT_external, dW_AT_frame_base, dW_AT_use_UTF8, dW_AT_MIPS_linkage_name :: Word @@ -54,7 +54,7 @@ dW_AT_frame_base = 0x40 dW_AT_use_UTF8 = 0x53 dW_AT_MIPS_linkage_name = 0x2007 --- | Abbrev declaration +-- * Abbrev declaration dW_CHILDREN_no, dW_CHILDREN_yes :: Word8 dW_CHILDREN_no = 0 dW_CHILDREN_yes = 1 @@ -69,7 +69,7 @@ dW_FORM_block1 = 0x0a dW_FORM_ref4 = 0x13 dW_FORM_flag_present = 0x19 --- | Dwarf native types +-- * Dwarf native types dW_ATE_address, dW_ATE_boolean, dW_ATE_float, dW_ATE_signed, dW_ATE_signed_char, dW_ATE_unsigned, dW_ATE_unsigned_char :: Word dW_ATE_address = 1 @@ -80,7 +80,7 @@ dW_ATE_signed_char = 6 dW_ATE_unsigned = 7 dW_ATE_unsigned_char = 8 --- | Call frame information +-- * Call frame information dW_CFA_set_loc, dW_CFA_undefined, dW_CFA_same_value, dW_CFA_def_cfa, dW_CFA_def_cfa_offset, dW_CFA_def_cfa_expression, dW_CFA_expression, dW_CFA_offset_extended_sf, dW_CFA_def_cfa_offset_sf, @@ -100,7 +100,7 @@ dW_CFA_val_offset = 0x14 dW_CFA_val_expression = 0x16 dW_CFA_offset = 0x80 --- | Operations +-- * Operations dW_OP_deref, dW_OP_consts, dW_OP_minus, dW_OP_mul, dW_OP_plus, dW_OP_lit0, dW_OP_breg0, dW_OP_call_frame_cfa :: Word8 @@ -113,7 +113,7 @@ dW_OP_lit0 = 0x30 dW_OP_breg0 = 0x70 dW_OP_call_frame_cfa = 0x9c --- | Dwarf section declarations +-- * Dwarf section declarations dwarfInfoSection, dwarfAbbrevSection, dwarfLineSection, dwarfFrameSection, dwarfGhcSection, dwarfARangesSection :: SDoc dwarfInfoSection = dwarfSection "info" @@ -133,7 +133,7 @@ dwarfSection name = sdocWithPlatform $ \plat -> ftext $ mkFastString $ | otherwise -> "\t.section .debug_" ++ name ++ ",\"dr\"" --- | Dwarf section labels +-- * Dwarf section labels dwarfInfoLabel, dwarfAbbrevLabel, dwarfLineLabel, dwarfFrameLabel :: LitString dwarfInfoLabel = sLit ".Lsection_info" dwarfAbbrevLabel = sLit ".Lsection_abbrev" From git at git.haskell.org Sun Nov 1 16:51:21 2015 From: git at git.haskell.org (git at git.haskell.org) Date: Sun, 1 Nov 2015 16:51:21 +0000 (UTC) Subject: [commit: ghc] master: Libdw: Fix symbol naming (52c6e3d) Message-ID: <20151101165121.1FAB03A300@ghc.haskell.org> Repository : ssh://git at git.haskell.org/ghc On branch : master Link : http://ghc.haskell.org/trac/ghc/changeset/52c6e3d608ee3d010337d4405df86c2620d24887/ghc >--------------------------------------------------------------- commit 52c6e3d608ee3d010337d4405df86c2620d24887 Author: Ben Gamari Date: Sun Nov 1 12:33:08 2015 +0100 Libdw: Fix symbol naming RTS convention is to use camel-case. >--------------------------------------------------------------- 52c6e3d608ee3d010337d4405df86c2620d24887 includes/rts/Libdw.h | 4 ++-- rts/Libdw.c | 63 ++++++++++++++++++++++++++-------------------------- rts/Libdw.h | 20 ++++++++--------- rts/posix/Signals.c | 10 ++++----- 4 files changed, 49 insertions(+), 48 deletions(-) Diff suppressed because of size. To see it, use: git diff-tree --root --patch-with-stat --no-color --find-copies-harder --ignore-space-at-eol --cc 52c6e3d608ee3d010337d4405df86c2620d24887 From git at git.haskell.org Sun Nov 1 16:51:23 2015 From: git at git.haskell.org (git at git.haskell.org) Date: Sun, 1 Nov 2015 16:51:23 +0000 (UTC) Subject: [commit: ghc] master: Minor simplification in unariser pass: (e9bfb3f) Message-ID: <20151101165123.B47FD3A300@ghc.haskell.org> Repository : ssh://git at git.haskell.org/ghc On branch : master Link : http://ghc.haskell.org/trac/ghc/changeset/e9bfb3fd4cb61621c28b51f0bf0e3d2c6f74e45f/ghc >--------------------------------------------------------------- commit e9bfb3fd4cb61621c28b51f0bf0e3d2c6f74e45f Author: ?mer Sinan A?acan Date: Sun Nov 1 17:14:58 2015 +0100 Minor simplification in unariser pass: We don't need to update StgCase's AltType, because it's already set correctly in `CoreToStg.mkStgAltType`, so we can just remove extra argument passing and return values. (I think this is a useful refactoring because it makes it clear that we don't need to update AltTypes) Reviewers: austin, bgamari, simonpj Reviewed By: bgamari, simonpj Subscribers: simonpj, thomie Differential Revision: https://phabricator.haskell.org/D1403 >--------------------------------------------------------------- e9bfb3fd4cb61621c28b51f0bf0e3d2c6f74e45f compiler/simplStg/UnariseStg.hs | 24 +++++++++++------------- 1 file changed, 11 insertions(+), 13 deletions(-) diff --git a/compiler/simplStg/UnariseStg.hs b/compiler/simplStg/UnariseStg.hs index f3d592f..a1533ba 100644 --- a/compiler/simplStg/UnariseStg.hs +++ b/compiler/simplStg/UnariseStg.hs @@ -114,10 +114,10 @@ unariseExpr us rho (StgLam xs e) unariseExpr us rho (StgCase e case_lives alts_lives bndr srt alt_ty alts) = StgCase (unariseExpr us1 rho e) (unariseLives rho case_lives) (unariseLives rho alts_lives) bndr (unariseSRT rho srt) - alt_ty' alts' + alt_ty alts' where (us1, us2) = splitUniqSupply us - (alt_ty', alts') = unariseAlts us2 rho alt_ty bndr (repType (idType bndr)) alts + alts' = unariseAlts us2 rho alt_ty bndr alts unariseExpr us rho (StgLet bind e) = StgLet (unariseBinding us1 rho bind) (unariseExpr us2 rho e) @@ -134,27 +134,25 @@ unariseExpr us rho (StgTick tick e) = StgTick tick (unariseExpr us rho e) ------------------------ -unariseAlts :: UniqSupply -> UnariseEnv -> AltType -> Id -> RepType -> [StgAlt] -> (AltType, [StgAlt]) -unariseAlts us rho alt_ty _ (UnaryRep _) alts - = (alt_ty, zipWith (\us alt -> unariseAlt us rho alt) (listSplitUniqSupply us) alts) - -unariseAlts us rho _ bndr (UbxTupleRep tys) ((DEFAULT, [], [], e) : _) - = (UbxTupAlt n, [(DataAlt (tupleDataCon Unboxed n), ys, uses, unariseExpr us2' rho' e)]) +unariseAlts :: UniqSupply -> UnariseEnv -> AltType -> Id -> [StgAlt] -> [StgAlt] +unariseAlts us rho (UbxTupAlt n) bndr [(DEFAULT, [], [], e)] + = [(DataAlt (tupleDataCon Unboxed n), ys, uses, unariseExpr us2' rho' e)] where (us2', rho', ys) = unariseIdBinder us rho bndr uses = replicate (length ys) (not (isDeadBinder bndr)) - n = length tys -unariseAlts us rho _ bndr (UbxTupleRep _) [(DataAlt _, ys, uses, e)] - = (UbxTupAlt n, [(DataAlt (tupleDataCon Unboxed n), ys', uses', unariseExpr us2' rho'' e)]) +unariseAlts us rho (UbxTupAlt n) bndr [(DataAlt _, ys, uses, e)] + = [(DataAlt (tupleDataCon Unboxed n), ys', uses', unariseExpr us2' rho'' e)] where (us2', rho', ys', uses') = unariseUsedIdBinders us rho ys uses rho'' = extendVarEnv rho' bndr ys' - n = length ys' -unariseAlts _ _ _ _ (UbxTupleRep _) alts +unariseAlts _ _ (UbxTupAlt _) _ alts = pprPanic "unariseExpr: strange unboxed tuple alts" (ppr alts) +unariseAlts us rho _ _ alts + = zipWith (\us alt -> unariseAlt us rho alt) (listSplitUniqSupply us) alts + -------------------------- unariseAlt :: UniqSupply -> UnariseEnv -> StgAlt -> StgAlt unariseAlt us rho (con, xs, uses, e) From git at git.haskell.org Sun Nov 1 18:27:16 2015 From: git at git.haskell.org (git at git.haskell.org) Date: Sun, 1 Nov 2015 18:27:16 +0000 (UTC) Subject: [commit: ghc] master: Change sphinx for documentation building on windows to the python3 version (65f3c4c) Message-ID: <20151101182716.4AB0D3A300@ghc.haskell.org> Repository : ssh://git at git.haskell.org/ghc On branch : master Link : http://ghc.haskell.org/trac/ghc/changeset/65f3c4c0a1304b8d00b46dc0e77ad93fc566ffb1/ghc >--------------------------------------------------------------- commit 65f3c4c0a1304b8d00b46dc0e77ad93fc566ffb1 Author: Tamar Christina Date: Sun Nov 1 19:26:16 2015 +0100 Change sphinx for documentation building on windows to the python3 version Summary: Python 3 seems to have fixed the long standing codepage issue with python on Windows. To be able to reliably build the documentation we should use the Python 3 version of Sphinx. See `https://docs.python.org/dev/whatsnew/3.3.html#codecs` and `https://bugs.python.org/issue13216`. Sphinx also supports Python 3. Oddly enough `python3-sphinx` is registered as `sphinx-build.exe` instead of `sphinx-build3.exe`, so the changes in `configure.ac` can be reverted. install with `pacman -S mingw-w64-$(uname -m)-python3-sphinx` Test Plan: ./validate Reviewers: austin, thomie, bgamari Reviewed By: bgamari Subscribers: erikd Differential Revision: https://phabricator.haskell.org/D1417 GHC Trac Issues: #11021 >--------------------------------------------------------------- 65f3c4c0a1304b8d00b46dc0e77ad93fc566ffb1 configure.ac | 14 +++----------- 1 file changed, 3 insertions(+), 11 deletions(-) diff --git a/configure.ac b/configure.ac index 6bd2103..84f381e 100644 --- a/configure.ac +++ b/configure.ac @@ -725,19 +725,11 @@ then fi dnl ** check for Sphinx toolchain -if test "$HostOS" = "mingw32" -then -SphinxBin=sphinx-build2 -else -SphinxBin=sphinx-build -fi; - -AC_SUBST([SphinxBin]) -AC_PATH_PROG(SPHINXBUILD,${SphinxBin}) -AC_CACHE_CHECK([for version of ${SphinxBin}], fp_cv_sphinx_version, +AC_PATH_PROG(SPHINXBUILD,sphinx-build) +AC_CACHE_CHECK([for version of sphinx-build], fp_cv_sphinx_version, changequote(, )dnl [if test -n "$SPHINXBUILD"; then - fp_cv_sphinx_version=`"$SPHINXBUILD" --version 2>&1 | sed 's/Sphinx\( (sphinx-build[2]\?)\)\? v\?\([0-9]\.[0-9]\.[0-9]\)/\2/' | head -n1`; + fp_cv_sphinx_version=`"$SPHINXBUILD" --version 2>&1 | sed 's/Sphinx\( (sphinx-build)\)\? v\?\([0-9]\.[0-9]\.[0-9]\)/\2/' | head -n1`; fi; changequote([, ])dnl ]) From git at git.haskell.org Sun Nov 1 18:35:02 2015 From: git at git.haskell.org (git at git.haskell.org) Date: Sun, 1 Nov 2015 18:35:02 +0000 (UTC) Subject: [commit: ghc] master: EventLog: Loop fwrite if necessary during flush (f46f32b) Message-ID: <20151101183502.387263A300@ghc.haskell.org> Repository : ssh://git at git.haskell.org/ghc On branch : master Link : http://ghc.haskell.org/trac/ghc/changeset/f46f32b922d7ecbee2829937295521f5db1d7997/ghc >--------------------------------------------------------------- commit f46f32b922d7ecbee2829937295521f5db1d7997 Author: Ben Gamari Date: Sun Nov 1 19:06:09 2015 +0100 EventLog: Loop fwrite if necessary during flush Previously the eventlog flush code would fail if `fwrite` wrote less than the requested amount. Like all Unix stream I/O operations, however, `fwrite` isn't guaranteed to write the entire buffer. Here we loop as long as `fwrite` succeeds in writing anything. Fixes #11041. Test Plan: Validate with eventlog Reviewers: austin, simonmar Reviewed By: simonmar Subscribers: thomie Differential Revision: https://phabricator.haskell.org/D1415 GHC Trac Issues: #11041 >--------------------------------------------------------------- f46f32b922d7ecbee2829937295521f5db1d7997 rts/eventlog/EventLog.c | 22 ++++++++++++---------- 1 file changed, 12 insertions(+), 10 deletions(-) diff --git a/rts/eventlog/EventLog.c b/rts/eventlog/EventLog.c index 2153942..db103a7 100644 --- a/rts/eventlog/EventLog.c +++ b/rts/eventlog/EventLog.c @@ -1100,20 +1100,22 @@ void postBlockMarker (EventsBuf *eb) void printAndClearEventBuf (EventsBuf *ebuf) { - StgWord64 numBytes = 0, written = 0; - closeBlockMarker(ebuf); if (ebuf->begin != NULL && ebuf->pos != ebuf->begin) { - numBytes = ebuf->pos - ebuf->begin; - - written = fwrite(ebuf->begin, 1, numBytes, event_log_file); - if (written != numBytes) { - debugBelch( - "printAndClearEventLog: fwrite() failed, written=%" FMT_Word64 - " doesn't match numBytes=%" FMT_Word64, written, numBytes); - return; + StgInt8 *begin = ebuf->begin; + while (begin < ebuf->pos) { + StgWord64 remain = ebuf->pos - begin; + StgWord64 written = fwrite(begin, 1, remain, event_log_file); + if (written == 0) { + debugBelch( + "printAndClearEventLog: fwrite() failed to write anything;" + " tried to write numBytes=%" FMT_Word64, remain); + resetEventsBuf(ebuf); + return; + } + begin += written; } resetEventsBuf(ebuf); From git at git.haskell.org Sun Nov 1 20:53:52 2015 From: git at git.haskell.org (git at git.haskell.org) Date: Sun, 1 Nov 2015 20:53:52 +0000 (UTC) Subject: [commit: ghc] wip/aarch64-regd: configure.ac: AArch64 is now registerised (c1c333a) Message-ID: <20151101205352.BFC253A300@ghc.haskell.org> Repository : ssh://git at git.haskell.org/ghc On branch : wip/aarch64-regd Link : http://ghc.haskell.org/trac/ghc/changeset/c1c333a09c52362b97ddbf9c5731e4a9a58cb71a/ghc >--------------------------------------------------------------- commit c1c333a09c52362b97ddbf9c5731e4a9a58cb71a Author: Erik de Castro Lopo Date: Sun Jul 5 11:22:24 2015 +0000 configure.ac: AArch64 is now registerised >--------------------------------------------------------------- c1c333a09c52362b97ddbf9c5731e4a9a58cb71a configure.ac | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/configure.ac b/configure.ac index 84f381e..ce336dc 100644 --- a/configure.ac +++ b/configure.ac @@ -240,7 +240,7 @@ AC_SUBST(SOLARIS_BROKEN_SHLD) dnl ** Do an unregisterised build? dnl -------------------------------------------------------------- case "$HostArch" in - i386|x86_64|powerpc|powerpc64|powerpc64le|arm) + i386|x86_64|powerpc|powerpc64|powerpc64le|arm|aarch64) UnregisterisedDefault=NO ;; *) From git at git.haskell.org Sun Nov 1 20:53:55 2015 From: git at git.haskell.org (git at git.haskell.org) Date: Sun, 1 Nov 2015 20:53:55 +0000 (UTC) Subject: [commit: ghc] wip/aarch64-regd: Implement AArch64 codegen in `mkJumpToAddr` (for GHCi). (c8d42fe) Message-ID: <20151101205355.5C4593A300@ghc.haskell.org> Repository : ssh://git at git.haskell.org/ghc On branch : wip/aarch64-regd Link : http://ghc.haskell.org/trac/ghc/changeset/c8d42fe36cbd642f8ccf3af81b5b14c843def1ce/ghc >--------------------------------------------------------------- commit c8d42fe36cbd642f8ccf3af81b5b14c843def1ce Author: Erik de Castro Lopo Date: Mon Oct 12 15:17:30 2015 +1100 Implement AArch64 codegen in `mkJumpToAddr` (for GHCi). >--------------------------------------------------------------- c8d42fe36cbd642f8ccf3af81b5b14c843def1ce compiler/ghci/ByteCodeItbls.hs | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/compiler/ghci/ByteCodeItbls.hs b/compiler/ghci/ByteCodeItbls.hs index a01fcd8..a97c79a 100644 --- a/compiler/ghci/ByteCodeItbls.hs +++ b/compiler/ghci/ByteCodeItbls.hs @@ -232,6 +232,23 @@ mkJumpToAddr dflags a = case platformArch (targetPlatform dflags) of , 0x11, 0xff, 0x2f, 0xe1 , byte0 w32, byte1 w32, byte2 w32, byte3 w32] + ArchARM64 { } -> + -- Generates: + -- + -- ldr x1, label + -- br x1 + -- label: + -- .quad + -- + -- which looks like: + -- 0: 58000041 ldr x1,