develooper Front page | perl.perl5.changes | Postings from February 2021

[Perl/perl5] 74c811: Add a newTRYCATCHOP(); migrate the custom codeout...

From:
Paul Evans via perl5-changes
Date:
February 14, 2021 12:21
Subject:
[Perl/perl5] 74c811: Add a newTRYCATCHOP(); migrate the custom codeout...
Message ID:
Perl/perl5/push/refs/heads/leonerd/feature-try-2/e1083f-805157@github.com
  Branch: refs/heads/leonerd/feature-try-2
  Home:   https://github.com/Perl/perl5
  Commit: 74c81120fd44af9bc12c5bc803808a9895c5b70e
      https://github.com/Perl/perl5/commit/74c81120fd44af9bc12c5bc803808a9895c5b70e
  Author: Paul "LeoNerd" Evans <leonerd@leonerd.org.uk>
  Date:   2021-02-14 (Sun, 14 Feb 2021)

  Changed paths:
    M embed.fnc
    M embed.h
    M op.c
    M perly.act
    M perly.h
    M perly.tab
    M perly.y
    M proto.h

  Log Message:
  -----------
  Add a newTRYCATCHOP(); migrate the custom code out of perly.y into it


  Commit: f24d244356662108ac0c054b3fd30e5e7d597f6e
      https://github.com/Perl/perl5/commit/f24d244356662108ac0c054b3fd30e5e7d597f6e
  Author: Paul "LeoNerd" Evans <leonerd@leonerd.org.uk>
  Date:   2021-02-14 (Sun, 14 Feb 2021)

  Changed paths:
    M embed.h
    M ext/Opcode/Opcode.pm
    M lib/B/Op_private.pm
    M op.c
    M op.h
    M opcode.h
    M opnames.h
    M pp_ctl.c
    M pp_proto.h
    M proto.h
    M regen/opcodes

  Log Message:
  -----------
  A totally new optree structure for try/catch involving three new optypes


  Commit: 71f1b7b1c8fd3b850ecb828bdea9f7cf49ba67b4
      https://github.com/Perl/perl5/commit/71f1b7b1c8fd3b850ecb828bdea9f7cf49ba67b4
  Author: Paul "LeoNerd" Evans <leonerd@leonerd.org.uk>
  Date:   2021-02-14 (Sun, 14 Feb 2021)

  Changed paths:
    M op.c

  Log Message:
  -----------
  OP_ENTERTRY no longer needs to handle OPf_SPECIAL flag


  Commit: 13369f9f79d19eae00c14d778ac98e5e81e85d2c
      https://github.com/Perl/perl5/commit/13369f9f79d19eae00c14d778ac98e5e81e85d2c
  Author: Paul "LeoNerd" Evans <leonerd@leonerd.org.uk>
  Date:   2021-02-14 (Sun, 14 Feb 2021)

  Changed paths:
    M lib/B/Deparse.pm
    M lib/B/Deparse.t

  Log Message:
  -----------
  Add B::Deparse support for try/catch syntax


  Commit: e101845f98f30bb36bb3695b3af4fd6b7d39ec2b
      https://github.com/Perl/perl5/commit/e101845f98f30bb36bb3695b3af4fd6b7d39ec2b
  Author: Tony Cook <tony@develop-help.com>
  Date:   2021-02-14 (Sun, 14 Feb 2021)

  Changed paths:
    M embed.fnc
    M embed.h
    M inline.h
    M pp_ctl.c
    M proto.h

  Log Message:
  -----------
  try isn't treated as a sub call like eval is

The try change added code to pp_return to skip past try contexts
when looking for the sub/sort/eval context to return from.

This was only needed because cx_pusheval() sets si_cxsubix to the
current frame and try uses that function to push it's context, that
value is then used by the dopopto_cursub() macro to shortcut
walking the context stack.

Since we don't need to treat try as a sub for return, list vs array
checks or lvalue sub checks, don't set si_cxsubix on try.


  Commit: acb999bfd9f4a59729335bbb45ef86a3e9316196
      https://github.com/Perl/perl5/commit/acb999bfd9f4a59729335bbb45ef86a3e9316196
  Author: Paul "LeoNerd" Evans <leonerd@leonerd.org.uk>
  Date:   2021-02-14 (Sun, 14 Feb 2021)

  Changed paths:
    M inline.h

  Log Message:
  -----------
  Move common parts of cx_push{eval,try} into a shared static function, to emphasise the commonality


  Commit: 737f34f354bb0377d725f92872fc596adffe05d2
      https://github.com/Perl/perl5/commit/737f34f354bb0377d725f92872fc596adffe05d2
  Author: Paul "LeoNerd" Evans <leonerd@leonerd.org.uk>
  Date:   2021-02-14 (Sun, 14 Feb 2021)

  Changed paths:
    M embed.fnc
    M embed.h
    M inline.h
    M pp_ctl.c
    M proto.h

  Log Message:
  -----------
  cx_pushtry() is never going to need a namesv so don't bother with that arg


  Commit: 42692451621eca1d600edda1c3dbbfe5d2b02a54
      https://github.com/Perl/perl5/commit/42692451621eca1d600edda1c3dbbfe5d2b02a54
  Author: Paul "LeoNerd" Evans <leonerd@leonerd.org.uk>
  Date:   2021-02-14 (Sun, 14 Feb 2021)

  Changed paths:
    M inline.h

  Log Message:
  -----------
  Static inline functions in inline.h should still be name prefixed with Perl_, not S_


  Commit: 8051578baf52edf904d416a54c188d4ca0084f97
      https://github.com/Perl/perl5/commit/8051578baf52edf904d416a54c188d4ca0084f97
  Author: Paul "LeoNerd" Evans <leonerd@leonerd.org.uk>
  Date:   2021-02-14 (Sun, 14 Feb 2021)

  Changed paths:
    M t/op/try.t

  Log Message:
  -----------
  Unit-test that try{return} within :lvalue sub behaves correctly (GH#18553)


Compare: https://github.com/Perl/perl5/compare/e1083f3ffd66...8051578baf52



nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About