1
1
/* cop.h
2
2
*
3
3
* Copyright (C) 1991, 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000,
4
- * 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009 by Larry Wall and others
4
+ * 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009 by Larry Wall and
5
+ * others
5
6
*
6
7
* You may distribute under the terms of either the GNU General Public
7
8
* License or the Artistic License, as specified in the README file.
8
9
*
9
- * Control ops (cops) are one of the two ops OP_NEXTSTATE and OP_DBSTATE,
10
- * that (loosely speaking) are statement separators.
11
- * They hold information important for lexical state and error reporting.
12
- * At run time, PL_curcop is set to point to the most recently executed cop,
13
- * and thus can be used to determine our current state.
10
+ * Control ops (cops) are one of the two ops OP_NEXTSTATE and OP_DBSTATE, that
11
+ * (loosely speaking) are statement separators. They hold information important
12
+ * for lexical state and error reporting. At run time, PL_curcop is set to
13
+ * point to the most recently executed cop, and thus can be used to determine
14
+ * our current state.
14
15
*/
15
16
16
17
/* A jmpenv packages the state required to perform a proper non-local jump.
@@ -433,12 +434,12 @@ the octets.
433
434
struct cop {
434
435
BASEOP
435
436
/* On LP64 putting this here takes advantage of the fact that BASEOP isn't
436
- an exact multiple of 8 bytes to save structure padding. */
437
+ an exact multiple of 8 bytes to save structure padding. */
437
438
line_t cop_line ; /* line # of this command */
438
439
/* label for this construct is now stored in cop_hints_hash */
439
440
#ifdef USE_ITHREADS
440
- PADOFFSET cop_stashoff ; /* offset into PL_stashpad, for the
441
- package the line was compiled in */
441
+ PADOFFSET cop_stashoff ; /* offset into PL_stashpad, for the package
442
+ the line was compiled in */
442
443
char * cop_file ; /* name of file this command is from */
443
444
#else
444
445
HV * cop_stash ; /* package line was compiled in */
@@ -448,13 +449,13 @@ struct cop {
448
449
U32 cop_seq ; /* parse sequence number */
449
450
/* Beware. mg.c and warnings.pl assume the type of this is STRLEN *: */
450
451
STRLEN * cop_warnings ; /* lexical warnings bitmask */
451
- /* compile time state of %^H. See the comment in op.c for how this is
452
- used to recreate a hash to return from caller. */
452
+ /* compile time state of %^H. See the comment in op.c for how this is used
453
+ to recreate a hash to return from caller. */
453
454
COPHH * cop_hints_hash ;
454
455
/* for now just a bitmask stored here.
455
- If we get sufficient features this may become a pointer.
456
- How these flags are stored is subject to change without
457
- notice. Use the macros to test for features.
456
+ If we get sufficient features this may become a pointer. How these flags
457
+ are stored is subject to change without notice. Use the macros to test
458
+ for features.
458
459
*/
459
460
U32 cop_features ;
460
461
};
@@ -1026,7 +1027,7 @@ struct context {
1026
1027
1027
1028
/* private flags for CXt_SUB and CXt_FORMAT */
1028
1029
#define CXp_MULTICALL 0x10 /* part of a multicall (so don't tear down
1029
- context on exit). (not CXt_FORMAT) */
1030
+ context on exit). (not CXt_FORMAT) */
1030
1031
#define CXp_HASARGS 0x20
1031
1032
#define CXp_SUB_RE 0x40 /* code called within regex, i.e. (?{}) */
1032
1033
#define CXp_SUB_RE_FAKE 0x80 /* fake sub CX for (?{}) in current scope */
@@ -1064,8 +1065,8 @@ struct context {
1064
1065
( CxTYPE(cx) >= CXt_LOOP_ARY && CxTYPE(cx) <= CXt_LOOP_LIST)
1065
1066
1066
1067
/* private flags for CXt_DEFER */
1067
- #define CXp_FINALLY 0x20 /* `finally` block; semantically identical
1068
- * but matters for diagnostic messages */
1068
+ #define CXp_FINALLY 0x20 /* `finally` block; semantically identical but
1069
+ * matters for diagnostic messages */
1069
1070
1070
1071
/* deprecated old name before real try/catch was added */
1071
1072
#define CXp_TRYBLOCK CXp_EVALBLOCK
@@ -1084,33 +1085,33 @@ struct context {
1084
1085
#endif
1085
1086
1086
1087
/* extra flags for Perl_call_* routines */
1087
- #define G_DISCARD 0x4 /* Call FREETMPS.
1088
- Don't change this without consulting the
1089
- hash actions codes defined in hv.h */
1090
- #define G_EVAL 0x8 /* Assume eval {} around
1091
- subroutine call. */
1088
+ #define G_DISCARD 0x4 /* Call FREETMPS. Don't change this
1089
+ without consulting the hash actions
1090
+ codes defined in hv.h */
1091
+ #define G_EVAL 0x8 /* Assume eval {} around subroutine
1092
+ call. */
1092
1093
#define G_NOARGS 0x10 /* Don't construct a @_ array. */
1093
1094
#define G_KEEPERR 0x20 /* Warn for errors, don't
1094
1095
overwrite $@ */
1095
1096
#define G_NODEBUG 0x40 /* Disable debugging at toplevel. */
1096
1097
#define G_METHOD 0x80 /* Calling method. */
1097
- #define G_FAKINGEVAL 0x100 /* Faking an eval context for call_sv or
1098
- fold_constants. */
1099
- #define G_UNDEF_FILL 0x200 /* Fill the stack with &PL_sv_undef
1100
- A special case for UNSHIFT in
1101
- Perl_magic_methcall(). */
1098
+ #define G_FAKINGEVAL 0x100 /* Faking an eval context for call_sv
1099
+ or fold_constants. */
1100
+ #define G_UNDEF_FILL 0x200 /* Fill the stack with &PL_sv_undef A
1101
+ special case for UNSHIFT in
1102
+ Perl_magic_methcall(). */
1102
1103
#define G_WRITING_TO_STDERR 0x400 /* Perl_write_to_stderr() is calling
1103
- Perl_magic_methcall(). */
1104
+ Perl_magic_methcall(). */
1104
1105
#define G_RE_REPARSING 0x800 /* compiling a run-time /(?{..})/ */
1105
- #define G_METHOD_NAMED 0x1000 /* calling named method, eg
1106
- without :: or ' */
1106
+ #define G_METHOD_NAMED 0x1000 /* calling named method, eg without ::
1107
+ or ' */
1107
1108
#define G_RETHROW 0x2000 /* eval_sv(): re-throw any error */
1108
1109
1109
1110
/* flag bits for PL_in_eval */
1110
1111
#define EVAL_NULL 0 /* not in an eval */
1111
1112
#define EVAL_INEVAL 1 /* some enclosing scope is an eval */
1112
- #define EVAL_WARNONLY 2 /* used by yywarn() when
1113
- calling yyerror() */
1113
+ #define EVAL_WARNONLY 2 /* used by yywarn() when calling
1114
+ yyerror() */
1114
1115
#define EVAL_KEEPERR 4 /* set by Perl_call_sv if G_KEEPERR */
1115
1116
#define EVAL_INREQUIRE 8 /* The code is being required. */
1116
1117
#define EVAL_RE_REPARSING 0x10 /* eval_sv() called with
@@ -1146,12 +1147,13 @@ struct stackinfo {
1146
1147
I32 si_cxmax ; /* maximum allocated index */
1147
1148
I32 si_cxsubix ; /* topmost sub/eval/format */
1148
1149
I32 si_type ; /* type of runlevel */
1149
- I32 si_markoff ; /* offset where markstack begins for us.
1150
- * currently used only with DEBUGGING,
1151
- * but not #ifdef-ed for bincompat */
1150
+ I32 si_markoff ; /* offset where markstack begins for
1151
+ * us. currently used only with
1152
+ * DEBUGGING, but not #ifdef-ed for
1153
+ * bincompat */
1152
1154
#if defined DEBUGGING && !defined DEBUGGING_RE_ONLY
1153
1155
/* high water mark: for checking if the stack was correctly extended /
1154
- * tested for extension by each pp function */
1156
+ * tested for extension by each pp function */
1155
1157
SSize_t si_stack_hwm ;
1156
1158
#endif
1157
1159
0 commit comments