Descriptiondart2js cps: Maintain parent pointers instead of recomputing them.
All passes must now preserve valid parent pointers. Several passes
already did this (or tried to do it).
The IR integrity checker can now check that parent pointers are valid.
This has caught a number of missing parent pointers assignments in
passes that otherwise tried to preserve them.
All node constructors now set parent pointers. This is very convenient
for simple transformations, but also a bit of a trap since updating a
field on an existing node does not update the parent pointer.
This is a pretty heavy-handed change. The main rationale for it are:
- The helpers methods require parent pointers, so they are more useful
when parent pointers are always set.
- The integrity checker can catch bogus parent pointers after passes
that have to maintain them anyway.
- The integrity checker is super slow, but this can finally be fixed
if it can assume parent pointers are valid (not part of this CL).
The IR visitors have been changed a bit to support a generic parent
visitor that does not have to implement every visit method.
The 'parent index' fields have been removed.
BUG=
R=kmillikin@google.com
Committed: https://github.com/dart-lang/sdk/commit/6cc9b435354ea4fe3796437e3cc7091f6a11de19
Committed: https://github.com/dart-lang/sdk/commit/d43d95aaa3a347fe51c78130c72cbc8ce93238f8
Patch Set 1 #
Total comments: 2
Patch Set 2 : Fix #
Total comments: 6
Patch Set 3 : Remove unnecessary code #Patch Set 4 : Rebase #Patch Set 5 : Parent pointer fix after merge #Patch Set 6 : Revert + Unrevert #Patch Set 7 : Fix imports #Patch Set 8 : Remove more unused imports #Patch Set 9 : Rebase #Messages
Total messages: 6 (1 generated)
|