dillon1000/react
Commit
Browse files Remove unnecessary temporary in tests
We previously didn't support ternaries whose value was unused, so we had an extraneous temporary and console.log call to ensure the value counted as used. We now special-case ternary/conditional expressions which are in an ExpressionStatement to not prune them, so the temporary and log are now unnecessary.
Changed paths12 files
First-parent comparisoncompiler/forget/src/__tests__/fixtures/compiler/ssa-renaming-ternary-destruction-with-mutation.expect.md ModifiedM compiler/forget/src/__tests__/fixtures/compiler/ssa-renaming-ternary-destruction-with-mutation.js ModifiedM compiler/forget/src/__tests__/fixtures/compiler/ssa-renaming-ternary-destruction.expect.md ModifiedM compiler/forget/src/__tests__/fixtures/compiler/ssa-renaming-ternary-destruction.js ModifiedM compiler/forget/src/__tests__/fixtures/compiler/ssa-renaming-ternary-with-mutation.expect.md ModifiedM compiler/forget/src/__tests__/fixtures/compiler/ssa-renaming-ternary-with-mutation.js ModifiedM compiler/forget/src/__tests__/fixtures/compiler/ssa-renaming-ternary.expect.md ModifiedM compiler/forget/src/__tests__/fixtures/compiler/ssa-renaming-ternary.js ModifiedM compiler/forget/src/__tests__/fixtures/compiler/ssa-renaming-unconditional-ternary-with-mutation.expect.md ModifiedM compiler/forget/src/__tests__/fixtures/compiler/ssa-renaming-unconditional-ternary-with-mutation.js ModifiedM compiler/forget/src/__tests__/fixtures/compiler/ssa-renaming-unconditional-ternary.expect.md ModifiedM compiler/forget/src/__tests__/fixtures/compiler/ssa-renaming-unconditional-ternary.js ModifiedPatch
Files changed
Rendering syntax-highlighted changes…