aboutsummaryrefslogtreecommitdiff
path: root/backend
diff options
context:
space:
mode:
authorronny2001-07-17 09:46:41 +0000
committerronny2001-07-17 09:46:41 +0000
commit1d3b6483161553bc620c1a98efe6a92241560a05 (patch)
tree19ee4e221590e9ca88a666e536c13e4a477181c0 /backend
parentassign correct selector kind to intermediate selections in nested updates (diff)
set attributes in heap to AVI_Empty to avoid using values in the heap from previous compilations (when caching is used)
git-svn-id: https://svn.cs.ru.nl/repos/clean-compiler/trunk@547 1f8540f1-abd5-4d5b-9d24-4c5ce8603e2d
Diffstat (limited to 'backend')
-rw-r--r--backend/backendconvert.icl17
1 files changed, 12 insertions, 5 deletions
diff --git a/backend/backendconvert.icl b/backend/backendconvert.icl
index 48a7866..99eeab4 100644
--- a/backend/backendconvert.icl
+++ b/backend/backendconvert.icl
@@ -1110,7 +1110,7 @@ beautifyAttributes st
convertTypeAlt :: Int ModuleIndex SymbolType -> BEMonad BETypeAltP
convertTypeAlt functionIndex moduleIndex symbolType
= beautifyAttributes (symbolType) ==> \symbolType=:{st_result, st_attr_env, st_attr_vars}
- -> resetAttrNumbers
+ -> resetAttrNumbers st_attr_vars
o` (beTypeAlt
(beNormalTypeNode (beFunctionSymbol functionIndex moduleIndex) (convertSymbolTypeArgs symbolType))
(convertAnnotTypeNode st_result)
@@ -1138,10 +1138,17 @@ convertTypeAlt functionIndex moduleIndex symbolType
, ig_demanded:: !AttributeVar
}
-resetAttrNumbers :: *BackEndState -> *BackEndState
-resetAttrNumbers state
- = {state & bes_attr_number = 0}
-
+resetAttrNumbers :: [AttributeVar] *BackEndState -> *BackEndState
+resetAttrNumbers attrVars state=:{bes_attrHeap}
+ = { 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 inequalities
= sfoldr (beUniVarEquationsList o convertAttributeInequality) beNoUniVarEquations inequalities