Skip to content
Commits on Jul 1, 2011
  1. Store C<study>'s data in in mg_ptr instead of interpreter variables.

    Nicholas Clark committed
    This allows more than one C<study> to be active at the same time.
    It eliminates PL_screamfirst, PL_lastscream, PL_maxscream.
  2. Merge PL_scream{first,next} into one allocated buffer.

    Nicholas Clark committed
    Effectively, PL_screamnext is now PL_screamfirst + 256. The actual interpreter
    variable PL_screamnext is eliminated.
Commits on Jun 12, 2011
  1. Move PL_runops_{std,dbg} to perl.h, and make them const.

    Nicholas Clark committed
    They exist solely to ensure that Perl_runops_standard and Perl_runops_debug
    are linked in - nothing assigns to either variable, and nothing reads them.
  2. Move PL_global_struct_size, PL_interp_size{,_5_16_0} to perl.h

    Nicholas Clark committed
    Make them const U16 - they should have been const from the start.
  3. In perlvar.h, move the always-present globals above those conditional…

    Nicholas Clark committed
    …ly compiled
    Rename PL_interp_size_5_10_0 to PL_interp_size_5_16_0, as it is only intended to
    track interpreter size within (forwards) binary compatible maintenance branches.
  4. Move PL_{revision,version,subversion} to perl.h, making them const U8.

    Nicholas Clark committed
    To get the initialisation to work, the location of #include patchlevel.h needs
    to be moved.
  5. Move PL_sh_path to perl.h (except for OS/2), as it's const char[]

    Nicholas Clark committed
    On OS/2, keep it in perlvars.h, as it's not const there. doesn't
    pay attention to C pre-processor symbols, so it will always see the declaration
    in perlvars.h, and add the symbol to the linker file, so no need to mention
    sh_path in globvar.sym. Add special case logic in regen/ to make the
    embedvar.h macros for PL_sh_path defined only on OS/2.
  6. Move PL_{No,Yes,hexdigit} from perlvars.h to perl.h, as all are const…

    Nicholas Clark committed
    … char[]
    They were converted in perl.h from const char[] to #define in 31fb120,
    then re-instated as const char[], but in perlvars.h, in 3fe35a8.
    There's no need for compile-time constants to jump through the hoops of
    perlvars.h, even for Symbian, as the various "EXTCONST" variables already in
    perl.h demonstrate.
    These were the only 3 users of the the PERLVARISC macro, so eliminate that, and
    all related code.
  7. Eliminate PL_patleave, unused since perl 5.0 alpha 2.

    Nicholas Clark committed
    patleave was added in perl 3.0 patch #35 patch #29 -- 395c379,
    used in scanpat(). scanpat() was refactored and renamed to scan_pat() in
    5.0 alpha 2, "commented" out with the C pre-processor in 5.000, and removed in
Commits on May 22, 2011
  1. Restore building with -DPERL_GLOBAL_STRUCT, broken since 4dc941f.

    Nicholas Clark committed
    As PL_charclass is a constant, it doesn't need to be accessed via the global
    struct. It should be exported via globvar.sym, not PERLVARA() in perlvars.h
    [With a PERVARA() it all compiles perfectly, once C<dVAR>s are added where
    now needed, but the build loops forever because the (real) charclass array is
    never initialised]
Commits on Feb 17, 2011
  1. handy.h: isIDFIRST_utf8() changed to use XIDStart

    Karl Williamson committed
    Previously this used a home-grown definition of an identifier start,
    stemming from a bug in some early Unicode versions.  This led to some
    problems, fixed by #74022.
    But the home-grown solution did not track Unicode, and allowed for
    characters, like marks, to begin words when they shouldn't.  This change
    brings this macro into compliance with Unicode going-forward.
Commits on Feb 2, 2011
  1. Add PL_foldable - a list of chars that participate in folds

    Karl Williamson committed
Commits on Jan 23, 2011
  1. Move all the generated file header printing into read_only_top()

    Nicholas Clark committed
    Previously all the scripts in regen/ had code to generate header comments
    (buffer-read-only, "do not edit this file", and optionally regeneration
    script, regeneration data, copyright years and filename).
    This change results in some minor reformatting of header blocks, and
    standardises the copyright line as "Larry Wall and others".
