Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
teach Rakudo_Scalar how to spesh.
  • Loading branch information
timo committed Jul 11, 2014
1 parent 87dcd11 commit e9c4921
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions src/vm/moar/ops/container.c
Expand Up @@ -161,11 +161,24 @@ static void rakudo_scalar_deserialize(MVMThreadContext *tc, MVMSTable *st, MVMSe
/* Nothing to do. */
}

static void rakudo_scalar_spesh(MVMThreadContext *tc, MVMSTable *st, MVMSpeshGraph *g, MVMSpeshBB *bb, MVMSpeshIns *ins) {
switch (ins->info->opcode) {
case MVM_OP_decont: {
ins->info = MVM_op_get_op(MVM_OP_sp_p6oget_o);
ins->operands[2].lit_i16 = offsetof( Rakudo_Scalar, value );
break;
}
default: break;
}
}


static const MVMContainerSpec rakudo_scalar_spec = {
"rakudo_scalar",
rakudo_scalar_fetch,
rakudo_scalar_store,
rakudo_scalar_store_unchecked,
rakudo_scalar_spesh,
NULL,
NULL,
rakudo_scalar_serialize,
Expand Down

0 comments on commit e9c4921

Please sign in to comment.