Skip to content

Commit

Permalink
[Spesh] Update deopt idx if we clone the deopt annotation
Browse files Browse the repository at this point in the history
Otherwise the deopt index check in codegen.c breaks (even though it
refers to the same output address).
  • Loading branch information
bdw committed Sep 13, 2019
1 parent e46e9a9 commit 571f4c9
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/spesh/plugin.c
Expand Up @@ -695,8 +695,10 @@ void MVM_spesh_plugin_rewrite_resolve(MVMThreadContext *tc, MVMSpeshGraph *g, MV
MVMSpeshPluginGuard *guard = &(gs->guards[guards_start]);
MVMSpeshFacts *preguarded_facts = MVM_spesh_get_facts(tc, g, arg_regs[guard->test_idx]);
if (guard->kind != MVM_SPESH_PLUGIN_GUARD_GETATTR) {
if (stolen_deopt_ann_used)
if (stolen_deopt_ann_used) {
stolen_deopt_ann = clone_deopt_ann(tc, g, stolen_deopt_ann);
deopt_idx = stolen_deopt_ann->data.deopt_idx;
}
}
switch (guard->kind) {
case MVM_SPESH_PLUGIN_GUARD_OBJ: {
Expand Down

0 comments on commit 571f4c9

Please sign in to comment.