summaryrefslogtreecommitdiff
path: root/warnings.h
diff options
context:
space:
mode:
authorPaul "LeoNerd" Evans <leonerd@leonerd.org.uk>2021-07-27 14:55:14 +0100
committerPaul Evans <leonerd@leonerd.org.uk>2021-08-25 13:52:09 +0100
commitf79e2ff95fbb22eaf18e130c7cba8a9d40be3d75 (patch)
tree18bedb48e757671114f8f63c8691677a06b62a1b /warnings.h
parent4b21956ed64a9303ab72a46be1cd68c22bff2560 (diff)
downloadperl-f79e2ff95fbb22eaf18e130c7cba8a9d40be3d75.tar.gz
Create `defer` syntax and `OP_PUSHDEFER` opcode
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.
Diffstat (limited to 'warnings.h')
-rw-r--r--warnings.h5
1 files changed, 5 insertions, 0 deletions
diff --git a/warnings.h b/warnings.h
index 5658e2183f..fe020b55a5 100644
--- a/warnings.h
+++ b/warnings.h
@@ -133,6 +133,10 @@
/* Warnings Categories added in Perl 5.033 */
#define WARN_EXPERIMENTAL__TRY 73
+
+/* Warnings Categories added in Perl 5.035 */
+
+#define WARN_EXPERIMENTAL__DEFER 74
#define WARNsize 19
#define WARN_ALLstring "\125\125\125\125\125\125\125\125\125\125\125\125\125\125\125\125\125\125\125"
#define WARN_NONEstring "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"
@@ -316,6 +320,7 @@ category parameters passed.
=for apidoc Amnh||WARN_EXPERIMENTAL__VLB
=for apidoc Amnh||WARN_EXPERIMENTAL__ISA
=for apidoc Amnh||WARN_EXPERIMENTAL__TRY
+=for apidoc Amnh||WARN_EXPERIMENTAL__DEFER
=cut
*/