summaryrefslogtreecommitdiff
path: root/testsuite/tests/simplCore/should_compile/noinline01.stderr
diff options
context:
space:
mode:
authorTakano Akio <tak@anoak.io>2017-01-18 18:26:47 -0500
committerBen Gamari <ben@smart-cactus.org>2017-01-20 14:36:29 -0500
commitd49b2bb21691892ca6ac8f2403e31f2a5e53feb3 (patch)
treecc8488acf59467899e4d3279a340577eec95310f /testsuite/tests/simplCore/should_compile/noinline01.stderr
parenta2a67b77c3048713541d1ed96ec0b95fb2542f9a (diff)
downloadhaskell-d49b2bb21691892ca6ac8f2403e31f2a5e53feb3.tar.gz
Allow top-level string literals in Core (#8472)
This commits relaxes the invariants of the Core syntax so that a top-level variable can be bound to a primitive string literal of type Addr#. This commit: * Relaxes the invatiants of the Core, and allows top-level bindings whose type is Addr# as long as their RHS is either a primitive string literal or another variable. * Allows the simplifier and the full-laziness transformer to float out primitive string literals to the top leve. * Introduces the new StgGenTopBinding type to accomodate top-level Addr# bindings. * Introduces a new type of labels in the object code, with the suffix "_bytes", for exported top-level Addr# bindings. * Makes some built-in rules more robust. This was necessary to keep them functional after the above changes. This is a continuation of D2554. Rebasing notes: This had two slightly suspicious performance regressions: * T12425: bytes allocated regressed by roughly 5% * T4029: bytes allocated regressed by a bit over 1% * T13035: bytes allocated regressed by a bit over 5% These deserve additional investigation. Rebased by: bgamari. Test Plan: ./validate --slow Reviewers: goldfire, trofi, simonmar, simonpj, austin, hvr, bgamari Reviewed By: trofi, simonpj, bgamari Subscribers: trofi, simonpj, gridaphobe, thomie Differential Revision: https://phabricator.haskell.org/D2605 GHC Trac Issues: #8472
Diffstat (limited to 'testsuite/tests/simplCore/should_compile/noinline01.stderr')
-rw-r--r--testsuite/tests/simplCore/should_compile/noinline01.stderr32
1 files changed, 24 insertions, 8 deletions
diff --git a/testsuite/tests/simplCore/should_compile/noinline01.stderr b/testsuite/tests/simplCore/should_compile/noinline01.stderr
index b100172381..1bb98e57b4 100644
--- a/testsuite/tests/simplCore/should_compile/noinline01.stderr
+++ b/testsuite/tests/simplCore/should_compile/noinline01.stderr
@@ -9,17 +9,25 @@ Noinline01.g :: GHC.Types.Bool
[GblId] =
\u [] Noinline01.f GHC.Types.False;
-Noinline01.$trModule2 :: GHC.Types.TrName
+Noinline01.$trModule4 :: GHC.Prim.Addr#
+[GblId, Caf=NoCafRefs, Unf=OtherCon []] =
+ "main"#;
+
+Noinline01.$trModule3 :: GHC.Types.TrName
[GblId, Caf=NoCafRefs, Str=m1, Unf=OtherCon []] =
- NO_CCS GHC.Types.TrNameS! ["main"#];
+ NO_CCS GHC.Types.TrNameS! [Noinline01.$trModule4];
+
+Noinline01.$trModule2 :: GHC.Prim.Addr#
+[GblId, Caf=NoCafRefs, Unf=OtherCon []] =
+ "Noinline01"#;
Noinline01.$trModule1 :: GHC.Types.TrName
[GblId, Caf=NoCafRefs, Str=m1, Unf=OtherCon []] =
- NO_CCS GHC.Types.TrNameS! ["Noinline01"#];
+ NO_CCS GHC.Types.TrNameS! [Noinline01.$trModule2];
Noinline01.$trModule :: GHC.Types.Module
[GblId, Caf=NoCafRefs, Str=m, Unf=OtherCon []] =
- NO_CCS GHC.Types.Module! [Noinline01.$trModule2
+ NO_CCS GHC.Types.Module! [Noinline01.$trModule3
Noinline01.$trModule1];
@@ -34,17 +42,25 @@ Noinline01.g :: GHC.Types.Bool
[GblId] =
\u [] Noinline01.f GHC.Types.False;
-Noinline01.$trModule2 :: GHC.Types.TrName
+Noinline01.$trModule4 :: GHC.Prim.Addr#
+[GblId, Caf=NoCafRefs, Unf=OtherCon []] =
+ "main"#;
+
+Noinline01.$trModule3 :: GHC.Types.TrName
[GblId, Caf=NoCafRefs, Str=m1, Unf=OtherCon []] =
- NO_CCS GHC.Types.TrNameS! ["main"#];
+ NO_CCS GHC.Types.TrNameS! [Noinline01.$trModule4];
+
+Noinline01.$trModule2 :: GHC.Prim.Addr#
+[GblId, Caf=NoCafRefs, Unf=OtherCon []] =
+ "Noinline01"#;
Noinline01.$trModule1 :: GHC.Types.TrName
[GblId, Caf=NoCafRefs, Str=m1, Unf=OtherCon []] =
- NO_CCS GHC.Types.TrNameS! ["Noinline01"#];
+ NO_CCS GHC.Types.TrNameS! [Noinline01.$trModule2];
Noinline01.$trModule :: GHC.Types.Module
[GblId, Caf=NoCafRefs, Str=m, Unf=OtherCon []] =
- NO_CCS GHC.Types.Module! [Noinline01.$trModule2
+ NO_CCS GHC.Types.Module! [Noinline01.$trModule3
Noinline01.$trModule1];