| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
| |
This is achieved by introducing a new find_rundefsv() function in pad.c
This fixes [perl #75436].
|
|
|
|
|
|
|
|
|
|
| |
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.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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.
|
|
|
|
|
|
|
|
|
| |
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.
|
|
|
|
|
|
|
|
| |
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. :-(
|
| |
|
|
|
|
|
| |
CvDEPTH() is 0 in a new thread, so duplicating pads beyond the always-present
first level is a waste of effort and memory.
|
|
|
|
| |
assert() that pads are never AvREAL().
|
| |
|
| |
|
| |
|
|
|
|
| |
Within the function, use sv_eq() rather than strcmp().
|
|
|
|
|
| |
Provide a flag option to Perl_pad_add_name(), pad_add_NO_DUP_CHECK, to supress
the call.
|
|
|
|
|
|
| |
The only user of the pad_add_FAKE flag was S_pad_findlex(), so move the relevant
code there from Perl_pad_add_name(), and have S_pad_findlex() call
S_pad_add_name_sv() directly. This eliminates the pad_add_FAKE flag completely.
|
|
|
|
|
|
| |
Currently only pad_add_STATE and pad_add_FAKE are used. The length is cross-
checked against strlen() on the pointer, but the intent is to re-work the entire
pad API to be UTF-8 aware, from the current situation of char * pointers only.
|
|
|
|
|
|
| |
Currently only pad_add_OUR is used. The length is cross-checked against
strlen() on the pointer, but the intent is to re-work the entire pad API to
be UTF-8 aware, from the current situation of char * pointers only.
|
|
|
|
| |
It already knows its length, and it will be UTF-8 clean in the future.
|
|
|
|
|
|
|
|
| |
API.
Currently no flags bits are used, and the length is cross-checked against
strlen() on the pointer, but the intent is to re-work the entire pad API to be
UTF-8 aware, from the current situation of char * pointers only.
|
|
|
|
|
| |
Replace ckWARN_d{,2,3,4}() && Perl_warner() with it, which trades reduced code
size for 1 more function call if warnings are not enabled.
|
|
|
|
|
|
|
| |
Replace ckWARN{,2,3,4}() && Perl_warner() with it, which trades reduced code
size (about 0.2%), for 1 more function call if warnings are not enabled.
However, if we're now in the L1 or L2 cache when we weren't previously, that's
still going to be a speed win.
|
| |
|
|
|
| |
p4raw-id: //depot/perl@34934
|
|
|
|
|
|
| |
I32. This permits some space saving rejigging of the interpreter
struct.
p4raw-id: //depot/perl@34930
|
|
|
|
|
| |
Protect the prototype of S_vdie() with #if defined (PERL_IN_UTIL_C)
p4raw-id: //depot/perl@34929
|
|
|
|
|
|
| |
Message-ID: <25940.1225611819@chthon>
Date: Sun, 02 Nov 2008 01:43:39 -0600
p4raw-id: //depot/perl@34698
|
|
|
|
|
| |
erroneous const in dump.c.
p4raw-id: //depot/perl@34675
|
|
|
| |
p4raw-id: //depot/perl@34653
|
|
|
| |
p4raw-id: //depot/perl@34650
|
|
|
| |
p4raw-id: //depot/perl@34647
|
|
|
| |
p4raw-id: //depot/perl@34629
|
|
|
|
|
| |
SvREFCNT_dec() on it.
p4raw-id: //depot/perl@34600
|
|
|
| |
p4raw-id: //depot/perl@34585
|
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
| |
Svf_PADSTALE means something different for state vars. Make sure
we always handle it correctly
p4raw-id: //depot/perl@33009
|
|
|
|
|
| |
p4raw-link: @31447 on //depot/perl: efa785391fea9e6aff4c999b27ad62b7d8f9ea99
p4raw-id: //depot/perl@32906
|
|
|
|
|
|
| |
set for all state vars in the pad.
(Nicholas worked up the same fix - spooky action at a distance!)
p4raw-id: //depot/perl@31835
|
|
|
|
|
|
|
|
|
| |
Change 22306# inadvertently made 'local $[' statement-scoped
rather than block-scoped; so revert that change and add a
different fix. The problem was to ensure that the savestack got
popped correctly while popping errored tokens. We how record the
current value of PL_savestack_ix with each pushed parser state.
p4raw-id: //depot/perl@31615
|
|
|
|
|
|
|
| |
This code:
my $x if ...; sub { $x}
could attempt to clone $x even if $x is stale.
p4raw-id: //depot/perl@31447
|
|
|
| |
p4raw-id: //depot/perl@31203
|
|
|
|
|
| |
than they need to be.
p4raw-id: //depot/perl@31017
|
|
|
|
|
| |
at each recursion, in order to be truly stateful. (bug #41789)
p4raw-id: //depot/perl@30548
|
|
|
|
|
|
| |
sv = newSV(0);
sv_upgrade(sv, type);
p4raw-id: //depot/perl@30347
|
|
|
| |
p4raw-id: //depot/perl@29696
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
| |
p4raw-id: //depot/perl@29679
|
|
|
|
|
| |
system this can't be stored.
p4raw-id: //depot/perl@29639
|
|
|
| |
p4raw-id: //depot/perl@29632
|
|
|
|
|
| |
B.pm, so that B::Concise doesn't need to hard code magic numbers.
p4raw-id: //depot/perl@29631
|
|
|
|
|
|
| |
in the xnv union. This frees up IVX for the PL_generation code, which
in turn will allow SvCUR to return to its real purpose.
p4raw-id: //depot/perl@29630
|
|
|
|
|
|
| |
4 macros COP_SEQ_RANGE_LOW, COP_SEQ_RANGE_HIGH, PARENT_PAD_INDEX
and PARENT_FAKELEX_FLAGS
p4raw-id: //depot/perl@29629
|