[parrot/parrot] 741b8c: [pmc] Clarify dead coroutines

GitHub noreply at github.com
Fri Oct 17 11:33:02 UTC 2014


  Branch: refs/heads/master
  Home:   https://github.com/parrot/parrot
  Commit: 741b8cb212a2a57c3c4c52c3e3f292ec3cd1b863
      https://github.com/parrot/parrot/commit/741b8cb212a2a57c3c4c52c3e3f292ec3cd1b863
  Author: Reini Urban <rurban at cpanel.net>
  Date:   2014-10-17 (Fri, 17 Oct 2014)

  Changed paths:
    M docs/book/pir/ch06_subroutines.pod
    M docs/pmc/subs.pod
    M src/pmc/coroutine.pmc
    M t/pmc/coroutine.t

  Log Message:
  -----------
  [pmc] Clarify dead coroutines

Coros are not resumable when all yield states are exhausted.
This is consistent with the LUA design, which we follow, and all other
coro implementations I know of. Just the parrot book argues that after a
return the state should be automatically reset. Technically no problem, even
without the quirks described in https://github.com/parrot/parrot/issues/564#issuecomment-3503597
or via a seperate reset() method, but semantically an auto-reset is problematic.

Added testcases for all the relevant tickets: #564, #585 and there is on
bug remaining: TT #1003 leading to Null PMC access in get_string on a dead coro


  Commit: 4725edbbccbf6dac2a075df87ca926adb6e1f0e2
      https://github.com/parrot/parrot/commit/4725edbbccbf6dac2a075df87ca926adb6e1f0e2
  Author: Reini Urban <rurban at cpanel.net>
  Date:   2014-10-17 (Fri, 17 Oct 2014)

  Changed paths:
    M config/gen/makefiles/root.in
    M src/ops/core.ops
    M src/ops/core_ops.c
    M src/pmc/coroutine.pmc
    M src/sub.c

  Log Message:
  -----------
  [pmc] Coroutine is now auto-resetting


  Commit: 07f2a907c7ace9c70a06ead0a70d6a4a70f0f325
      https://github.com/parrot/parrot/commit/07f2a907c7ace9c70a06ead0a70d6a4a70f0f325
  Author: Reini Urban <rurban at cpanel.net>
  Date:   2014-10-17 (Fri, 17 Oct 2014)

  Changed paths:
    M docs/pmc/subs.pod
    M src/pmc/coroutine.pmc
    M t/pmc/coroutine.t

  Log Message:
  -----------
  [pmc] Add Coroutine.reset() method

Mentioned in GH #564.

It is however more efficient to clone an initial coro and
copy this saved clone back, as the context does not need to
be recreated afresh.


  Commit: 3268b6ceaebca6cad63d8eb0238de31c6f154c72
      https://github.com/parrot/parrot/commit/3268b6ceaebca6cad63d8eb0238de31c6f154c72
  Author: Reini Urban <rurban at cpanel.net>
  Date:   2014-10-17 (Fri, 17 Oct 2014)

  Changed paths:
    M src/pmc/coroutine.pmc
    M src/sub.c

  Log Message:
  -----------
  coro: implemented autoreset method and attribute

fix crashes in sub_continuation_rewind_environment()
Still using traceflag 8. Maybe I should adopt it or resuse the SUB_CALL_FLAG?


  Commit: f04d50943a19cbde89e9ad5974bcad66251ab4ac
      https://github.com/parrot/parrot/commit/f04d50943a19cbde89e9ad5974bcad66251ab4ac
  Author: Reini Urban <rurban at cpanel.net>
  Date:   2014-10-17 (Fri, 17 Oct 2014)

  Changed paths:
    M ChangeLog
    M include/parrot/interpreter.h
    M src/pmc/coroutine.pmc
    M src/sub.c
    M t/pmc/coroutine.t

  Log Message:
  -----------
  core: autoreset tests, TRACE_CORO, PARROT_TRACE_CORO_STATE_FLAG

add TRACE_CORO define, -t8 only usable when not --optimizing
fix -t2 returning from coroutine msg.
-t2 msg either Coroutine autoreset or Coroutine no autoreset
add autoreset test, not yet working (one-off same as TT #1003)


  Commit: fa4e678b3c32b63eeac07243fea06e1e1cbc400a
      https://github.com/parrot/parrot/commit/fa4e678b3c32b63eeac07243fea06e1e1cbc400a
  Author: Reini Urban <rurban at cpanel.net>
  Date:   2014-10-17 (Fri, 17 Oct 2014)

  Changed paths:
    M ChangeLog
    M frontend/parrot/main.c
    M frontend/parrot2/main.c
    M frontend/parrot2/prt0.pir
    M frontend/parrot2/prt0.winxed

  Log Message:
  -----------
  Document -t8 flag, harmonize parrot usage messages

along parrot and parrot_old
Omit GH issue prefix from ChangeLog if default.


  Commit: c0692efe39039dd2a4ea42dd68f41ca2a429658f
      https://github.com/parrot/parrot/commit/c0692efe39039dd2a4ea42dd68f41ca2a429658f
  Author: Reini Urban <rurban at cpanel.net>
  Date:   2014-10-17 (Fri, 17 Oct 2014)

  Changed paths:
    M src/pmc/coroutine.pmc

  Log Message:
  -----------
  [cage] fix 2 codingstd issues with TRACE_CORO


  Commit: 4872085f321b2770c46daade07d933172192f8cc
      https://github.com/parrot/parrot/commit/4872085f321b2770c46daade07d933172192f8cc
  Author: Reini Urban <rurban at cpanel.net>
  Date:   2014-10-17 (Fri, 17 Oct 2014)

  Changed paths:
    M frontend/parrot/main.c
    M frontend/parrot2/main.c
    M include/parrot/interpreter.h
    M src/packfile/api.c
    M src/pmc/coroutine.pmc
    M src/pmc/sub.pmc
    M src/sub.c

  Log Message:
  -----------
  [core] Disable -t trace flags 4+8 with --optimize

Fixes GH #1105


  Commit: cfcb945cf151e4a3baeb3a275cac99a696613079
      https://github.com/parrot/parrot/commit/cfcb945cf151e4a3baeb3a275cac99a696613079
  Author: Reini Urban <rurban at cpanel.net>
  Date:   2014-10-17 (Fri, 17 Oct 2014)

  Changed paths:
    M ChangeLog

  Log Message:
  -----------
  add to ChangeLog


  Commit: a4046f71839bea8ae3583368271cc5c6a4b69fe3
      https://github.com/parrot/parrot/commit/a4046f71839bea8ae3583368271cc5c6a4b69fe3
  Author: Reini Urban <rurban at cpanel.net>
  Date:   2014-10-17 (Fri, 17 Oct 2014)

  Changed paths:
    M t/pmc/coroutine.t

  Log Message:
  -----------
  [test] change closed TT #1003 ticket to new GH #1106


Compare: https://github.com/parrot/parrot/compare/0eba55c180e0...a4046f71839b


More information about the parrot-commits mailing list