Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 321651 - [compiler][otre] array-translations (lifting/lowering) in nested team not properly translated
Summary: [compiler][otre] array-translations (lifting/lowering) in nested team not pro...
Status: VERIFIED FIXED
Alias: None
Product: Objectteams
Classification: Tools
Component: OTJ (show other bugs)
Version: 0.7   Edit
Hardware: Other Linux
: P3 normal (vote)
Target Milestone: 0.7.1   Edit
Assignee: Stephan Herrmann CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-08-03 16:19 EDT by Stephan Herrmann CLA
Modified: 2010-09-23 08:56 EDT (History)
0 users

See Also:


Attachments
fixes (13.05 KB, patch)
2010-08-03 16:28 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 2010-08-03 16:19:04 EDT
When a nested team performs lowering/lifting for arrays of its (nested) role,
both compiler and otre currently fail, mainly because lifting/lowering
requires the use of an appropriate team-method, but those methods are searched
for in the enclosing team, rather in the nested team itself.

Although r671 already fixed an easy issue (witnessed by test2215_arrayLifting6)
additional test test2215_arrayLifting7() shows more problems in this area.
Comment 1 Stephan Herrmann CLA 2010-08-03 16:28:15 EDT
Created attachment 175808 [details]
fixes

Various fixes as needed for test2215_arrayLifting7():

* callin-wrapper didn't find lift method because search started at the
  enclosing team
  (rather than expecting role to be a team with lift-methods, too)

* array-lowering of base-call result didn't find a suitable call target,
  because lowering as inserted by InsertTypeAdjustmentsVisitor didn't have
  enough context (recall that callin wrappers are out off its scope).
  * insert an explicit PotentialLowerExpression
  * feed the appropriate team expression into the PotentialLowerExpression
    and from there into ArrayLowering

* array-lowering in a nested team should resolve to the interface method for 
  easier use at the call-site

* OTRE adjustment for base-call surrogates 
  (these seem to be independent of the issue of arrays):
  * select this or this$n
  * use the correct receiver type for the lifting call.
Comment 2 Stephan Herrmann CLA 2010-08-03 16:29:49 EDT
Patch has been committed as r672, r673.
Comment 3 Stephan Herrmann CLA 2010-08-03 17:53:57 EDT
r674 fixes a regression in test1129_nestedCallin2() caused by this patch:
More work was needed to determine the correct receiver for array-lowering
of a callin result.
Comment 4 Stephan Herrmann CLA 2010-09-23 08:56:27 EDT
Verified using I201009211735