summaryrefslogtreecommitdiff
path: root/feature.h
Commit message (Collapse)AuthorAgeFilesLines
* fix incorrect vi filetype declarations in generated filesLukas Mai2023-03-241-1/+1
| | | | | Vim's filetype declarations are case sensitive. The correct types for Perl, C, and Pod are perl, c, and pod, respectively.
* generated files - update mode lines to specify file typeElvin Aslanov2023-02-191-2/+2
| | | | | | | | | | This updates the mode-line for most of our generated files so that they include file type information so they will be properly syntax highlighted on github. This does not make any other functional changes to the files. [Note: Commit message rewritten by Yves]
* Initial attack at basic 'class' featurePaul "LeoNerd" Evans2023-02-101-19/+34
| | | | | | | | | | | | | Adds a new experimental warning, feature, keywords and enough parsing to implement basic classes with an empty `new` constructor method. Inject a $self lexical into method bodies; populate it with the object instance, suitably shifted Creates a new OP_METHSTART opcode to perform method setup Define an aux flag to remark which stashes are classes Basic implementation of fields. Basic anonymous methods.
* Enable `use feature 'module_true'`chromatic2022-11-011-11/+24
| | | | | | | | | | | Per RFC 18, whenever `use feature 'module_true';` is enabled in a scope, any file required with `require` has an implicit return value of true and will not trigger the "did not return a true value" error condition. This includes logic to use the OPf_SPECIAL flag for OP_RETURN listops to indicate that the module_true feature is in effect when it executes. This flag plays no role unless the OP_RETURN tail calls the pp_leaveeval logic, so it doesn't affect normal sub returns.
* feature.h - simplify expression CURRENT_HINTS expressionYves Orton2022-10-261-1/+6
| | | | | | | | | | | | | | | | | PL_hints expands to PL_compiling.cop_hints. So there is no point in doing PL_curcop == &PL_compiling ? PL_hints : PL_curcop->cop_hints as it resolves to doing: PL_curcop->cop_hints but with a comparison, which likely kills any speed advantage the direct access might provide. The old define is left around to validate that the two are the same if needed.
* Remove bareword_filehandles from the :5.38 feature bundleDagfinn Ilmari Mannsåker2022-07-061-11/+17
| | | | | | Commit c5327cb77526e4e4c7bb83e24be20ac48e85b1fa fixed the bug that caused it to be put back in the :5.36 feature bundle, so let's pull it out again.
* Put 'bareword_filehandles' feature back into the v5.35 bundlePaul "LeoNerd" Evans2022-05-131-1/+1
|
* Add 'extra paired delimiters' featureKarl Williamson2022-03-191-20/+32
| | | | | When this feature is enabled, one can use many more string delimiters that have an opening version and a mirrored closing one.
* Add 'signatures' to :5.36 feature bundlePaul "LeoNerd" Evans2022-02-201-2/+3
|
* Add 'isa' to 'use feature :5.35'Paul "LeoNerd" Evans2022-02-151-2/+3
|
* feature.pm: remove bareword_filehandles from :5.36Ricardo Signes2021-11-021-1/+1
|
* feature: remove indirect and multidimensional in v5.36Ricardo Signes2021-11-021-2/+2
|
* Create `defer` syntax and `OP_PUSHDEFER` opcodePaul "LeoNerd" Evans2021-08-251-14/+29
| | | | | | | | | | | | | | | 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.
* feature.pm: drop "switch" from latest version bundleRicardo Signes2021-07-251-12/+17
|
* Initial attempt at feature 'try'Paul "LeoNerd" Evans2021-02-041-2/+17
| | | | | | | | | * Add feature, experimental warning, keyword * Basic parsing * Basic implementation as optree fragment See also https://github.com/Perl/perl5/issues/18504
* add a bareword_filehandles feature, which is enabled by defaultTony Cook2021-01-041-18/+31
| | | | This disables use of bareword filehandles except for the built-in handles
* add a default enabled feature "multidimensional"Tony Cook2020-08-101-17/+30
| | | | | | Like "indirect" this feature is enabled by default and enables the perl4 hash-based multidimensional array emulation documented under $; in perlvar.
* Add 'indirect' feature that can be turned off to disable indirect object syntaxDagfinn Ilmari Mannsåker2020-02-161-10/+23
| | | | Co-authored-by: Tony Cook <tony@develop-help.com>
* Add the `isa` operatorPaul "LeoNerd" Evans2019-12-091-8/+23
| | | | | | | | | | | | | | | | | | Adds a new infix operator named `isa`, with the semantics that $x isa SomeClass is true if and only if `$x` is a blessed object reference that is either `SomeClass` directly, or includes the class somewhere in its @ISA hierarchy. It is false without warning or error for non-references or non-blessed references. This operator respects `->isa` method overloading, and is intended to replace boilerplate code such as use Scalar::Util 'blessed'; blessed($x) and $x->isa("SomeClass")
* updates to $^H{feature_validname} now update cop_featuresTony Cook2019-12-051-0/+117
| | | | This removes $^{FEATURE_BITS}, since it's no longer needed.
* remove now unneeded FEATURE_IS_ENABLED()Tony Cook2019-10-301-7/+0
|
* Faster feature checksTony Cook2019-10-301-13/+45
| | | | | | | | | | | | | | | 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.
* Provide header guards to prevent re-inclusionJames E Keenan2018-12-041-0/+5
| | | | | | | | Per LGTM analysis: https://lgtm.com/projects/g/Perl/perl5/alerts/?mode=tree&ruleFocus=2163210746 and LGTM recommendation: https://lgtm.com/rules/2163210746/ For: RT 133699
* Remove support for setting $[ to a non-zero valueDagfinn Ilmari Mannsåker2018-09-261-7/+0
| | | | This removes arybase and all its surrounding machinery.
* Enable bitwise feature with ‘use v5.28’Father Chrysostomos2017-12-311-11/+17
|
* Add declared_refs feature featureFather Chrysostomos2016-07-171-0/+6
|
* Give feature.pm the concept of no-op featuresFather Chrysostomos2016-05-201-12/+0
|
* Make postfix dereferencing work without the postderef featureAaron Crane2015-07-131-3/+2
| | | | | The feature still exists, for compatibility with code that tries to enable it, but it has no effect. The postderef_qq feature still exists, however.
* The postderef feature is no longer experimentalAaron Crane2015-06-271-12/+22
| | | | | | | | | | | | | | As proposed by RJBS. The "5.24" feature bundle (and therefore C<< use v5.24 >>) now enable postderef and postderef_qq. I can't find any precedent for what to do with the relevant experimental::* warnings category when an experimental feature graduates to acceptance. I have elected to leave the category in place, so that code doing C<< no warnings "experimental::postderef" >> will continue to work. This means that C<< use warnings "experimental::postderef" >> is also accepted, but has no effect.
* Add bitwise feature featureFather Chrysostomos2015-01-311-0/+6
|
* Rename lvalue referencesFather Chrysostomos2014-10-171-2/+2
| | | | | Also correct the description of lvref magic. When it was first added, it was for list assignments only, but that soon changed.
* Add lvalue_refs feature featureFather Chrysostomos2014-10-101-0/+6
|
* subroutine signaturesZefram2014-02-011-0/+6
| | | | | | | | | | Declarative syntax to unwrap argument list into lexical variables. "sub foo ($a,$b) {...}" checks number of arguments and puts the arguments into lexical variables. Signatures are not equivalent to the existing idiom of "sub foo { my($a,$b) = @_; ... }". Signatures are only available by enabling a non-default feature, and generate warnings about being experimental. The syntactic clash with prototypes is managed by disabling the short prototype syntax when signatures are enabled.
* Add postderef_qq feature featureFather Chrysostomos2013-10-051-1/+7
|
* Add postderef feature featureFather Chrysostomos2013-10-051-0/+6
|
* Add experimental lexical_subs featureFather Chrysostomos2012-09-151-0/+6
|
* Tweak the FEATURE_IS_ENABLED() macro to avoid a bug in the HP-UX compiler.Nicholas Clark2012-04-121-1/+3
|
* Add the fc keyword in regen/feature.plBrian Fraser2012-01-291-0/+7
| | | | It doesn't do anything yet.
* feature.h: Mask hints in CURRENT_FEATURE_BUNDLEFather Chrysostomos2012-01-281-1/+2
| | | | | | | | | | | | Otherwise CURRENT_FEATURE_BUNDLE will end up including any hints added later that happen to use higher bits. This was causing autobox to turn off all features, causing failures for Dist::Zilla::PluginBundle::AVAR. I’m not adding tests for this, as such tests would need constant tweaking in future perl developement. What autobox is doing is naughty and unsupported anyway.
* use VERSION needs to enable uni8bit hintFather Chrysostomos2011-12-241-0/+4
|
* Make MAX_FEATURE_LEN reflect realityFather Chrysostomos2011-12-241-1/+1
| | | | | unicode_strings was not the longest string. We can determine it auto- matically, now that this macro is in a generated file.
* feature.h: FEATURE_IS_ENABLED can use CURRENT_HINTSFather Chrysostomos2011-12-241-1/+1
|
* feature.h: Function for enabling bundlesFather Chrysostomos2011-12-241-0/+21
|
* Move FEATURE_IS_ENABLED to feature.hFather Chrysostomos2011-12-241-0/+7
| | | | | It makes little sense to have it in perl.h any more. (Until recently, feature.h didn’t exist.)
* Eliminate ‘negative’ featuresFather Chrysostomos2011-12-241-1/+1
| | | | | | Now that we have hints in $^H to indicate the default feature bun- dle, there is no need for entries in %^H that turn features off by their presence.
* feature.h: Avoid compiler warningFather Chrysostomos2011-12-241-2/+1
| | | | unsigned >= 0 produces a warning, even if the 0 is actually a macro.
* Add macros for checking individual featuresFather Chrysostomos2011-12-241-0/+62
|
* feature.h: Add macros for current hintsFather Chrysostomos2011-12-241-0/+4
| | | | | | | | | CURRENT_HINTS is not specific to features, but for now will be used by nothing else. It returns the compile-time or run-time hints, depend- ing on whether PL_curcop points to &PL_compiling. CURRENT_FEATURE_BUNDLE extracts the feature bundle number from the current hints.
* feature.h: Parenthesise macro definitionFather Chrysostomos2011-12-241-1/+1
|
* Add feature.h, with constants for feature bundlesFather Chrysostomos2011-12-241-0/+20