| Summary: | [compiler] cannot callin-bind a callout-defined method | ||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| Product: | [Tools] Objectteams | Reporter: | Stephan Herrmann <stephan.herrmann> | ||||||||||
| Component: | OTJ | Assignee: | Stephan Herrmann <stephan.herrmann> | ||||||||||
| Status: | VERIFIED FIXED | QA Contact: | |||||||||||
| Severity: | normal | ||||||||||||
| Priority: | P3 | ||||||||||||
| Version: | 0.7 | ||||||||||||
| Target Milestone: | 0.7.1 | ||||||||||||
| Hardware: | PC | ||||||||||||
| OS: | Linux | ||||||||||||
| Whiteboard: | |||||||||||||
| Attachments: |
|
||||||||||||
|
Description
Stephan Herrmann
Deferring post 0.7.0 due to potentially wide impact. Created attachment 174567 [details]
implementation part 1
This patch implements the change in compile order:
* integrate wrapTypesInMethodDeclSignature into
SourceTypeBinding.resolveTypesFor(MethodBinding) (unified for roles/teams).
(was: STATE_TYPES_ADJUSTED)
* defer some actions on parameter mappings until
MethodMappingImplementor.makeWrapperCallArguments:
- replace SingleNameReference("result") with ResultReference
(was: TransformStatementsVisitor for STATE_STATEMENTS_TRANSFORMED)
(using new class ReplaceResultReferenceVisitor extracted from
TransformStatementsVisitor)
- check replace for replace callin
(was: CallinMappingDeclaration.checkResultForReplace for
STATE_MAPPINGS_RESOLVED)
* resolve mappings and transform callouts from establishMethodsCreated()
(was: STATE_MAPPINGS_RESOLVED & STATE_MAPPINGS_TRANSFORMED)
The patch also contains some cleanup (resolve warnings)
TODO:
* should signature weakening be integrated into resolveTypesFor(..), too?
CopyInheritance.weakenTeamMethodSignatures(teamDecl)
CopyInheritance.weakenInterfaceSignatures(..)
CopyInheritance.weakenSignaturesFromSupers(..)
* remove STATE_MAPPINGS_RESOLVED
* move from Dependencies to proper locations:
- resolveMethodMappings, transformCallouts
Patch has already been committed for testing as r581.
Created attachment 174575 [details]
additional fixes
Fine-tuning compile order to fix regressions caused by the previous patch:
* consistently handle CALLIN_FLAG_BASE_SUPER_CALL during analyseCode:
* move setting the flag BaseCallMessageSend.analyseCode, this is not a
transformation and thus has nothing to do in TransformStatementsVisitor
* move checking against this flag to CallinMappingDeclaration.analyseDetails
(this method has been combined with checkBaseResult()):
this check needs the flag to be set and thus cannot be performed during
resolveMethodMappings().
* create base call surrogates between LATE_ATTRIBUTES_EVALUATED and RESOLVED:
needs inherited callin bindings but must happen before resolve()
Patch has already been committed for testing as r583.
Created attachment 174576 [details] additional fixes Cleanup: (In reply to comment #2) > TODO: > * remove STATE_MAPPINGS_RESOLVED Done. Also: - renamed STATE_MAPPINGS_TRANSFORMED to STATE_CALLINS_TRANSFORMED - reduce 2x ensureState(MAPPINGS_TRANSFORMED) to METHODS_CREATED > * move from Dependencies to proper locations: > - resolveMethodMappings, transformCallouts Done. A few helper methods have been extracted from establishMethodsCreated. Patch has already been committed for testing as r585. Created attachment 175129 [details]
additional fixes
Final fixes
- fine grained order: resolve callout, generate callout decl, resolve callin
- handle private shorthand callout:
- don't generate ifc-part,
- don't make class-part public
Test test1122_layeredTeams8 now passes.
With last patch committed as r638 this issue is now resolved. Verified using I201009211735 |