| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
| |
To correspond to stable CPAN release.
|
| |
|
| |
|
|
|
|
| |
Commit modifies 4 of 5 files in patch submitted by author in RT #124335.
|
|
|
|
|
|
| |
Per report by kentnl++ in RT #124151.
Increment $VERSION across dist/ExtUtils-ParseXS/lib. Add perldelta entry.
|
|
|
|
|
| |
XS writers may need to manipulate the LC_NUMERIC locale. Some macros
are available to do this. This documents them and the issues.
|
|
|
|
|
|
|
| |
From commit 8990e30710 "perl 5.0 alpha 6". The DESTROY XSUB with T_PTROBJ
as INPUT arg was refusing to obey my custom typemap for T_PTROBJ, but all
other XSUBs followed the custom T_PTROBJ override. Extend this
optimization to other rarely used typemap types and document this behavior.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This patch avoids using ST(0) repeatedly in the OUTPUT section for RETVAL.
ST() include a read of global PL_stack_base. This read must be done between
every function call per C lang. XSRETURN also contains a PL_stack_base
read. sv_2mortal returns the incoming SV, the retval was previously ignored
and ST was used again. This patch reduced the number of ST references to
exactly 1, per RETVAL. The PL_stack_base reference in XSRETURN will be
optimized into the PL_stack_base reference in ST(0). Using the retval of
sv_2mortal allows the SV* to stay in a cheaper volatile register. In a
sequence of "RETVALSV = newSViv(RETVAL); RETVALSV = sv_2mortal(RETVALSV);
ST(0) = RETVALSV; XSRETURN(1);" RETVALSV never had to be saved around a
function call. Also ST(0) in a multi eval macro with different
function calls in it, will cause more PL_stack_base reads, so badly written
user supplied typemaps get optimized since a C auto that never had & done
on it is guarenteed to not change between function calls.
To produce cleaner C code, indenting cleanup is done, and if RETVAL is a
SV *, RETVALSV isn't created. Also if no additional boilerplate lines
like sv_2mortal are added, RETVALSV isn't created.
See [perl #123278] for details on machine code reductions that this patch
caused and also see
http://www.nntp.perl.org/group/perl.perl5.porters/2014/11/msg222342.html
|
|
|
|
|
|
| |
A recent change to ExtUtils::ParseXS broke builds: add
PERL_UNUSED_VAR(file)
only when the 'file' var is present.
|
| |
|
| |
|
|
|
|
|
| |
Since newXS_deffile was introduced, we don’t always use the file
variable.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
- 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
|
| |
|
|
|
|
|
|
|
| |
This pod has been totally silent about monkey wrenches that could be
thrown by XS code doing things that can affect perl. Add a few
cautions, including some detailed information about one area where we
have been bitten: locales.
|
|
|
|
| |
Includes version bump.
|
| |
|
| |
|
|
|
|
|
|
| |
General refactoring to make the code (marginally) easier to follow
and more consistent. This should not result in a change in behaviour.
Includes version bump to 3.24.
|
|
|
|
| |
and tell the reader where to find the details.
|
|
|
|
|
| |
Not using PERL_NO_GET_CONTEXT is for legacy or unmaintained pre-ithreads
code. New code should define it.
|
| |
|
|
|
|
|
|
| |
the plan is fragile 29 = 2 + 2 + 25
Signed-off-by: Francois Perrad <francois.perrad@gadz.org>
|
|
|
|
|
|
| |
9b2d7314c3d60 bumped $VERSION in ParseXS.pm from 3.22 to 3.23,
but left the other .pm files at .22. This stops ExtUtils::ParseXS from
loading, so bump all the other modules in this distribution too.
|
|
|
|
|
| |
There has been another change (e15ca23a9) since the last CPAN
release. Would that cmp_version.t could catch this!
|
|
|
|
|
|
|
|
|
|
| |
This means:
TYPEMAP: <<FOO;
Something T_IV
FOO
will now work.
|
|
|
|
|
|
|
|
| |
[DELTA]
3.22 - Thu Aug 29 19:30:00 CET 2013
- Fix parallel testing crashes.
- Explicitly require new-enough Exporter.
|
|
|
|
|
|
|
|
|
|
| |
Make the array interface 64-bit safe by using SSize_t instead of I32
for array indices.
This is based on a patch by Chip Salzenberg.
This completes what the previous commit began when it changed
av_extend.
|
|
|
|
|
|
|
|
| |
In second block of tests, eliminate all tests except those needed to prove
that ParseXS can write a .c file without line numbers. We will treat this as
sufficient because the tests we are deleting are causing crashes on Windows.
For: RT #119231
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Both t/001-basic.t and what was t/004-nolinenumbers.t were trying to write to
a 't/XSTest.c' file. When run in parallel, this was causing problems when
TEST_JOBS >= 1 (2 on some boxes, 4 on dromedary).
Since all that t/004-nolinenumbers.t was ever trying to do was to run
process_file() without line numbers -- a case not exercised prior to my
2009-11 refactoring/test additions -- the simplest way to avoid these
problems is to stuff the tests from t/004 into t/001 and delete t/001.
For: RT #119231
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
- duplicate declaration of name for newMouse
- missing OUTPUT clauses
- use of a member of the context object that doesn't exist in
get_mouse_name()
- incorrect type assigned to RETVAL in get_mouse_name
- inconsistent indentation
- B<> to mark a heading instead of =headN
|
| |
|
| |
|
|
|
|
|
|
| |
The generated XS file output was varying between builds because of hash
randomisation. This sorts the output to make it the same for the same
inputs. This facilitates eyeballing diffs of two workspaces.
|
| |
|
|
|
|
|
|
| |
Added an example for $type Perl variable interpolated by typemap.
and adjusted an example of $ntype Perl variable of typemap to
illustrate its effect.
|
|
|
|
|
|
|
|
|
| |
At the same time, discourage its use. It's an obscure option that, most
of the time, does the opposite of what people actually need. If nothing
else, it should be a feature of XS instead of xsubpp.
But it exists, so documenting it with a warning is the right thing to
do.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This problem was brought up in #115796. Both of those lines of code that
ParseXS put out when dealing with T_BOOL were unnecessary, and caused a
some inefficiencies (extra calls). Since typemaps can have complicated
evaluation and include Perl code, see commit 9712754a3e, it is best to
eval the typemap entry first, then regexp it to see what it looks like,
not regexp the unevaled entry possibly containing Perl. In case a typemap
entry is maintaining state inside ParseXS (venturing into the undocumented
and unsupported), (I've never seen it done) don't eval it twice if it can
be avoided. Someone might want to change the typemap entry to multiple
eval in the future, but don't introduce it now if it can be avoided.
Using T_BOOL by name to see an immortal is a bad idea, since any XS module
can reuse the typemap entry, so best to regexp for something that looks
like it would return an immortal, "= &PL_sv_* ;" or "= boolSV(". In the
future someone might want to introduce a macro that does nothing, except
gives a signal to ParseXS that an expression returns an immortal or an
already mortaled SV, to suppress the sv_2mortal call.
The tests in 001-basic.t might break in the future with changes to ParseXS
or the Perl API, but I assume they will be fixed at that point in time.
Note: This patch was amended by the committer to apply cleanly to a
newer version of ExtUtils::ParseXS and to include all necessary test
changes.
|
|
|
|
|
| |
Lots of dead code and some inflexibilities wrt. running tests from / or
t/.
|
| |
|
|
|
|
|
| |
Basically, using named lexical beats $_ by a long shot since they don't
magically propagate into functions called.
|
|
|
|
|
| |
Sort of. Breaking encapsulation, but that's better than not even having
a blessed object at all.
|
| |
|
| |
|
|
|
|
|
| |
Adds new / vastly improved tests for 'targetable'.
Also improves targetable documentation.
|
|
|
|
|
|
|
|
|
|
| |
The make_targetable function in ExtUtils::ParseXS::Utilities now lives
in ExtUtils::Typemaps::OutputMap as method 'targetable' since the code
was quite duplicated before. Makes very minor adjustments to
'targetable'.
Removes the flawed make_targetable tests. Improved tests in lieu of the
old ones will be added asap.
|
| |
|
|
|
|
|
| |
Includes moving tidy_type to ExtUtils::Typemaps where it seems to
belong. It's a pretty poor canonicalizer, but better than nothing!
|