onFp32Array method

  1. @override
InlineFloat32Array? onFp32Array(
  1. int id,
  2. int count
)
override

An fp32 array announcing count elements, asked once its fixlen_word has been read and validated — so the element kind is the real one, never a collapsed "fixlen" (§4.8). A message that ends between the count and that word is INCOMPLETE: the field cannot be identified yet.

The wire payload is copied into the destination's storage byte for byte, so a signaling NaN survives (§4.6).

Implementation

@override
InlineFloat32Array? onFp32Array(int id, int count) {
  if (_overCapacity(this, id, cap, rcap)) return null;
  if (_overLength(this, count, rowCount, rowCap)) return null;
  while (out.length <= id) {
    out.add(InlineFloat32Array(0));
  }
  final r = out[id];
  if (r.capacity < count) r.storage = Float32List(count);
  return r;
}