Hello, guys.
I'm working on IonMonkey together with Pericles and Igor, and I would like to
check with you if a behavior in the compiler might be a bug. I wrote a dead
code elimination algorithm that uses IonMonkey's RPO iterator. In a block with
an MTest instruction at the end, I expected the iterator to reach all blocks of
one of its true or false subgraphs before moving on to the other one, but I've
got a case where that doesn't happen. Is this behavior expected?
I've attached to this email a test case that reproduces this. I've also pasted
the code down below. If you generate the program's control flow graph, then you
can see that the RPO iterator moves from block 3 to block 4 then to block 5,
but 5 is the only successor to 3, and 4 is in a completely different subgraph
than 3 and 5. A PDF file with the 'Renumber Blocks' graph is also attached to
this email. Could this be a possible bug, or is this expected?
// Code:
function f(b) {
if (b) {
if (!b) return;
} else
return;
};
f(true);
Any help is highly appreciated.
Regards,
Henrique.
_______________________________________________
dev-tech-js-engine-internals mailing list
[email protected]
https://lists.mozilla.org/listinfo/dev-tech-js-engine-internals