<html><head></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><br><div><div>On Jan 18, 2010, at 1:23 PM, Duncan Sands wrote:</div><br class="Apple-interchange-newline"><blockquote type="cite"><div>Hi Stuart,<br><br><blockquote type="cite">+// Starting at the 'desired' BLOCK, recursively walk back to the<br></blockquote><blockquote type="cite">+// 'grand' context, and return pushing regions to make 'desired' the<br></blockquote><blockquote type="cite">+// current context.  Assumes 'grand' is a<br></blockquote><blockquote type="cite">+// parent/grandparent/great-grandparent of 'desired'.  'desired'<br></blockquote><br>how about: "is an ancestor of 'desired'"?<br></div></blockquote><div><br></div><div>Duh.  Of course.  Agreed; I'll fix.</div><br><blockquote type="cite"><div><br><blockquote type="cite">+  if (grand != desired)<br></blockquote><blockquote type="cite">+    push_regions(BLOCK_SUPERCONTEXT(desired), grand);<br></blockquote><br>This shows that this routine can be used with grand == desired, which<br>is inconsistent with the comment above about grand being a parent of<br>desired (or older).<br><br><blockquote type="cite">+<br></blockquote><blockquote type="cite">+  void push_regions(tree_node *desired, tree_node *grand);<br></blockquote><br>The comment describing this function is missing here.<br><br><blockquote type="cite">+  void change_regions(tree_node *desired, tree_node *grand);<br></blockquote><br>Likewise.<br><br><blockquote type="cite">+typedef std::set<union tree_node *> treeset;<br></blockquote><br>Here you use "union tree_node *", while...<br><br><blockquote type="cite">+  std::set<tree_node*> seen_blocks;<br></blockquote><br>... here you do not, which is a bit inconsistent.  Also, why not<br>use "treeset" here when declaring seen_blocks?<font class="Apple-style-span" color="#000000"><font class="Apple-style-span" color="#144FAE"><br></font></font></div></blockquote><br></div><div>Generally Agreed to all of the above.  I'll fix.</div><div><br></div><div>Thank you,</div><div><br></div><div>stuart</div></body></html>