[Git][ghc/ghc][wip/marge_bot_batch_merge_job] 6 commits: Maintain separate flags for C++ compiler invocations

Marge Bot gitlab at gitlab.haskell.org
Fri Jun 14 09:38:09 UTC 2019



 Marge Bot pushed to branch wip/marge_bot_batch_merge_job at Glasgow Haskell Compiler / GHC


Commits:
7bc5d6c6 by Ben Gamari at 2019-06-14T03:34:41Z
Maintain separate flags for C++ compiler invocations

Previously we would pass flags intended for the C compiler to the C++
compiler (see #16738). This would cause, for instance, `-std=gnu99` to
be passed to the C++ compiler, causing spurious test failures. Fix this
by maintaining a separate set of flags for C++ compilation invocations.

- - - - -
71e75ba6 by Ömer Sinan Ağacan at 2019-06-14T03:35:19Z
Remove unused Unique field from StgFCallOp

Fixes #16696

- - - - -
ec25fe59 by Alp Mestanogullari at 2019-06-14T03:35:56Z
Hadrian: remove superfluous dependencies in Rules.Compile

Each package's object files were 'need'ing the library files of all transitive
dependencies of the current package, whichi is pointless since the said
libraries are not needed until we link those object files together.

This fixes #16759.

- - - - -
3bc6df32 by Andreas Klebinger at 2019-06-14T03:36:34Z
Add Outputable instances for Float, Double.

- - - - -
414e9735 by Andrew Martin at 2019-06-14T09:38:05Z
Implement the -XUnliftedNewtypes extension.

GHC Proposal: 0013-unlifted-newtypes.rst
Discussion: https://github.com/ghc-proposals/ghc-proposals/pull/98
Issues: #15219, #1311, #13595, #15883
Implementation Details:
  Note [Implementation of UnliftedNewtypes]
  Note [Unifying data family kinds]
  Note [Compulsory newtype unfolding]

This patch introduces the -XUnliftedNewtypes extension. When this
extension is enabled, GHC drops the restriction that the field in
a newtype must be of kind (TYPE 'LiftedRep). This allows types
like Int# and ByteArray# to be used in a newtype. Additionally,
coerce is made levity-polymorphic so that it can be used with
newtypes over unlifted types.

The bulk of the changes are in TcTyClsDecls.hs. With -XUnliftedNewtypes,
getInitialKind is more liberal, introducing a unification variable to
return the kind (TYPE r0) rather than just returning (TYPE 'LiftedRep).
When kind-checking a data constructor with kcConDecl, we attempt to
unify the kind of a newtype with the kind of its field's type. When
typechecking a data declaration with tcTyClDecl, we again perform a
unification. See the implementation note for more on this.

Co-authored-by: Richard Eisenberg <rae at richarde.dev>

- - - - -
8a27fd4d by Ben Gamari at 2019-06-14T09:38:06Z
PrelRules: Don't break let/app invariant in shiftRule

Previously shiftRule would rewrite as invalid shift like
```
let x = I# (uncheckedIShiftL# n 80)
in ...
```
to
```
let x = I# (error "invalid shift")
in ...
```
However, this breaks the let/app invariant as `error` is not
okay-for-speculation. There isn't an easy way to avoid this so let's not
try. Instead we just take advantage of the undefined nature of invalid
shifts and return zero.

Fixes #16742.

- - - - -


30 changed files:

- aclocal.m4
- compiler/basicTypes/Id.hs
- compiler/basicTypes/MkId.hs
- compiler/codeGen/StgCmmExpr.hs
- compiler/codeGen/StgCmmForeign.hs
- compiler/codeGen/StgCmmPrim.hs
- compiler/coreSyn/CoreSyn.hs
- compiler/deSugar/DsExpr.hs
- compiler/ghci/Linker.hs
- compiler/hsSyn/HsTypes.hs
- compiler/main/DynFlags.hs
- compiler/main/Settings.hs
- compiler/main/SysTools.hs
- compiler/main/SysTools/Info.hs
- compiler/main/SysTools/Tasks.hs
- compiler/main/TidyPgm.hs
- compiler/main/ToolSettings.hs
- compiler/prelude/PrelRules.hs
- compiler/prelude/PrimOp.hs
- compiler/prelude/TysPrim.hs
- compiler/prelude/primops.txt.pp
- compiler/rename/RnSource.hs
- compiler/stgSyn/CoreToStg.hs
- compiler/stgSyn/StgSyn.hs
- compiler/typecheck/TcErrors.hs
- compiler/typecheck/TcEvidence.hs
- compiler/typecheck/TcHsType.hs
- compiler/typecheck/TcInstDcls.hs
- compiler/typecheck/TcMType.hs
- compiler/typecheck/TcSimplify.hs


The diff was not included because it is too large.


View it on GitLab: https://gitlab.haskell.org/ghc/ghc/compare/caea50fea56b325e4a2572fff18544d10a522046...8a27fd4d2b531df1dce7778773ba0e7900d77ad3

-- 
View it on GitLab: https://gitlab.haskell.org/ghc/ghc/compare/caea50fea56b325e4a2572fff18544d10a522046...8a27fd4d2b531df1dce7778773ba0e7900d77ad3
You're receiving this email because of your account on gitlab.haskell.org.


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.haskell.org/pipermail/ghc-commits/attachments/20190614/9111ada0/attachment.html>


More information about the ghc-commits mailing list