Summary: | Compiler generates unnecessary byte codes | ||||||
---|---|---|---|---|---|---|---|
Product: | [Eclipse Project] JDT | Reporter: | Andreas Winter <andreas.winter> | ||||
Component: | Core | Assignee: | Olivier Thomann <Olivier_Thomann> | ||||
Status: | VERIFIED FIXED | QA Contact: | |||||
Severity: | normal | ||||||
Priority: | P3 | CC: | andreas.winter | ||||
Version: | 2.1 | ||||||
Target Milestone: | 2.1.1 | ||||||
Hardware: | PC | ||||||
OS: | Windows 2000 | ||||||
Whiteboard: | |||||||
Attachments: |
|
Description
Andreas Winter
2003-05-08 10:39:53 EDT
The reason is that we no longer consider null has a constant. This case could still be optimized. I will investigate. Created attachment 4825 [details]
Fix proposal
Philippe, I attached a patch that optimizes this case. We now generate the same
bytecodes than jikes. javac 1.4.1_02 or 1.4.2b21 still generate the whole array
initializer. Let me know if you want me to release it.
Please release this patch. Indeed, I forgot about this codegen optimization when removing null constant expressions. Olivier, also backport it to 2.1 maintenance stream. Fixed and released in HEAD stream. Backported to 2.1 maintenance stream. Regression test added. Verified. |