Skip to content

Commit

Permalink
make Rakudo build on parrot after context_pmc3 branch merge
Browse files Browse the repository at this point in the history
Patch courtesy by bacek++
  • Loading branch information
moritz committed Sep 3, 2009
1 parent 1cb71e4 commit c6bf7b8
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 17 deletions.
2 changes: 1 addition & 1 deletion build/PARROT_REVISION
@@ -1 +1 @@
40789
40958
30 changes: 15 additions & 15 deletions src/ops/perl6.ops
Expand Up @@ -144,12 +144,12 @@ skips the current sub and starts looking immediately at its outers.

*/
inline op find_lex_skip_current(out PMC, in STR) :base_core {
Parrot_Context *ctx = CONTEXT(interp);
PMC *ctx = CURRENT_CONTEXT(interp);
$1 = PMCNULL;

while (ctx->outer_ctx) {
Parrot_Context * const outer = ctx->outer_ctx;
PMC * const lex_pad = outer->lex_pad;
while (Parrot_pcc_get_outer_ctx(interp, ctx)) {
PMC * const outer = Parrot_pcc_get_outer_ctx(interp, ctx);
PMC * const lex_pad = Parrot_pcc_get_lex_pad(interp, outer);

if (!PMC_IS_NULL(lex_pad) && VTABLE_exists_keyed_str(interp, lex_pad, $2)) {
$1 = VTABLE_get_pmc_keyed_str(interp, lex_pad, $2);
Expand Down Expand Up @@ -266,21 +266,21 @@ nextsame need.

*/
inline op get_next_candidate_info(out PMC, out PMC, out PMC) :base_core {
Parrot_Context *ctx = CONTEXT(interp)->caller_ctx;
STRING *name = string_from_literal(interp, "__CANDIDATE_LIST__");
STRING *wrapper = string_from_literal(interp, "$!wrapper_block");
PMC *last_lexpad = PMCNULL;
PMC *last_sub = PMCNULL;
PMC *ctx = Parrot_pcc_get_caller_ctx(interp, CURRENT_CONTEXT(interp));
STRING *name = string_from_literal(interp, "__CANDIDATE_LIST__");
STRING *wrapper = string_from_literal(interp, "$!wrapper_block");
PMC *last_lexpad = PMCNULL;
PMC *last_sub = PMCNULL;

while (ctx) {
while (!PMC_IS_NULL(ctx)) {
/* See if we've found a candidate list. */
PMC *lexpad = ctx->lex_pad;
PMC *lexpad = Parrot_pcc_get_lex_pad(interp, ctx);
PMC *clist = VTABLE_get_pmc_keyed_str(interp, lexpad, name);
if (!PMC_IS_NULL(clist)) {
/* Found. Set results and we're done. */
$1 = clist;
if (PMC_IS_NULL(VTABLE_getprop(interp, ctx->current_sub, wrapper))) {
$2 = ctx->current_sub;
if (PMC_IS_NULL(VTABLE_getprop(interp, Parrot_pcc_get_sub(interp, ctx), wrapper))) {
$2 = Parrot_pcc_get_sub(interp, ctx);
$3 = lexpad;
}
else {
Expand All @@ -291,9 +291,9 @@ inline op get_next_candidate_info(out PMC, out PMC, out PMC) :base_core {
}
else {
/* Not found; keep looking. */
last_sub = ctx->current_sub;
last_sub = Parrot_pcc_get_sub(interp, ctx);
last_lexpad = lexpad;
ctx = ctx->outer_ctx;
ctx = Parrot_pcc_get_outer_ctx(interp, ctx);
}
}
if (!ctx)
Expand Down
2 changes: 1 addition & 1 deletion src/pmc/p6invocation.pmc
Expand Up @@ -244,7 +244,7 @@ pmclass P6Invocation need_ext dynpmc group perl6_group {
first_candidate = VTABLE_get_pmc_keyed_str(interp, ns, CONST_STRING(interp, "!deferal_fail"));
}
addr = VTABLE_invoke(interp, first_candidate, next);
lexpad = CONTEXT(interp)->lex_pad;
lexpad = Parrot_pcc_get_lex_pad(INTERP, CURRENT_CONTEXT(interp));
if (!PMC_IS_NULL(lexpad) && VTABLE_exists_keyed_str(interp, lexpad, lexname))
VTABLE_set_pmc_keyed_str(interp, lexpad, lexname, SELF);
return addr;
Expand Down

0 comments on commit c6bf7b8

Please sign in to comment.