summaryrefslogtreecommitdiff
path: root/ext
Commit message (Collapse)AuthorAgeFilesLines
* Speed up method calls like $o->Other::method() and $o->Other::SUPER::method().syber2014-12-023-3/+31
| | | | | | | | | | | | | | | It was done by adding new OP_METHOD_REDIR and OP_METHOD_REDIR_SUPER optypes. Class name to redirect is saved into METHOP as a shared hash string. Method name is changed (class name removed) an saved into op_meth_sv as a shared string hash. So there is no need now to scan for '::' and calculate class and method names at runtime (in gv_fetchmethod_*) and searching cache HV without precomputed hash. B::* modules are changed to support new op types. method_redir is now printed by Concise like (for threaded perl) $obj->AAA::meth 5 <.> method_redir[PACKAGE "AAA", PV "meth"] ->6
* [perl #123063] allow assert() to be used as an expressionTony Cook2014-12-031-0/+7
| | | | | In non-DEBUGGING builds it would be replaced with nothing, producing a syntax error
* Add B::PMOP::pmregexpFather Chrysostomos2014-12-023-0/+17
| | | | | | | | | | | | | | | | | | | | | | | | | | | There was no way to get from a PMOP to its regexp object under non- threaded builds. The threaded pmoffset field was exposed, but not its non-threaded counterpart. I implemented pmregexp in terms of PM_GETRE (which uses op_pmoffset with threads and op_pmregexp without), so it works under threads, too. It’s easier than conditionally using the regex_padav to get at things like this: $ ./perl -Ilib -MB -e 'use O "Concise", B::regex_padav->ARRAYelt(B::svref_2object(sub {qr/(??{})/})->ROOT->first->first->sibling->pmoffset)->qr_anoncv->object_2svref' B::Concise::compile(CODE(0x7f8e9185ba08)) 2 <1> leavesub[1 ref] K/REFC,1 ->(end) 1 </> qr() P/RTIME ->2 - <@> list K ->- - <0> pushmark s ->- - <1> null sK*/1 ->- - <1> ex-scope sK ->(end) - <0> stub s ->(end) - <$> const(PV "(\077?{})") s ->- -e syntax OK With pmregexp, it is ‘only’: $ ./perl -Ilib -MB -e 'use O "Concise", B::svref_2object(sub {qr/(??{})/})->ROOT->first->first->sibling->pmregexp->qr_anoncv->object_2svref'
* b.t: Move a testFather Chrysostomos2014-12-021-3/+2
| | | | This should go with the other regexp tests.
* Update B::Showlex docsFather Chrysostomos2014-11-301-11/+11
| | | | I forgot this in 0f94cb1fe.
* [perl #123223] Make PADNAME a separate typeFather Chrysostomos2014-11-304-27/+122
| | | | | | | | | | | distinct from SV. This should fix the CPAN modules that were failing when the PadnameLVALUE flag was added, because it shared the same bit as SVs_OBJECT and pad names were going through code paths not designed to handle pad names. Unfortunately, it will probably break other CPAN modules, but I think this change is for the better, as it makes both pad names and SVs sim- pler and makes pad names take less memory.
* Prepare B typemap for upcoming pad name changesFather Chrysostomos2014-11-301-0/+13
|
* Increase $B::Showlex::VERSION to 1.05Father Chrysostomos2014-11-301-1/+1
|
* Prepare B::Concise for upcoming pad name changesFather Chrysostomos2014-11-301-1/+3
| | | | | | | | | When pad names become their own type, separate from SVs, the ‘immor- tal’ pad names, &PL_padname_undef and &PL_padname_const (to replace &PL_sv_undef and &PL_sv_no), will no longer be B::SPECIAL objects, but B::PADNAMEs. The way to distinguish them is to check the length. This method happens to work both before and after the pad name changes.
* B.pm: Clarify classes used for pad namesFather Chrysostomos2014-11-301-0/+3
|
* B.pm: Document upcoming PADLIST changesFather Chrysostomos2014-11-301-1/+53
|
* fetch_pad_names.t: Emit all test namesFather Chrysostomos2014-11-301-2/+4
| | | | | They were defined in the structure passed to the general_tests func- tion, but not all of them were used.
* Make pad names always UTF8Father Chrysostomos2014-11-301-12/+12
| | | | | | | | | | | | | | | | | | | | | | | | Prior to 5.16, pad names never used the UTF8 flag, and all non-ASCII pad names were in UTF8. Because the latter was consistently true, everything just worked anyway. In 5.16, UTF8 handling was done ‘properly’, so that non-ASCII UTF8 strings were always accompanied by the UTF8 flag. Now, it is still the case that the only non-ASCII names to make their way into pad name code are in UTF8. Since ASCII is a subset of UTF8, we effectively *always* have UTF8 pad names. So the flag handling is actually redundant. If we just assume that all pad names are UTF8 (which is true), then we don’t need to bother with the flag checking. There is actually no reason why we should have two different encodings for storing pad names. So this commit enforces what has always been the case and removes the extra code for converting between Latin-1 and UTF8. Nothing on CPAN is using the UTF8 flag with pads, so nothing should break. In fact, we never documented padadd_UTF8_NAME.
* Make PADNAMELIST a separate typeFather Chrysostomos2014-11-303-9/+97
| | | | This is in preparation for making PADNAME a separate type.
* B::Concise: Dump regexp code blocksFather Chrysostomos2014-11-301-1/+6
| | | | | | | | | | | As of perl 5.18, pmops have a code_list pointer that points to a list of ops representing the constants, variables and code blocks that make up the regular expression. For run-time compilation, these ops are also accessible via pmop->op_first->op_first (i.e., the kids of the regcomp op), so they are already dumped. But for regexp compiled at compile time, these ops were not being dumped. So this commit makes them appear as kids of the pmop, right before the replacement block in the case of subst.
* Expose qr_anoncv via B::REGEXPFather Chrysostomos2014-11-293-1/+9
| | | | This is necessary to get to the code blocks in qr/(?{...})/.
* B.pm: Document the B::REGEXP methodsFather Chrysostomos2014-11-291-0/+10
|
* Opcode.pm: wrap long verbatim pod lineFather Chrysostomos2014-11-281-1/+2
|
* speedup for SUPER::method() calls.syber2014-11-282-4/+4
| | | | | | | | | | | | | | | In ck_method: Scan for '/::. If found SUPER::, create OP_METHOD_SUPER op with precomputed hash value for method name. In B::*, added support for method_super In pp_hot.c, pp_method_*: S_method_common removed, code related to getting stash is moved to S_opmethod_stash, other code is moved to pp_method_* functions. As a result, SUPER::func() calls speeded up by 50%.
* Increase $XS::APItest::VERSION to 0.69Father Chrysostomos2014-11-281-1/+1
|
* Fix newFOROP with PERL_OP_PARENT and no slabFather Chrysostomos2014-11-281-3/+14
| | | | It wasn’t updating the parent pointer after reallocating the op.
* ext/Fcntl/Makefile.PL: Make S_IFMT unsignedTony Cook2014-11-281-1/+1
| | | | | | See <20141126223250.GS19835@mars.tony.develop-help.com> S_IFMT on os390 has the upper bit set but Perl is expecting an unsigned, so force it to be so.
* Bump Dynloader version to satisfy porting/cmp_version.tChris 'BinGOs' Williams2014-11-271-1/+1
|
* HP-UX dynaloading uses shl_t, not void ptr.Jarkko Hietaniemi2014-11-271-1/+1
|
* printf type-matching.Jarkko Hietaniemi2014-11-271-5/+5
|
* Enable POSIX::strtold() on Windows (GCC) USE_LONG_DOUBLE buildsSteve Hay2014-11-271-0/+2
|
* If no cuserid(), s is unused.Jarkko Hietaniemi2014-11-261-0/+1
|
* Revert "Remove -std=c89/-ansi if freebsd has "inline static" in <fenv.h>"Jarkko Hietaniemi2014-11-261-32/+0
| | | | | | This reverts commit f5fdb0259d5e9470e8291544a8b209e202d36334. (the theory is that 7ff69a2d made this unnecessary)
* Suppress ‘-e syntax OK’ in concise.tFather Chrysostomos2014-11-261-3/+1
| | | | | | | | | | On Windows, the output was including # 490-e syntax OK # : $l->concise($level); which does not match /(?^:\# 4\d\d: \s+ \$l->concise\(\$level\);)/, hence the test failure.
* PerlIO::encoding:fallback.t: White-space onlyKarl Williamson2014-11-261-1/+1
|
* PerlIO::encoding:fallback.t: Don't use undefined subKarl Williamson2014-11-261-1/+4
| | | | skip_all isn't defined under Test::More.
* Change core to use is_invariant_string()Karl Williamson2014-11-261-3/+3
| | | | | is_ascii_string's name has misled me in the past; the new name is clearer.
* Bump ext/POSIX version to 1.48Karl Williamson2014-11-261-1/+1
|
* Remove -std=c89/-ansi if freebsd has "inline static" in <fenv.h>Jarkko Hietaniemi2014-11-241-0/+32
| | | | | | Since -std=c89 (eq -ansi) simply isn't compatible with "inline static". Based on a fix by TonyC.
* fix ext/B/t/optree_misc.t in unthreaded buildsDavid Mitchell2014-11-231-1/+1
| | | | | | | My fix to fix smokes broke something else. (The people responsible for sacking the people who broke the builds, have now been sacked.)
* fix recent Concise tests under PERL_UNICODE=''David Mitchell2014-11-232-11/+11
| | | | | | | | | | | | | | | Some smokers run with PERL_UNICODE set; this has the side effect of making Concise display nextstate ops with open hints flags, e.g. nextstate(....) v:>,<,% ->8 where :... are the flags. Concise 'golden samples' should have these flags set; they're stripped from the expected output in the non-PERL_UNICODE case, rather than being stripped from the actual output in the PERL_UNICODE case. (It would probably make life easier if we did it the other way round.)
* Increase $POSIX::VERSION to 1.47Father Chrysostomos2014-11-201-1/+1
|
* Increase $B::VERSION to 1.54Father Chrysostomos2014-11-201-1/+1
|
* concise.t: correct test description to match actual testJim Cromie2014-11-201-1/+1
| | | | | | Commit c6036734 changed the subject of an optimized constant function rendering test to one from the Storable API (ie stable), but missed the function name repeated in the test description. Fix that now.
* Make B use B::COP for nulled COPsFather Chrysostomos2014-11-205-17/+30
| | | | | | | | | | Former COPs still carry information with them, and to get to it I had to have B::Deparse rebless the op object into B::COP. This commit makes B use the right class to begin with. This happens to make B::Concise output the extra information that nulled COPs carry around with them, which was on my to-do list anyway, so I’m happy about that.
* [perl #77452] Deparse { ...; BEGIN{} } correctlyFather Chrysostomos2014-11-201-1/+1
| | | | | | | | | | | | | | | | | | | | | | | 8635e3c2 (5.21.6) changed the COP sequence numbers for nested blocks, such that most BEGIN blocks (incl. ‘use’ statements) and sub declara- tions end up in the right place. However, it had the side effect of causing declarations at the end of the enclosing scope to fall out of it and appear below. This commit fixes that by adding an extra nulled COP to the end of the enclosing scope if that scope ends with a sub, so the final declara- tion gets deparsed before it. The frequency of sub declarations at the end of the enclosing scope is sufficiently low (I’m guessing a bit here) that this slight increase in run-time memory usage is probably acceptable. I had to change B::Deparse to deparse nulled COPs the same way it does live COPs, which means we get more extraneous semicolons than before. I hope to fix that in a forthcoming commit. I also ran into a B bug, in that null ops are not presented to Perl code with the right op class (see the blessing in the patch). I plan to fix that in a separ- ate commit, too.
* tgamma infinity limit for IEEE quad prec.Jarkko Hietaniemi2014-11-201-1/+7
|
* Escape EFS for directory portion in tovmsspec.Craig A. Berry2014-11-181-0/+2
| | | | | | | | | | | For some reason extended characters were only being escaped in the final component of the path, but not in the directory portion, the one exception being dots. We need to give the entire path the same treatment. There is probably considerable opportunity for further consolidation and refactoring in what we escape, but at least now ../foo bar/ correctly becomes [-.foo^_^_bar]. The reverse case has similar problems and is a TODO.
* While the nan() todo remains, at least warn not.Jarkko Hietaniemi2014-11-181-0/+1
|
* Comment reformatting.Jarkko Hietaniemi2014-11-181-2/+4
|
* Use my_tgamma/my_lgamma only ifndef HAS_TGAMMA/HAS_LGAMMA.Jarkko Hietaniemi2014-11-181-2/+2
|
* Platform may have only one of lgamma/tgamma.Jarkko Hietaniemi2014-11-171-12/+11
|
* fma() emulation.Jarkko Hietaniemi2014-11-171-3/+8
|
* No C++ comments, please, we are C89ish.Jarkko Hietaniemi2014-11-171-6/+6
|
* Increase $I18N::Langinfo::VERSION to 0.12Father Chrysostomos2014-11-161-1/+1
|