Project

Profile

Help

Bug #3124

closed

GroundedIterator.materialize() returns the whole sequence, not just the residue

Added by Michael Kay about 7 years ago. Updated almost 7 years ago.

Status:
Closed
Priority:
Normal
Assignee:
Category:
Internals
Sprint/Milestone:
-
Start date:
2017-02-02
Due date:
% Done:

100%

Estimated time:
Legacy ID:
Applies to branch:
9.7
Fix Committed on Branch:
9.7, trunk
Fixed in Maintenance Release:
Platforms:

Description

The method GroundedValue.materialize(SequenceIterator) is documented to return the whole sequence backed by the sequence iterator, but some callers are assuming that it returns the residue, that is, the items that have not yet been read. For example, the new code for FocusTrackingIterator.getLength() is doing this. Generally, methods that pass around a SequenceIterator are interested only in the part of the sequence that has not yet been read.

This is causing a failure in position-0102 when I change 9.7 to use the same logic as 9.8 for computing last(). The test works in 9.8 because 9.8 is using a ListIterator rather than a ChainIterator.

Actions #1

Updated by Michael Kay about 7 years ago

On the 9.7 branch I have implemented new methods SequenceExtent.makeResidue(SequenceIterator) and GroundedValue.getResidue(SequenceIterator) to get the items remaining in a sequence. Currently it is used only in computing last().

Leaving open because I have not yet made the changes for 9.8.

Actions #2

Updated by Michael Kay about 7 years ago

  • Category set to Internals
  • Assignee set to Michael Kay
  • Priority changed from Low to Normal
  • Applies to branch 9.7, 9.8 added
  • Fix Committed on Branch 9.7, 9.8 added

Changes now applied also to 9.8

Actions #3

Updated by Michael Kay about 7 years ago

  • Status changed from New to Resolved
Actions #4

Updated by Michael Kay about 7 years ago

Committed a further patch, the change had caused a regression in the test case tail(12 to 15)

Actions #5

Updated by O'Neil Delpratt about 7 years ago

  • Status changed from Resolved to Closed
  • % Done changed from 0 to 100
  • Fixed in Maintenance Release 9.7.0.15 added

Bug fix applied to the Saxon 9.7.0.15 maintenance release

Actions #6

Updated by O'Neil Delpratt almost 7 years ago

  • Fix Committed on Branch trunk added
  • Fix Committed on Branch deleted (9.8)
Actions #7

Updated by O'Neil Delpratt almost 7 years ago

  • Applies to branch deleted (9.8)

Please register to edit this issue

Also available in: Atom PDF