Skip to content

Improve dead code analysis #12356

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
stevemessick opened this issue Aug 9, 2013 · 2 comments
Closed

Improve dead code analysis #12356

stevemessick opened this issue Aug 9, 2013 · 2 comments
Assignees
Labels
closed-as-intended Closed as the reported issue is expected behavior legacy-area-analyzer Use area-devexp instead. type-enhancement A request for a change that isn't a bug

Comments

@stevemessick
Copy link
Contributor

The editor is able to detect that anything after the || in an expression such as "true || somethingElse" is dead code, but not in the case of "somethingElse || true." Not terribly important, perhaps, but an interesting failure to detect that case.
////////////////////////////////////////////////////////////////////////////////////
Editor: 0.6.15_r25822 (2013-08-06)
OS: Linux - amd64 (3.2.5-gg1236)
JVM: 1.7.0-google-v5

projects: 5

open dart files: 21

auto-run pub: false
localhost resolves to: 127.0.0.1
mem max/total/free: 1778 / 1343 / 527 MB
thread count: 47
index: 1067880 relationships in 227842 keys in 1788 sources

SDK installed: true
Dartium installed: true
analysis engine: new

@bwilkerson
Copy link
Member

Set owner to @jwren.
Removed Type-Defect label.
Added Type-Enhancement label.

@jwren
Copy link
Member

jwren commented Sep 11, 2013

The original code had this implemented, but it was commented out. See DeadCodeVerifier.visitBinaryExpression. The reason that it was removed was because the "true" part of "somethingElse || true" is not dead code, it will be executed. That said, it is pointless code, ... but not dead code.

If this inconsistency nags users we can always change it back for consistency.


Added AsDesigned label.

@stevemessick stevemessick added Type-Enhancement legacy-area-analyzer Use area-devexp instead. closed-as-intended Closed as the reported issue is expected behavior labels Sep 11, 2013
@stevemessick stevemessick added this to the Later milestone Sep 11, 2013
@kevmoo kevmoo added type-enhancement A request for a change that isn't a bug and removed type-enhancement labels Mar 1, 2016
This issue was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
closed-as-intended Closed as the reported issue is expected behavior legacy-area-analyzer Use area-devexp instead. type-enhancement A request for a change that isn't a bug
Projects
None yet
Development

No branches or pull requests

4 participants