Skip to content

Commit

Permalink
Set type facts on a resolved method
Browse files Browse the repository at this point in the history
This enables the isnull opt to deal with non-nullness of a resolved
method.
  • Loading branch information
jnthn committed Apr 19, 2018
1 parent b8cd9ca commit e569015
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/spesh/optimize.c
Original file line number Diff line number Diff line change
Expand Up @@ -133,6 +133,8 @@ static void optimize_method_lookup(MVMThreadContext *tc, MVMSpeshGraph *g, MVMSp

/* Tweak facts for the target, given we know the method. */
MVMSpeshFacts *meth_facts = MVM_spesh_get_and_use_facts(tc, g, ins->operands[0]);
meth_facts->flags |= MVM_SPESH_FACT_KNOWN_TYPE;
meth_facts->type = meth->st->WHAT;
meth_facts->flags |= MVM_SPESH_FACT_KNOWN_VALUE;
meth_facts->value.o = meth;

Expand Down

0 comments on commit e569015

Please sign in to comment.