Bug 4272 - ArrayType iterator limited to Java's primitive types
Summary: ArrayType iterator limited to Java's primitive types
Alias: None
Product: frysk
Classification: Unclassified
Component: general (show other bugs)
Version: unspecified
: P2 normal
Target Milestone: ---
Assignee: Unassigned
Depends on:
Blocks: 3393
  Show dependency treegraph
Reported: 2007-03-23 21:03 UTC by Andrew Cagney
Modified: 2008-04-23 20:55 UTC (History)
0 users

See Also:
Last reconfirmed:


Note You need to log in before you can comment on or make changes to this bug.
Description Andrew Cagney 2007-03-23 21:03:02 UTC
The ArrayType contains the code:

	public Object next ()
	    if (type.typeId == BaseTypes.baseTypeChar)
		return new Character((char)v.getByte(idx * type.getSize()));
	    else if (type.typeId == BaseTypes.baseTypeShort)
		return new Integer(v.getShort(idx * type.getSize()));
	    else if (type.typeId == BaseTypes.baseTypeInteger)

this doesn't work - as the "type" could be a pointer, or some other more
abstract type.

Instead the iteratore should use "ByteBuffer.slice" to slice the underlying
array of bytes and then create a Variable from that.
Comment 1 Stan Cox 2007-06-14 14:48:17 UTC
struct is now supported, need to add pointers.