Created
August 31, 2014 16:05
-
-
Save bdw/cc441decdeec2ff692be to your computer and use it in GitHub Desktop.
fix bug 122504
This file contains hidden or 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/vm/moar/ops/perl6_ops.c b/src/vm/moar/ops/perl6_ops.c | |
index 65eeb27..3599cd5 100644 | |
--- a/src/vm/moar/ops/perl6_ops.c | |
+++ b/src/vm/moar/ops/perl6_ops.c | |
@@ -462,8 +462,9 @@ static MVMuint8 s_p6routinereturn[] = { | |
MVM_operand_obj | MVM_operand_read_reg, | |
}; | |
static void p6routinereturn(MVMThreadContext *tc, MVMuint8 *cur_op) { | |
- MVMObject *ret = MVM_frame_find_lexical_by_name_rel_caller(tc, str_return, | |
- tc->cur_frame)->o; | |
+ MVMRegister *reg = MVM_frame_find_lexical_by_name_rel_caller(tc, str_return, | |
+ tc->cur_frame); | |
+ MVMObject *ret = (reg ? reg->o : NULL); | |
if (!MVM_is_null(tc, ret) && IS_CONCRETE(ret) && REPR(ret)->ID == MVM_REPR_ID_Lexotic) { | |
MVM_args_setup_thunk(tc, NULL, MVM_RETURN_VOID, &one_arg_callsite); | |
tc->cur_frame->args[0].o = GET_REG(tc, 2).o; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment