Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
a p6bool "basically" boxes an int.
may want to invent a second flag "BOXED_NORMALIZED" or
so that would only allow boxing/unboxing skipping if the
result is used in an if/unless op.
  • Loading branch information
timo committed Nov 13, 2014
1 parent b93fc6d commit f8f6feb
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/vm/moar/ops/perl6_ops.c
Expand Up @@ -342,6 +342,9 @@ static void p6bool(MVMThreadContext *tc, MVMuint8 *cur_op) {
}
static void p6bool_discover(MVMThreadContext *tc, MVMSpeshGraph *g, MVMSpeshIns *ins) {
discover_create(tc, g, ins, STABLE(True)->WHAT);
#ifdef MVM_SPESH_FACT_KNOWN_BOX_SRC
MVM_spesh_get_facts(tc, g, ins->operands[0])->flags |= MVM_SPESH_FACT_KNOWN_BOX_SRC;
#endif
}

/* Creates a Scalar from the specified descriptor. */
Expand Down

0 comments on commit f8f6feb

Please sign in to comment.