Ticket #866 (new RFC) — at Version 6

Opened 13 years ago

Last modified 11 years ago

DEPRECATE (after review) the *bigint*, pow* and nextkey_keyed VTABLE functions

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

Description (last modified by cotto) (diff)

Current nomenclature of VTABLEs is bloated and requires cleanup. The following functions can be removed at any time post-1.0:

get_bigint
set_bigint_*
pow
i_pow
nextkey_keyed*

-- Bacek

Change History

  Changed 13 years ago by allison

nextkey_keyed* I can see, if they're no longer needed for iterators (they never were a good way to implement iterators anyway). I don't see the reasoning for bigint and pow, could you explain your thoughts?

  Changed 13 years ago by bacek

Just as cleanup of rare used code.

1. get_bignum is just shortcut for $P0 = new 'BigNum'; set $P0, orig. And only one "real" usage is inside Integer PMC.

2. set_bignum_* isn't used anywhere in Parrot. And not exposed in ops.

3. pow/i_pow for consistency sake. Why we have VTABLE_pow, but not "exp", "ln", etc?

-- Bacek

follow-up: ↓ 4   Changed 12 years ago by allison

1. Except that it's impossible to retrieve a bignum value from another PMC without get_bignum, because an N register can't hold the value.

3. The same could be argued for all the math vtable functions, but you have to draw the line somewhere. Simple "to the power of X" is a common operation, exp and ln aren't.

nextkey_keyed* can go, but the bignum and pow vtable functions stay.

in reply to: ↑ 3   Changed 12 years ago by bacek

Replying to allison:

1. Except that it's impossible to retrieve a bignum value from another PMC without get_bignum, because an N register can't hold the value.

Ok. Let's add "get_complex". For exactly same reason...

Agree (but dislike it) with math ops.

There is more vtables to review:

  • set_bignum_int (which is not used at all.)

  • get_repr (which have notice in pdd17 about redundancy with get_string)
  • assing_string_native/set_string_native looks pretty duplicates.
  • "string" versions of bitwise operators. Do we really need them? How often they are used. Can we hust replace them with METHODs?

*ADD* more VTABLEs for consistency sake:

  • i_logical_or, _and, _xor

-- Bacek

  Changed 12 years ago by bacek

set_*_same VTABLE functions were removed in r41229.

  Changed 12 years ago by cotto

  • description modified (diff)
  • summary changed from DEPRECATE (after review) some VTABLE functions to DEPRECATE (after review) the *bigint*, pow* and nextkey_keyed VTABLE functions
Note: See TracTickets for help on using tickets.