Ticket #817 (new cage)

Opened 5 years ago

Last modified 4 years ago

[pmc2c] don't require custom #defines for private flags

Reported by: cotto Owned by: cotto
Priority: minor Milestone:
Component: build Version:
Severity: low Keywords: pmc2c newbie cage
Cc: Language:
Patch status: Platform:

Description

It'd be nice if pmc2c didn't require that custom private PObj flags be #defined, but rather provided a way to declare them as part of the pmclass declaration. The syntax could look something like this:

pmclass FooClass
    group FooGroup
    extends FooBase {

    ATTR PMC    *foo;
    ATTR INTVAL *bar;

    FLAG FOO_IS_HAVING_A_GOOD_DAY;
    FLAG FOO_IS_WEARING_YELLOW;

This would be a good introductory task for someone wanting to get into Parrot since it's not urgent and wouldn't cause any compatibility breaks. The majority of the code that would need to be changed is in lib/Parrot/Pmc2c/Parser.pm and lib/Parrot/Pmc2c/PMCEmitter.pm .

Change History

Changed 5 years ago by jkeenan

  • owner set to cotto
  • component changed from none to pmc2c

Changed 5 years ago by coke

  • component changed from pmc2c to build

Changed 4 years ago by jkeenan

cotto,

Can you provide any update on the status of this ticket?

Thank you very much.

kid51

Changed 4 years ago by cotto

  • keywords pmc2c newbie added; pmc2c, newbie, removed

There's been no change.

For someone wanting to work on this, the Boolean PMC would be an excellent guinea pig. It stores its bit value in a flag, so a pmc2c-processed custom PObj flag would be a natural use case.

Note: See TracTickets for help on using tickets.