Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 352914 - Avoid unnecessary decapsulation accessors for callout to field
Summary: Avoid unnecessary decapsulation accessors for callout to field
Status: VERIFIED FIXED
Alias: None
Product: Objectteams
Classification: Tools
Component: OTJ (show other bugs)
Version: 2.0   Edit
Hardware: Other Linux
: P3 enhancement (vote)
Target Milestone: 2.0.1   Edit
Assignee: Stephan Herrmann CLA
QA Contact:
URL:
Whiteboard: Also released in 2.1 M1
Keywords:
Depends on:
Blocks:
 
Reported: 2011-07-22 17:05 EDT by Stephan Herrmann CLA
Modified: 2011-08-21 11:11 EDT (History)
0 users

See Also:


Attachments
partial implementation (17.71 KB, patch)
2011-07-22 17:24 EDT, Stephan Herrmann CLA
no flags Details | Diff
additional fix (4.03 KB, patch)
2011-07-22 18:53 EDT, Stephan Herrmann CLA
no flags Details | Diff
additional fix with test (3) (5.03 KB, patch)
2011-07-23 06:51 EDT, Stephan Herrmann CLA
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Stephan Herrmann CLA 2011-07-22 17:05:16 EDT
This came up during work on otredyn:

Callout-to-field is currently implemented with the indirection
of a wrapper method in the base class (generated by the otre) 
whose purpose is to realize decapsulation.

If the field is normally visible to the role class this wrapper is not
needed and should thus be avoided.
Comment 1 Stephan Herrmann CLA 2011-07-22 17:24:53 EDT
Created attachment 200226 [details]
partial implementation

This patch implements the requested optimization for "get" c-t-f.

The change spreads out because several locations assumed that a base method
always exists for all method bindings, which is no longer true.

One test case now reports a more precise error (check was buggy).

TODO: include "set" c-t-f in the optimization.
Comment 2 Stephan Herrmann CLA 2011-07-22 18:53:38 EDT
Created attachment 200230 [details]
additional fix

Fixing previous patch for static base fields (was: build failure).
Comment 3 Stephan Herrmann CLA 2011-07-23 06:51:46 EDT
Created attachment 200233 [details]
additional fix with test (3)

Fixing previous patch for invisible base class (was: build failure).
Comment 4 Stephan Herrmann CLA 2011-08-02 05:38:58 EDT
All tests pass with the three patches applied.
Comment 5 Stephan Herrmann CLA 2011-08-17 12:23:59 EDT
Verified for 2.0.1 using build 201108160141.