Created
January 18, 2019 20:17
-
-
Save niner/7f146f55c52d43608952f6bf16867711 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/optimize.c b/src/spesh/optimize.c | |
index 9f55fa598..b7d4b82f4 100644 | |
--- a/src/spesh/optimize.c | |
+++ b/src/spesh/optimize.c | |
@@ -2124,7 +2124,8 @@ static void optimize_plugin(MVMThreadContext *tc, MVMSpeshGraph *g, MVMSpeshBB * | |
} | |
else { | |
/* Unstable guard indexes. */ | |
- return; | |
+ agg_guard_index = -1; | |
+ goto specialize; | |
} | |
} | |
} | |
@@ -2141,6 +2142,7 @@ static void optimize_plugin(MVMThreadContext *tc, MVMSpeshGraph *g, MVMSpeshBB * | |
} | |
} | |
+ specialize: | |
/* If we picked a guard index, insert the guards and rewrite the resolve | |
* instruction. If not, just rewrite the resolve instruction into the | |
* spesh version of itself including the index. */ |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment