mirror of
https://github.com/Eaglercraft-TeaVM-Fork/eagler-teavm.git
synced 2024-12-22 16:14:10 -08:00
C backend: fix bugs in exception handling transformer
This commit is contained in:
parent
52ddd96c7d
commit
ff07b28bee
|
@ -395,7 +395,7 @@ public class ExceptionHandlingShadowStackContributor {
|
|||
if (outgoingVariablesToRemove.contains(incoming.getValue().getIndex())) {
|
||||
phi.getIncomings().remove(i--);
|
||||
break;
|
||||
} else if (incoming.getValue().getIndex() == value) {
|
||||
} else if (incoming.getValue().getIndex() == value && incoming.getSource() != newBlock) {
|
||||
if (variablesDefinedHere.contains(value)) {
|
||||
incoming.setSource(newBlock);
|
||||
} else {
|
||||
|
|
|
@ -144,7 +144,7 @@ public class BasicBlockSplitter {
|
|||
|
||||
DefinitionExtractor defExtractor = new DefinitionExtractor();
|
||||
for (BasicBlock block : sourceParts) {
|
||||
if (block != null) {
|
||||
if (block != source) {
|
||||
for (Map.Entry<Phi, Variable> lastDefinedEntry : lastDefinedValues.entrySet()) {
|
||||
Incoming incomingCopy = new Incoming();
|
||||
incomingCopy.setSource(block);
|
||||
|
|
Loading…
Reference in New Issue
Block a user