summaryrefslogtreecommitdiff
path: root/scope.h
Commit message (Collapse)AuthorAgeFilesLines
* remove index offsetting ($[)Zefram2011-09-091-3/+0
| | | | | | $[ remains as a variable. It no longer has compile-time magic. At runtime, it always reads as zero, accepts a write of zero, but dies on writing any other value.
* Fix typos (spelling errors) in Perl sources.Peter J. Acklam) (via RT2011-01-071-1/+1
| | | | | | | | | # New Ticket Created by (Peter J. Acklam) # Please include the string: [perl #81904] # in the subject line of all future correspondence about this issue. # <URL: http://rt.perl.org/rt3/Ticket/Display.html?id=81904 > Signed-off-by: Abigail <abigail@abigail.be>
* add SAVEFREECOPHH()Zefram2010-10-281-0/+2
| | | | | Add the facility for the save stack to free (decrement the refcount of) a COPHH*.
* bad things happened with for $x (...) { *x = *y }David Mitchell2010-09-081-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | fix for [perl #21469]: since the GP may be pulled from under us and freed, coredumps and strange things can happen. Fix this by storing a pointer to the GV in the loop block, rather than a pointer to the GvSV slot. The ITHREADS variant already stores GV rather than than &GvSV; extend this to non-threaded builds too. Also, for both threaded and non-threaded, it used to push &GvSV on the save stack. Fix this by introducing a new save type, SAVEt_GVSV. This behaves similarly to SAVEt_SV, but without magic get/set. This means that for $package_var (...) is now close in behaviour to local $package_var = ... (except for the magic bit).
* When saving ints, if the value is small enough save it with the type.Nicholas Clark2010-05-051-0/+1
| | | | This uses a new type, SAVEt_INT_SMALL.
* When saving I32s, if the value is small enough save it with the type.Nicholas Clark2010-05-051-0/+1
| | | | This uses a new type, SAVEt_I32_SMALL.
* On the save stack, store the save type as the bottom 6 bits of a UV.Nicholas Clark2010-05-011-2/+7
| | | | This makes the other 26 (or 58) bits available for save data.
* remove bool* cast from SAVEBOOLDavid Mitchell2010-04-211-1/+1
| | | | | SAVEBOOL() should only be used on variables of type bool; casting pointers to variables of other types into bool* is just wrong.
* Skip the scope name checks if PL_scopestack_name is NULL.Nicholas Clark2009-11-181-4/+7
| | | | | | It's possible that someone has built a module with -DDEBUGGING, but they're using it against a perl built non-DEBUGGING, in which case PL_scopestack_name will be NULL. Better to skip the checks than to SEGV.
* Performance optimisation in assert, suggested by Tim BunceRafael Garcia-Suarez2009-11-151-1/+3
| | | | | | Most compilers will store only a single copy of identical literal strings. So changing that assert to check the pointer first would significantly reduce the cost.
* Add ENTER_with_name and LEAVE_with_name to automaticly check for matching ↵Gerard Goossen2009-11-121-0/+28
| | | | ENTER/LEAVE when debugging is enabled
* Introduce save_hdelete() and SAVEHDELETE()Vincent Pit2009-07-251-0/+2
| | | | save_hdelete() is just like save_delete() except that it takes an SV instead of char buffer.
* Add a new SAVEf_KEEPOLDELEM flag to save_scalar_at() and save_{a,h}elem_flags()Vincent Pit2009-07-251-0/+1
| | | | When set, save_scalar_at() doesn't replace the given SV by a fresh new one. local magic is not called in this case.
* Introduce save_aelem_flags()Vincent Pit2009-07-251-0/+1
| | | | It's the symmetric of save_helem_flags(). save_aelem() is now a macro wrapping around save_aelem_flags().
* The 2nd arg to save_alloc() must be cast to I32 to avoid pointer truncation ↵Jan Dubois2009-07-031-1/+1
| | | | warnings on 64-bit platforms.
* Add save_adelete()/SAVEADELETE() to save on the stack an array element deleteVincent Pit2008-12-281-0/+3
|
* Move the implmentation of SAVEHINTS() into a new Perl_save_hints() inNicholas Clark2008-12-011-16/+1
| | | | | | scope.c. "Inlined" macro functions in scope.h are actually space inefficient. p4raw-id: //depot/perl@34965
* For SAVEHINTS(), re-order the savestack to be (?:PTR, )? INT, PTR.Nicholas Clark2008-12-011-6/+6
| | | | | This brings it to the same order as save_aelem() or save_pushi32ptr(). p4raw-id: //depot/perl@34964
* Expose save_pushi32ptr() and implement SAVECOPARYBASE() with it.Nicholas Clark2008-12-011-7/+1
| | | p4raw-id: //depot/perl@34963
* Expose save_pushptrptr() and implement SAVESWITCHSTACK() with it.Nicholas Clark2008-12-011-4/+1
| | | p4raw-id: //depot/perl@34960
* Re-implement the macros SAVECOMPPAD(), SAVECOMPILEWARNINGS(),Nicholas Clark2008-11-301-18/+3
| | | | | | | SAVEPARSER() in terms of save_pushptr(). This shinks the exectuable by about 4K. Maybe some of the other scope.h macros should become functions. p4raw-id: //depot/perl@34958
* Convert all the scope save functions of the formNicholas Clark2008-11-301-0/+6
| | | | | | | | | SSCHECK(2); SSPUSHPTR(o); SSPUSHINT(SAVEt_FREEOP); into a single function Perl_save_pushptr(ptr, type), which the others call. Implement the others as macros. This reduces the object code size. p4raw-id: //depot/perl@34956
* Re: [perl #60360] [PATCH] UPDATED: local $SIG{FOO} = sub {...}; sets signal ↵Chip Salzenberg2008-11-131-0/+4
| | | | | | | | | | | | handler to SIG_DFL Message-ID: <20081112234504.GI2062@tytlal.topaz.cx> Updated patch to retain source compatibility. Plus using the correct PERL_ARGS_ASSERT_SAVE_HELEM_FLAGS macro and running make regen. p4raw-id: //depot/perl@34829
* Add MUTABLE_HV(), and remove (HV *) casts from headers.Nicholas Clark2008-10-281-1/+1
| | | p4raw-id: //depot/perl@34619
* Add a macro MUTABLE_PTR(p), which on (non-pedantic) gcc will not castNicholas Clark2008-10-271-5/+5
| | | | | | | | | | away const, returning a void *. Add MUTABLE_SV(sv) which uses this, and replace all (SV *) casts either with MUTABLE_SV(sv), or (const SV *). This probably still needs some work - assigning to SvPVX() and SvRV() is now likely to generate a casting error. The core doesn't do this. But as-is it's finding bugs that can be fixed. p4raw-id: //depot/perl@34605
* Update copyright years.Nicholas Clark2008-10-251-2/+2
| | | p4raw-id: //depot/perl@34585
* A macro used only once isn't a typing saving, and 3 macro definitionsNicholas Clark2008-04-061-4/+0
| | | | | | | never used are more obfuscation than clarification, so inline the only use of SAVECOPLABEL_FREE(), and remove the unthreaded variant and both SAVECOPLABEL()s. Exterminate! Exterminate! Exterminate! p4raw-id: //depot/perl@33654
* Investigation reveals that the work of restoring the iterator to theNicholas Clark2008-01-261-2/+2
| | | | | | | | | | | | | | | | | pad is shared between POPLOOP, using itersave, and the end of scope restore action requested by Perl_save_padsv(). In fact, the only user of SAVEt_PADSV is pp_enteriter, and it already provides enough information to allow it to perform the sv_2mortal() in POPLOOP. So make it do so. Rather than creating a new routine, use the existing routine because nothing else (at least nothing else known to Google's codesearch) uses it. But rename it just in case something we can't see is being naughty and using our private functions - they will get link errors against 5.12. All this means that itersave is now redundant. So remove it. This makes struct context 48 bytes on ILP32 platforms with 32bit IVs, down from 64 bytes in 5.10. 33% more context stack in the same memory. p4raw-id: //depot/perl@33080
* Add editor blocks to some header files.Marcus Holland-Moritz2008-01-011-0/+9
| | | p4raw-id: //depot/perl@32793
* Update copyright years in .h files. Also, in .plRafael Garcia-Suarez2007-01-051-1/+1
| | | | | | files that generate .h files, so they'll be ready next time. p4raw-id: //depot/perl@29695
* handle cloning of parsers on the save stackDave Mitchell2007-01-031-0/+8
| | | p4raw-id: //depot/perl@29678
* Re: [PATCH] do not meddle in the affairs of PERL_TRACK_MEMPOOLJarkko Hietaniemi2006-12-181-0/+4
| | | | | | | Message-ID: <4586084E.8040706@iki.fi> Introduce CopLABEL() macro to deal with labels attached to COPs. p4raw-id: //depot/perl@29585
* [perl #40557] regexec.c saves context stack position improperly Dave Bailey2006-10-181-0/+9
| | | | | | From: Dave Bailey (via RT) <perlbug-followup@perl.org> Message-ID: <rt-3.5.HEAD-4979-1161103047-337.40557-75-0@perl.org> p4raw-id: //depot/perl@29033
* Rename cop_hints to cop_hints_hashNicholas Clark2006-05-201-3/+3
| | | p4raw-id: //depot/perl@28252
* Re: [PATCH] cleanup 212 warnings emitted by gcc-4.2Marcus Holland-Moritz2006-04-261-2/+2
| | | | | Message-ID: <20060424232038.7550f9b6@r2d2> p4raw-id: //depot/perl@27962
* Change SAVECOPWARNINGS(c) to SAVECOMPILEWARNINGS() - it's only used toNicholas Clark2006-04-141-6/+5
| | | | | | | save the warnings on PL_compiling, so constraining its use to what we can test seems to make sense. Particularly as testing Perl_ss_dup is tricky. p4raw-id: //depot/perl@27805
* Remove SAVEt_FREESHAREDPV, as nothing is using it, and it isn't cateredNicholas Clark2006-04-131-10/+2
| | | | | | for in Perl_ss_dup, hence nothing is testing it and nothing will alert us if it breaks. p4raw-id: //depot/perl@27792
* Change cop_warnings from an SV holding the warnings bitmask to aNicholas Clark2006-04-121-0/+21
| | | | | | | directly (shared) malloc()ed buffer holding the warnings bitmask. This avoids bugs/crashes when the interpreter that created an optree is freed but the optree remains in use by other interpreters. p4raw-id: //depot/perl@27779
* First stab at using the pad to store the serialised hints data.Nicholas Clark2006-04-111-0/+2
| | | | | | This approach is almost certainly not only wrong, but also doomed. But it's needed to build a correct solution. p4raw-id: //depot/perl@27768
* Save the regexp engine state as 1 block on the save stack.Nicholas Clark2006-04-051-0/+1
| | | p4raw-id: //depot/perl@27728
* Abstract all the accesses to cop_arybase (apart from ByteLoader)Nicholas Clark2006-04-021-0/+10
| | | p4raw-id: //depot/perl@27671
* Automatically set HINT_LOCALIZE_HH whenever %^H is modified.Nicholas Clark2006-04-011-1/+1
| | | p4raw-id: //depot/perl@27666
* Serialise changes to %^H onto the current COP. Return the compile timeNicholas Clark2006-03-311-1/+5
| | | | | | state of %^H as an eleventh value from caller. This allows users to write pragmas. p4raw-id: //depot/perl@27643
* Remove SOFT_CAST() as it no longer does anything useful.Nicholas Clark2006-02-111-18/+14
| | | p4raw-id: //depot/perl@27161
* Quotes fixed, see also perl #36079Andy Lester2005-06-021-1/+1
| | | | | Message-ID: <20050602050238.GA4001@petdance.com> p4raw-id: //depot/perl@24666
* move the SETJMP exception-handing definitions from scope.h to cop.hDave Mitchell2005-05-021-118/+0
| | | | | so that a JMPENV* entry can be added to struct block_eval p4raw-id: //depot/perl@24361
* Symbian port of PerlJarkko Hietaniemi2005-04-211-0/+1
| | | | | Message-ID: <B356D8F434D20B40A8CEDAEC305A1F2453D653@esebe105.NOE.Nokia.com> p4raw-id: //depot/perl@24271
* Update copyrights.Rafael Garcia-Suarez2005-03-301-1/+1
| | | p4raw-id: //depot/perl@24106
* Remove PERL_FLEXIBLE_EXCEPTIONS code.Marcus Holland-Moritz2005-01-101-111/+27
| | | p4raw-id: //depot/perl@23780
* make -Dl log runops loop entry and exit, and jump level poppingDave Mitchell2004-07-251-1/+5
| | | p4raw-id: //depot/perl@23161