• Home
  • Raw
  • Download

Lines Matching full:ref

63         public static int ParseLength(ref ReadOnlySpan<byte> buffer, ref ParserInternalState state)  in ParseLength()
65 return (int)ParseRawVarint32(ref buffer, ref state); in ParseLength()
72 public static uint ParseTag(ref ReadOnlySpan<byte> buffer, ref ParserInternalState state) in ParseTag()
105 state.lastTag = ParsingPrimitives.ParseRawVarint32(ref buffer, ref state); in ParseTag()
111 if (SegmentedBufferHelper.IsAtEnd(ref buffer, ref state)) in ParseTag()
117 state.lastTag = ParsingPrimitives.ParseRawVarint32(ref buffer, ref state); in ParseTag()
132 …public static bool MaybeConsumeTag(ref ReadOnlySpan<byte> buffer, ref ParserInternalState state, u… in MaybeConsumeTag()
134 if (PeekTag(ref buffer, ref state) == tag) in MaybeConsumeTag()
147 public static uint PeekTag(ref ReadOnlySpan<byte> buffer, ref ParserInternalState state) in PeekTag()
155 state.nextTag = ParseTag(ref buffer, ref state); in PeekTag()
164 … public static ulong ParseRawVarint64(ref ReadOnlySpan<byte> buffer, ref ParserInternalState state) in ParseRawVarint64()
168 return ParseRawVarint64SlowPath(ref buffer, ref state); in ParseRawVarint64()
193 …private static ulong ParseRawVarint64SlowPath(ref ReadOnlySpan<byte> buffer, ref ParserInternalSta… in ParseRawVarint64SlowPath()
199 byte b = ReadRawByte(ref buffer, ref state); in ParseRawVarint64SlowPath()
218 … public static uint ParseRawVarint32(ref ReadOnlySpan<byte> buffer, ref ParserInternalState state) in ParseRawVarint32()
222 return ParseRawVarint32SlowPath(ref buffer, ref state); in ParseRawVarint32()
261 if (ReadRawByte(ref buffer, ref state) < 128) in ParseRawVarint32()
274 …private static uint ParseRawVarint32SlowPath(ref ReadOnlySpan<byte> buffer, ref ParserInternalStat… in ParseRawVarint32SlowPath()
276 int tmp = ReadRawByte(ref buffer, ref state); in ParseRawVarint32SlowPath()
282 if ((tmp = ReadRawByte(ref buffer, ref state)) < 128) in ParseRawVarint32SlowPath()
289 if ((tmp = ReadRawByte(ref buffer, ref state)) < 128) in ParseRawVarint32SlowPath()
296 if ((tmp = ReadRawByte(ref buffer, ref state)) < 128) in ParseRawVarint32SlowPath()
303 result |= (tmp = ReadRawByte(ref buffer, ref state)) << 28; in ParseRawVarint32SlowPath()
309 if (ReadRawByte(ref buffer, ref state) < 128) in ParseRawVarint32SlowPath()
325 …public static uint ParseRawLittleEndian32(ref ReadOnlySpan<byte> buffer, ref ParserInternalState s… in ParseRawLittleEndian32()
331 return ParseRawLittleEndian32SlowPath(ref buffer, ref state); in ParseRawLittleEndian32()
340 …private static uint ParseRawLittleEndian32SlowPath(ref ReadOnlySpan<byte> buffer, ref ParserIntern… in ParseRawLittleEndian32SlowPath()
342 uint b1 = ReadRawByte(ref buffer, ref state); in ParseRawLittleEndian32SlowPath()
343 uint b2 = ReadRawByte(ref buffer, ref state); in ParseRawLittleEndian32SlowPath()
344 uint b3 = ReadRawByte(ref buffer, ref state); in ParseRawLittleEndian32SlowPath()
345 uint b4 = ReadRawByte(ref buffer, ref state); in ParseRawLittleEndian32SlowPath()
352 …public static ulong ParseRawLittleEndian64(ref ReadOnlySpan<byte> buffer, ref ParserInternalState … in ParseRawLittleEndian64()
357 return ParseRawLittleEndian64SlowPath(ref buffer, ref state); in ParseRawLittleEndian64()
364 …private static ulong ParseRawLittleEndian64SlowPath(ref ReadOnlySpan<byte> buffer, ref ParserInter… in ParseRawLittleEndian64SlowPath()
366 ulong b1 = ReadRawByte(ref buffer, ref state); in ParseRawLittleEndian64SlowPath()
367 ulong b2 = ReadRawByte(ref buffer, ref state); in ParseRawLittleEndian64SlowPath()
368 ulong b3 = ReadRawByte(ref buffer, ref state); in ParseRawLittleEndian64SlowPath()
369 ulong b4 = ReadRawByte(ref buffer, ref state); in ParseRawLittleEndian64SlowPath()
370 ulong b5 = ReadRawByte(ref buffer, ref state); in ParseRawLittleEndian64SlowPath()
371 ulong b6 = ReadRawByte(ref buffer, ref state); in ParseRawLittleEndian64SlowPath()
372 ulong b7 = ReadRawByte(ref buffer, ref state); in ParseRawLittleEndian64SlowPath()
373 ulong b8 = ReadRawByte(ref buffer, ref state); in ParseRawLittleEndian64SlowPath()
381 … public static double ParseDouble(ref ReadOnlySpan<byte> buffer, ref ParserInternalState state) in ParseDouble()
386 … return BitConverter.Int64BitsToDouble((long)ParseRawLittleEndian64(ref buffer, ref state)); in ParseDouble()
389 …double result = Unsafe.ReadUnaligned<double>(ref MemoryMarshal.GetReference(buffer.Slice(state.buf… in ParseDouble()
397 public static float ParseFloat(ref ReadOnlySpan<byte> buffer, ref ParserInternalState state) in ParseFloat()
402 return ParseFloatSlow(ref buffer, ref state); in ParseFloat()
405 …float result = Unsafe.ReadUnaligned<float>(ref MemoryMarshal.GetReference(buffer.Slice(state.buffe… in ParseFloat()
410 …private static unsafe float ParseFloatSlow(ref ReadOnlySpan<byte> buffer, ref ParserInternalState … in ParseFloatSlow()
417 tempSpan[i] = ReadRawByte(ref buffer, ref state); in ParseFloatSlow()
425 return Unsafe.ReadUnaligned<float>(ref MemoryMarshal.GetReference(tempSpan)); in ParseFloatSlow()
434 …public static byte[] ReadRawBytes(ref ReadOnlySpan<byte> buffer, ref ParserInternalState state, in… in ReadRawBytes()
450 return ReadRawBytesSlow(ref buffer, ref state, size); in ReadRawBytes()
453 …private static byte[] ReadRawBytesSlow(ref ReadOnlySpan<byte> buffer, ref ParserInternalState stat… in ReadRawBytesSlow()
455 ValidateCurrentLimit(ref buffer, ref state, size); in ReadRawBytesSlow()
458 IsDataAvailableInSource(ref state, size)) in ReadRawBytesSlow()
464 ReadRawBytesIntoSpan(ref buffer, ref state, size, bytes); in ReadRawBytesSlow()
489 state.segmentedBufferHelper.RefillBuffer(ref buffer, ref state, true); in ReadRawBytesSlow()
518 …public static void SkipRawBytes(ref ReadOnlySpan<byte> buffer, ref ParserInternalState state, int … in SkipRawBytes()
525 ValidateCurrentLimit(ref buffer, ref state, size); in SkipRawBytes()
541 state.segmentedBufferHelper.RefillBuffer(ref buffer, ref state, true); in SkipRawBytes()
547 state.segmentedBufferHelper.RefillBuffer(ref buffer, ref state, true); in SkipRawBytes()
558 … public static string ReadString(ref ReadOnlySpan<byte> buffer, ref ParserInternalState state) in ReadString()
560 int length = ParsingPrimitives.ParseLength(ref buffer, ref state); in ReadString()
561 return ParsingPrimitives.ReadRawString(ref buffer, ref state, length); in ReadString()
568 … public static ByteString ReadBytes(ref ReadOnlySpan<byte> buffer, ref ParserInternalState state) in ReadBytes()
570 int length = ParsingPrimitives.ParseLength(ref buffer, ref state); in ReadBytes()
571 … return ByteString.AttachBytes(ParsingPrimitives.ReadRawBytes(ref buffer, ref state, length)); in ReadBytes()
581 …public static string ReadRawString(ref ReadOnlySpan<byte> buffer, ref ParserInternalState state, i… in ReadRawString()
614 return ReadStringSlow(ref buffer, ref state, length); in ReadRawString()
620 …private static string ReadStringSlow(ref ReadOnlySpan<byte> buffer, ref ParserInternalState state,… in ReadStringSlow()
622 ValidateCurrentLimit(ref buffer, ref state, length); in ReadStringSlow()
625 if (IsDataAvailable(ref state, length)) in ReadStringSlow()
642 … // in a method with a "ref Span<byte> buffer" argument. If the stackalloc'd span was assigned in ReadStringSlow()
643 … // to the ref argument then bad things would happen. We'll never do that so it is ok. in ReadStringSlow()
646 ReadRawBytesIntoSpan(ref buffer, ref state, length, tempSpan); in ReadStringSlow()
666 …return WritingPrimitives.Utf8Encoding.GetString(ReadRawBytes(ref buffer, ref state, length), 0, le… in ReadStringSlow()
673 …private static void ValidateCurrentLimit(ref ReadOnlySpan<byte> buffer, ref ParserInternalState st… in ValidateCurrentLimit()
678 …SkipRawBytes(ref buffer, ref state, state.currentLimit - state.totalBytesRetired - state.bufferPos… in ValidateCurrentLimit()
685 … private static byte ReadRawByte(ref ReadOnlySpan<byte> buffer, ref ParserInternalState state) in ReadRawByte()
689 state.segmentedBufferHelper.RefillBuffer(ref buffer, ref state, true); in ReadRawByte()
769 public static bool IsDataAvailable(ref ParserInternalState state, int size) in IsDataAvailable()
777 return IsDataAvailableInSource(ref state, size); in IsDataAvailable()
786 private static bool IsDataAvailableInSource(ref ParserInternalState state, int size) in IsDataAvailableInSource()
797 …private static void ReadRawBytesIntoSpan(ref ReadOnlySpan<byte> buffer, ref ParserInternalState st… in ReadRawBytesIntoSpan()
804 state.segmentedBufferHelper.RefillBuffer(ref buffer, ref state, true); in ReadRawBytesIntoSpan()