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 51035 Details for
Bug 159021
[compiler] Unused locals initialisation is optimized out when it is a single name reference
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
Log In
[x]
|
Terms of Use
|
Copyright Agent
[patch]
Proposed fix
patch_159021.txt (text/plain), 3.44 KB, created by
Olivier Thomann
on 2006-09-27 15:39:48 EDT
(
hide
)
Description:
Proposed fix
Filename:
MIME Type:
Creator:
Olivier Thomann
Created:
2006-09-27 15:39:48 EDT
Size:
3.44 KB
patch
obsolete
>### Eclipse Workspace Patch 1.0 >#P org.eclipse.jdt.core >Index: compiler/org/eclipse/jdt/internal/compiler/ast/SingleNameReference.java >=================================================================== >RCS file: /cvsroot/eclipse/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/SingleNameReference.java,v >retrieving revision 1.89 >diff -u -r1.89 SingleNameReference.java >--- compiler/org/eclipse/jdt/internal/compiler/ast/SingleNameReference.java 9 Feb 2006 16:01:30 -0000 1.89 >+++ compiler/org/eclipse/jdt/internal/compiler/ast/SingleNameReference.java 27 Sep 2006 19:43:08 -0000 >@@ -347,41 +347,39 @@ > codeStream.generateConstant(fieldConstant, implicitConversion); > } > } else { >- if (valueRequired) { >- boolean isStatic = fieldBinding.isStatic(); >- if (!isStatic) { >- if ((bits & DepthMASK) != 0) { >- ReferenceBinding targetType = currentScope.enclosingSourceType().enclosingTypeAt((bits & DepthMASK) >> DepthSHIFT); >- Object[] emulationPath = currentScope.getEmulationPath(targetType, true /*only exact match*/, false/*consider enclosing arg*/); >- codeStream.generateOuterAccess(emulationPath, this, targetType, currentScope); >- } else { >- generateReceiver(codeStream); >- } >- } >- // managing private access >- if ((syntheticAccessors == null) || (syntheticAccessors[READ] == null)) { >- if (isStatic) { >- codeStream.getstatic(fieldBinding); >- } else { >- codeStream.getfield(fieldBinding); >- } >+ boolean isStatic = fieldBinding.isStatic(); >+ if (!isStatic) { >+ if ((bits & DepthMASK) != 0) { >+ ReferenceBinding targetType = currentScope.enclosingSourceType().enclosingTypeAt((bits & DepthMASK) >> DepthSHIFT); >+ Object[] emulationPath = currentScope.getEmulationPath(targetType, true /*only exact match*/, false/*consider enclosing arg*/); >+ codeStream.generateOuterAccess(emulationPath, this, targetType, currentScope); > } else { >- codeStream.invokestatic(syntheticAccessors[READ]); >+ generateReceiver(codeStream); > } >- if (valueRequired) { >- if (this.genericCast != null) codeStream.checkcast(this.genericCast); >- codeStream.generateImplicitConversion(implicitConversion); >+ } >+ // managing private access >+ if ((syntheticAccessors == null) || (syntheticAccessors[READ] == null)) { >+ if (isStatic) { >+ codeStream.getstatic(fieldBinding); > } else { >- // could occur if !valueRequired but compliance >= 1.4 >- switch (fieldBinding.type.id) { >- case T_long : >- case T_double : >- codeStream.pop2(); >- break; >- default : >- codeStream.pop(); >- } >- } >+ codeStream.getfield(fieldBinding); >+ } >+ } else { >+ codeStream.invokestatic(syntheticAccessors[READ]); >+ } >+ if (valueRequired) { >+ if (this.genericCast != null) codeStream.checkcast(this.genericCast); >+ codeStream.generateImplicitConversion(implicitConversion); >+ } else { >+ // could occur if !valueRequired but compliance >= 1.4 >+ switch (fieldBinding.type.id) { >+ case T_long : >+ case T_double : >+ codeStream.pop2(); >+ break; >+ default : >+ codeStream.pop(); >+ } > } > } > break;
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 159021
:
51035
|
51055
|
51079