| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
|
|
|
|
|
| |
Expose cop hint hashes as a type COPHH, with a cophh_* API which is a
macro layer over the refcounted_he_* API. The documentation for cophh_*
describes purely API-visible behaviour, whereas the refcounted_he_*
documentation describes the functions mainly in terms of the
implementation. Revise the cop_hints_* API, using the flags parameter
consistently and reimplementing in terms of cophh_*. Use the cophh_*
and cop_hints_* functions consistently where appropriate.
[Modified by the committer to update two calls to
Perl_refcounted_he_fetch recently added to newPMOP.]
|
|
|
|
|
| |
lex_start() is added to the API, marked experimental, and documented.
It also gains a flags parameter for foreseeable future use.
|
|
|
|
|
|
|
|
| |
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.
|
|
|
|
|
|
|
|
| |
The only uses of lex_start that had the new_filter parameter false,
to make the new lexer context share source filters with the previous
lexer context, were uses with rsfp null, which therefore never invoked
source filters. Inheriting source filters from a logically unrelated
file seems like a silly idea anyway.
|
|
|
|
|
|
|
| |
Previously yylex() was conditionally populating @AnyDBM_File::ISA (if it was not
set, and the token dbmopen was seen), and init_predump_symbols() was populating
@IO::File::ISA (unconditionally, but this is so early that nothing previously
could have set it). This refactoring eliminates code duplication.
|
|
|
|
|
| |
My original fix broke the 'goto redo_body' path. Not that
anything tests for this!
|
| |
|
|
|
|
|
|
| |
[perl #3719] eval_sv("some syntax err") cleared $@ and didn't return
a failure indication. This also affected eval_pv() which calls eval_sv().
Fix this and add lots of tests.
|
|
|
|
|
|
|
|
| |
When calling the destructors for IO objects embedded in arena GVs,
process PL_defoutgv and PL_stderrgv last. Yes, the test suite
expects STDOUT to still work at this point. Indeed, one test in ref.t
calls print from STDOUT's destructor (which is why pp_print needed a
slight tweak to handle a null GV properly).
|
|
|
|
|
|
| |
Commit 31c91b4357905486e81f901ad079da5735bdb7ba added a block of code
to free PL_psig_pend in a signal-safe way, but omitted to remove the
original unsafe freeing code above it. Removed with this commit.
|
|
|
|
| |
Well yes, it does, kinda; but it's harmless. Add a comment to that effect.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
With PERL_DESTRUCT_LEVEL >= 1, PL_defstash is explicitly freed,
but doesn't actually get freed at that point due to a reference loop
between %:: and *::. Break that loop to ensure that PL_defstash gets freed
at that point. Actually, its not as serious as it sounds, as it would get
freed a bit later anyway by sv_clean_all(), but this new way has these
benefits:
* it gets freed where you expect it to be
* it gets freed cleanly, rather than by the more brutal sv_clean_all()
(which can leave dangling pointers to freed SVs)
* since its freed while *not* under the influence of
PL_in_clean_all = TRUE, it's more likely to flag up bugs related to
double-freeing etc. Indeed, the two previous commits to this are a
result of that.
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
yyparse() becomes reentrant. The yacc stack and related resources
are allocated in yyparse(), rather than in lex_start(), and they are
localised to yyparse(), preserving their values from any outer parser.
yyparse() now takes a parameter which determines which production it
will parse at the top level. New API function parse_fullstmt() uses this
facility to parse just a single statement. The top-level single-statement
production that is used for this then messes with the parser's head so
that the parsing stops without seeing EOF, and any lookahead token seen
after the statement is pushed back to the lexer.
|
| |
|
|
|
|
|
|
| |
[perl #77352]
PL_my_cxt_list was never freed
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
These are left from PERL_OBJECT, which was an implementation of
multiplicity using C++ objects. PERL_OBJECT was removed in 5.8, but the
macros seem to have been cargo-culted all over the core (including in
places where they would have been inappropriate originally). Since they
now do exactly nothing, it's cleaner to remove them.
I have left the definitions in perl.h, under #ifndef PERL_CORE, since
some CPAN XS code uses them (also often incorrectly). I have also left
STATIC alone, since it seems potentially more useful and is much more
ingrained.
The only appearance of these macros this patch doesn't touch is in
Devel-PPPort, because that's a CPAN module.
|
|
|
|
|
|
| |
Previously only opmini.o was compiled with -DPERL_EXTERNAL_GLOB, and only
perlmini.o with -DPERL_IS_MINIPERL. Add "PERL_EXTERNAL_GLOB" to the output
of (mini)perl -V if it is defined.
|
|
|
|
|
| |
Rather than just recording whether an SV was cloned (sv->sv_debug_cloned),
record the address of the SV we were cloned from.
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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).
|
| |
|
|
|
|
|
|
|
|
|
| |
Abigail already said it best:
I do not think 'perl -h' is the place to give recommendations on how
code should be written. 'perl -h' gives a list and a brief explanation
of the command line switches. IMO, it should do just that, and nothing
else.
|
|
|
|
|
|
|
| |
Previously, whenever a true value was assigned to $^P, all 3 were set to 0.
Now only set them to 0 if they aren't already SvIOK().
Resolves RT #72422.
|
|
|
|
|
| |
Add a function Perl_hv_fill to perform the count. This will save 1 IV per hash,
and on some systems cause struct xpvhv to become cache aligned.
|
|
|
|
|
|
|
|
| |
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.
|
|
|
|
| |
This reduces the object code size slightly.
|
|
|
|
| |
This reduces the object code size slightly.
|
|
|
|
|
| |
Reapplies commit 482d21b3db741a7f6b59279ab7ad289307e2186b
that was reverted in commit bb87c82accf79d3e15da7fc9b646232a4c2bd47c
|
| |
|
| |
|
| |
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
blessing filehandles into FileHandle
It turns out that it's not quite as simple as blessing into IO::File.
If you do (just) that, then it breaks any existing code that does
C<require IO::Handle;> to allow it to call methods on file handles,
because they're blessed into IO::File, which isn't loaded. (Note this code
doesn't assume that methods in IO::Seekable are there to be called)
So, it all should work if you also set @IO::File:::ISA correctly?
That way, code that assumes that methods from IO::Handle can be called will
work. However, gv.c now starts complaining (but not failing) if IO::Handle,
IO::Seekable and Exporter aren't present, because it goes looking for
methods in them.
So the solution seems to be to set @IO::File::ISA *and* create (empty)
stashes for the other 3 packages. Patch appended, but not applied.
|
| |
|
|
|
|
| |
http://nntp.perl.org/group/perl.perl5.porters/155493
|
| |
|
| |
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Free the PL_scopestack_name
Gerard Goossen
From 4652807944b1b7efc8a66b3fe8d7562d23a2189f Mon Sep 17 00:00:00 2001
From: Gerard Goossen <gerard@ggoossen.net>
Date: Fri, 18 Dec 2009 15:09:49 +0100
Subject: [PATCH 2/2] Free the PL_scopestack_name
Signed-off-by: H.Merijn Brand <h.m.brand@xs4all.nl>
|
| |
|
|
|
|
|
|
|
| |
Subject: Re: Smoke [5.11.2] v5.11.2-105-gc2123ae FAIL(F) MSWin32 Win2000 SP4 (x86/1 cpu)
Message-ID: <20091204140536.GD2582@plum.flirble.org>
(amended to fix the obvious typo)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
New format:
This is perl 5, version 11, subversion 1 (v5.11.1) ...
The rationale for this change is that the Perl 5 interpreter will never
increment PERL_REVISION from 5 to 6, so we want people to start focusing
on the PERL_VERSION number as most significant and PERL_SUBVERSION as
equivalent to a "release number". In other words, "perl 5" is a
language, this is the 11th version of it, and the second release of that
version (counting from zero). Among other things, this makes the
output of -v and -V more consistent.
The old v-string style is included for familiarity and usage in code.
For builds from git, it will include the same extended format as it
did before, e.g. "(v5.11.1-176-gaf24cc9*)"
|
|
|
|
| |
ENTER/LEAVE when debugging is enabled
|
|
|
|
|
|
|
| |
Rationale: This makes the behaviour of my_exit consistent, so it no
longer depends on whether a subroutine was called using call_sv or as a
normal using an entersub op. Previously, the exit code was sometimes
converted to an exception.
|
| |
|
|
|
|
| |
the original files insted of to the copied files perlmini.c and opmini.c
|
|
|
|
|
| |
Replace ckWARN_d{,2,3,4}() && Perl_warner() with it, which trades reduced code
size for 1 more function call if warnings are not enabled.
|
|
|
|
|
|
|
| |
Replace ckWARN{,2,3,4}() && Perl_warner() with it, which trades reduced code
size (about 0.2%), for 1 more function call if warnings are not enabled.
However, if we're now in the L1 or L2 cache when we weren't previously, that's
still going to be a speed win.
|
| |
|
|
|
|
| |
Saves having object code to build one SV that Config::_V can find out by itself.
|
| |
|