MCPcopy Create free account
hub / github.com/google/gapid / writeBuffer

Method writeBuffer

gapil/compiler/plugins/encoder/encoder.go:624–628  ·  view source on GitHub ↗

writeBuffer writes the size of buffer src to dst as a varint to dst, and then writes the src buffer data to dst.

(s *compiler.S, dst, src *codegen.Value)

Source from the content-addressed store, hash-verified

622// writeBuffer writes the size of buffer src to dst as a varint to dst, and
623// then writes the src buffer data to dst.
624func (e *encoder) writeBuffer(s *compiler.S, dst, src *codegen.Value) {
625 size := src.Index(0, compiler.BufSize).Load()
626 bytes := src.Index(0, compiler.BufData).Load()
627 e.writeBytes(s, dst, size, bytes)
628}
629
630// writeBytes writes size as a varint to buf, and then writes size bytes to buf.
631func (e *encoder) writeBytes(s *compiler.S, buf, size, bytes *codegen.Value) {

Callers 2

encodeValueMethod · 0.95
writeBlobMethod · 0.95

Calls 3

writeBytesMethod · 0.95
LoadMethod · 0.65
IndexMethod · 0.65

Tested by

no test coverage detected