Branch: refs/heads/blead
  Home:   https://github.com/Perl/perl5
  Commit: 8a8491416c79dc8f491c402c013844437c0643eb
      
https://github.com/Perl/perl5/commit/8a8491416c79dc8f491c402c013844437c0643eb
  Author: Yves Orton <demer...@gmail.com>
  Date:   2023-02-20 (Mon, 20 Feb 2023)

  Changed paths:
    M embed.fnc
    M embed.h
    M pp_ctl.c
    M proto.h
    M t/op/die.t
    M t/op/eval.t
    M util.c

  Log Message:
  -----------
  toke.c - invoke __DIE__ handler after compilation errors in eval

Currently whether the __DIE__ signal handler triggers during compilation
of an eval string depends on the selection of the errors it contains.
Certain types of compilation error are considered "deferred errors" and
will not terminate compilation immediately, for instance undeclared
variables do not confuse the compiler so they do not trigger immediate
termination, and we will report them without limit provided they are the
only errors encountered. Whether a given error terminates compilation or
not or uses the error count to decide to do so seems to be somewhat
random, and it is quite possible that compilation can complete, with
errors, without ever "throwing" the exception so it can be passed to the
__DIE__ handler.

This patch ensures that when the eval has failed due to errors the
$SIG{__DIE__} handler is invoked before the eval completes.


  Commit: 21938ae5a278f0b48443561333c47714921e7566
      
https://github.com/Perl/perl5/commit/21938ae5a278f0b48443561333c47714921e7566
  Author: Yves Orton <demer...@gmail.com>
  Date:   2023-02-20 (Mon, 20 Feb 2023)

  Changed paths:
    M perl.h
    M perly.c
    M pp_ctl.c
    M t/op/eval.t
    M t/op/signatures.t
    M t/uni/parser.t
    M toke.c

  Log Message:
  -----------
  perl.h, pp_ctl.c - switch to standard way of terminating compilation

I did not fully understand the use of yyquit() when I implemented
the SYNTAX_ERROR related stuff. It is not needed, and switching to this
makes eval compile error messages more consistent.


  Commit: 248b96b9665b816ea8d1c3415b674dabccf7190b
      
https://github.com/Perl/perl5/commit/248b96b9665b816ea8d1c3415b674dabccf7190b
  Author: Yves Orton <demer...@gmail.com>
  Date:   2023-02-20 (Mon, 20 Feb 2023)

  Changed paths:
    M pp_ctl.c
    M t/lib/feature/bundle
    M t/lib/strict/vars
    M toke.c

  Log Message:
  -----------
  pp_ctl.c - Consistently exit after 10 errors

Currently we only check the error count when we report an error via
yyerror(), even though we say we will stop processing after 10 errors.
Errors reported directly to qerror() bypass the check.

This fixes this so that we check the number of errors reported in
qerror() itself. We also change qerror() so that qerror(NULL) triggers
the exception, this way we can move the logic out of yyerror and into
qerror().


Compare: https://github.com/Perl/perl5/compare/828bae551a7f...248b96b9665b

Reply via email to