@@ -271,6 +271,25 @@ static SV *sentinel_mortalize(Sentinel sen, SV *sv) {
271
271
return sv ;
272
272
}
273
273
274
+ DEFSTRUCT (RStore_U32 ) {
275
+ U32 * where ;
276
+ U32 what ;
277
+ };
278
+
279
+ static void resource_store_u32 (pTHX_ void * p ) {
280
+ PERL_UNUSED_CONTEXT ;
281
+ RStore_U32 * rs = p ;
282
+ * rs -> where = rs -> what ;
283
+ Safefree (rs );
284
+ }
285
+
286
+ static void sentinel_save_u32 (Sentinel sen , U32 * pu ) {
287
+ RStore_U32 * rs ;
288
+ Newx (rs , 1 , RStore_U32 );
289
+ rs -> where = pu ;
290
+ rs -> what = * pu ;
291
+ sentinel_register (sen , rs , resource_store_u32 );
292
+ }
274
293
275
294
#if HAVE_PERL_VERSION (5 , 17 , 2 )
276
295
#define MY_OP_SLABBED (O ) ((O)->op_slabbed)
@@ -1773,6 +1792,11 @@ static int parse_fun(pTHX_ Sentinel sen, OP **pop, const char *keyword_ptr, STRL
1773
1792
Perl_croak (aTHX_ "In %" SVf ": I was expecting a function body, not \"%c\"" , SVfARG (declarator ), (int )c );
1774
1793
}
1775
1794
1795
+ /* turn off line debugging for generated code */
1796
+ sentinel_save_u32 (sen , & PL_perldb );
1797
+ const U32 prev_db_line = PL_perldb & PERLDBf_LINE ;
1798
+ PL_perldb &= ~PERLDBf_LINE ;
1799
+
1776
1800
/* surprise predeclaration! */
1777
1801
if (saw_name && !spec -> install_sub && !(spec -> flags & FLAG_RUNTIME )) {
1778
1802
/* 'sub NAME (PROTO);' to make name/proto known to perl before it
@@ -2365,6 +2389,8 @@ static int parse_fun(pTHX_ Sentinel sen, OP **pop, const char *keyword_ptr, STRL
2365
2389
}
2366
2390
}
2367
2391
2392
+ PL_perldb |= prev_db_line ;
2393
+
2368
2394
/* finally let perl parse the actual subroutine body */
2369
2395
body = parse_block (0 );
2370
2396
0 commit comments