-
-
Save jnthn/323906079c443ad0e4be04309cd36ea5 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff --git a/src/spesh/inline.c b/src/spesh/inline.c | |
index 5a883ba..b5cfaed 100644 | |
--- a/src/spesh/inline.c | |
+++ b/src/spesh/inline.c | |
@@ -544,10 +544,13 @@ static void merge_graph(MVMThreadContext *tc, MVMSpeshGraph *inliner, | |
/* Only update these to the point we found the invoke | |
* being inlined, so it serves as a snapshot of what | |
* is active. */ | |
- if (ann->type == MVM_SPESH_ANN_FH_START) | |
- active[ann->data.frame_handler_index] = 1; | |
+ MVMint32 fhidx = ann->data.frame_handler_index; | |
+ if (ann->type == MVM_SPESH_ANN_FH_START && | |
+ (!inliner->unreachable_handlers || | |
+ !inliner->unreachable_handlers[fhidx])) | |
+ active[fhidx] = 1; | |
else if (ann->type == MVM_SPESH_ANN_FH_END) | |
- active[ann->data.frame_handler_index] = 0; | |
+ active[fhidx] = 0; | |
} | |
ann = ann->next; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment