Download
Getting Started
Members
Projects
Community
Marketplace
Events
Planet Eclipse
Newsletter
Videos
Participate
Report a Bug
Forums
Mailing Lists
Wiki
IRC
How to Contribute
Working Groups
Automotive
Internet of Things
LocationTech
Long-Term Support
PolarSys
Science
OpenMDM
More
Community
Marketplace
Events
Planet Eclipse
Newsletter
Videos
Participate
Report a Bug
Forums
Mailing Lists
Wiki
IRC
How to Contribute
Working Groups
Automotive
Internet of Things
LocationTech
Long-Term Support
PolarSys
Science
OpenMDM
Toggle navigation
Bugzilla – Attachment 190384 Details for
Bug 326950
[compiler][null]Do not optimize code generation based on static analysis (dead code)
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
Log In
[x]
|
Terms of Use
|
Copyright Agent
[patch]
updated fix v2.0
patch326950_2.txt (text/plain), 2.68 KB, created by
Ayushman Jain
on 2011-03-04 08:55:55 EST
(
hide
)
Description:
updated fix v2.0
Filename:
MIME Type:
Creator:
Ayushman Jain
Created:
2011-03-04 08:55:55 EST
Size:
2.68 KB
patch
obsolete
>### Eclipse Workspace Patch 1.0 >#P org.eclipse.jdt.core >Index: compiler/org/eclipse/jdt/internal/compiler/ast/IfStatement.java >=================================================================== >RCS file: /cvsroot/eclipse/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/IfStatement.java,v >retrieving revision 1.70 >diff -u -r1.70 IfStatement.java >--- compiler/org/eclipse/jdt/internal/compiler/ast/IfStatement.java 4 Mar 2011 12:41:21 -0000 1.70 >+++ compiler/org/eclipse/jdt/internal/compiler/ast/IfStatement.java 4 Mar 2011 13:51:36 -0000 >@@ -164,10 +164,7 @@ > if (hasThenPart) { > BranchLabel falseLabel = null; > // generate boolean condition only if needed >- if (((this.bits & ASTNode.IsElseStatementUnreachable) != 0) || >- (cst != Constant.NotAConstant && cst.booleanValue() == true)) { >- // No need to generate if condition statement when we know that only the then action >- // will be executed >+ if (cst != Constant.NotAConstant && cst.booleanValue() == true) { > this.condition.generateCode(currentScope, codeStream, false); > } else { > this.condition.generateOptimizedBoolean( >@@ -206,8 +203,7 @@ > } > } else if (hasElsePart) { > // generate boolean condition only if needed >- if (((this.bits & ASTNode.IsThenStatementUnreachable) != 0) || >- (cst != Constant.NotAConstant && cst.booleanValue() == false)) { >+ if (cst != Constant.NotAConstant && cst.booleanValue() == false) { > // No need to generate if condition statement when we know that only the else action > // will be executed > this.condition.generateCode(currentScope, codeStream, false); >Index: compiler/org/eclipse/jdt/internal/compiler/ast/Statement.java >=================================================================== >RCS file: /cvsroot/eclipse/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/Statement.java,v >retrieving revision 1.51 >diff -u -r1.51 Statement.java >--- compiler/org/eclipse/jdt/internal/compiler/ast/Statement.java 22 Jan 2011 23:39:25 -0000 1.51 >+++ compiler/org/eclipse/jdt/internal/compiler/ast/Statement.java 4 Mar 2011 13:51:36 -0000 >@@ -72,7 +72,8 @@ > // complaintLevel = 0 if was reachable up until now, 1 if fake reachable (deadcode), 2 if fatal unreachable (error) > public int complainIfUnreachable(FlowInfo flowInfo, BlockScope scope, int previousComplaintLevel) { > if ((flowInfo.reachMode() & FlowInfo.UNREACHABLE) != 0) { >- this.bits &= ~ASTNode.IsReachable; >+ if ((flowInfo.reachMode() & FlowInfo.UNREACHABLE_OR_DEAD) != 0) >+ this.bits &= ~ASTNode.IsReachable; > if (flowInfo == FlowInfo.DEAD_END) { > if (previousComplaintLevel < COMPLAINED_UNREACHABLE) { > scope.problemReporter().unreachableCode(this);
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 326950
:
189182
|
189809
|
190188
|
190384
|
190394
|
190438
|
190473