Commits on Jan 9, 2011
  1. Generate pp_* prototypes in pp_proto.h, and remove pp.sym

    Nicholas Clark committed
    Eliminate the #define pp_foo Perl_pp_foo(pTHX) macros, and update the 13
    locations that relied on them.
    regen/ now generates prototypes for the PP functions directly, into
    pp_proto.h. It no longer writes pp.sym, and regen/ no longer reads
    this, removing the only ordering dependency in the regen scripts.
    is now responsible for prototypes for pp_* functions. ( remains
    responsible for ck_* functions, reading from regen/opcodes)
Commits on Nov 15, 2010
  1. @mauzo

    Improve custom OP support.

    mauzo committed with Father Chrysostomos
    Change the custom op registrations from two separate hashes to one hash
    holding structure pointers, and add API functions to register ops and
    look them up. This will make it easier to add new properties of custom
    ops in the future. Copy entries across from the old hashes where
    necessary, to preserve compatibility.
    Add two new properties, in addition to the already-existing 'name' and
    'description': 'class' and 'peep'. 'class' is one of the OA_*OP
    constants, and allows B and other introspection mechanisms to work with
    custom ops that aren't BASEOPs. 'peep' is a pointer to a function that
    will be called for ops of this type from Perl_rpeep.
    Adjust B.xs to take account of the new properties, and also to give
    custom ops their registered name rather than simply 'custom'.
Commits on Nov 14, 2010
  1. @rafl

    Eliminate PL_dirty

    rafl committed
    It now only exists as a compatibility macro for extensions that want to
    introspect it.
  2. @rafl

    Add ${^GLOBAL_PHASE}

    rafl committed
    This exposes the current top-level interpreter phase to perl space.
Commits on Nov 8, 2010
  1. regexec.c: Don't give up on fold matching early

    Karl Williamson committed with Father Chrysostomos
    As noted in the comments of the code, "a" =~ /[A]/i doesn't work currently
    (except that regcomp.c knows about the ASCII characters and corrects for
    it, but not always, for example in cases like "a" =~ /\p{Upper}/i.  This
    patch catches all those).
    It works by computing a list of all characters that (singly) fold to
    another one, and then checking each of those.  The maximum length of
    the list is 3 in the current Unicode standard.
    I believe that a better long-term solution is to do this at compile
    rather than execution time, by generating a closure of everything
    matched.  But this can't be done now because the data structure would
    need to be extensively revamped to list all non-byte characters, and
    user-defined \p{} matches are not known at compile-time.
    And it doesn't handle the multi-char folds.  There is a separate ticket
    for those.
Commits on Nov 1, 2010
  1. @iabyn

    RT #76248: double-freed SV with nested sig-handler

    iabyn committed
    There was some buggy code in Perl_sighandler() related to getting an SV
    with the signal name to pass to the perl-level handler function.
    on threaded builds, a sig handler that died leaked PL_psig_name[sig];
    on unthreaded builds, in a recursive handler that died, PL_sig_sv was
    prematurely freed.
    PL_sig_sv was originally just a file static var that was not
    recursion-save anyway, and got promoted to perlvars.h when it should
    instead have been done away with. So I've got rid of it now, and
    rationalised the code, which fixed the two issues listed above.
    Also added an assert which makes the dodgy manual popping of the save
    stack slightly less dodgy.
Commits on Oct 21, 2010
  1. replace PL_doextract with better kinds of variable

    Zefram committed with Father Chrysostomos
    PL_doextract had two unrelated jobs, neither best served by an interpreter
    global variable.  The first was to track the -x command-line switch.
    That is replaced with a local variable in S_parse_body().  The second
    was to track whether the lexer is in the middle of a =pod section.
    That is replaced with an element in PL_parser.
Commits on Oct 14, 2010
  1. -> regen/

    Father Chrysostomos committed
    so newcomers can find it more easily
Commits on Sep 26, 2010
  1. @tonycoz
