14 years agoAvoid overflow warning in chop.t.
Craig A. Berry [Fri, 4 Jun 2010 03:17:39 +0000]
Avoid overflow warning in chop.t.

It overflows at compile time on 32-bit architectures, so the skip
isn't enough.

14 years agofix indendation of DM_* flag definitions
David Mitchell [Fri, 4 Jun 2010 20:30:18 +0000]
fix indendation of DM_* flag definitions

14 years agoexpress DM_[GU]ID flags in terms of components
David Mitchell [Fri, 4 Jun 2010 20:28:20 +0000]
express DM_[GU]ID flags in terms of components

14 years agorename DM_ARRAY flag to DM_ARRAY_ISA
David Mitchell [Fri, 4 Jun 2010 20:25:07 +0000]
rename DM_ARRAY flag to DM_ARRAY_ISA

This better represents its current role as specifically delaying magic on
@ISA as opposed to a general array magic delay mechanism.

14 years agobelatedly add a test for RT #51636:
David Mitchell [Fri, 4 Jun 2010 20:16:48 +0000]
belatedly add a test for RT #51636:

segmentation fault with array ties

14 years agoRevert "Re: [perl #51636] segmentation fault with array ties"
David Mitchell [Fri, 4 Jun 2010 20:01:43 +0000]
Revert "Re: [perl #51636] segmentation fault with array ties"

This reverts commit 90630e3c741716305d7f1da4df5eab5c1bee42cc.

