The Perl Toolchain Summit needs more sponsors. If your company depends on Perl, please support this very important event.

Deprecation in Parrot

This is a list of currently deprecated features of Parrot. Every deprecation has an associated RT ticket. Each item indicates the last release it's guaranteed to appear in.

When deprecated items are removed, all usage of the feature in the repository should be updated or removed; including documentation.

When deprecating opcodes, in addition to the ticket, be sure to mark the opcode with the :deprecated flag; this will allow users to enable deprecation warnings selectively with:

 .include 'include/warnings.pasm'
 warningson .PARROT_WARNINGS_DEPRECATED_FLAG

And then receive runtime warnings if they are using any deprecated opcodes. The -w command line option for parrot can also be used to enable all warnings. You can use make warnings_tests to run the standard test suite with this option.

vtable entries

  • new_from_string [post 0.5.0]

    See RT #47011.

Opcodes

  • store_global [post 0.5.0]

    See RT #48016. Replace usage with set_[hll,root]_global variants.

  • find_global [post 0.5.0]

    See RT #48018. Replace usage with get_[hll,root]_global variants.

  • get_mro [post 0.5.0]

    See RT #47976.

  • n_* math opcode variants [post 0.7.1]

    See RT #58410.

  • open opcode mode string [post 0.8.2]

    The open opcode will change from Perl-style mode-strings to 'r' for read, 'w' for write, 'a' for append, and 'p' for pipe.

  • infix and n_infix opcodes [post 0.8.2]

    These opcodes were only used by the old MMD system. See TT #7.

  • slice [post 0.8.2]

    The slice opcode's implementation is experimental. Its use cases and implementation should be reconsidered. The current implementation will be removed.

  • add_io_event [post 0.8.2]

    The add_io_event opcode is experimental and non-functional. The current implementation will be removed.

Class Features

  • PMC union struct [post 0.5.0]

    See RT #48014. This will be removed once all core PMCs have been updated.

  • :anon and :vtable named parameters to add_method [post 0.8.2]

    If you want to override a vtable method/function when building a Class, then use the method add_vtable_override instead of calling add_method with one or both of these flags.

PIR syntax

  • String indexing [post 0.8.2]

    String indexing sugar is deprecated. This means you can no longer write

      $S0[1]

    to mean substr, $S0, 1, 1. Use the substr op instead.

  • .namespace [ "a" .. "b" ] [post 0.5.0]

    See RT #46715.

  • Assignment syntax with opcodes [post 0.8.2]

    See RT #36283. When the first argument of an opcode is OUT, then the assignment syntax will be allowed, as it is today.

    In any other case (i.e. INOUT, IN), this will become a syntax error. For example:

        $S0 = print
        $P0 = substr 1, 2, "x"

    Will have to be:

        print $S0
        substr $P0, 1, 2, "x"
  • Exception Handlers won't automatically be disabled [post 0.8.1]

    Exception handlers won't be automatically disabled after 0.8.1. Any exception handlers that currently rely on this feature will need to either be more specific about what they catch or rethrow exceptions they don't recognize.

    See RT #60640.

Functions

Old-style MMD functions [post 0.7.1]

Parrot_mmd_add_function, mmd_expand_x, mmd_expand_y, Parrot_mmd_register, Parrot_mmd_register_sub, Parrot_mmd_destroy, Parrot_MMD_search_default_infix, Parrot_mmd_search_default, mmd_cvt_to_types.

See RT #60626.

src/pic.c and src/pic_jit.c [post 0.8.1]

These two files were a thin prototype implementation of Polymorphic Inline Caching that only ever applied to 4 opcodes, one of which has now been removed. The files (and all functions in them) are deprecated, and will be removed. See RT #60048.

* Subs marked with :vtable/:method aren't in namespace [post 0.8.2]

Subs marked with :vtable or :method flags are no longer given a namespace entry by default. Use the :nsentry flag to cause this to happen. See RT #60586 and RT #53302.

* Bytecode packfile segment will use subid not sub name [post 0.8.1]

See RT #60590.

Compiler Tools

'get_string', 'get_bool', etc. named vtable functions [post 0.8.1]

All of the named vtable functions in PCT and PGE will lose their names and effectively become anonymous. See RT #60384.

Capture_PIR class [post 0.8.2]

The Capture_PIR class in runtime/parrot/library/Parrot/Capture_PIR.pir is deprecated and will be removed.

Misc.

'make smoke' [post 0.8.2]

The functionality currently provided by "make smoke" will be changing to be an alias for "make smolder_test". We're moving towards smolder as our single point of online test reporting, and will keep the make target to simplify the switch for anyone currently smoking parrot. See RT #49276.

2 POD Errors

The following errors were encountered while parsing the POD:

Around line 154:

Expected text after =item, not a bullet

Around line 160:

Expected text after =item, not a bullet