Ticket #1616 (closed todo: fixed)

Opened 12 years ago

Last modified 11 years ago

t/pmc/bigint.t: implement 2 todo-ed items: Minint conversions

Reported by: jkeenan Owned by: Paul C. Anagnostopoulos
Priority: normal Milestone:
Component: core Version: 2.3.0
Severity: medium Keywords:
Cc: Language:
Patch status: applied Platform:

Description

Creating a ticket to track these todo-ed items:

t/pmc/bigint.t-747-k25:
t/pmc/bigint.t:748:    todo($I1, 'integer negation of MinInt converts MaxInt+1 to BigInt')
t/pmc/bigint.t-749-
--
t/pmc/bigint.t-762-k27:
t/pmc/bigint.t:763:    todo($I1, 'integer absolute-value of MinInt converts MaxInt+1 to BigInt')
t/pmc/bigint.t-764-

Attachments

PCA-patch-007.patch Download (1.0 KB) - added by Paul C. Anagnostopoulos 11 years ago.
PCA-patch-008.patch Download (6.1 KB) - added by Paul C. Anagnostopoulos 11 years ago.

Change History

Changed 11 years ago by Paul C. Anagnostopoulos

  • owner set to Paul C. Anagnostopoulos
  • status changed from new to assigned

Changed 11 years ago by Paul C. Anagnostopoulos

Changed 11 years ago by Paul C. Anagnostopoulos

  • patch set to new

We agreed on #parrot that Parrot assumes a two's-complement machine. The first patch adds a test to t/op/integer.t to check that -INTMAX == INTMIN+1.

Changed 11 years ago by Paul C. Anagnostopoulos

Changed 11 years ago by Paul C. Anagnostopoulos

The second patch corrects the Integer vtable functions neg and absolute so that they promote the minimum integer to a BigInt. Appropriate tests have been added, including the two todo items in the original ticket.

I also had to add the neg function to Boolean, because it relied on the broken behavior of Integer's neg.

Changed 11 years ago by Paul C. Anagnostopoulos

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

Changes have been committed in r48754 and r48755.

Note: See TracTickets for help on using tickets.