Chromium Code Reviews
Descriptiondart2js cps: Add helpers for common IR manipulation.
This adds four helpers:
- InteriorExpression: remove, insertAbove, and insertBelow.
- Primitive: destroy.
As discussed elsewhere, using such helpers is a double-edged sword.
They make the code easier to read and write, but it's easy to end up
with helpers that look like they work for a particular purpose, but
actually don't because of slight variations in different use-cases.
These methods have a couple of pitfalls, like forgetting to unlink
references after a call to `remove`, or accidentally using the body
of an orphaned node. But these are generally caught quickly in
checked-mode so, it seems like it will be worth it.
BUG=
R=kmillikin@google.com
Committed: https://github.com/dart-lang/sdk/commit/85f25787834ec7b5c09ceb7f9d5a27196c0ad11b
Reverted: https://github.com/dart-lang/sdk/commit/e4536dd274adf9cd3c8835ecfce98d4b75b5990e
Committed: https://github.com/dart-lang/sdk/commit/808f5e2228df9c41a909fcc31c481334a14a1d2b
Patch Set 1 #Patch Set 2 : Add extra assertion #Patch Set 3 : Rebase #Patch Set 4 : Revert + Unrevert #Patch Set 5 : Bugfix #Patch Set 6 : Fix type annotation #
Messages
Total messages: 7 (2 generated)
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||