Skip to main content
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorEd Willink2016-05-05 10:00:54 +0000
committerEd Willink2016-05-05 13:32:16 +0000
commit5dc9863579b5458f19f4431e6ed3d9269d07e8bf (patch)
treef5c2a1e3b0817d09b37e620ce0317675e9748ab2
parente5a2424717d5a490ca89a3bbbcc7a1045fe5ccea (diff)
downloadorg.eclipse.qvtd-5dc9863579b5458f19f4431e6ed3d9269d07e8bf.tar.gz
org.eclipse.qvtd-5dc9863579b5458f19f4431e6ed3d9269d07e8bf.tar.xz
org.eclipse.qvtd-5dc9863579b5458f19f4431e6ed3d9269d07e8bf.zip
[486722] Avoid spurious call trre nesting
-rw-r--r--plugins/org.eclipse.qvtd.compiler/src/org/eclipse/qvtd/compiler/internal/qvtp2qvts/CallTreeBuilder.java28
1 files changed, 23 insertions, 5 deletions
diff --git a/plugins/org.eclipse.qvtd.compiler/src/org/eclipse/qvtd/compiler/internal/qvtp2qvts/CallTreeBuilder.java b/plugins/org.eclipse.qvtd.compiler/src/org/eclipse/qvtd/compiler/internal/qvtp2qvts/CallTreeBuilder.java
index 3eb7e3c08..6feb45ff7 100644
--- a/plugins/org.eclipse.qvtd.compiler/src/org/eclipse/qvtd/compiler/internal/qvtp2qvts/CallTreeBuilder.java
+++ b/plugins/org.eclipse.qvtd.compiler/src/org/eclipse/qvtd/compiler/internal/qvtp2qvts/CallTreeBuilder.java
@@ -131,19 +131,37 @@ public class CallTreeBuilder
assert topOfStack != null;
@NonNull Region commonRegion = getCommonRegion(topOfStack, region);
//
- // If the caller is a recursion, ensure the the caller's caller is on the stack.
+ // Must identify the call point at which all source values are available.
//
-/* for (@NonNull DatumConnection incomingConnection1 : getIncomingConnections(region)) { // FIXME passed
- for (@NonNull Region sourceRegion1 : getSourceRegions(incomingConnection1)) {
+ // The 'easy' safe inefficient case is the caller of the common region of all sources.
+ //
+ // FIXME: The optimized case for a single-headed region ensures that for all candidate sources for the head,
+ // the to-one region from the head's source covers all the required producer-consumer dependencies.
+ //
+ // Obsolete special case: If the caller is a recursion, ensure the the caller's caller is on the stack.
+ //
+/* for (@NonNull DatumConnection incomingConnection1 : scheduleCache.getIncomingConnections(region)) { // FIXME passed
+ for (@NonNull Region sourceRegion1 : scheduleCache.getSourceRegions(incomingConnection1)) {
if (sourceRegion1.getLoopingConnections().size() > 0) {
- for (@NonNull DatumConnection incomingConnection2 : getIncomingConnections(sourceRegion1)) { // FIXME passed
- for (@NonNull Region sourceRegion2 : getSourceRegions(incomingConnection2)) {
+ for (@NonNull DatumConnection incomingConnection2 : scheduleCache.getIncomingConnections(sourceRegion1)) { // FIXME passed
+ for (@NonNull Region sourceRegion2 : scheduleCache.getSourceRegions(incomingConnection2)) {
commonRegion = getCommonRegion(commonRegion, sourceRegion2);
}
}
}
}
} */
+ for (@NonNull DatumConnection incomingConnection1 : scheduleCache.getIncomingConnections(region)) {
+ for (@NonNull Region sourceRegion1 : scheduleCache.getSourceRegions(incomingConnection1)) {
+// if (sourceRegion1.getLoopingConnections().size() > 0) {
+ for (@NonNull DatumConnection incomingConnection2 : scheduleCache.getIncomingConnections(sourceRegion1)) {
+ for (@NonNull Region sourceRegion2 : scheduleCache.getSourceRegions(incomingConnection2)) {
+ commonRegion = getCommonRegion(commonRegion, sourceRegion2);
+ }
+ }
+// }
+ }
+ }
while (!callStack.contains(commonRegion)) {
commonRegion = getMinimumDepthParentRegion(commonRegion);
assert commonRegion != null;

Back to the top