Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Found the offending code that was causing segfaults, it relates colle…

…cting function definitions from inlined code. It has been commented out to provide a working version of everything to start figuring out the bug now that it has been isolated.
  • Loading branch information...
commit 274f9fcea6655ecd5b209d68d57802e964645533 1 parent f3409d9
rtharper rtharper authored
Showing with 6 additions and 6 deletions.
  1. +6 −6 EHC/src/ehc/Core/Trf/Inline.cag
12 EHC/src/ehc/Core/Trf/Inline.cag
View
@@ -28,10 +28,11 @@ ATTR AllCodeNT [ funcMp : FuncMp convMp : ConvMp | | inlined : SELF ]
SEM CExpr
| Let body.funcMp = if @categ == acoreBindcategRec
- then @lhs.funcMp `Map.difference` @binds.gathFuncMp
- else @binds.gathFuncMp `Map.union` @lhs.funcMp
+ then @lhs.funcMp {-`Map.difference` @binds.gathFuncMp-}
+ else {-@binds.gathFuncMp `Map.union`-} @lhs.funcMp
| Let binds.funcMp = @lhs.funcMp
+{-
ATTR CBindL [ | | gathFuncMp USE {`Map.union`} {Map.empty} : FuncMp ]
ATTR CBind [ | | gathFuncMp : FuncMp ]
@@ -46,13 +47,12 @@ SEM CBindAspect
SEM CBind
| Bind lhs.gathFuncMp = if not (isNothing (Map.lookup @nm @lhs.convMp))
then trace ("Not adding function " ++ show @nm ++ "because it was a conversion function") $ Map.empty
- else trace ("Adding function " ++ show @nm ++ "to the funcMp") $ Map.singleton @nm $ head @bindAspects.gathExpr
-
-
+ else {-trace ("Adding function " ++ show @nm ++ "to the funcMp") $-} Map.singleton @nm $ head @bindAspects.gathExpr
+-}
SEM CExpr
| App lhs.inlined = if @func.isInlinable
- then trace ("Inlining " ++ show @func.inlined) $ inline @lhs.funcMp @lhs.convMp (apply @func.inlined @arg.inlined)
+ then {- trace ("Inlining " ++ show @func.inlined) $ -} inline @lhs.funcMp @lhs.convMp $ (apply @func.inlined @arg.inlined)
else acoreApp1 @func.inlined @arg.inlined
| Var lhs.inlined = if @isInlinable
then fromJust (Map.lookup (acbrefNm @ref) @lhs.funcMp)
Please sign in to comment.
Something went wrong with that request. Please try again.