File tree Expand file tree Collapse file tree 1 file changed +9
-2
lines changed
Expand file tree Collapse file tree 1 file changed +9
-2
lines changed Original file line number Diff line number Diff line change @@ -166,6 +166,9 @@ yy_stack_print (pTHX_ const yy_parser *parser)
166166 case toketype_ival :
167167 PerlIO_printf (Perl_debug_log , " %8" IVdf , (IV )ps -> val .ival );
168168 break ;
169+ case toketype_svval :
170+ PerlIO_printf (Perl_debug_log , " 0x%" UVxf , PTR2UV (ps -> val .svval ));
171+ break ;
169172 default :
170173 PerlIO_printf (Perl_debug_log , " %8" UVxf , (UV )ps -> val .ival );
171174 }
@@ -239,8 +242,8 @@ S_clear_yystack(pTHX_ const yy_parser *parser)
239242
240243 while (ps > parser -> stack ) {
241244 LEAVE_SCOPE (ps -> savestack_ix );
242- if ( yy_type_tab [yystos [ps -> state ]] == toketype_opval
243- && ps -> val .opval )
245+ toketypes toketype = yy_type_tab [yystos [ps -> state ]];
246+ if ( toketype == toketype_opval && ps -> val .opval )
244247 {
245248 if (ps -> compcv && (ps -> compcv != PL_compcv )) {
246249 PL_compcv = ps -> compcv ;
@@ -250,6 +253,10 @@ S_clear_yystack(pTHX_ const yy_parser *parser)
250253 YYDPRINTF ((Perl_debug_log , "(freeing op)\n" ));
251254 op_free (ps -> val .opval );
252255 }
256+ else if (toketype == toketype_svval && ps -> val .svval ) {
257+ YYDPRINTF ((Perl_debug_log , "(freeing SV)\n" ));
258+ SvREFCNT_dec (ps -> val .svval );
259+ }
253260 SvREFCNT_dec (ps -> compcv );
254261 ps -- ;
255262 }
You can’t perform that action at this time.
0 commit comments