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

Method writeWireAndTag

gapil/compiler/plugins/encoder/encoder.go:582–587  ·  view source on GitHub ↗

writeWireAndTag writes a wire type and tag (proto field ID) to buf. All proto fields are prefixed with a wire and tag.

(s *compiler.S, buf *codegen.Value, wire uint64, tag serialization.ProtoFieldID)

Source from the content-addressed store, hash-verified

580// writeWireAndTag writes a wire type and tag (proto field ID) to buf.
581// All proto fields are prefixed with a wire and tag.
582func (e *encoder) writeWireAndTag(s *compiler.S, buf *codegen.Value, wire uint64, tag serialization.ProtoFieldID) {
583 if tag < 1 {
584 panic(fmt.Sprintf("Illegal tag: %v"))
585 }
586 e.writeVarint(s, buf, s.Scalar(wire|(uint64(tag)<<3)))
587}
588
589// writeFixed32 writes a fixed size, 32-bit number to buf.
590func (e *encoder) writeFixed32(s *compiler.S, buf, val *codegen.Value) {

Callers 2

encodeFieldMethod · 0.95
encodeValueMethod · 0.95

Calls 2

writeVarintMethod · 0.95
ScalarMethod · 0.45

Tested by

no test coverage detected