Commit bf80d6af authored by Ronny Wichers Schreur's avatar Ronny Wichers Schreur 🏢
Browse files

set attributes in heap to AVI_Empty to avoid using values in the heap from...

set attributes in heap to AVI_Empty to avoid using values in the heap from previous compilations (when caching is used)
parent 640ade95
...@@ -1110,7 +1110,7 @@ beautifyAttributes st ...@@ -1110,7 +1110,7 @@ beautifyAttributes st
convertTypeAlt :: Int ModuleIndex SymbolType -> BEMonad BETypeAltP convertTypeAlt :: Int ModuleIndex SymbolType -> BEMonad BETypeAltP
convertTypeAlt functionIndex moduleIndex symbolType convertTypeAlt functionIndex moduleIndex symbolType
= beautifyAttributes (symbolType) ==> \symbolType=:{st_result, st_attr_env, st_attr_vars} = beautifyAttributes (symbolType) ==> \symbolType=:{st_result, st_attr_env, st_attr_vars}
-> resetAttrNumbers -> resetAttrNumbers st_attr_vars
o` (beTypeAlt o` (beTypeAlt
(beNormalTypeNode (beFunctionSymbol functionIndex moduleIndex) (convertSymbolTypeArgs symbolType)) (beNormalTypeNode (beFunctionSymbol functionIndex moduleIndex) (convertSymbolTypeArgs symbolType))
(convertAnnotTypeNode st_result) (convertAnnotTypeNode st_result)
...@@ -1138,10 +1138,17 @@ convertTypeAlt functionIndex moduleIndex symbolType ...@@ -1138,10 +1138,17 @@ convertTypeAlt functionIndex moduleIndex symbolType
, ig_demanded:: !AttributeVar , ig_demanded:: !AttributeVar
} }
resetAttrNumbers :: *BackEndState -> *BackEndState resetAttrNumbers :: [AttributeVar] *BackEndState -> *BackEndState
resetAttrNumbers state resetAttrNumbers attrVars state=:{bes_attrHeap}
= {state & bes_attr_number = 0} = { state
& bes_attr_number = 0
, bes_attrHeap = foldSt resetAttrVar attrVars bes_attrHeap
}
where
resetAttrVar :: AttributeVar *AttrVarHeap -> *AttrVarHeap
resetAttrVar {av_info_ptr} attrHeap
= writePtr av_info_ptr AVI_Empty attrHeap
convertAttributeInequalities :: [InequalityGroup] -> BEMonad BEUniVarEquations convertAttributeInequalities :: [InequalityGroup] -> BEMonad BEUniVarEquations
convertAttributeInequalities inequalities convertAttributeInequalities inequalities
= sfoldr (beUniVarEquationsList o convertAttributeInequality) beNoUniVarEquations inequalities = sfoldr (beUniVarEquationsList o convertAttributeInequality) beNoUniVarEquations inequalities
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment