Difference: CS255Spring09Discussions (6 vs. 7)

Revision 72009-02-26 - BinBao

Line: 1 to 1
 
META TOPICPARENT name="CS255Spring09"

CS255/455 Spring 2009 Discussion Board

Last year's discussion page was a success for people to discuss and share the project experience, especially their experience with GCC. So this year, we are going to continue with the discussion tradition. This page is intended for anyone to post questions and everyone to answer them. Please insert questions at the beginning and separate each question with a horizontal rule separator. For other formatting instructions read the answer to this question.


Changed:
<
<
Q: In the intermediate language, can we assume that in an OpExpr, the operands are always either VarAcc or Const, i.e. expressions are not arbitrarily nested?
>
>
Q: Not having access to a nodes children array can be annoying. If nothing else, and method that returns an iterator or children's length should be added in the next version.

A: The children array is readable through the clone. One can get the size by using node.children_copy.length and the index of a child by node.children_copy.index(child).


Q: In Project Part2, Tasks 2 and 3 would have been much easier if I could have directly modified the id field.

A: The id and children fields are read-only so to protect the integrity of the Ast node. By design the way to change a node is to create a new node and replace the old node.


Q: In the intermediate language, can we assume that in an OpExpr, the operands are always either VarAcc or Const, i.e. expressions are not arbitrarily nested?
  A: Based on the form of gimplified statements, yes, you can make that assumption to simplify your implementation.
 
This site is powered by the TWiki collaboration platform Powered by PerlCopyright © 2008-2017 by the contributing authors. All material on this collaboration platform is the property of the contributing authors.
Ideas, requests, problems regarding URCS? Send feedback