<html><head></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><br><div><div>On Jan 31, 2012, at 2:49 PM, David Greene wrote:</div><br class="Apple-interchange-newline"><blockquote type="cite"><div><br>Add some data structures to represent for loops.  These will be<br>referenced during object processing to do any needed iteration and<br>instantiation.<br></div></blockquote><div><br></div><div>- Don't add trailing whitespace.</div><div><br></div><div>- Clean up comments after cut/paste (ParseForeachDeclaration).</div><div><br></div><div>- Don't put the loop stack in RecordKeeper. It is a parse time data structure.</div><div><br></div><div><blockquote type="cite"><div><font class="Apple-style-span" color="#000000">struct ForeachLoop {</font></div><div><font class="Apple-style-span" color="#000000">  Record *Rec;          // Placeholder for body contents.</font></div></blockquote><br></div><div>MultiClass has 'Record Rec;', no pointer. Why the difference?</div><div><br></div><div><blockquote type="cite"><div><font class="Apple-style-span" color="#000000">  // Create a second member to hold the list value.  We know that</font></div><div><font class="Apple-style-span" color="#000000">  // CurRec is the foreach loop record so this won't conflict with</font></div><div><font class="Apple-style-span" color="#000000">  // anything.</font></div><div><font class="Apple-style-span" color="#000000">  ItemName = BinOpInit::get(BinOpInit::STRCONCAT, ItemName,</font></div><div><font class="Apple-style-span" color="#000000">                            StringInit::get("_List"),</font></div><div><font class="Apple-style-span" color="#000000">                            StringRecTy::get())->Fold(CurRec, 0);</font></div><div><font class="Apple-style-span" color="#000000">  ForeachListName = ItemName;</font></div></blockquote><br></div><div>Why store the list as a record field? Can't you just store a ListInit directly in ForEachLoop?</div><div><br></div><div>- What's DefPrototypes for? I don't see it used anywhere.</div><div><br></div><div>- The syntax in the documentation doesn't match the implementation and tests.</div><div><br></div><div>- Please avoid putting spurious records in RecordKeeper. It shouldn't be necessary to store unnamed loop and iteration records there.</div><div><br></div><div>When resubmitting, please squash everything into one patch.</div><div><br></div><div>/jakob</div><div><br></div></div></body></html>