Commits on Sep 8, 2010
  1. Remove offer_nice_chunk(), PL_nice_chunk and PL_nice_chunk_size.

    Nicholas Clark committed
    These provided a non-public API for the hash and array code to donate free
    memory direct to the SV head allocation routines, instead of returning it
    to the malloc system with free().
    I assume that on some older mallocs this could offer significant benefits.
    However, my benchmarking on a modern malloc couldn't detect any significant
    effect (positive or negative) on removing the code. Its (continued) presence,
    however, has downsides
    a: slightly more code complexity
    b: slightly larger interpreter structure
    c: in the steady state, if net creation of SVs is zero, 1 chunk of allocated
       but unused memory will exist (per thread)
    So I think it best to remove it.
Commits on Aug 26, 2010
  1. @rafl

    make recursive part of peephole optimiser hookable

    Zefram committed with rafl
    New variable PL_rpeepp makes it possible for extensions to hook
    the per-op-chain part of the peephole optimiser (which recurses into
    side chains).  The existing variable PL_peepp still allows hooking the
    per-sub part of the peephole optimiser, maintaining perfect backward
Commits on Jul 26, 2010
  1. @rafl

    Check API compatibility when loading xs modules

    rafl committed
    This adds PL_apiversion, allowing the API version of a running interpreter to be
    introspected. It is used in the new XS_APIVERSION_BOOTCHECK macro, which is
    added to the _boot function of every XS module, to compare it against the API
    version the module has been compiled against. If the versions do not match, an
    exception is thrown.
    This doesn't fully prevent binary incompatible extensions to be loaded. It
    merely compares PERL_API_* between compile- and runtime, and does not attempt to
    solve the problem of identifying binary incompatible perls with the same API
    version (i.e. the same perl version configured with and without DEBUGGING).
Commits on Jul 22, 2010
  1. @jandubois

    Get rid of PERL_POLLUTE

    jandubois committed
    PERL_POLLUTE was added (but undefined by default) in 5.6 to optionally
    expose older 5.005 symbols for backwards compatibility.  It's use was
    always discouraged, and MakeMaker contains a more specific escape hatch:
        perl Makefile.PL POLLUTE=1
    This can be used for modules that have not been upgraded to 5.6 naming
    conventions (and really should be completely obsolete by now).
Commits on Jul 12, 2010
  1. @mauzo @rgs

    Generic hooks into Perl_block_{start,end}.

    mauzo committed with rgs
    These take the form of a vtable pushed onto the new PL_blockhooks array.
    This could probably do with a API around it later. Separate pre_end and
    post_end hooks are needed to capture globals before the stack is unwound
    (like needblockscope in the existing code). The intention is that once
    a vtable is installed it never gets removed, so where necessary
    extensions using this will need to use a hinthv element to determine
    whether to do anything or not.
Commits on Jun 4, 2010
  1. @iabyn

    add PL_signalhook to hook into signal dispatch

    iabyn committed
    This is initially intended for threads::shared and shouldn't (yet)
    be considered part of the public API.
Commits on Apr 25, 2010
  1. @iabyn

    unwinding target nominated by separate global

    Zefram committed with iabyn
    When unwinding due to die, the new global PL_restartjmpenv points
    to the JMP_ENV at which longjmping should stop and control should
    be transferred to PL_restartop.  This replaces the previous
    use of cxstack[cxstack_ix+1].blk_eval.cur_top_env, located in a
    nominally-discarded context frame.
Commits on Dec 6, 2009
  1. qr/\X/ expansion

    Karl Williamson committed
Commits on Nov 12, 2009
  1. @ggoossen @rgs

    Add ENTER_with_name and LEAVE_with_name to automaticly check for matc…

    ggoossen committed with rgs
    …hing ENTER/LEAVE when debugging is enabled
Commits on Nov 5, 2009
  1. @obra

    regen generated files changed by the previous patch - facility to plu…

    obra committed
    …g in syntax triggered by keywords
Commits on Oct 19, 2009
  1. @demerphq
Commits on Sep 13, 2009
  1. @rgs
Commits on Jul 8, 2009
  1. @vpit

    Add a pluggable hook in op_free()

    vpit committed with vpit
Something went wrong with that request. Please try again.