| Summary: | Need utility to break apart compound conditional expressions | ||
|---|---|---|---|
| Product: | z_Archived | Reporter: | Jeff Douglas <jeffdouglas> |
| Component: | EDT | Assignee: | Project Inbox <edt.compiler-inbox> |
| Status: | CLOSED FIXED | QA Contact: | |
| Severity: | critical | ||
| Priority: | P1 | CC: | greer, hjiyong, pharmon, svihovec |
| Version: | unspecified | ||
| Target Milestone: | --- | ||
| Hardware: | PC | ||
| OS: | Windows XP | ||
| Whiteboard: | |||
|
Description
Jeff Douglas
*** Bug 353218 has been marked as a duplicate of this bug. *** I have completed this and added a preprocess step to the beginning of each generated to invoke the code to expand the binary expressions. Hi Paul,
It seems this change cause a defect when the conditional expression is used in a while statement.
For example, in the following RUI Handler
handler testCombound type RUIhandler{onConstructionFunction = start}
a Widget{};
function start()
while(a.class == "where" && a.getAttribute("hello") == 2)
a = a.parent
end
end
end
The generated IR for the function start is
Function(Start), Compound, While(Compound(It is a Member now)) ..
The compound statement for while is only evaluated once. But actually, the compound should be evaluated for every loop.
This defect leads to the following JSGen code
"start": function() {
var eze_compound_1 = false;
eze_compound_1 = ((egl.checkNull(this.a).getClass()) == "where");
if (eze_compound_1) {
eze_compound_1 = (this.a.getAttribute("hello") == {eze$$value : 2, eze$$signature : "i;"});
}
while (eze_compound_1) { // HERE the WHILE condition is not correct
.......
}
}
I have updated my utility to handle CompoundConditions in While and For statements This high severity defect was fixed several weeks ago, so I am closing. |