Commit 143c12db authored by Axel Simon's avatar Axel Simon

try to be more precise

parent 32a8878a
......@@ -1023,11 +1023,6 @@ structure C1 = struct
val s = registerSymbol (stateSym, s)
val s = foldl registerSymbol s (map getDeclName ds)
val funs = map (emitDecl s) ds
val recordMapping = case !(#stateType s) of
RECORDvtype (_,fs) =>
AtomMap.insert (#recordMapping s, genRecSignature fs,
Atom.atom "monad")
| _ => #recordMapping s
val s = {
names = #names s,
prefix = #prefix s,
......@@ -1039,7 +1034,7 @@ structure C1 = struct
constrs = #constrs s,
closureToFun = #closureToFun s,
allocFuncs = #allocFuncs s,
recordMapping = recordMapping,
recordMapping = #recordMapping s,
preDeclEmit = #preDeclEmit s,
stateType = #stateType s
} : state
......
......@@ -1096,7 +1096,7 @@ structure TypeRefinement = struct
...
}) = decl
in
lub (s,symType s sym, visitCall s (vtypeToStype s t, es))
symType s sym
end
| visitExp s (PRIexp (SETSTATEprim,_, [UPDATEexp (rs,_,fs,PRIexp (GETSTATEprim,_,[]))])) =
let
......@@ -1677,7 +1677,7 @@ structure TypeRefinement = struct
origFields = fs,
stateSym = stateSym
}
fun visitDeclPrint state d = ((*debugOn:=(SymbolTable.toInt(getDeclName d)= ~1);*) (*TextIO.print ("type of writeRes : " ^ showSType (inlineSType state (symType state ((SymbolTable.unsafeFromInt 1045)))) ^ " at " ^ SymbolTable.getString(!SymbolTables.varTable, getDeclName d) ^ "\n");*) visitDecl state d)
fun visitDeclPrint state d = ((*debugOn:=(SymbolTable.toInt(getDeclName d)= 18570); TextIO.print ("type of XCHG args : " ^ showSType (inlineSType state (symType state ((SymbolTable.unsafeFromInt 18569)))) ^ " at " ^ SymbolTable.getString(!SymbolTables.varTable, getDeclName d) ^ "\n");*) visitDecl state d)
val _ = map (visitDeclPrint state) ds
(* unify the types of all records that have the same set of fields *)
val _ = mergeRecords state
......
Markdown is supported
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