It just happens that the (caller)[...] offsets for file and line are
the same as the keyword numbers. KEY___PACKAGE__ is 3 and (caller)[0]
returns the package, so keyword_number % 3 can be used for the offset
instead of an unwieldy switch block.
}
/* Generated from:
- * 34be1269b3c67c86c758c60794ddba6eadc528e0435f954d514c14a2f1c73a2e regen/keywords.pl
+ * 6563b55da87af894b79ef9d777217633eee6c7b5f352ff4c17317f562247f5fc regen/keywords.pl
* ex: set ro: */
#define KEY_y 252
/* Generated from:
- * 34be1269b3c67c86c758c60794ddba6eadc528e0435f954d514c14a2f1c73a2e regen/keywords.pl
+ * 6563b55da87af894b79ef9d777217633eee6c7b5f352ff4c17317f562247f5fc regen/keywords.pl
* ex: set ro: */
switch(opnum) {
case 0:
- {
- IV index = 0;
- switch(-code) {
- case KEY___FILE__ : index = 1; break;
- case KEY___LINE__ : index = 2; break;
- }
- return op_append_elem(OP_LINESEQ,
+ return op_append_elem(OP_LINESEQ,
argop,
newSLICEOP(0,
- newSVOP(OP_CONST, 0, newSViv(index)),
+ newSVOP(OP_CONST, 0, newSViv(-code % 3)),
newOP(OP_CALLER,0)
)
- );
- }
+ );
default:
switch (PL_opargs[opnum] & OA_CLASS_MASK) {
case OA_BASEOP:
read_only_bottom_close_and_rename($_, [$0]) foreach $c, $h;
+
+# coresub_op in op.c expects __FILE__, __LINE__ and __PACKAGE__ to be the
+# first three.
+
__END__
NULL