develooper Front page | perl.perl6.internals | Postings from July 2002

[perl #15846] [PATCH] lexical scope ops, test and example

Thread Next
From:
Jonathan Sillito
Date:
July 30, 2002 11:56
Subject:
[perl #15846] [PATCH] lexical scope ops, test and example
Message ID:
rt-15846-32009.14.1042143290811@perl
# New Ticket Created by  Jonathan Sillito 
# Please include the string:  [perl #15846]
# in the subject line of all future correspondence about this issue. 
# <URL: http://rt.perl.org/rt2/Ticket/Display.html?id=15846 >


This patch supersedes my previous lexical scope patch 
<URL: http://rt.perl.org/rt2/Ticket/Display.html?id=15800 >

In this implementation, find_lex and store_lex only operate on the
current pad, and open_lex/close_lex have been renamed to
new_pad/pop_pad.

The implementation is still quite simple (no pad descriptors, no
accessing by index), but is at least a start on what is needed.

The files affected by the patch are:
- core.ops: added implementation the 4 ops.
- dod.c: added interpreter->ctx.pad_stack to the initial first dod pass
  (I am not sure how to test if this is correct ...)
- interpreter.c and interpreter.h: added pad_stack to Parrot_Context.

In addition to the patch an updated test and example pasm file are
attached:

- lexicals.t: simple tests for the 4 ops that should to in t/op/
- lexicals.pasm: simple example that should go in examples/assembly/

Again, comments welcome.
--
Jonathan Sillito



-- attachment  1 ------------------------------------------------------
url: http://rt.perl.org/rt2/attach/32009/26690/0ce4d7/lex.patch

-- attachment  2 ------------------------------------------------------
url: http://rt.perl.org/rt2/attach/32009/26691/38d4e4/lexicals.t

-- attachment  3 ------------------------------------------------------
url: http://rt.perl.org/rt2/attach/32009/26692/dc2ab1/lexicals.pasm


Thread Next


nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About