Bug 247612 - [compiler] Compiler could avoid allocating field bindings for receiver type change
Summary: [compiler] Compiler could avoid allocating field bindings for receiver type c...
Status: VERIFIED FIXED
Alias: None
Product: JDT
Classification: Eclipse Project
Component: Core (show other bugs)
Version: 3.4   Edit
Hardware: PC Windows XP
: P3 enhancement (vote)
Target Milestone: 3.5 M3   Edit
Assignee: Philipe Mulet CLA
QA Contact:
URL:
Whiteboard:
Keywords: performance
Depends on:
Blocks:
 
Reported: 2008-09-17 04:58 EDT by Philipe Mulet CLA
Modified: 2008-10-28 13:08 EDT (History)
0 users

See Also:


Attachments
In progress state (95.10 KB, patch)
2008-09-19 10:31 EDT, Philipe Mulet CLA
no flags Details | Diff
More advanced patch (168.11 KB, patch)
2008-09-24 08:37 EDT, Philipe Mulet CLA
no flags Details | Diff
Improved patch (170.87 KB, patch)
2008-09-24 13:11 EDT, Philipe Mulet CLA
no flags Details | Diff
Improved patch 2 (178.78 KB, patch)
2008-09-25 03:47 EDT, Philipe Mulet CLA
no flags Details | Diff
Improved patch 3 (200.49 KB, patch)
2008-09-25 10:58 EDT, Philipe Mulet CLA
no flags Details | Diff
Proposed patch (200.37 KB, patch)
2008-09-25 13:05 EDT, Philipe Mulet CLA
no flags Details | Diff
Better patch (204.61 KB, patch)
2008-09-25 17:22 EDT, Philipe Mulet CLA
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Philipe Mulet CLA 2008-09-17 04:58:54 EDT
Build 3.5M2

Follow-up of bug 247292, for field specific scenario.

This issue has existed since day 1. The code generation relies on a field
binding to tell its constant pool declaring class. This forces the compiler to
instantiate a new binding each time the receiver type must be used instead of
the target field declaring class.
Comment 1 Philipe Mulet CLA 2008-09-17 05:02:03 EDT
Once this is under control: SourceTypeBinding#RECEIVER_TYPE_EMUL should be discarded and SourceTypeBinding#MAX_SYNTHETICS reduced by one.
Comment 2 Philipe Mulet CLA 2008-09-17 06:20:33 EDT
Also should discard corresponding #codegenBinding slots
Comment 3 Philipe Mulet CLA 2008-09-19 06:34:41 EDT
Will also take care of issue raised in bug 128563#c10 given the new support (see InnerEmulationTest#test157)
Comment 4 Philipe Mulet CLA 2008-09-19 10:31:44 EDT
Created attachment 113015 [details]
In progress state

non functional patch
Comment 5 Philipe Mulet CLA 2008-09-24 08:37:23 EDT
Created attachment 113351 [details]
More advanced patch
Comment 6 Philipe Mulet CLA 2008-09-24 13:11:37 EDT
Created attachment 113390 [details]
Improved patch
Comment 7 Philipe Mulet CLA 2008-09-25 03:47:11 EDT
Created attachment 113439 [details]
Improved patch 2
Comment 8 Philipe Mulet CLA 2008-09-25 10:58:02 EDT
Created attachment 113465 [details]
Improved patch 3

still having issues in eval support
Comment 9 Philipe Mulet CLA 2008-09-25 13:05:07 EDT
Created attachment 113490 [details]
Proposed patch
Comment 10 Philipe Mulet CLA 2008-09-25 17:22:05 EDT
Created attachment 113530 [details]
Better patch

Final version, also takes care of #fieldStore(...)
Comment 11 Philipe Mulet CLA 2008-09-26 06:40:01 EDT
Note to verifiers: it will be hard to assess this bug, since it is a rewrite of an existing functionality. Need to check source code, for the absence of SourceTypeBinding.getUpdateFieldBinding(...) to check we are no longer constructing these bindings.

Numbers from a performance run should also demonstrate the win.

Released for 3.5M3
Comment 12 Philipe Mulet CLA 2008-09-30 09:32:04 EDT
re: comment 3
Issue got forked into bug 249107
Comment 13 Kent Johnson CLA 2008-10-28 13:08:11 EDT
Verified for 3.5M3 using I20081026-2000 build.