-
-
Save gerdr/babe2cbd5d85c9170dec to your computer and use it in GitHub Desktop.
t/nqp/56-role.t
This file contains 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
[/devel/moarvm/nqp-cc] ../moarvm nqp.moarvm t/nqp/56-role.t | |
1..13 | |
ok 1 | |
ok 2 | |
failed to find frame_name_34 | |
started looking at frame_name_30 | |
invokee frames: | |
role_meth | |
frame_name_34 | |
frame_name_30 | |
frame_name_0 | |
stack frames: | |
frame_name_30 | |
frame_name_0 | |
Cannot locate an outer frame for the call | |
at t/nqp/56-role.t:23 (<ephemeral file>:frame_name_30:95) | |
from nqp-src/NQPHLL.nqp:1084 (./NQPHLLMoar.moarvm:frame_name_831:97) | |
from nqp-src/NQPHLL.nqp:1070 (./NQPHLLMoar.moarvm:eval:86) | |
from nqp-src/NQPHLL.nqp:1276 (./NQPHLLMoar.moarvm:evalfiles:115) | |
from nqp-src/NQPHLL.nqp:1182 (./NQPHLLMoar.moarvm:command_eval:210) | |
from nqp-src/NQPHLL.nqp:1155 (./NQPHLLMoar.moarvm:command_line:129) | |
from nqp-src/NQP.nqp:3446 (nqp.moarvm:MAIN:23) | |
from nqp-src/NQP.nqp:3438 (nqp.moarvm:frame_name_0:292) | |
from <unknown>:1 (nqp.moarvm:frame_name_3780:6) | |
from <unknown>:1 (nqp.moarvm:frame_name_3778:6) |
This file contains 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/core/frame.c b/src/core/frame.c | |
index 3d9930c..f84dd9f 100644 | |
--- a/src/core/frame.c | |
+++ b/src/core/frame.c | |
@@ -173,9 +173,29 @@ void MVM_frame_invoke(MVMThreadContext *tc, MVMStaticFrame *static_frame, | |
} | |
if (!frame->outer) { | |
frame->outer = static_frame_body->outer->body.prior_invocation; | |
- if (!frame->outer) | |
+ if (!frame->outer) { | |
+ MVMStaticFrame *sf; | |
+ | |
+ printf("failed to find "); | |
+ MVM_string_say(tc, static_frame_body->outer->body.name); | |
+ | |
+ printf("started looking at "); | |
+ MVM_string_say(tc, tc->cur_frame->static_info->body.name); | |
+ | |
+ puts("\ninvokee frames:"); | |
+ for(sf = static_frame; sf; sf = sf->body.outer) | |
+ MVM_string_say(tc, sf->body.name); | |
+ | |
+ puts("\nstack frames:"); | |
+ | |
+ for(sf = tc->cur_frame->static_info; sf; sf = sf->body.outer) | |
+ MVM_string_say(tc, sf->body.name); | |
+ | |
+ puts(""); | |
+ | |
MVM_exception_throw_adhoc(tc, | |
"Cannot locate an outer frame for the call"); | |
+ } | |
} | |
} | |
else { |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment