Ticket #299 (closed patch: wontfix)

Opened 13 years ago

Last modified 11 years ago

Access attributes of PMC from derived pir classes

Reported by: NotFound Owned by:
Priority: normal Milestone:
Component: core Version:
Severity: medium Keywords:
Cc: Language:
Patch status: Platform:

Description

There are several problems related to pir classes derived from PMC. The root of the problem is that GET_ATTR can't access to the PMC attributes when used from the pir object of the derived class.

This patch is the beginning of a solution to the problem: it tries to access the first proxy pmc found in the parent list when a class attribute is not found.

It also modifies the ExceptionHandler pmc to use this functionality and make work a failing test.

Opinions?

Attachments

attributes.patch Download (5.7 KB) - added by NotFound 13 years ago.
attributes_inheritance.patch Download (7.1 KB) - added by NotFound 13 years ago.

Change History

Changed 13 years ago by NotFound

Changed 13 years ago by NotFound

Changed 13 years ago by NotFound

After some talk in irc, I make this new attempt: the names of the PMC attributes are stored in the vtable (all in this versions, must be limited to inheritable ones), and during the pmc proxy creation they are added as class attributes.

To make things easier, also modifies the GET_ATTR accessors to return 0, 0.0 and NULL STRING, if the attribute is not initialized.

This patch also includes the changes in ExceptionHandler needed to check this functionality.

A later improvement can be to set the type of the attributes.

Changed 13 years ago by NotFound

Committed in r36525 a modified version of this patch.

The main change is that a one character prefix is added to the attr name, and is used in pmcproxy to inherit only the types supported by the GET_ATTR/SET_ATTR macros.

The other changes are implementation details and test updating.

Changed 13 years ago by jkeenan

  • component changed from none to core

Changed 11 years ago by whiteknight

  • status changed from new to closed
  • resolution set to wontfix

This particular issue is resolved and this ticket is being closed. There are larger problems with our object metamodel that will require a comprehensive redesign, but those issues are too large for this ticket.

Note: See TracTickets for help on using tickets.