| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
|
|
|
| |
Eliminate the #define pp_foo Perl_pp_foo(pTHX) macros, and update the 13
locations that relied on them.
regen/opcode.pl now generates prototypes for the PP functions directly, into
pp_proto.h. It no longer writes pp.sym, and regen/embed.pl no longer reads
this, removing the only ordering dependency in the regen scripts. opcode.pl
is now responsible for prototypes for pp_* functions. (embed.pl remains
responsible for ck_* functions, reading from regen/opcodes)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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'.
|
|
|
|
|
| |
It now only exists as a compatibility macro for extensions that want to
introspect it.
|
|
|
|
| |
This exposes the current top-level interpreter phase to perl space.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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.
`
Basically:
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.
|
|
|
|
|
|
|
|
| |
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.
|
|
|
|
| |
so newcomers can find it more easily
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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.
|
|
|
|
|
|
|
|
| |
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
compatibility.
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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).
|
|
|
|
|
|
|
|
|
|
|
| |
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).
|
|
|
|
|
|
|
|
|
|
| |
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.
|
|
|
|
|
| |
This is initially intended for threads::shared and shouldn't (yet)
be considered part of the public API.
|
|
|
|
|
|
|
|
| |
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.
|
| |
|
|
|
|
| |
ENTER/LEAVE when debugging is enabled
|
|
|
|
| |
syntax triggered by keywords
|
| |
|
| |
|
| |
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
(The table is 256 bytes; the run-time initialisation code is larger than this!)
Adapt generate_uudmap.c to generate the initalisation block for PL_bitcount,
writing the code to bitcount.h, using the same approach as uudmap.h.
To preserve binary compatibility:
for MULTIPLICITY:
keep Ibitcount in the interpreter structure, but remove all the macros that
access it. PL_bitcount is a new symbol in the object file, which won't clash
with anything as that name wasn't used before.
otherwise:
keep PL_bitcount as a char *, but initialise it at compile time to a new
constant array PL_bitcount array. Remove the code that attempts to Safefree()
it at interpreter destruction time.
|
|
|
|
| |
(and run "make regen")
|
|
|
|
|
|
| |
Perl_mro_get_from_name() to retrieve MROs by name, and PL_registered_mros to
store them in. Abolish the static array of mros, and instead register the dfs
and c3 MRO structures.
|
|
|
|
|
| |
the ANSI gods of VMS.
p4raw-id: //depot/perl@34886
|
|
|
|
|
| |
lines in subroutines defined inside eval ""s for the debugger.
p4raw-id: //depot/perl@34873
|
|
|
|
|
| |
Message-ID: <20081114084436.GJ5779@tytlal.topaz.cx>
p4raw-id: //depot/perl@34831
|
|
|
| |
p4raw-id: //depot/perl@34586
|
|
|
| |
p4raw-id: //depot/perl@34569
|
|
|
| |
p4raw-id: //depot/perl@32954
|
|
|
|
|
| |
a now unused variable.
p4raw-id: //depot/perl@32477
|
|
|
|
|
|
| |
global symbols to keep overall symbol length within 31 characters,
which is what the VMS C compiler with default flags can handle.
p4raw-id: //depot/perl@32275
|
|
|
|
|
|
|
|
| |
From: "Jerry D. Hedden" <jdhedden@cpan.org>
Message-ID: <1ff86f510711061136t52a1fe62waf384c4551612181@mail.gmail.com>
(core patch only)
p4raw-id: //depot/perl@32241
|
|
|
|
|
|
|
|
|
|
|
| |
into global variables (and hence a shared perl library). Additionally
under MULTIPLICITY record the size of the interpreter structure (total,
and for this version) and under PERL_GLOBAL_STRUCT the size of the
global variables structure. Coupled with PL_bincompat_options this will
allow 5.10.1 (and later), when compiled with a shared perl library, to
perform sanity checks in main() to verify that the shared library is
indeed binary compatible.
p4raw-id: //depot/perl@32238
|
|
|
|
|
|
|
| |
PL_cshlen can be calculated by the compiler. So eliminate both as
interpreter variables, and the code that calculates PL_cshlen at
runtime.
p4raw-id: //depot/perl@32035
|
|
|
|
|
| |
p4raw-link: @31978 on //depot/perl: d804f4346b490171e547d5cc512063e53da10708
p4raw-id: //depot/perl@32015
|
|
|
| |
p4raw-id: //depot/perl@31990
|
|
|
|
|
|
| |
From: "Robin Barker" <Robin.Barker@npl.co.uk>
Message-ID: <2C2E01334A940D4792B3E115F95B7226C9D1C3@exchsvr1.npl.ad.local>
p4raw-id: //depot/perl@31978
|
|
|
|
|
|
| |
From: "Brandon Black" <blblack@gmail.com>
Message-ID: <84621a60708121336m13dcf9e5uac624fb246f2a79c@mail.gmail.com>
p4raw-id: //depot/perl@31770
|
|
|
|
|
|
|
| |
the first two aren't used, and the last two are just place holders
to ensure that both runops functions get linked in; so make them
global rather than per-interpeter
p4raw-id: //depot/perl@31280
|
|
|
| |
p4raw-id: //depot/perl@31255
|
|
|
| |
p4raw-id: //depot/perl@31254
|
|
|
| |
p4raw-id: //depot/perl@31252
|
|
|
|
|
|
| |
and fix 'duplicate symbol' warnings from embed.pl
for utf8cache and sh_path
p4raw-id: //depot/perl@31246
|
|
|
| |
p4raw-id: //depot/perl@31245
|
|
|
| |
p4raw-id: //depot/perl@31203
|
|
|
| |
p4raw-id: //depot/perl@31200
|
|
|
|
|
| |
and simplify its creation and destruction
p4raw-id: //depot/perl@31199
|