| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Adds syntax `defer { BLOCK }` to create a deferred block; code that is
deferred until the scope exits. This syntax is guarded by
use feature 'defer';
Adds a new opcode, `OP_PUSHDEFER`, which is a LOGOP whose `op_other` field
gives the start of an optree to be deferred until scope exit. That op
pointer will be stored on the save stack and invoked as part of scope
unwind.
Included is support for `B::Deparse` to deparse the optree back into
syntax.
|
| |
|
| |
|
|
|
|
|
|
|
| |
This is a rebasing by @khw of part of GH #18792, which I needed to get
in now to proceed with other commits.
It also strips trailing white space from the affected files.
|
|
|
|
|
| |
These functions allow one to check for the existence of keys in the
hints hash of a specific cop.
|
|
|
|
|
| |
These functions allow one to check for the existence of keys in a hints
hash.
|
|
|
|
|
|
|
|
|
| |
* Add feature, experimental warning, keyword
* Basic parsing
* Basic implementation as optree fragment
See also
https://github.com/Perl/perl5/issues/18504
|
|
|
|
|
|
| |
CxTRYBLOCK would be confusing when we add a real CxTRY for try/catch
Also renames the associated CXp_TRYBLOCK flag to CXp_EVALBLOCK
|
| |
|
| |
|
|
|
|
|
| |
This encloses some #defines in a PERL_CORE section, as their only use is
in the macro immediately following, already confined to core.
|
|
|
|
|
| |
The pod says these are const, but they won't compile if actually called
with one.
|
| |
|
|
|
|
|
|
|
|
|
|
|
| |
This feature allows documentation destined for perlapi or perlintern to
be split into sections of related functions, no matter where the
documentation source is. Prior to this commit the line had to contain
the exact text of the title of the section. Now it can be a $variable
name that autodoc.pl expands to the title. It still has to be an exact
match for the variable in autodoc, but now, the expanded text can be
changed in autodoc alone, without other files needing to be updated at
the same time.
|
|
|
|
|
|
| |
Now that we can get automatic links in perlapi, remove the redundant
stripped-down documentation that goes there in favor of the better
documentation in perlcall.
|
| |
|
|
|
|
|
| |
This uses a new organization of sections that I came up with. I asked
for comments on p5p, but there were none.
|
|
|
|
|
| |
apidoc_section is slightly favored over head1, as it is known only to
autodoc, and can't be confused with real pod.
|
|
|
|
|
| |
The macro which the comment describes is long gone, but the comment got
missed.
|
| |
|
|
|
|
| |
See previous commit.
|
| |
|
|
|
|
|
|
|
|
|
|
|
| |
This is useful in Devel::PPPort for generating its api-info data. That
useful feature of D:P allows someone to find out what was the first
release of Perl to have a function, macro, or flag. And whether using
ppport.h backports it further.
I went through apidoc.pod and looked for flags that were documented but
that D:P didn't know about. This commit adds entries for each so that
D:P can find them.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Perform only a bit check instead of a much more expensive hash
lookup to test features.
For now I've just added a U32 to the cop structure to store the bits,
if we need more we could either add more bits directly, or make it a
pointer.
We don't have the immediate need for a pointer that warning do since
we don't dynamically add new features during compilation/runtime.
The changes to %^H are retained so that caller() can be used from perl
code to check the features enabled at a given caller's scope.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
repository (#1186)
* Update repository and bugtracker URLs to GitHub in makemeta
regen META files
* Update POD and comments to reference GitHub as canonical repository
* Update Porting/corelist.pl to recognize GitHub issue tracker
* remove "A note on camel and dromedary"
* Remove redundant 'Committing your changes' section
|
|
|
|
|
|
|
|
|
| |
http://xray.mpe.mpg.de does not serve the mailing list archives anymore
and is not available via the Wayback machine either.
This patch restores the content of a link to an URL "we" hopefully control
better. The message ID is likely 20040713143217.GB1424@plum.flirble.org ,
to help future searches.
|
| |
|
|
|
|
|
|
|
|
| |
original merge commit: v5.31.3-198-gd2cd363728
reverted by: v5.31.4-0-g20ef288c53
The commit following this commit fixes the breakage, which that means
the revert can be undone.
|
|
|
|
|
|
|
|
|
|
|
|
| |
This reverts commit d2cd363728088adada85312725ac9d96c29659be, reversing
changes made to 068b48acd4bdf9e7c69b87f4ba838bdff035053c.
This change breaks installing Test::Deep:
...
not ok 37 - Test 'isa eq' completed
ok 38 - Test 'isa eq' no premature diagnostication
...
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This tracks the most recent sub/eval/format context pushed onto the
context stack. Then make dopopto_cursub use it.
The previous value is saved in the cxt struct, and is restored whenever
the context is popped.
This adds a tiny overhead for every sub call, but speeds up other
operations, such as determining the caller context when returning a
value from a sub - this has to be dpne for every sub call where the last
expression is context sensitive, so its often a win.
|
|
|
|
|
| |
Now that Devel::PPPort has the ability to handle these, we can loosen
the syntax for clarity.
|
| |
|
|
|
|
|
| |
while I expect most C programmers have these powers of two engraved
into their brains, using hex makes this more obvious
|
|
|
|
| |
and update eval_pv() to use it.
|
|
|
|
|
|
|
|
|
|
| |
This makes various fixes to the text that is used to generate the
documentation. The dominant change is to add the 'n' flag to indicate
that the macro takes no arguments. A couple should have been marked
with a D (for deprecated) flag, and a couple were missing parameters,
and a couple were missing return values.
These were spotted by using Devel::PPPort on them.
|
|
|
|
|
|
| |
This indicates to not output the macro with parentheses for parameters.
Currently that doesn't happen anyway, but a future commit will change
things so this is required (so that a bug can be fixed)
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The pumpking has determined that the CPAN breakage caused by changing
smartmatch [perl #132594] is too great for the smartmatch changes to
stay in for 5.28.
This reverts most of the merge in commit
da4e040f42421764ef069371d77c008e6b801f45. All core behaviour and
documentation is reverted. The removal of use of smartmatch from a couple
of tests (that aren't testing smartmatch) remains. Customisation of
a couple of CPAN modules to make them portable across smartmatch types
remains. A small bugfix in scope.c also remains.
|
|
|
|
|
| |
The names of ops, context types, functions, etc., all change in accordance
with the change of keyword.
|
|
|
|
|
| |
These were used to identify foreach loops that qualify as topicalizers.
That's no longer a relevant classification.
|
|
|
|
| |
A "given" construct is now officially a one-iteration loop.
|
|
|
|
| |
This context frame type doesn't need to cater for "given" any more.
|
|
|
|
|
|
|
|
|
|
| |
When giving a function-style prototype for a macro taking a literal string
parameter, put a string literal in place of a type for that parameter.
This goofy appearance makes it obvious that this isn't really a function,
and clues the reader in that the parameter can't actually be an arbitrary
expression of the right type. Also change the nonsensical "NUL-terminated
literal string" to "literal string" to describe these parameters.
Fixes [perl #116286].
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
RT #131942
My commit v5.27.1-114-g9449f0d added a field je_old_stack_hwm to
the jmpenv structure on debugging builds.
However, one field in the interpreter structure is a JMPENV (rather than
JMPENV*), so this can make the interpreter structure size vary on
debugging and non-debugging builds.
This is usually a no-no, since it breaks re.pm, which recompiles
the various re functions with DEBUGGING enabled, even on non-debugging
fields.
This was supposed to be handled by the extra '!defined DEBUGGING_RE_ONLY'
condition, and indeed all core XS modules including re.xs work ok.
However, it seems to have broken several CPAN modules. I still don't
understand why, but the easiest fix is to just always include the
debugging je_old_stack_hwm field in all builds.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
RT #131732
With v5.27.1-66-g87058c3, I introduced a DEBUGGING-only mechanism in the
runops loop for checking whether an op extended the stack by as many slots
as values it returned on the stack. It did this by setting a
high-water-mark just before calling each pp function, and checking its
result on return.
It saved and restored the old value of PL_curstackinfo->si_stack_hwm
whenever it entered or left a runops loop or did a JMPENV_PUSH /
JMPENV_POP. However, the restoring could restore to an old value that was
smaller than the current value, leading to false-positive stack-extend
panics. So only restore if the old value was larger.
In particular this was causing false positives in DBI.
|
|
|
|
|
|
|
|
|
| |
When continuing after an exception (JMPENV_PUSH() returns 3),
restore the value of PL_curstackinfo->si_stack_hwm.
This is a recently added variable on debugging builds that detects
attempts to push stuff on the stack without extending it.
After an exception its value may be invalid and trigger a false panic.
|
| |
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
On debugging builds only, add a mechanism for checking pp function calls
for insufficient stack extending. It works by:
* make the runops loop set a high-water-mark (HWM) variable equal to
PL_stack_sp just before calling each pp function;
* make EXTEND() etc update this HWM;
* on return from the pp function, panic if PL_stack_sp is > HWM.
This detects whether pp functions are pushing more items onto the stack
than they are requesting space for.
There's a possibility of false positives if the code is doing weird stuff
like direct manipulation of stacks via PL_curstack, SWITCHSTACK() etc.
It's also possible that one pp function "knows" that a previous pp
function will have already grown the stack enough. Currently the only
place in core that seems to do this is pp_enteriter, which allocates 1
stack slot so that pp_iter doesn't have to check each time it returns
&PL_sv_yes/no. To accommodate this, the new macro EXTEND_SKIP() has been
added, that tells perl that it's safely skipping an EXTEND() here.
|
|
|
|
|
|
|
|
| |
Currently the SvSCREAM flag is set on the sv pointed to by
cx->blk_eval.cur_text, to indicate that it is ref counted.
Instead, use a spare bit in the blk_u16 field of the eval context.
This is to reduce the number of odd special cases for the SvSCREAM flag.
|
|
|
|
|
|
|
|
|
|
|
| |
Under -Wshadow, CX_POP_SAVEARRAY's local var 'av' can generate this
warning:
warning: declaration shadows a local variable [-Wshadow]
So rename it to cx_pop_savearay_av to reduce the risk of a clash.
(See http://nntp.perl.org/group/perl.perl5.porters/236444)
|