Version 7 (modified by coke, 11 years ago)

add note for codestring, which is going away shortly.

Remove Parrot_PCCINVOKE

Description

The C function Parrot_PCCINVOKE has been removed.

Rationale

This function didn't conform to Parrot's naming conventions. See TT #443 and PCCMigrationNotes for details.

Replacement

Use Parrot_pcc_invoke_method_from_c_arg instead. A simple textual substitution is enough to update any code that depends on this function.

   /* old code */
   Parrot_PCCINVOKE(interp, interp->scheduler, CONST_STRING(interp, "count_handlers"), "S->I", handler_type, &count);
   
   /* updated code */
   Parrot_pcc_invoke_method_from_c_args(interp, interp->scheduler, CONST_STRING(interp, "count_handlers"), "S->I", handler_type, &count);

See r42129 for more examples.

Remove Parrot_find_global_s and Parrot_store_global_s

Description

Parrot_find_global_s and Parrot_store_global_s were removed after they were found to be unused.

Rationale

Nothing in Parrot used them and they were therefore untested.

Replacement

Use the body of one of the old functions in place of its call.

   /* old code */
   XXX: insert code here
   
   /* updated code */
   XXX: insert code here

See r48435 (src/namespace.c changes) for an example of what to replace calls to these functions with. See r42129 for more example

Change behavior of find_lex opcode

Description

The find_lex opcode no longer throws an exception when the lexical is not found; it returns PMCNULL instead.

Rationale

This is consistent with the other "lookup" opcodes.

Replacement

If you want to throw an exception, you must check the result of the opcode and throw the exception explicitly.

Remove CodeString PMC

See #1633

Description

The CodeString pmc has been removed.

Rationale

See #1633. With the switch to immutable strings, CodeString became very expensive, as it did a lot of string concatenations.

Replacement

As a replacement for the .emit() functionality, instead use .append_format() in StringBuilder. Only difference from emit() is that newlines are not automatically appended, so you'll have to add them manually.

Charname_to_ord is now an opcode: find_codepoint. The other methods that were provided are now part of PCT (and are probably not needed directly).