| Commit message (Collapse) | Author | Age | Files | Lines |
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Scalar::Util::reftype(), refaddr() and blessed() are all a bit
less useful than they could be as they all return C<undef> when
their argument is not a reference. While this is logical, it also
means that using these routines has to be guarded, and normally
guarded in such a way that the internal logic is called twice.
Additionally these routines are quite commonly used and having to
load an additional DLL and XS code every program is inefficient.
Therefore we introduce the "mauve" namespace for to hold the "fixed"
equivalents, this namespace is /always/ loaded (like the 're' or 'utf8'
namespaces), and thus these routines can be accessed easily at any time.
We also provide a new module wrapper in t/lib which allows these
routines to be exported into other namespaces if the user so chooses.
At Jesse's request I have included weaken() and as it seemed logical to
do so I have also added isweak().
Once we have a good name for the namespace we can s/mauve/whatever/g
|
| |
|
|
|
|
|
|
|
|
|
|
| |
There are a number of object methods which make absolutely
no sense when called as class methods. In addition, with
Perl 5.11.5/5.12.0, there are asserts which will trigger
SEGV's when you do that.
So we check in the XS code and refuse to continue if an
object method is called as a class method.
|
|
|
|
|
| |
This reduces object code size, reducing CPU cache pressure on the non-exception
paths.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
A number of function names that do warnings have been added, but diag.t
hasn't kept up.
This patch changes it to look for likely function names in embed.fnc, so
it will automatically keep up in the future. There's no need to worry
about it looking for inappropriate functions, as the syntax of messages
that it looks for is so restrictive, that there won't be false
positives. Instead there are still many messages it fails to catch.
As a result of it's falling behind several issues have crept in. I
resolved the couple I thought were clear (including one in a comment;
diag.t doesn't strip comments, but mostly it doesn't matter), and added
the others to the <DATA> section to ignore.
are
|
|
|
|
| |
The array should be declared with its actual size.
|
| |
|
|
|
|
|
| |
Replacing the longhand list of calls to newXS{,proto} with loop over a data
structure reduces the object size by over 1K.
|
| |
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Authors: John Peacock, David Golden and Zefram
The goal of this mega-patch is to enforce strict rules for version
numbers provided to 'package NAME VERSION' while formalizing the prior,
lax rules used for version object creation. Parsing for use() is
unchanged.
version.pm adds two globals, $STRICT and $LAX, containing regular
expressions that define the rules. There are two additional functions
-- version::is_strict and version::is_lax -- that test an argument
against these rules.
However, parsing of strings that might contain version numbers is done
in core via the Perl_scan_version function, which may be called during
compilation or may be called later when version objects are created by
Perl_new_version or Perl_upg_version.
A new helper function, Perl_prescan_version, has been added to validate
a string under either strict or lax rules. This is used in toke.c for
'package NAME VERSION' in strict mode and by Perl_scan_version in lax
mode. It matches the behavior of the verison.pm regular expressions,
but does not use them directly.
A new test file, comp/packagev.t, validates strict and lax behaviors of
'package NAME VERSION' and 'version->new(VERSION)' respectively and
verifies their behavior against the $STRICT and $LAX regular
expressions, as well. Validating these two implementation should help
ensure they each work as intended.
Other files and tests have been modified as necessary to support these
changes.
There is remaining work to be done in a few areas:
* documenting all changes in behavior and new functions
* determining proper treatment of "," as decimal separators in
various locales
* updating diagnostics for new error messages
* porting changes back to the version.pm distribution on CPAN,
including pure-Perl versions
|
| |
|
| |
|
| |
|
| |
|
| |
|
|
|
|
| |
A constant subroutine is now optimised away at DESTROY time.
|
|
|
|
|
| |
The function Internals::inc_sub_generation() was removed
in commit 41892db1963e88b547da12808d8e5630cc1edb59
|
| |
|
|
|
|
|
| |
never been in a released version of perl, so this change has no compatibility
implications.
|
|
|
|
| |
S_mro_get_linear_isa_dfs(), we can move get_isa_hash() to any other source file.
|
|
|
|
|
|
| |
Message-ID: <25940.1225611819@chthon>
Date: Sun, 02 Nov 2008 01:43:39 -0600
p4raw-id: //depot/perl@34698
|
|
|
|
|
|
| |
This is mostly to silence gcc's warning, "format not a string
literal and no format arguments".
p4raw-id: //depot/perl@34694
|
|
|
|
|
|
| |
Can't easily do gv.h, as GvGP() (at least) needs to split into two
macros - one const for reading, one non-const for writing.
p4raw-id: //depot/perl@34679
|
|
|
|
|
| |
Perl_sv_magicext(), which is documented.
p4raw-id: //depot/perl@34671
|
|
|
| |
p4raw-id: //depot/perl@34653
|
|
|
| |
p4raw-id: //depot/perl@34650
|
|
|
| |
p4raw-id: //depot/perl@34624
|
|
|
| |
p4raw-id: //depot/perl@34585
|
|
|
|
|
|
|
|
|
|
|
| |
de-duping hash used by S_mro_get_linear_isa_dfs(). Provide a new
function Perl_get_isa_hash() to lazily retrieve this. (Which could
actually be static if S_isa_lookup() and Perl_sv_derived_from()
moved into mro.c.) Make S_isa_lookup() use this lookup hash in place
of a linear walk of the linear isa. This should turn isa lookups from
O(n) to O(1), which should make heavy users of ->isa() faster.
(eg PPI, and hence Perl Critic).
p4raw-id: //depot/perl@34354
|
|
|
|
|
|
|
| |
which doesn't tell you anything you won't discover soon enough when you
try to call a method. (Or haven't already been warned about when @ISA
was linearised)
p4raw-id: //depot/perl@34353
|
|
|
|
|
| |
comparing the two, as a NULL == NULL comparison can't happen.
p4raw-id: //depot/perl@34352
|
|
|
| |
p4raw-id: //depot/perl@34350
|
|
|
|
|
| |
don't need to pass in name_stash as a parameter.
p4raw-id: //depot/perl@34349
|
|
|
|
|
|
| |
meant to be removed once I'd proved it by running the tests without
aborting. Oops. use more 'coffee';
p4raw-id: //depot/perl@34217
|
|
|
| |
p4raw-id: //depot/perl@34216
|
|
|
|
|
| |
along with a bunch other named capture related leaks.
p4raw-id: //depot/perl@34151
|
|
|
|
|
|
| |
From: "Jerry D. Hedden" <jdhedden@cpan.org>
Message-ID: <1ff86f510805211015m5c59bbf5wf3a992e776b1c4c4@mail.gmail.com>
p4raw-id: //depot/perl@33910
|
|
|
|
|
| |
with stringifying a code reference.
p4raw-id: //depot/perl@33902
|
|
|
|
|
|
|
| |
the form Perl_croak(aTHX_ "Usage %s::%s(%s)", "ouch" "awk", "eee_yow");
down to croak_xs_usage(cv, "eee_yow"); and refactor all the core XS
code to use it. This adds () to the error messages for attributes::*
p4raw-id: //depot/perl@33901
|
|
|
|
|
|
|
|
|
|
|
|
| |
ability to create landmines that will explode under someone in the
future when they upgrade their compiler to one with better
optimisation. We've already done this at least twice.
(Yes, some of the assertions are after code that would already have
SEGVd because it already deferences a pointer, but they are put in
to make it easier to automate checking that each and every case is
covered.)
Add a tool, checkARGS_ASSERT.pl, to check that every case is covered.
p4raw-id: //depot/perl@33291
|
|
|
|
|
|
| |
PerlIO_get_layers(), by co-opting the new SVs it creates, rather than
copying them.
p4raw-id: //depot/perl@33182
|
|
|
|
|
| |
sv_2mortal().
p4raw-id: //depot/perl@33181
|
|
|
|
|
| |
Message-ID: <20080128125741.GA27390@refcnt.homeunix.org>
p4raw-id: //depot/perl@33103
|
|
|
|
|
|
| |
From: "Jerry D. Hedden" <jdhedden@cpan.org>
Message-ID: <1ff86f510801081201q5c36f055re6165ebfe8876c2e@mail.gmail.com>
p4raw-id: //depot/perl@32911
|
|
|
| |
p4raw-id: //depot/perl@32896
|
|
|
|
|
|
| |
and mortalizing them. Use these macros where possible. And also
mX?PUSH[inpu] where possible.
p4raw-id: //depot/perl@32821
|
|
|
|
|
| |
sv_2mortal(newSVpvs(...)) constructions to use it.
p4raw-id: //depot/perl@32819
|
|
|
|
|
| |
p4raw-link: @32816 on //depot/perl: 1eb9e81d303aab0f6c2386f44bc76241948fce0f
p4raw-id: //depot/perl@32817
|