summaryrefslogtreecommitdiff
path: root/mg.c
Commit message (Collapse)AuthorAgeFilesLines
* Call SvMAGICAL_off in mg_freeBram2008-05-101-0/+1
| | | | | Message-ID: <20080505161856.pgz4pjga1w44ksk4@horde.wizbit.be> p4raw-id: //depot/perl@33815
* Inline the trivial S_raise_signal function in the perl signal handler.Gisle Aas2008-04-241-32/+14
| | | | | | | | | | This makes the code more readable and avoids the need for excuses for why the function is (still) named this way. It also effectively avoids segfaults observed with gcc-3.3 when the sibling-call optimization is used for invoking S_raise_signal() just before the signal handler returns. p4raw-id: //depot/perl@33741
* Drop #ifdefs that became empty in change #32012.Gisle Aas2008-04-241-4/+0
| | | | | p4raw-link: @32012 on //depot/perl: b6455c53c26be8a62e12a3f2a24a3a5086dd2c7b p4raw-id: //depot/perl@33739
* Fix for [perl #52074] Segfault on ISA push after symbol table deleteRafael Garcia-Suarez2008-04-151-2/+4
| | | | | | This restores the 5.8.8 behaviour. The deleted stash is not vivified again, hence the hierarchy remains broken. But there's no segfault. p4raw-id: //depot/perl@33684
* Define sv_insert() as a wrapper to sv_insert_flags(), and moveNicholas Clark2008-04-011-1/+2
| | | | | Perl_sv_insert() to mathoms.c p4raw-id: //depot/perl@33627
* apidoc mismatch for Perl_magic_clearhintVincent Pit2008-03-241-1/+1
| | | | | Message-ID: <47E80F52.4030805@profvince.com> p4raw-id: //depot/perl@33553
* Re: [PATCH] mg_magical() sometimes turns SvRMAGICAL on when it shouldn'tVincent Pit2008-03-101-10/+15
| | | | | Message-ID: <47ACD61B.6030501@profvince.com> p4raw-id: //depot/perl@33458
* assert() that every NN argument is not NULL. Otherwise we have theNicholas Clark2008-02-121-1/+133
| | | | | | | | | | | | 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
* Fix bug whereby length on a tied scalar that returned a UTF-8 valueNicholas Clark2008-01-121-4/+7
| | | | | | | would not be correct the first time. (And for the more pathological case, would be incorrect if the UTF-8-ness of the returned value changed.) p4raw-id: //depot/perl@32968
* Re: [perl #49564] Re: MRO and av_clearRick Delaney2008-01-111-0/+23
| | | | | Message-ID: <20080109183655.GB11282@bort.ca> p4raw-id: //depot/perl@32948
* Re: SV leak?Vincent Pit2008-01-041-1/+1
| | | | | | | | Message-ID: <477D28BD.5060801@profvince.com> Mortalize SVs that are being pushed on the stack. Try to use specialized macros for pushing mortals. p4raw-id: //depot/perl@32822
* Add macros mPUSHs() and mXPUSHs() for pushing SVs on the stackMarcus Holland-Moritz2008-01-041-2/+2
| | | | | | and mortalizing them. Use these macros where possible. And also mX?PUSH[inpu] where possible. p4raw-id: //depot/perl@32821
* Add newSVpvs_flags() as a wrapper to newSVpvn_flags(), and reworkNicholas Clark2008-01-031-2/+4
| | | | | sv_2mortal(newSVpvs(...)) constructions to use it. p4raw-id: //depot/perl@32819
* Extend newSVpvn_flags() to also call sv_2mortal() if SVs_TEMP is set inNicholas Clark2008-01-031-5/+5
| | | | | | the flags. Move its implementation just ahead of sv_2mortal()'s for CPU cache locality. Refactor all code that can be to use this. p4raw-id: //depot/perl@32818
* Make struct regexp the body of SVt_REGEXP SVs, REGEXPs become SVs,Nicholas Clark2008-01-021-11/+0
| | | | | | and regexp reference counting is via the regular SV reference counting. This was not as easy at it looks. p4raw-id: //depot/perl@32804
* Wrap all deferences of struct regexp* in macros RX_*() [and forNicholas Clark2008-01-021-14/+14
| | | | | | | regcomp.c and regexec.c RXp_* where necessary] so that in future we can maintain source compatibility when we add an extra level of dereferencing. p4raw-id: //depot/perl@32802
* Perl_magic_setbm() and Perl_magic_setfm() are mathoms that can beNicholas Clark2007-12-311-22/+10
| | | | | | | merged with Perl_magic_setregexp(). [Coverage on the testsuite suggests that more than that they're actually dead code, but in theory it should be possible to construct a test case that exercises them.] p4raw-id: //depot/perl@32789
* mg_free frees data but leaves it accessibleYuval Kogman2007-12-211-0/+1
| | | | | | Message-ID: <20071220221331.GG10631@woobling.org> Date: Fri, 21 Dec 2007 00:13:31 +0200 p4raw-id: //depot/perl@32686
* Perl_magic_setglob() is a mathom.Nicholas Clark2007-12-201-24/+0
| | | p4raw-id: //depot/perl@32672
* Simplify the logic for retrieving PL_inplace into $^I, as sv_setpv()Nicholas Clark2007-10-181-4/+1
| | | | | will do the "right" thing if we want NULL to map to undef. p4raw-id: //depot/perl@32137
* Change newSVpv() to newSVpvn() where we know the length is non-zero, asNicholas Clark2007-10-181-3/+3
| | | | | newSVpvn() will be fractionally more efficient. p4raw-id: //depot/perl@32135
* Change a sv_catpv() to sv_catpvs().Nicholas Clark2007-10-051-1/+1
| | | p4raw-id: //depot/perl@32038
* As PL_hinthv is actually tied, need to call SvSETMAGIC() after theNicholas Clark2007-10-051-3/+3
| | | | | store to it. Gosh, the tied hash API is clunky. p4raw-id: //depot/perl@32032
* Try a bit harder to get *PL_sighandlerp to agree with itsCraig A. Berry2007-10-041-8/+6
| | | | | prototype based on SA_SIGINFO definedness rather than Win32-ness. p4raw-id: //depot/perl@32027
* Fix warnings about Sighandler_t type on Win32.Rafael Garcia-Suarez2007-10-041-0/+8
| | | p4raw-id: //depot/perl@32020
* Adapt definition of Sighandler_t to go with change #32012Rafael Garcia-Suarez2007-10-031-2/+2
| | | | | p4raw-link: @32012 on //depot/perl: b6455c53c26be8a62e12a3f2a24a3a5086dd2c7b p4raw-id: //depot/perl@32013
* [perl #45513] Test failures on amd64-freebsd 6.2 Slaven Rezic2007-10-031-12/+3
| | | | | | From: "slaven@rezic.de via RT" <perlbug-followup@perl.org> Message-ID: <rt-3.6.HEAD-5916-1191069483-1553.45513-15-0@perl.org> p4raw-id: //depot/perl@32012
* hv_stores() on a literal string is now fractionally more efficient thanNicholas Clark2007-09-211-8/+8
| | | | | hv_store(). p4raw-id: //depot/perl@31938
* Silence a load of "value computed is not used" warningsRafael Garcia-Suarez2007-09-211-2/+2
| | | p4raw-id: //depot/perl@31936
* Re: optimize push @ISA, (was Re: parent.pm at http://corion.net/perl-dev)Brandon Black2007-08-311-4/+5
| | | | | | From: "Brandon Black" <blblack@gmail.com> Message-ID: <84621a60708121336m13dcf9e5uac624fb246f2a79c@mail.gmail.com> p4raw-id: //depot/perl@31770
* misc blead stuffJarkko Hietaniemi2007-08-301-0/+9
| | | | | Message-ID: <46D617B5.3000002@iki.fi> p4raw-id: //depot/perl@31765
* Revert change #31489.Rafael Garcia-Suarez2007-06-291-20/+0
| | | | | | | | | | | That change was adding a hook to cope with the case when one was undef'ining *ISA globs, in order to clean up correctly. However, this broke the case where one was assiging an array ref to @ISA, which is likely to be more common. Conclusion: don't undef *ISA. (or more generally don't undef globs that contain magical variables) p4raw-link: @31489 on //depot/perl: 5be5c7a687aa37f2ea9dec7988eb57cad1f1ec24 p4raw-id: //depot/perl@31502
* Rename various regex defined so that they have distinct prefixes based on ↵Yves Orton2007-06-281-6/+6
| | | | | | | | | | | | | | their usage. RXf_ => flags used in pm_flags argument to regcomp and stored in the regex via rx->extflags PREGf_ => flags stored in rx->intflags RXapif_ => argument flags for regex named capture api RX_BUFF_IDX_ => special indexes to represent $` $' $& used in the numeric capture buffer api PREGf is untouched by this change, but RXf_ is split into RXapif and RX_BUFF_IDX_. p4raw-id: //depot/perl@31497
* Re: [perl #43357] *DESTROY = sub {} at runtimeBrandon Black2007-06-281-0/+20
| | | | | | From: "Brandon Black" <blblack@gmail.com> Message-ID: <84621a60706270807r7af65546x8d959b131ffa28e6@mail.gmail.com> p4raw-id: //depot/perl@31489
* Re: [PATCH] Callbacks for named captures (%+ and %-)Ævar Arnfjörð Bjarmason2007-06-061-6/+6
| | | | | | From: "Ævar Arnfjörð Bjarmason" <avarab@gmail.com> Message-ID: <51dd1af80706031324y5618d519p460da27a2e7fe712@mail.gmail.com> p4raw-id: //depot/perl@31341
* Various mro updates from Brandon Black. References:Craig A. Berry2007-05-191-0/+5
| | | | | | | | <84621a60705111347q40f9dd9ciefa9468e9ff9ca6c@mail.gmail.com> <84621a60705121458i34ff361fh9166e8558781df41@mail.gmail.com> <84621a60705141111q70ed307r9181dfc2834a8f5c@mail.gmail.com> <84621a60705160937h53946fcfg70635908302724e8@mail.gmail.com> p4raw-id: //depot/perl@31239
* Small fix to a previous patch on magic $<digit> variables.Ævar Arnfjörð Bjarmason2007-05-101-0/+1
| | | | | | | Subject: [PATCH] From: "Ævar Arnfjörð Bjarmason" <avarab@gmail.com> Message-ID: <51dd1af80705091924q77c2ca23n30359779b96ab909@mail.gmail.com> p4raw-id: //depot/perl@31190
* more constingAndy Lester2007-05-081-2/+2
| | | | | Message-ID: <20070507163416.GA6187@petdance.com> p4raw-id: //depot/perl@31167
* move PL_lex_state into the PL_parser structDave Mitchell2007-05-051-1/+1
| | | p4raw-id: //depot/perl@31154
* FETCH/STORE/LENGTH callbacks for numbered capture variablesÆvar Arnfjörð Bjarmason2007-05-031-61/+84
| | | | | | From: "Ævar Arnfjörð Bjarmason" <avarab@gmail.com> Message-ID: <51dd1af80705011658g1156e14cw4d2b21a8d772ed41@mail.gmail.com> p4raw-id: //depot/perl@31130
* Re: mro status, etcBrandon Black2007-05-031-6/+13
| | | | | | From: "Brandon Black" <blblack@gmail.com> Message-ID: <84621a60704301445y37e9b05ey235210a8e5547cc1@mail.gmail.com> p4raw-id: //depot/perl@31122
* When FETCHSIZE returns <0 perl segfaultsÆvar Arnfjörð Bjarmason2007-05-021-3/+5
| | | | | | From: "Ævar Arnfjörð Bjarmason" <avarab@gmail.com> Message-ID: <51dd1af80705011406j7897772bm58e9c770183ef3ed@mail.gmail.com> p4raw-id: //depot/perl@31116
* Re: mro status, etcBrandon Black2007-04-301-0/+2
| | | | | | From: "Brandon Black" <blblack@gmail.com> Message-ID: <84621a60704291527y1b39be37l221ef66e4c828f66@mail.gmail.com> p4raw-id: //depot/perl@31107
* Re: new C3 MRO patchBrandon Black2007-04-191-3/+12
| | | | | | From: "Brandon Black" <blblack@gmail.com> Message-ID: <84621a60704171114k29b0460el5b08ce5185d55ed5@mail.gmail.com> p4raw-id: //depot/perl@30980
* In struct regexp replace the two arrays of I32s accessed via startpNicholas Clark2007-03-261-10/+11
| | | | | | | | | | and endp with a single array of struct regexp_paren_pair, which has 2 I32 members. PL_regstartp and PL_regendp are replaced with a pointer to regexp_paren_pair. The regexp swap structure now only has one member, so abolish it and store the pointer to the swap array directly. Hopefully keeping the corresponding start and end adjacent in memory will help with cache coherency. p4raw-id: //depot/perl@30769
* minor code simplification made possible by change #30627Dave Mitchell2007-03-191-7/+5
| | | | | p4raw-link: @30627 on //depot/perl: e7cbf6c66722616e50aa4cda71d48adf3ae55201 p4raw-id: //depot/perl@30628
* When restoring localised values, call set only on container magic.Dave Mitchell2007-03-181-0/+2
| | | | | | Avoids (among other things), localised pos index being trashed at scope exit. p4raw-id: //depot/perl@30627
* move magic container/value test into separate functionDave Mitchell2007-03-181-23/+34
| | | p4raw-id: //depot/perl@30624
* Add a comment to mg.c to clarify that words like "raise" andCraig A. Berry2007-02-251-0/+13
| | | | | | "pending" in the context of Perl's deferred signals bear only an analogous relationship to the underlying signal mechanism. p4raw-id: //depot/perl@30393
* Add a cast for C++ compilationRafael Garcia-Suarez2007-02-191-1/+1
| | | p4raw-id: //depot/perl@30349