Ticket #187 (closed todo: fixed)

Opened 13 years ago

Last modified 13 years ago

deprecated: dynpmc Pair

Reported by: coke Owned by: coke
Priority: normal Milestone: 1.5
Component: none Version: trunk
Severity: medium Keywords:
Cc: Language:
Patch status: applied Platform: all

Description (last modified by coke) (diff)

  • delegate - unused, appears to be the previous version of PMCProxy
  • deleg_pmc - unused, appears to be the previous version of PMCProxy
  • Enumerate - unused, specialization of Iterator
  • Intlist - unused
  • MultiArray - (unused) a multidimensional array
  • Pair - key/value mapping (unused)
  • Pointer - represents a pointer (unused)

Attachments

remove-pair Download (11.9 KB) - added by kraai 13 years ago.
Patch to remove Pair PMC

Change History

  Changed 13 years ago by coke

  • description modified (diff)

  Changed 13 years ago by donaldh

Pointer is used by anyone (e.g. me) that uses NCI and wants to store opaque pointers. For example, it's used in the DBDI code in ext/SQLite3/SQLite3.pir

The 'V' NCI signature implicitly only works with PMCs that store a pointer in PMC_data. The only PMC with the correct GC semantics (i.e. none) is Pointer.

Cheers, Donald.

follow-up: ↓ 4   Changed 13 years ago by barney

  • description modified (diff)

Pair might currently not be used, but my guts feeling is that a Pair is a basic datatype which should be supported by Parrot. It's also mentioned in PDD17.

in reply to: ↑ 3   Changed 13 years ago by pmichaud

Replying to barney:

Pair might currently not be used, but my guts feeling is that a Pair is a basic datatype which should be supported by Parrot. It's also mentioned in PDD17.

I disagree. AFAIK the only language really making use of pairs generically is Rakudo, and for that we don't/won't use the Parrot Pair PMC (because it doesn't really do what we need).

I'm in favor of removing the Pair PMC for now, and then when we have some actual use cases of multiple languages needing pairs we can see about adding it back in.

Pm

  Changed 13 years ago by coke

Intlist PMC (and src/intlist.c) removed in r35942

  Changed 13 years ago by coke

Enumerate PMC removed in r35943.

  Changed 13 years ago by coke

MultiArray removed in r35944 (along with a minor leftover from Enumerate and IntList)

  Changed 13 years ago by coke

Removed Pair PMC in r35945 (3 to 1 against.)

  Changed 13 years ago by coke

Removed delegate and deleg_pmc in r35947. This leaves only the Pointer PMC, which we have a vote to keep.

  Changed 13 years ago by chromatic

Let's hold off on the Pointer PMC. We may be able to replace it with UnManagedStruct, but it'll take some experimenting.

  Changed 13 years ago by kjs

  • platform set to all
  • version set to trunk
  • type changed from bug to todo

follow-up: ↓ 15   Changed 13 years ago by quevlar

Hi,

I've found an interesting use of pointers:

Their use is in two dimensional arrays(matrixes), in page 20 ,instead of using a nxm matrix they use a pointer to an array of pointers to rows.

The book is:

Numerical recipes in c

Second edition

William H. Press , Saul A. Teukolsky William T. Vetterling , Brian P Flannery

Cambridge University Press

Sincerely,

Igor

follow-up: ↓ 16   Changed 13 years ago by coke

The pair pmc was recently re-added as a dynpmc for the benefit of the eclectus language.

I would recommend re-killing it, and allowing that language to host its own pmc, as many others do.

  Changed 13 years ago by allison

Agreed on eclectus implementing its own Pair (if it heavily uses the existing dynpmc Pair, we can just move that one to the eclectus directories).

Allison

in reply to: ↑ 12   Changed 13 years ago by coke

Replying to quevlar:

Hi, I've found an interesting use of pointers: Their use is in two dimensional arrays(matrixes), in page 20 ,instead of using a nxm matrix they use a pointer to an array of pointers to rows. The book is: Numerical recipes in c Second edition William H. Press , Saul A. Teukolsky William T. Vetterling , Brian P Flannery Cambridge University Press Sincerely, Igor

This ticket refers to the Pointer PMC; not to C - level pointers.

in reply to: ↑ 13   Changed 13 years ago by barney

Replying to coke:

The pair pmc was recently re-added as a dynpmc for the benefit of the eclectus language. I would recommend re-killing it, and allowing that language to host its own pmc, as many others do.

The EclectusPair PMC now no longer tries to inherit from the Pair PMC, so from the Eclectus point of view the Pair PMC can be removed.

Changed 13 years ago by kraai

Patch to remove Pair PMC

  Changed 13 years ago by coke

  • description modified (diff)
  • milestone changed from 1.2 to 1.5

Thanks for the patch.

The original notice for the Pair PMC was removed before the 1.0 release, so there was no note about removing the new dynamic version; So, we have to add a new deprecation notice (done), and wait until post-1.4 to apply the patch.

  Changed 13 years ago by coke

  • summary changed from deprecated: various unused PMCs to deprecated: dynpmc Pair

  Changed 13 years ago by coke

  • owner set to coke

  Changed 13 years ago by coke

  • status changed from new to assigned

  Changed 13 years ago by coke

  • status changed from assigned to closed
  • resolution set to fixed
  • patch set to applied

Patch applied (kraai++) in r40197, Pair dynpmc removed.

'make fulltest' passes, modulo failures introduced by TT #811.

Note: See TracTickets for help on using tickets.