Partial rollback of
*** Reason for rollback ***
This is no longer necessary now that we calculate side effects correctly for 'await' nodes.
*** Original change description ***
Don't remove unused 'await' expressions
***
@@ -260,10 +260,6 @@ class PeepholeRemoveDeadCode extends AbstractPeepholeOptimization {
result = n;
}
break;
- case AWAIT:
- // If there's an 'await' node whose result isn't used, it's still important to wait
- // for the promise to resolve before running the next line, so don't remove it.
- break;
default:
if (!nodeTypeMayHaveSideEffects(n)) {
// This is the meat of this function. The node itself doesn't generate
