Ticket #975: 0001-make-Rakudo-build-on-parrot-after-context_pmc3-branc.patch

File 0001-make-Rakudo-build-on-parrot-after-context_pmc3-branc.patch, 4.0 KB (added by moritz, 12 years ago)

Make Rakudo build on Parrot r40958

  • build/PARROT_REVISION

    From 69e4e98245a2629dbd5b49127538c3abc9a955cb Mon Sep 17 00:00:00 2001
    From: Moritz Lenz <moritz@faui2k3.org>
    Date: Thu, 3 Sep 2009 14:21:06 +0200
    Subject: [PATCH] make Rakudo build on parrot after context_pmc3 branch merge
    
    Patch courtesy by bacek++
    ---
     build/PARROT_REVISION    |    2 +-
     src/ops/perl6.ops        |   30 +++++++++++++++---------------
     src/pmc/p6invocation.pmc |    2 +-
     3 files changed, 17 insertions(+), 17 deletions(-)
    
    diff --git a/build/PARROT_REVISION b/build/PARROT_REVISION
    index 662bddf..68518f7 100644
    a b  
    1 40789 
     140958 
  • src/ops/perl6.ops

    diff --git a/src/ops/perl6.ops b/src/ops/perl6.ops
    index 6e333df..1c88ba4 100644
    a b  
    144144 
    145145*/ 
    146146inline op find_lex_skip_current(out PMC, in STR) :base_core { 
    147     Parrot_Context *ctx = CONTEXT(interp); 
     147    PMC *ctx = CURRENT_CONTEXT(interp); 
    148148    $1 = PMCNULL; 
    149149 
    150     while (ctx->outer_ctx) { 
    151         Parrot_Context   * const outer   = ctx->outer_ctx; 
    152         PMC              * const lex_pad = outer->lex_pad; 
     150    while (Parrot_pcc_get_outer_ctx(interp, ctx)) { 
     151        PMC   * const outer   = Parrot_pcc_get_outer_ctx(interp, ctx); 
     152        PMC   * const lex_pad = Parrot_pcc_get_lex_pad(interp, outer); 
    153153 
    154154        if (!PMC_IS_NULL(lex_pad) && VTABLE_exists_keyed_str(interp, lex_pad, $2)) { 
    155155            $1 = VTABLE_get_pmc_keyed_str(interp, lex_pad, $2); 
     
    266266 
    267267*/ 
    268268inline op get_next_candidate_info(out PMC, out PMC, out PMC) :base_core { 
    269     Parrot_Context *ctx         = CONTEXT(interp)->caller_ctx; 
    270     STRING         *name        = string_from_literal(interp, "__CANDIDATE_LIST__"); 
    271     STRING         *wrapper     = string_from_literal(interp, "$!wrapper_block"); 
    272     PMC            *last_lexpad = PMCNULL; 
    273     PMC            *last_sub    = PMCNULL; 
     269    PMC     *ctx         = Parrot_pcc_get_caller_ctx(interp, CURRENT_CONTEXT(interp)); 
     270    STRING  *name        = string_from_literal(interp, "__CANDIDATE_LIST__"); 
     271    STRING  *wrapper     = string_from_literal(interp, "$!wrapper_block"); 
     272    PMC     *last_lexpad = PMCNULL; 
     273    PMC     *last_sub    = PMCNULL; 
    274274 
    275     while (ctx) { 
     275    while (!PMC_IS_NULL(ctx)) { 
    276276        /* See if we've found a candidate list. */ 
    277         PMC *lexpad = ctx->lex_pad; 
     277        PMC *lexpad = Parrot_pcc_get_lex_pad(interp, ctx); 
    278278        PMC *clist  = VTABLE_get_pmc_keyed_str(interp, lexpad, name); 
    279279        if (!PMC_IS_NULL(clist)) { 
    280280            /* Found. Set results and we're done. */ 
    281281            $1 = clist; 
    282             if (PMC_IS_NULL(VTABLE_getprop(interp, ctx->current_sub, wrapper))) { 
    283                 $2 = ctx->current_sub; 
     282            if (PMC_IS_NULL(VTABLE_getprop(interp, Parrot_pcc_get_sub(interp, ctx), wrapper))) { 
     283                $2 = Parrot_pcc_get_sub(interp, ctx); 
    284284                $3 = lexpad; 
    285285            } 
    286286            else { 
     
    291291        } 
    292292        else { 
    293293            /* Not found; keep looking. */ 
    294             last_sub = ctx->current_sub; 
     294            last_sub = Parrot_pcc_get_sub(interp, ctx); 
    295295            last_lexpad = lexpad; 
    296             ctx = ctx->outer_ctx; 
     296            ctx = Parrot_pcc_get_outer_ctx(interp, ctx); 
    297297        } 
    298298    } 
    299299    if (!ctx) 
  • src/pmc/p6invocation.pmc

    diff --git a/src/pmc/p6invocation.pmc b/src/pmc/p6invocation.pmc
    index 4df78be..11e5921 100644
    a b  
    244244            first_candidate = VTABLE_get_pmc_keyed_str(interp, ns, CONST_STRING(interp, "!deferal_fail")); 
    245245        } 
    246246        addr = VTABLE_invoke(interp, first_candidate, next); 
    247         lexpad = CONTEXT(interp)->lex_pad; 
     247        lexpad = Parrot_pcc_get_lex_pad(INTERP, CURRENT_CONTEXT(interp)); 
    248248        if (!PMC_IS_NULL(lexpad) && VTABLE_exists_keyed_str(interp, lexpad, lexname)) 
    249249            VTABLE_set_pmc_keyed_str(interp, lexpad, lexname, SELF); 
    250250        return addr;