From c2f293d7d4ff23ddfa636543802eff237c184b11 Mon Sep 17 00:00:00 2001 From: David Jones Date: Tue, 14 Oct 1997 13:54:48 +0100 Subject: [PATCH] Summaries should be computed Copied from Perforce Change: 18879 ServerID: perforce.ravenbrook.com --- mps/src/root.c | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/mps/src/root.c b/mps/src/root.c index 38cb864d7b8..f2667ba037a 100644 --- a/mps/src/root.c +++ b/mps/src/root.c @@ -1,6 +1,6 @@ /* impl.c.root: ROOT IMPLEMENTATION * - * $HopeName: MMsrc!root.c(trunk.23) $ + * $HopeName: MMsrc!root.c(trunk.24) $ * Copyright (C) 1997 The Harlequin Group Limited. All rights reserved. * * .scope: This is the implementation of the root datatype. @@ -10,7 +10,7 @@ #include "mpm.h" -SRCID(root, "$HopeName: MMsrc!root.c(trunk.23) $"); +SRCID(root, "$HopeName: MMsrc!root.c(trunk.24) $"); /* RootVarCheck -- check a Root union discriminator @@ -265,10 +265,13 @@ Res RootScan(ScanState ss, Root root) if(TraceSetInter(root->grey, ss->traces) == TraceSetEMPTY) return ResOK; + AVER(ScanStateSummary(ss) == RefSetEMPTY); + switch(root->var) { case RootTABLE: res = TraceScanArea(ss, root->the.table.base, root->the.table.limit); - if(res != ResOK) return res; + if(res != ResOK) + return res; break; case RootTABLE_MASKED: @@ -276,7 +279,8 @@ Res RootScan(ScanState ss, Root root) root->the.tableMasked.base, root->the.tableMasked.limit, root->the.tableMasked.mask); - if(res != ResOK) return res; + if(res != ResOK) + return res; break; case RootFUN: @@ -304,6 +308,8 @@ Res RootScan(ScanState ss, Root root) } root->grey = TraceSetDiff(root->grey, ss->traces); + root->summary = ScanStateSummary(ss); + EVENT_PWW(RootScan, root, ss->traces, ScanStateSummary(ss)); return ResOK; }