| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
- this improves the error message on ABI incompatibility, per
[perl #123136]
- reduce the number of gv_fetchfile calls in newXS over registering many
XSUBs
- "v" was not stripped from PERL_API_VERSION_STRING since string
"vX.XX.X\0", a typical version number is 8 bytes long, and aligned to
4/8 by most compilers in an image. A double digit maint release is
extremely unlikely.
- newXS_deffile saves on machine code in bootstrap functions by not passing
arg filename
- move newXS to where the rest of the newXS*()s live
- move the "no address" panic closer to the start to get it out of the way
sooner flow wise (it nothing to do with var gv or cv)
- move CvANON_on to not check var name twice
- change die message to use %p, more efficient on 32 ptr/64 IV platforms
see ML post "about commit "util.c: fix comiler warnings""
- vars cv/xs_spp (stack pointer pointer)/xs_interp exist for inspection by
a C debugger in an unoptimized build
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This API elevates the amount of ABI compatibility protection between XS
modules and the interp. It also makes each boot XSUB smaller in machine
code by removing function calls and factoring out code into the new
Perl_xs_handshake and Perl_xs_epilog functions.
sv.c :
- revise padlist duping code to reduce code bloat/asserts on DEBUGGING
ext/DynaLoader/dlutils.c :
- disable version checking so interp startup is faster, ABI mismatches are
impossible because DynaLoader is never available as a shared library
ext/XS-APItest/XSUB-redefined-macros.xs :
- "" means dont check the version, so switch to " " to make the test in
xsub_h.t pass, see ML thread "XS_APIVERSION_BOOTCHECK and XS_VERSION
is CPP defined but "", mow what?"
ext/re/re.xs :
- disable API version checking until #123007 is resolved
ParseXS/Utilities.pm :
109-standard_XS_defs.t :
- remove context from S_croak_xs_usage similar to core commit cb077ed296 .
CvGV doesn't need a context until 5.21.4 and commit ae77754ae2 and
by then core's croak_xs_uage API has been long available and this
backport doesn't need to account for newer perls
- fix test where lack of having PERL_IMPLICIT_CONTEXT caused it to fail
|
|
|
|
|
|
|
| |
We control both strings. Perl API versions are not old decimal or alphas
versions. Maints dont increase Perl API ver. Just do a memcmp. Faster and
less machine code. Before 0xA6 bytes of machine code on VC 2003 32b,
after 0x35. This patch is related to [perl #123136].
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
It is not very user friendly to list functions as
"Functions found in file FOO". Better is to group them by purpose, as
many were already. I went through and placed the ones that weren't
already so grouped into groups. Patches welcome if you have a better
classification.
I changed the headings of some so that the important disctinction was
the first word so that they are placed in the file more appropriately.
And a couple of ones that I had created myself, I came up with a name
that I think is better than the original
|
|
|
|
| |
plus some typo fixes. I probably changed some things in perlintern, too.
|
|
|
|
|
|
|
|
|
| |
The option is always defined by default and can't be disabled from the
makefiles. Manually disabling it causes several tests to fail, which
nobody has reported, so we presume nobody does this. The non-default
configuration is believed to be historical cruft with no value now, and
has clearly bitrotted in recent years (hence the test failures), so
remove it to simplify the codebase slightly.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This removes most register declarations in C code (and accompanying
documentation) in the Perl core. Retained are those in the ext
directory, Configure, and those that are associated with assembly
language.
See:
http://stackoverflow.com/questions/314994/whats-a-good-example-of-register-variable-usage-in-c
which says, in part:
There is no good example of register usage when using modern compilers
(read: last 10+ years) because it almost never does any good and can do
some bad. When you use register, you are telling the compiler "I know
how to optimize my code better than you do" which is almost never the
case. One of three things can happen when you use register:
The compiler ignores it, this is most likely. In this case the only
harm is that you cannot take the address of the variable in the
code.
The compiler honors your request and as a result the code runs slower.
The compiler honors your request and the code runs faster, this is the least likely scenario.
Even if one compiler produces better code when you use register, there
is no reason to believe another will do the same. If you have some
critical code that the compiler is not optimizing well enough your best
bet is probably to use assembler for that part anyway but of course do
the appropriate profiling to verify the generated code is really a
problem first.
|
|
|
|
|
| |
This updates the editor hints in our files for Emacs and vim to request
that tabs be inserted as spaces.
|
|
|
|
|
|
| |
This was causing build errors like:
Cwd.c:553:1: error: external linkage required for symbol ‘XS_Cwd_getcwd’ because of ‘dllexport’ attribute
|
|
|
|
|
|
|
| |
Instead, as Zefram recommended, ExtUtils::ParseXS will be patched
to not export XSUB symbols by default that are generated through
the module itself. As Zefram said, this has the advantage of
allowing older perls to benefit from the non-exporting of symbols.
|
|
|
|
|
|
| |
For C++, ab1478f7146843f7 inadvertently defined XS_INTERNAL as
extern "C" static ...
which C++ compilers rightfully choke on.
|
|
|
|
|
|
|
| |
At the same time, do not include "STATIC" in XSPROTO and
get rid of the XSPROTO_INTERNAL and XSPROTO_EXTERNAL macros
because of that. This allows Devel::PPPort to continue doing
its evil typedef'ing magic using XSPROTO.
|
|
|
|
|
|
|
|
|
|
|
|
| |
This adds a few additional macros to XSUB.h:
XS_INTERNAL and XS_EXTERNAL are versions of the XS macro
that explicitly use internal (static) linking or not.
XSPROTO_INTERNAL and XSPROTO_EXTERNAL are the obvious equivalents
for XSPROTO (which is apparently not public yet we support its
use in SWIG...).
The XS and XSPROTO macros themselves are not defined to not
use STATIC, but this may (should?) be changed in the future.
|
|
|
|
|
| |
Magic with a NULL vtable is equivalent to magic with a vtable of all 0s.
On CPAN, only Apache::Peek's code for 5.005 is referencing it.
|
|
|
|
|
|
|
|
|
| |
# New Ticket Created by (Peter J. Acklam)
# Please include the string: [perl #81904]
# in the subject line of all future correspondence about this issue.
# <URL: http://rt.perl.org/rt3/Ticket/Display.html?id=81904 >
Signed-off-by: Abigail <abigail@abigail.be>
|
|
|
|
|
|
| |
The previous macro generated over .5K of object code. This is in every shared
object, and is only called once. Hence this change increases the perl binary
by about .5K (once), to save .5K for every XS module loaded.
|
|
|
|
|
|
| |
The macro expansion generates over 1K of object code. This is in every shared
object, and is only called once. Hence this change increases the perl binary
by about 1K (once), to save 1K for every XS module loaded.
|
|
|
|
| |
It should not be FALSE, because it's a bitmap, not a boolean.
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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).
|
|
|
|
|
|
|
|
|
| |
The SV holding XS_VERSION, and the version object created from it were
leaked. Also, if the version from perl space wasn't a version object already,
the one that got created leaked.
Additionally, in case of an error, the two SVs returned by vstringify were
leaked.
|
| |
|
|
|
|
|
| |
See also http://rt.cpan.org/Public/Bug/Display.html?id=55049
with workaround in http://code.google.com/p/perl-devel-nytprof/source/detail?r=1168
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Hi,
Using the attached patch to the blead source (as of a few hours ago), I can
build perl with the following OS/compiler/make combos.
On 32-bit XP:
MSVC++ 7.0 / dmake (uses win32/makefile.mk)
MSVC++ 7.0 / nmake (uses win32/Makefile)
Borland C++ 5.5.1 / dmake
mingw.org's gcc-4.3.0 / dmake
mingw.org's gcc-3.4.5 / dmake
mingw-w64.sf's 32-bit gcc-4.4.3 / dmake
(There's a bug with that last compiler on XP.
The perl it builds on XP hangs on XP, but runs ok if copied across to Vista.
I think this is unrelated to the patches - probably even unrelated to perl.
Without these patches perl will not even build using that last compiler.)
On 64-bit Vista:
32-bit MSVC++ 7.0 / nmake (uses win32/Makefile)
32-bit MSVC++ 7.0 / dmake (uses win32/makfile.mk)
32-bit Borland C++ 5.5.1 / dmake
mingw.org's 32-bit gcc-4.4.0 / dmake
mingw.org's 32-bit gcc-3.4.5 / dmake
mingw-w64.sf's 32-bit gcc-4.4.3 / dmake
mingw-w64.sf's 64-bit gcc-4.4.3 / dmake
mingw-w64.sf's 64-bit x86_64-w64-mingw32-gcc-4.4.3 / dmake
64-bit MicrosoftPlatform SDK for Windows Server 2003 R2 / dmake (uses
win32/makefile.mk)
64-bit MicrosoftPlatform SDK for Windows Server 2003 R2 / nmake (uses
win32/Makefile)
Not all of those builds pass all tests - but where the removal of the
patches still permits perl to build, the same tests still fail. That is,
*nothing* is lost by including these patches - but there are significant
gains.
Each of the above builds was done according to the normal win32
configuration parameters - ie multi-threaded, non debug. No unusual config
settings were applied. (I did build one debug perl on Vista using
mingw-w64.sf's 32-bit gcc-4.4.3 and it built fine.)
Please feel free to apply these patches (with or without modification) -
and, yes, you're more than welcome to blame me if they cause any breakages
;-)
Of course, some of those compilers (Borland, Microsoft, and the compilers
from mingw.org) already build perl *without* having to apply any patches.
It's just the other compilers that need the patches. The purpose of testing
with Borland, Microsoft, and the mingw.org compilers is just to check that
these patches don't break them.
As a final check, I've done a build on my aging linux (mandrake-9.1) box,
gcc-3.2.2. I built with '-des -Duselongdouble -Duse64bitint -Dusedevel'. No
problem with that, either.
If there's additional testing requirements please let me know, and I'll try
to oblige.
I believe the patch applied successfully for me - see below my sig for the
output.
Cheers,
Rob
Rob@desktop2 ~/GIT/blead
$ patch -p0 <blead_diff.diff
patching file dist/threads/threads.xs
patching file handy.h
patching file cpan/ExtUtils-MakeMaker/lib/ExtUtils/MM_Win32.pm
patching file op.c
Hunk #1 succeeded at 5774 (offset 47 lines).
patching file pp_pack.c
patching file util.c
Hunk #1 succeeded at 5366 (offset -28 lines).
patching file win32/makefile.mk
patching file win32/perlhost.h
patching file win32/win32.c
patching file win32/win32.h
patching file README.win32
patching file XSUB.h
|
| |
|
|
|
|
|
|
|
|
|
| |
As Nicholas already noted in a FIXME, assigning to DEFSV should
use GvSV instead of GvSVn. This change ensures that, at least
under -DPERL_CORE, DEFSV cannot be assigned to and introduces
a DEFSV_set macro to allow setting DEFSV.
This fixes #53038: map leaks memory.
p4raw-id: //depot/perl@34776
|
|
|
| |
p4raw-id: //depot/perl@34585
|
|
|
| |
p4raw-id: //depot/perl@32820
|
|
|
|
|
|
|
|
|
|
|
|
| |
typedef XS(SwigPerlWrapper);
typedef SwigPerlWrapper *SwigPerlWrapperPtr;
This breaks if XS() includes the 'extern "C"' decoration under C++.
The appended patch provides an XSPROTO() macro that could be used
by SWIG instead.
(Patch from Jan Dubois to fix breakage caused by #28734.)
p4raw-id: //depot/perl@31697
|
|
|
|
|
|
| |
From: "Robert May" <robertmay@cpan.org>
Message-ID: <54bdc7510707211829t67e8b82eo7d8e722e73c6a3b3@mail.gmail.com>
p4raw-id: //depot/perl@31653
|
|
|
|
|
| |
Message-Id: <B46A083E-A133-4D38-9BE8-BE1EB0AAA326@petdance.com>
p4raw-id: //depot/perl@31270
|
|
|
|
|
| |
Message-ID: <prol131i8b27re246alnhmem4mj13fcl2b@4ax.com>
p4raw-id: //depot/perl@30879
|
|
|
|
|
|
| |
files that generate .h files, so they'll be ready
next time.
p4raw-id: //depot/perl@29695
|
|
|
|
|
|
|
|
|
| |
Subject: [PATCH] Cleanup SVf arguments (2nd try)
Message-ID: <20070101201613.4120d9ef@r2d2>
Introduce an SVfARG() macro for %SVf (%-p here) arguments to
perl's printf
p4raw-id: //depot/perl@29687
|
|
|
|
|
|
|
|
| |
Subject: [PATCH] Cleanup SVf arguments (2nd try)
Message-ID: <20070101201613.4120d9ef@r2d2>
Adds (void*) casts to %-p and %p printf arguments
p4raw-id: //depot/perl@29686
|
|
|
| |
p4raw-id: //depot/perl@29684
|
|
|
|
|
| |
most efficient idea.
p4raw-id: //depot/perl@29042
|
|
|
| |
p4raw-id: //depot/perl@28966
|
|
|
|
|
| |
[And these are function pointers, so they're not NULL :-)]
p4raw-id: //depot/perl@28962
|
|
|
|
|
| |
Message-ID: <9b18b3110610061016x5ddce965u30d9a821f632d450@mail.gmail.com>
p4raw-id: //depot/perl@28957
|
|
|
|
|
| |
(See: http://www.nntp.perl.org/group/perl.daily-build.reports/40283)
p4raw-id: //depot/perl@28759
|
|
|
|
|
| |
Message-ID: <44E49649.9090307@iki.fi>
p4raw-id: //depot/perl@28734
|
|
|
|
|
|
|
| |
storage to newXS() seemingly forever. This involves creating
newXS_flags(), with the first flag being "arrange to copy the
filename and free it at the right time".
p4raw-id: //depot/perl@28063
|
|
|
|
|
|
| |
from I32 to PADOFFSET, which is more correct (and fixes
a warning in Devel::PPPort).
p4raw-id: //depot/perl@27968
|
|
|
| |
p4raw-id: //depot/perl@27696
|
|
|
|
|
|
|
| |
and default definitions for the 2 variables. (Which will save a lot of
conditional complilation, by instead letting the C compiler optimiser
remove dead code.)
p4raw-id: //depot/perl@27408
|
|
|
|
|
|
| |
Instead remove &PL_vtbl_glob from globvar.sym.
p4raw-link: @27295 on //depot/perl: 3476b56103cbe13508b1fd6b46ae7b9cb6e0f7ed
p4raw-id: //depot/perl@27296
|
|
|
|
|
| |
p4raw-link: @27289 on //depot/perl: c0c446747ad6c5bde53bc8415ca16ef77f6320f2
p4raw-id: //depot/perl@27295
|
|
|
|
|
|
| |
SVpad_OUR with macros SvPAD_TYPED(), SvPAD_OUR() etc, to abstract
away the flags bits acutally used to store this information.
p4raw-id: //depot/perl@27294
|
|
|
|
|
| |
Message-ID: <20060215125148.GA12535@brugman.iloquent.nl>
p4raw-id: //depot/perl@27203
|
|
|
|
|
| |
Message-ID: <20060202093849.GD12591@accognoscere.homeunix.org>
p4raw-id: //depot/perl@27054
|