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 189182 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]
proposed fix
patch326950.txt (text/plain), 4.60 KB, created by
Ayushman Jain
on 2011-02-17 09:01:18 EST
(
hide
)
Description:
proposed fix
Filename:
MIME Type:
Creator:
Ayushman Jain
Created:
2011-02-17 09:01:18 EST
Size:
4.60 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.69 >diff -u -r1.69 IfStatement.java >--- compiler/org/eclipse/jdt/internal/compiler/ast/IfStatement.java 12 Aug 2010 16:58:28 -0000 1.69 >+++ compiler/org/eclipse/jdt/internal/compiler/ast/IfStatement.java 17 Feb 2011 13:50:31 -0000 >@@ -1,5 +1,5 @@ > /******************************************************************************* >- * Copyright (c) 2000, 2010 IBM Corporation and others. >+ * Copyright (c) 2000, 2011 IBM Corporation and others. > * All rights reserved. This program and the accompanying materials > * are made available under the terms of the Eclipse Public License v1.0 > * which accompanies this distribution, and is available at >@@ -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,10 +203,7 @@ > } > } else if (hasElsePart) { > // generate boolean condition only if needed >- if (((this.bits & ASTNode.IsThenStatementUnreachable) != 0) || >- (cst != Constant.NotAConstant && cst.booleanValue() == false)) { >- // No need to generate if condition statement when we know that only the else action >- // will be executed >+ if (cst != Constant.NotAConstant && cst.booleanValue() == false) { > this.condition.generateCode(currentScope, codeStream, false); > } else { > this.condition.generateOptimizedBoolean( >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 17 Feb 2011 13:50:31 -0000 >@@ -72,7 +72,7 @@ > // 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; >+ //this.bits &= ~ASTNode.IsReachable; > if (flowInfo == FlowInfo.DEAD_END) { > if (previousComplaintLevel < COMPLAINED_UNREACHABLE) { > scope.problemReporter().unreachableCode(this); >Index: compiler/org/eclipse/jdt/internal/compiler/ast/TypeDeclaration.java >=================================================================== >RCS file: /cvsroot/eclipse/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/TypeDeclaration.java,v >retrieving revision 1.166 >diff -u -r1.166 TypeDeclaration.java >--- compiler/org/eclipse/jdt/internal/compiler/ast/TypeDeclaration.java 11 Feb 2011 14:55:06 -0000 1.166 >+++ compiler/org/eclipse/jdt/internal/compiler/ast/TypeDeclaration.java 17 Feb 2011 13:50:31 -0000 >@@ -633,8 +633,8 @@ > for (int i = 0, count = this.fields.length; i < count; i++) { > FieldDeclaration field = this.fields[i]; > if (field.isStatic()) { >- if ((staticFieldInfo.tagBits & FlowInfo.UNREACHABLE) != 0) >- field.bits &= ~ASTNode.IsReachable; >+// if ((staticFieldInfo.tagBits & FlowInfo.UNREACHABLE) != 0) >+// field.bits &= ~ASTNode.IsReachable; > > /*if (field.isField()){ > staticInitializerContext.handledExceptions = NoExceptions; // no exception is allowed jls8.3.2 >@@ -649,8 +649,8 @@ > staticFieldInfo = FlowInfo.initial(this.maxFieldCount).setReachMode(FlowInfo.UNREACHABLE); > } > } else { >- if ((nonStaticFieldInfo.tagBits & FlowInfo.UNREACHABLE) != 0) >- field.bits &= ~ASTNode.IsReachable; >+// if ((nonStaticFieldInfo.tagBits & FlowInfo.UNREACHABLE) != 0) >+// field.bits &= ~ASTNode.IsReachable; > > /*if (field.isField()){ > initializerContext.handledExceptions = NoExceptions; // no exception is allowed jls8.3.2
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