This fix turns out to be wrong, and also made ($<,$>)=(...) fail
(RT #75212).

The original problem was a SEGV in av_clear(). This was mis-diagnosed
as recursive PL_delaymagic issue, and the fix was to temprarily reset
PL_delaymagic to zero. This stopped the mg_set() of $> and $> being
delayed.

The real problem was that mg_free wasn't clearing the [GSR]MG flags
after freeing xmg_magic. This was independently fixed by commit
68f8932eb570af656553ed44c11a23f0a216a3ec.

14 years agothreads::shared: veto signal despatch if locked
David Mitchell [Fri, 4 Jun 2010 16:05:21 +0000]
threads::shared: veto signal despatch if locked

This fixes RT #74868: Safe signals changes causing hangs with threads.

The basic issue is that due to changes in where safe signals can be
despatched, (including now on leaving scope), it's possible for a
perl-level signal handler to be called while PL_sharedsv_lock is held.
If the handler does locking or manipulation of shared vars, then deadlock
can occur.

A robust fix for this is to ensure that the signal handler isn't called
while we have the lock. This is done using the signal handler hook added
in the previous commit.

14 years agoadd PL_signalhook to hook into signal dispatch
David Mitchell [Fri, 4 Jun 2010 15:18:05 +0000]
add PL_signalhook to hook into signal dispatch

This is initially intended for threads::shared and shouldn't (yet)
be considered part of the public API.

14 years agoDo not advertise Math::TrulyRandom, which hasn't been updated since 1996
Rafael Garcia-Suarez [Thu, 3 Jun 2010 14:11:26 +0000]
Do not advertise Math::TrulyRandom, which hasn't been updated since 1996

(Spotted by Giel Goudsmit)

14 years agoRemove extraneous semicolon from OP_PRIVATE_ONCE.
Craig A. Berry [Thu, 3 Jun 2010 12:44:17 +0000]
Remove extraneous semicolon from OP_PRIVATE_ONCE.

Thus silencing compiler noise like:

OP_PRIVATE_ONCE(op_aassign, OPpASSIGN_COMMON, ",COMMON");
........................................................^
%CC-I-EXTRASEMI, Extraneous semicolon.
at line number 846 in file D0:[craig.blead]dump.c;1

14 years agoDeprecate find_rundefsvoffset()
Vincent Pit [Thu, 3 Jun 2010 10:08:14 +0000]
Deprecate find_rundefsvoffset()

14 years agoThe UNDERBAR macro should use find_rundefsv() as well
Vincent Pit [Thu, 3 Jun 2010 09:55:20 +0000]
The UNDERBAR macro should use find_rundefsv() as well

14 years agoMake pp_reverse fetch the lexical $_ from the correct pad
Vincent Pit [Thu, 3 Jun 2010 09:44:15 +0000]
Make pp_reverse fetch the lexical $_ from the correct pad

This is achieved by introducing a new find_rundefsv() function in pad.c

This fixes [perl #75436].

14 years agoSkip two Japhs that use the fact that split in void context splitted
Abigail [Tue, 1 Jun 2010 16:27:43 +0000]
Skip two Japhs that use the fact that split in void context splitted
to @_. This is no longer true in 5.12.0 and upwards.

14 years agoDocument IO::Socket getsockopt and setsockopt
Slaven Rezic [Thu, 29 Apr 2010 14:04:35 +0000]
Document IO::Socket getsockopt and setsockopt

get/setsockopt are not explicitly documented. Note that the documented
sockopt() method is a wrapper around get/setsockopt, but does not cover
all cases because of the hardcoded level (= SOL_SOCKET).

14 years agomove the fresh_perl() tests above the environment tests
Tony Cook [Mon, 31 May 2010 23:50:08 +0000]
move the fresh_perl() tests above the environment tests

the environment tests were resetting environment variables useful for
running fresh perls, like LD_LIBRARY_PATH.

14 years agoPATCH: teach diag.t new warning function names
Karl Williamson [Mon, 31 May 2010 03:54:32 +0000]
PATCH: teach diag.t new warning function names

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

14 years agoState the requirement of a C89 compliant ANSI C-compiler
H.Merijn Brand [Mon, 31 May 2010 12:35:09 +0000]
State the requirement of a C89 compliant ANSI C-compiler

14 years agoIn Perl_pad_add_name(), use sv_upgrade() directly rather than new[AH]V().
Nicholas Clark [Mon, 31 May 2010 12:19:22 +0000]
In Perl_pad_add_name(), use sv_upgrade() directly rather than new[AH]V().

As newAV() and newHV() are now merely wrappers around sv_upgrade(), and the
existing SV is always brand new and of type SVt_NULL, call them on it, rather
than disposing of it as a side effect of storing a(nother new) SV.

Also, no need to set SvPADMY() again, as it is already set.

Resolves RT #73092.

14 years agoReorder the entry for die, moving discussion of the exit code later.
Nicholas Clark [Mon, 31 May 2010 10:47:04 +0000]
Reorder the entry for die, moving discussion of the exit code later.

Change to start with "C<die> raises an exception." and phrase in terms of
handling exceptions, and then how uncaught exceptions result in process exit.
Do not give details of the exit code in the first paragraph. Move this to a
later paragraph, clarify that $! is often unpredictable, and stress that 255
is the last resort exit code.

14 years agohandle perl extended utf8 start bytes
Tony Cook [Tue, 16 Mar 2010 12:46:48 +0000]
handle perl extended utf8 start bytes

perl uses UTF8_IS_START() to test if a byte is a valid start byte,
this didn't take perl's extended UTF-8 range into account.

14 years ago[perl #70075] no 6; broken
Father Chrysostomos [Mon, 31 May 2010 10:03:11 +0000]
[perl #70075] no 6; broken

the original patch included a fix, but this problem was fixed in
faee19b5, so only apply the test.

14 years agoPATCH: [perl #75138] "\c`" -> " "
Karl Williamson [Sun, 30 May 2010 19:05:48 +0000]
PATCH: [perl #75138] "\c`" -> " "

Attached is a patch for some of this issue.  I took Nicholas' advice,
and if the result of \cX isn't a word character, the output message will
precede it with a backslash, so the message in the example would be

"\c`" more clearly written simply as "\ " at -e line 1.

I think that message is true.

I also added tests.

There is a test that guarantees that we won't ship 5.14 with things as
they are now in it.  I added wording to the comments next to that test
to be sure to verify with this email thread if we should remove the
deprecation, and mentioned that in the explanatory wording in the pod.
I support removing the deprecation, but for now I'm not touching that,
to see what other issues may yet arise before 5.14.

14 years agoDocument tricks, work-arounds for user-defined casing
Karl Williamson [Fri, 28 May 2010 04:24:40 +0000]
Document tricks, work-arounds for user-defined casing

And add a .t file to verify that it works.

14 years agoUn-TODO a threads-shared test that now passes
Jerry D. Hedden [Wed, 26 May 2010 18:50:39 +0000]
Un-TODO a threads-shared test that now passes

Commit bb1bc619ea68d9703fbd3fe5bc65ae000f90151f has
fixed a threads-shared TODO test in t/object.t.

14 years agoAdd mktables option for development use
Karl Williamson [Wed, 5 May 2010 03:43:56 +0000]
Add mktables option for development use

The -output_names option was added.  It will cause the generated file
tables to not have ranges, and each line will have the character name.
This makes it easier to compare what characters are in given tables,
from version to version, or to compare the differences between
properties.

14 years agomktables -- don't create Names table unless asked
Karl Williamson [Tue, 4 May 2010 21:14:24 +0000]
mktables -- don't create Names table unless asked

This speeds up mktables by not creating the Names table unless asked to,
by someone adding it to the list of tables to be output.  Perl uses a
different table than this one for charnames, so the one being suppressed
isn't generally used.  Previously it was created but not output.  Now,
we skip the useless creation step.

14 years agoFix priority of suppressed vs. explicitly output
Karl Williamson [Tue, 4 May 2010 21:10:18 +0000]
Fix priority of suppressed vs. explicitly output

It's not clear this is a real bug, but it is a surprise.  If a table is
in the suppressed list, it isn't output, even if it is in the
to-be-output override list.  This latter list is non-empty only if the
user has hand-edited the the program to force an output.  So this patch
makes that list have priority.

14 years agoRemove obsolete comment
Karl Williamson [Tue, 4 May 2010 17:18:59 +0000]
Remove obsolete comment

Commit: 6c4b69c35161f79a5088d6c3070cc17a0e4978b2 made this comment
obsolete; forgot to remove it then.

14 years agoGenerate simple case folding tables only if asked
Karl Williamson [Tue, 4 May 2010 15:13:35 +0000]
Generate simple case folding tables only if asked

Speed up mktables by not generating the simple case folding tables
unless asked to.  Previously the simple tables were generated, and then
the full tables were initialized with them, and then overwritten with
the full mappings.  This is an artifact from the fact that the data
comes to us in two files, one  with the simple mappings (among other
things), and another with the full mapping overrides.  Now, the full
tables are initialized from the first file, and the second file
overrides the full mappings.  The simple tables are not generated by
default, so this saves, copying them.

14 years agoAdd comment about objaddr in mktables
Karl Williamson [Sun, 30 May 2010 14:49:28 +0000]
Add comment about objaddr in mktables

Slightly modified to include the commit id by Steffen.

14 years agoUse in-line 'no overloading' for speed
Karl Williamson [Mon, 3 May 2010 16:06:30 +0000]
Use in-line 'no overloading' for speed

An earlier performance enhancement was to change the subroutine that
gets the address of a ref to using 'no overloading' and then numifying
the ref, which returns its address.  This patch speeds things up
slightly by in-lining the "no overloading" so that the function call
overhead is avoided.

It also gets rid of the kludge that was done before the original
speed-up that created a local in the call stack of one of the classes so
that the address would only have to be executed once per call stack;
This was subject to failure if maintenance of the code perturbed things
so it didn't work; now the overhead is minimal, so the address is gotten
in each call.

14 years agoDon't require doubled backslashes in perldiag.pod
Karl Williamson [Sun, 16 May 2010 12:56:01 +0000]
Don't require doubled backslashes in perldiag.pod

Prior to this patch, messages in perldiag.pod had to have \\ instead of
the correct single backslash in order for diag.t to not complain.

14 years agoEliminate some newSV(0)s by merging the SV allocation with first modification.
Nicholas Clark [Sun, 30 May 2010 11:52:01 +0000]
Eliminate some newSV(0)s by merging the SV allocation with first modification.

14 years agoOnly allocate entries for @_ when the subroutine is first called.
Nicholas Clark [Sun, 30 May 2010 10:51:15 +0000]
Only allocate entries for @_ when the subroutine is first called.

Previously, @_ was allocated for every subroutine at compile time, with a
default sized AV, hence space for 4 entries. We don't actually need to
allocate the space for entries, as there is already a check at call time as to
whether @_ is long enough.

valgrind suggests that this saves allocating 23K (on a 64 bit platform) when
running pod2man on perlfunc.pod. As well as the absolute saving, there is also
benefit in deferring allocation for subroutines actually called - for a program
which forks, @_ is less likely to be in pages shared COW with the parent.

Resolves RT #72416.

14 years agoFix the regexp in t/porting/args_assert.t, and add 3 missing macros.
Nicholas Clark [Sat, 29 May 2010 21:22:36 +0000]
Fix the regexp in t/porting/args_assert.t, and add 3 missing macros.

Resolves RT #72800.

14 years agoProperly free paren_name_list with its regexp.
Nicholas Clark [Sat, 29 May 2010 21:07:04 +0000]
Properly free paren_name_list with its regexp.

Previously the AV paren_name_list would "leak" until global destruction.
This was only an issue under -DDEBUGGING. Fixes RT #73438.

14 years agoClarify that count is bytes not unicode characters
Karl Williamson [Fri, 15 Jan 2010 04:21:37 +0000]
Clarify that count is bytes not unicode characters

14 years agoDisplay characters as Unicode for clarity
Karl Williamson [Fri, 15 Jan 2010 02:19:22 +0000]
Display characters as Unicode for clarity

14 years agoAdd tested for corrupted regnode
Karl Williamson [Fri, 15 Jan 2010 00:36:46 +0000]
Add tested for corrupted regnode

14 years agoUse sizeof instead of hard-coded array size
Karl Williamson [Thu, 14 Jan 2010 23:02:14 +0000]
Use sizeof instead of hard-coded array size

The array should be declared with its actual size.

14 years agoTypo
Karl Williamson [Thu, 14 Jan 2010 23:01:13 +0000]
Typo

14 years agoWhen assigning to $^P, don't zero $DB::single, $DB::trace and $DB::signal.
Nicholas Clark [Sat, 29 May 2010 15:23:53 +0000]
When assigning to $^P, don't zero $DB::single, $DB::trace and $DB::signal.

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.

14 years agoMigrate most other op_private to name conversion into S_op_private_to_names().
Nicholas Clark [Fri, 28 May 2010 15:02:12 +0000]
Migrate most other op_private to name conversion into S_op_private_to_names().

14 years agoIn Perl_do_op_dump(), move calls to append_flags() into S_op_private_to_names()
Nicholas Clark [Fri, 28 May 2010 13:33:34 +0000]
In Perl_do_op_dump(), move calls to append_flags() into S_op_private_to_names()

14 years agoAdd C_ARRAY_END(), returning a pointer to after the last element of an array.
Nicholas Clark [Fri, 28 May 2010 13:53:04 +0000]
Add C_ARRAY_END(), returning a pointer to after the last element of an array.

Refactor the macro append_flags() in dump.c to use it.

14 years agoIn Perl_do_op_dump(), reorder the ops within the if (o->op_private) clause.
Nicholas Clark [Fri, 28 May 2010 12:53:02 +0000]
In Perl_do_op_dump(), reorder the ops within the  if (o->op_private) clause.

14 years agoIn Perl_do_sv_dump(), use append_flags() for PVCV, PVFM and PVGP flags.
Nicholas Clark [Fri, 28 May 2010 12:43:43 +0000]
In Perl_do_sv_dump(), use append_flags() for PVCV, PVFM and PVGP flags.

14 years agoIn Perl_do_sv_dump(), for PVCV and PVFM, test for SvCOMPILED(sv) last.
Nicholas Clark [Fri, 28 May 2010 10:50:54 +0000]
In Perl_do_sv_dump(), for PVCV and PVFM, test for SvCOMPILED(sv) last.

14 years agoIn Perl_do_op_dump(), move runs of op_private name tests to S_append_flags().
Nicholas Clark [Fri, 28 May 2010 10:26:16 +0000]
In Perl_do_op_dump(), move runs of op_private name tests to S_append_flags().

14 years agoCreate S_append_flags() from a common code pattern in dump.c.
Nicholas Clark [Fri, 28 May 2010 09:56:21 +0000]
Create S_append_flags() from a common code pattern in dump.c.

Convert repetitive sequences of "if this bit is set, append that string" into
structures and a function call. Use a custom macro append_flags() to make
calling it easer.

This makes the object code slightly smaller.

14 years agoInPerl_boot_core_UNIVERSAL() use a data structure for calls to newXS{,proto}
Nicholas Clark [Tue, 5 Jan 2010 13:06:52 +0000]
InPerl_boot_core_UNIVERSAL() use a data structure for calls to newXS{,proto}

Replacing the longhand list of calls to newXS{,proto} with loop over a data
structure reduces the object size by over 1K.

14 years agoNaif calls segfault T_PRTOBJ of the stock typemap
Salvador Ortiz Garcia [Fri, 28 May 2010 08:25:52 +0000]
Naif calls segfault T_PRTOBJ of the stock typemap

The T_PTROBJ INPUT in stock typemap only uses 'sv_derived_from' for
input validation, that cause a segfault when the argument passed match
the class name.

14 years agoAdd simple_bitmask and varies_bitmask to globvar.sym.
Nicholas Clark [Fri, 28 May 2010 06:58:19 +0000]
Add simple_bitmask and varies_bitmask to globvar.sym.

global.sym is generated; is there a way to automate globvar.sym?

14 years agoConvert REGNODE_{SIMPLE,VARIES} to a bitmask lookup, from a strchr() lookup.
Nicholas Clark [Wed, 17 Mar 2010 17:16:24 +0000]
Convert REGNODE_{SIMPLE,VARIES} to a bitmask lookup, from a strchr() lookup.

This is O(1) with no branching, instead of O(n) with branching.
Deprecate the old implementation's externally visible variables
PL_simple and PL_varies. Google codesearch suggests that nothing outside the
core regexp code was using these.

14 years agoChange regcomp.pl to 0-based indexing for its arrays and loops.
Nicholas Clark [Wed, 17 Mar 2010 16:41:27 +0000]
Change regcomp.pl to 0-based indexing for its arrays and loops.

14 years agoEncapsulate lookups in PL_{varies,simple} within macros REGNODE_{VARIES,SIMPLE}
Nicholas Clark [Wed, 17 Mar 2010 13:58:25 +0000]
Encapsulate lookups in PL_{varies,simple} within macros REGNODE_{VARIES,SIMPLE}

This allows the implementation of the lookup mechanism to change.

14 years agoGenerate PL_simple[] and PL_varies[] with regcomp.pl, rather than hard-coding.
Nicholas Clark [Wed, 17 Mar 2010 13:33:48 +0000]
Generate PL_simple[] and PL_varies[] with regcomp.pl, rather than hard-coding.

Add a new flags column to regcomp.sym, with V if the node type is in PL_varies,
S if it is in PL_simple, and . if a placeholder is needed because subsequent
optional columns are present.

14 years agoRe-work the regcomp.sym to remove use of hard tabs. No data change.
Nicholas Clark [Tue, 16 Mar 2010 10:22:04 +0000]
Re-work the regcomp.sym to remove use of hard tabs. No data change.

The tab separating name and type is replaced with whitespace, the tab marking
the start of the description is replaced by a semicolon.

14 years agoCorrect the node numbers in comments.
Nicholas Clark [Tue, 16 Mar 2010 09:50:29 +0000]
Correct the node numbers in comments.

Really, should we be maintaining these manually?

14 years agoRemove stray tab character in definition for VERB.
Nicholas Clark [Tue, 16 Mar 2010 09:48:35 +0000]
Remove stray tab character in definition for VERB.

As VERB is "Used only for the type field of verbs" this is only a cosmetic
change, causing that correct description to appear in the comment in
regnodes.h. The change to regarglen doesn't affect anything, as the VERB type
is never actually used for compiled nodes.

14 years agoFix clang "incompatible operand types" error in ternary expressions.
George Greer [Thu, 27 May 2010 01:12:37 +0000]
Fix clang "incompatible operand types" error in ternary expressions.

14 years agoPATCH: user defined special casing for non utf8
Karl Williamson [Fri, 14 May 2010 14:56:46 +0000]
PATCH: user defined special casing for non utf8

Users can define their own case changing mappings to replace the
standard ones.  Prior to this patch, any mappings on characters whose
ordinals are 0-222, 224-255 that resulted in multiple characters were
ignored.

Note that there still is a deficiency in that the mappings will be
applied only to strings in utf8 format.

14 years agoChange a few tests to use new test.pl EBCDIC stuff
Karl Williamson [Mon, 24 May 2010 17:01:10 +0000]
Change a few tests to use new test.pl EBCDIC stuff

A few .t's are delivered here which use the new conversion functions in
test.pl.  Obviously, this commit doesn't have to be incorporated, but it
does simplify those tests.

14 years agoAdd functions to test.pl for easier EBCDIC testing
Karl Williamson [Mon, 24 May 2010 16:50:13 +0000]
Add functions to test.pl for easier EBCDIC testing

This patch adds functions native_to_latin1($) and latin1_to_native($) to
test.pl.  Use of these in test scripts allows for less special case code
(or deciding to blow it off and just skip EBCDIC platforms).  If a
string is all ASCII, one has always been able to just use it and not
worry about EBCDIC.  But non-ASCII, latin1 characters have been a
different matter.  This allows one to wrap those characters in a
function call and get automatic EBCDIC compatibility.

The functions do not handle UTF-8/UTF-EBCDIC conversions.  This is more
complicated, and I was worried that that part was not appropriate for
test.pl which should use the bare minimum of Perl functionality.  These
functions use tr///, beyond what other parts of test.pl use.

14 years agoFix CLONE/weakref bug revealed by adf8f095c5881bce.
Nicholas Clark [Tue, 25 May 2010 16:23:10 +0000]
Fix CLONE/weakref bug revealed by adf8f095c5881bce.

The AV unreferenced in the clone_params needs to be reference counted, rather
than not referenced counted, because the fixup to ensure that all otherwise
0-reference count scalars have a reference (on the temps stack) happens after
CLONE is run, and CLONE can run Perl code that causes their reference counts
to increase from then return to zero, which prematurely triggers sv_free().

14 years agoUpdate rsync sources in perlhack
H.Merijn Brand [Tue, 25 May 2010 16:26:37 +0000]
Update rsync sources in perlhack

14 years agoAdd the perl equivalent for av_make.
Shlomi Fish [Mon, 24 May 2010 20:40:48 +0000]
Add the perl equivalent for av_make.

Signed-off-by: David Golden <dagolden@cpan.org>

14 years agoAdd the Perl equivalent for av_len.
Shlomi Fish [Wed, 19 May 2010 17:11:03 +0000]
Add the Perl equivalent for av_len.

Signed-off-by: David Golden <dagolden@cpan.org>

14 years agoAdd a missing comma in the av_fill() docs.
Shlomi Fish [Wed, 19 May 2010 14:46:43 +0000]
Add a missing comma in the av_fill() docs.

Minor, but still good enough for a commit.

Signed-off-by: David Golden <dagolden@cpan.org>

14 years agoClarify the av_fetch() documentation.
Shlomi Fish [Tue, 18 May 2010 14:42:52 +0000]
Clarify the av_fetch() documentation.

Thanks to LeoNerd and Zefram on #p5p on IRC for some insights and
suggesting versions for the modified text. I ended up using Zefram's
version.

Signed-off-by: David Golden <dagolden@cpan.org>

14 years agoAdd Perl equivalent for av_exists().
Shlomi Fish [Tue, 18 May 2010 12:31:41 +0000]
Add Perl equivalent for av_exists().

This mentions that it's equivalent to exists($myarray[$key]).

Signed-off-by: David Golden <dagolden@cpan.org>

14 years agoAdd a Perl equivalent to av_delete().
Shlomi Fish [Sat, 15 May 2010 19:13:59 +0000]
Add a Perl equivalent to av_delete().

Signed-off-by: David Golden <dagolden@cpan.org>

14 years agoAdd the Perl equivalent example to av_clear.
Shlomi Fish [Sat, 15 May 2010 18:44:58 +0000]
Add the Perl equivalent example to av_clear.

Signed-off-by: David Golden <dagolden@cpan.org>

14 years agoLink from GIMME_V to perlcall for a usage example.
Shlomi Fish [Sat, 15 May 2010 18:37:46 +0000]
Link from GIMME_V to perlcall for a usage example.

Added a link from the GIMME_V entry to perlcall for a usage example.

Signed-off-by: David Golden <dagolden@cpan.org>

14 years agoPATCH: correct misstatement, formats in perlunicode
Karl Williamson [Mon, 24 May 2010 14:08:51 +0000]
PATCH: correct misstatement, formats in perlunicode

This is suitable for 5.12.2, but not many people use this feature.

14 years agoFix for typo in 0824d66743a706cd, in the expected output with threads.
Nicholas Clark [Tue, 25 May 2010 15:30:43 +0000]
Fix for typo in 0824d66743a706cd, in the expected output with threads.

14 years agoadd OPpDEREFed flag to avoid double mg_get()
David Mitchell [Tue, 25 May 2010 10:38:35 +0000]
add OPpDEREFed flag to avoid double mg_get()

    The previous commit made various ops such as rv2av unconditionally do
    an SvGETMAGIC(). Under some circumstances this could cause a double
    mg_get() (and hence double FETCH etc). In particular, when the
    proceeding op was something like aelem with OPpDEREF, the aelem would
    call vivify_ref(), which would call magic. So in peep(), mark
    OP_RV2[SAH]V ops with the new OPpDEREFed flag if the preceding op was
    OPpDEREF. Then use this flag to avoid a second dose of magic.

    Note that RV2GV probably needs this flag too, but there weren't any
    spare private flag bits left for that op (I think).

14 years agoDeref ops ignore get-magic when SvROK(sv)
Father Chrysostomos (via RT) [Sun, 17 Jan 2010 22:32:24 +0000]
Deref ops ignore get-magic when SvROK(sv)

This is just like bug 68192, except in this case it’s a different set
of operators that have had this problem for much longer.

14 years agoJust the tests from a proposed fix for 68192
Father Chrysostomos [Mon, 24 May 2010 10:56:25 +0000]
Just the tests from a proposed fix for 68192

The bug was fixed in a different way by davem, but the tests
are needed as the base for a commit to follow

14 years agoReplace wrong tr/// table in perlebcdic.pod
Karl Williamson [Tue, 18 May 2010 14:43:31 +0000]
Replace wrong tr/// table in perlebcdic.pod

perlebcdic.pod contains a helpful table to use in tr/// to convert
between EBCDIC and Latin1/ASCII.  Unfortunately, the table is the
inverse of the one it describes, as I discovered in following the
directions on how it was extracted.

The actual code that uses the table uses it in the inverse way, so it
actually works correctly, but if you follow the instructions to get the
tables corresponding to the other recognized code pages, you will get
the inverse of the ones you wanted, and things won't work out.

This patch changes the table to its inverse, and changes the sample code
to correspond, as this is easier for the person trying to follow the
instructions since deriving the old table is somewhat more complicated.

I also changed the table to hex from octal, as that is more the norm
these days, and I changed to recipes in the pod to print out leading
zeros to make all the values the same length, as the table that they can
generate has them.

14 years agoRemove unused, wrong #define in utf8.h
Karl Williamson [Tue, 18 May 2010 16:02:26 +0000]
Remove unused, wrong #define in utf8.h

is unused in the code, and is wrong for EBCDIC platforms, as there can
be invariants there that aren't ASCII.  I simply removed it.

14 years agoFix build warnings introduced by v5.13.0-139-ge0fa7e2
Jerry D. Hedden [Fri, 7 May 2010 16:14:05 +0000]
Fix build warnings introduced by v5.13.0-139-ge0fa7e2

14 years agoAdd Perl_clone_params_{del,new} and Perl_sv_dup to the "no threads" exclusions.
Nicholas Clark [Mon, 24 May 2010 20:01:29 +0000]
Add Perl_clone_params_{del,new} and Perl_sv_dup to the "no threads" exclusions.

14 years agoSet PADSTALE on all lexicals at the end of sub creation.
Nicholas Clark [Fri, 26 Feb 2010 09:18:44 +0000]
Set PADSTALE on all lexicals at the end of sub creation.

The PADSTALEness of lexicals between the 0th and 1st call to a subroutine is now
consistent with the state between the nth and (n + 1)th call.

This permits a work around in Perl_padlist_dup() to avoid leaking active pad
data into a new thread, whilst still correctly bodging the external references
needed by the current ?{} implementation. Fix that, and this can be removed.

14 years agoDon't clone the contents of lexicals in pads.
Nicholas Clark [Thu, 25 Feb 2010 21:35:39 +0000]
Don't clone the contents of lexicals in pads.

This stops the values of lexicals in active stack frames in the parent leaking
into the lexicals in the child thread.

With an exception for lexicals with a reference count of > 1, to cope with the
implementation of ?{{ ... }} blocks in regexps. :-(

14 years agoIn Perl_pad_tidy(), merge the SvPADTMP_on() loops for padtidy_SUB and _FORMAT.
Nicholas Clark [Thu, 25 Feb 2010 16:56:53 +0000]
In Perl_pad_tidy(), merge the SvPADTMP_on() loops for padtidy_SUB and _FORMAT.

14 years agoIn Perl_padlist_dup() don't duplicate @_ or pads caused by recursion.
Nicholas Clark [Thu, 25 Feb 2010 14:21:18 +0000]
In Perl_padlist_dup() don't duplicate @_ or pads caused by recursion.

CvDEPTH() is 0 in a new thread, so duplicating pads beyond the always-present
first level is a waste of effort and memory.

14 years agoConvert PAD_DUP to a function Perl_padlist_dup().
Nicholas Clark [Wed, 10 Feb 2010 09:57:23 +0000]
Convert PAD_DUP to a function Perl_padlist_dup().

assert() that pads are never AvREAL().

14 years agoWhen deleting CLONE_PARAMS, push any unreferenced SVs onto the temps stack.
Nicholas Clark [Thu, 25 Feb 2010 11:12:03 +0000]
When deleting CLONE_PARAMS, push any unreferenced SVs onto the temps stack.

Effectively this leaves the cloned-into interpreter in a consistent state.
In the cloned-from interpreter, the SV targets of non-reference owning pointers
*are* referenced and managed by other pointers. SvREFCNT() == 0 SVs in the
cloned-into interpreter result from the non-reference owning pointers being
found and followed, but the reference owning and managing pointers not being
part of the subsection of interpreter state cloned over. Hence, this change
creates reference owning pointers to this SVs on the temps stack, which ensures
that they are correctly cleaned up, and don't "leak" until interpreter
destruction. (Which might be some time away, in a persistent process.)

14 years agoBetter ithreads cloning - add all SVs with a 0 refcnt to the temps stack.
Nicholas Clark [Wed, 24 Feb 2010 17:15:41 +0000]
Better ithreads cloning - add all SVs with a 0 refcnt to the temps stack.

Track all SVs created by sv_dup() that have a 0 reference count. If they still
have a 0 reference count at the end of cloning, assign a reference to each to
the temps stack. As the temps stack is cleared at thread exit, SVs book keeping
will be correct and consistent before perl_destruct() makes its check for
leaked scalars.

Remove special case code for checking each @_ and the parent's temp stack.

14 years agoCleaner implementations for Perl_clone_params_{new,del}
Nicholas Clark [Mon, 24 May 2010 14:48:06 +0000]
Cleaner implementations for Perl_clone_params_{new,del}

Not source or binary compatible with maint-5.12.

14 years agoAbstract *correct* initialisation of CLONE_PARAMS into Perl_clone_params_new().
Nicholas Clark [Wed, 24 Feb 2010 11:47:08 +0000]
Abstract *correct* initialisation of CLONE_PARAMS into Perl_clone_params_new().

As it allocates memory dynamically, add Perl_clone_params_del(). This will
allow CLONE_PARAMS to be expand in future in a source and binary compatible
fashion.

These implementations of Perl_clone_params_new()/Perl_clone_params_del() jump
through hoops to remain source and binary compatible, in particular, by not
assuming that the structure member is present and correctly initialised. Hence
they should be suitable for inclusion into Devel::PPPort.

Convert threads.xs to use them, resolving RT #73046.

14 years agoConvert Perl_sv_dup_inc() from a macro to a real function.
Nicholas Clark [Tue, 23 Feb 2010 14:48:17 +0000]
Convert Perl_sv_dup_inc() from a macro to a real function.

14 years agoIn perl_clone_using(), turn off AvREAL() on param->stashes.
Nicholas Clark [Wed, 24 Feb 2010 15:07:51 +0000]
In perl_clone_using(), turn off AvREAL() on param->stashes.

This is an optimisation, not a bug fix.

14 years agoAdd package block syntax to perldelta
Zefram [Mon, 24 May 2010 11:38:24 +0000]
Add package block syntax to perldelta

14 years agoAdd perldelta entry for non-destructive substitution
David Golden [Mon, 24 May 2010 00:04:38 +0000]
Add perldelta entry for non-destructive substitution

14 years agoChange the API documentation from sv_2nv to sv_2nv_flags.
Nicholas Clark [Sun, 23 May 2010 20:09:13 +0000]
Change the API documentation from sv_2nv to sv_2nv_flags.

Addendum to 39d5de13bc6d138b.

14 years agofix MAD handling of package block syntax
Zefram [Sat, 22 May 2010 22:10:16 +0000]
fix MAD handling of package block syntax

There was a broken TOKEN_GETMAD attempting to handle the label preceding a
package-block statement, where no label is actually possible.  The correct
behaviour for no label is a no-op, so just remove the TOKEN_GETMAD.

14 years agoadd perldelta entry for overload fixes
David Mitchell [Sun, 23 May 2010 14:04:37 +0000]
add perldelta entry for overload fixes