github.com/pyroscope-io/pyroscope@v0.37.3-0.20230725203016-5f6947968bd0/pkg/storage/tree/profile_vtproto.pb.go (about) 1 // Code generated by protoc-gen-go-vtproto. DO NOT EDIT. 2 // protoc-gen-go-vtproto version: v0.2.0 3 // source: profile.proto 4 5 package tree 6 7 import ( 8 fmt "fmt" 9 io "io" 10 bits "math/bits" 11 sync "sync" 12 13 protoimpl "google.golang.org/protobuf/runtime/protoimpl" 14 ) 15 16 const ( 17 // Verify that this generated code is sufficiently up-to-date. 18 _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) 19 // Verify that runtime/protoimpl is sufficiently up-to-date. 20 _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) 21 ) 22 23 func (m *Profile) MarshalVT() (dAtA []byte, err error) { 24 if m == nil { 25 return nil, nil 26 } 27 size := m.SizeVT() 28 dAtA = make([]byte, size) 29 n, err := m.MarshalToSizedBufferVT(dAtA[:size]) 30 if err != nil { 31 return nil, err 32 } 33 return dAtA[:n], nil 34 } 35 36 func (m *Profile) MarshalToVT(dAtA []byte) (int, error) { 37 size := m.SizeVT() 38 return m.MarshalToSizedBufferVT(dAtA[:size]) 39 } 40 41 func (m *Profile) MarshalToSizedBufferVT(dAtA []byte) (int, error) { 42 if m == nil { 43 return 0, nil 44 } 45 i := len(dAtA) 46 _ = i 47 var l int 48 _ = l 49 if m.unknownFields != nil { 50 i -= len(m.unknownFields) 51 copy(dAtA[i:], m.unknownFields) 52 } 53 if m.DefaultSampleType != 0 { 54 i = encodeVarint(dAtA, i, uint64(m.DefaultSampleType)) 55 i-- 56 dAtA[i] = 0x70 57 } 58 if len(m.Comment) > 0 { 59 var pksize2 int 60 for _, num := range m.Comment { 61 pksize2 += sov(uint64(num)) 62 } 63 i -= pksize2 64 j1 := i 65 for _, num1 := range m.Comment { 66 num := uint64(num1) 67 for num >= 1<<7 { 68 dAtA[j1] = uint8(uint64(num)&0x7f | 0x80) 69 num >>= 7 70 j1++ 71 } 72 dAtA[j1] = uint8(num) 73 j1++ 74 } 75 i = encodeVarint(dAtA, i, uint64(pksize2)) 76 i-- 77 dAtA[i] = 0x6a 78 } 79 if m.Period != 0 { 80 i = encodeVarint(dAtA, i, uint64(m.Period)) 81 i-- 82 dAtA[i] = 0x60 83 } 84 if m.PeriodType != nil { 85 size, err := m.PeriodType.MarshalToSizedBufferVT(dAtA[:i]) 86 if err != nil { 87 return 0, err 88 } 89 i -= size 90 i = encodeVarint(dAtA, i, uint64(size)) 91 i-- 92 dAtA[i] = 0x5a 93 } 94 if m.DurationNanos != 0 { 95 i = encodeVarint(dAtA, i, uint64(m.DurationNanos)) 96 i-- 97 dAtA[i] = 0x50 98 } 99 if m.TimeNanos != 0 { 100 i = encodeVarint(dAtA, i, uint64(m.TimeNanos)) 101 i-- 102 dAtA[i] = 0x48 103 } 104 if m.KeepFrames != 0 { 105 i = encodeVarint(dAtA, i, uint64(m.KeepFrames)) 106 i-- 107 dAtA[i] = 0x40 108 } 109 if m.DropFrames != 0 { 110 i = encodeVarint(dAtA, i, uint64(m.DropFrames)) 111 i-- 112 dAtA[i] = 0x38 113 } 114 if len(m.StringTable) > 0 { 115 for iNdEx := len(m.StringTable) - 1; iNdEx >= 0; iNdEx-- { 116 i -= len(m.StringTable[iNdEx]) 117 copy(dAtA[i:], m.StringTable[iNdEx]) 118 i = encodeVarint(dAtA, i, uint64(len(m.StringTable[iNdEx]))) 119 i-- 120 dAtA[i] = 0x32 121 } 122 } 123 if len(m.Function) > 0 { 124 for iNdEx := len(m.Function) - 1; iNdEx >= 0; iNdEx-- { 125 size, err := m.Function[iNdEx].MarshalToSizedBufferVT(dAtA[:i]) 126 if err != nil { 127 return 0, err 128 } 129 i -= size 130 i = encodeVarint(dAtA, i, uint64(size)) 131 i-- 132 dAtA[i] = 0x2a 133 } 134 } 135 if len(m.Location) > 0 { 136 for iNdEx := len(m.Location) - 1; iNdEx >= 0; iNdEx-- { 137 size, err := m.Location[iNdEx].MarshalToSizedBufferVT(dAtA[:i]) 138 if err != nil { 139 return 0, err 140 } 141 i -= size 142 i = encodeVarint(dAtA, i, uint64(size)) 143 i-- 144 dAtA[i] = 0x22 145 } 146 } 147 if len(m.Mapping) > 0 { 148 for iNdEx := len(m.Mapping) - 1; iNdEx >= 0; iNdEx-- { 149 size, err := m.Mapping[iNdEx].MarshalToSizedBufferVT(dAtA[:i]) 150 if err != nil { 151 return 0, err 152 } 153 i -= size 154 i = encodeVarint(dAtA, i, uint64(size)) 155 i-- 156 dAtA[i] = 0x1a 157 } 158 } 159 if len(m.Sample) > 0 { 160 for iNdEx := len(m.Sample) - 1; iNdEx >= 0; iNdEx-- { 161 size, err := m.Sample[iNdEx].MarshalToSizedBufferVT(dAtA[:i]) 162 if err != nil { 163 return 0, err 164 } 165 i -= size 166 i = encodeVarint(dAtA, i, uint64(size)) 167 i-- 168 dAtA[i] = 0x12 169 } 170 } 171 if len(m.SampleType) > 0 { 172 for iNdEx := len(m.SampleType) - 1; iNdEx >= 0; iNdEx-- { 173 size, err := m.SampleType[iNdEx].MarshalToSizedBufferVT(dAtA[:i]) 174 if err != nil { 175 return 0, err 176 } 177 i -= size 178 i = encodeVarint(dAtA, i, uint64(size)) 179 i-- 180 dAtA[i] = 0xa 181 } 182 } 183 return len(dAtA) - i, nil 184 } 185 186 func (m *ValueType) MarshalVT() (dAtA []byte, err error) { 187 if m == nil { 188 return nil, nil 189 } 190 size := m.SizeVT() 191 dAtA = make([]byte, size) 192 n, err := m.MarshalToSizedBufferVT(dAtA[:size]) 193 if err != nil { 194 return nil, err 195 } 196 return dAtA[:n], nil 197 } 198 199 func (m *ValueType) MarshalToVT(dAtA []byte) (int, error) { 200 size := m.SizeVT() 201 return m.MarshalToSizedBufferVT(dAtA[:size]) 202 } 203 204 func (m *ValueType) MarshalToSizedBufferVT(dAtA []byte) (int, error) { 205 if m == nil { 206 return 0, nil 207 } 208 i := len(dAtA) 209 _ = i 210 var l int 211 _ = l 212 if m.unknownFields != nil { 213 i -= len(m.unknownFields) 214 copy(dAtA[i:], m.unknownFields) 215 } 216 if m.Unit != 0 { 217 i = encodeVarint(dAtA, i, uint64(m.Unit)) 218 i-- 219 dAtA[i] = 0x10 220 } 221 if m.Type != 0 { 222 i = encodeVarint(dAtA, i, uint64(m.Type)) 223 i-- 224 dAtA[i] = 0x8 225 } 226 return len(dAtA) - i, nil 227 } 228 229 func (m *Sample) MarshalVT() (dAtA []byte, err error) { 230 if m == nil { 231 return nil, nil 232 } 233 size := m.SizeVT() 234 dAtA = make([]byte, size) 235 n, err := m.MarshalToSizedBufferVT(dAtA[:size]) 236 if err != nil { 237 return nil, err 238 } 239 return dAtA[:n], nil 240 } 241 242 func (m *Sample) MarshalToVT(dAtA []byte) (int, error) { 243 size := m.SizeVT() 244 return m.MarshalToSizedBufferVT(dAtA[:size]) 245 } 246 247 func (m *Sample) MarshalToSizedBufferVT(dAtA []byte) (int, error) { 248 if m == nil { 249 return 0, nil 250 } 251 i := len(dAtA) 252 _ = i 253 var l int 254 _ = l 255 if m.unknownFields != nil { 256 i -= len(m.unknownFields) 257 copy(dAtA[i:], m.unknownFields) 258 } 259 if len(m.Label) > 0 { 260 for iNdEx := len(m.Label) - 1; iNdEx >= 0; iNdEx-- { 261 size, err := m.Label[iNdEx].MarshalToSizedBufferVT(dAtA[:i]) 262 if err != nil { 263 return 0, err 264 } 265 i -= size 266 i = encodeVarint(dAtA, i, uint64(size)) 267 i-- 268 dAtA[i] = 0x1a 269 } 270 } 271 if len(m.Value) > 0 { 272 var pksize2 int 273 for _, num := range m.Value { 274 pksize2 += sov(uint64(num)) 275 } 276 i -= pksize2 277 j1 := i 278 for _, num1 := range m.Value { 279 num := uint64(num1) 280 for num >= 1<<7 { 281 dAtA[j1] = uint8(uint64(num)&0x7f | 0x80) 282 num >>= 7 283 j1++ 284 } 285 dAtA[j1] = uint8(num) 286 j1++ 287 } 288 i = encodeVarint(dAtA, i, uint64(pksize2)) 289 i-- 290 dAtA[i] = 0x12 291 } 292 if len(m.LocationId) > 0 { 293 var pksize4 int 294 for _, num := range m.LocationId { 295 pksize4 += sov(uint64(num)) 296 } 297 i -= pksize4 298 j3 := i 299 for _, num := range m.LocationId { 300 for num >= 1<<7 { 301 dAtA[j3] = uint8(uint64(num)&0x7f | 0x80) 302 num >>= 7 303 j3++ 304 } 305 dAtA[j3] = uint8(num) 306 j3++ 307 } 308 i = encodeVarint(dAtA, i, uint64(pksize4)) 309 i-- 310 dAtA[i] = 0xa 311 } 312 return len(dAtA) - i, nil 313 } 314 315 func (m *Label) MarshalVT() (dAtA []byte, err error) { 316 if m == nil { 317 return nil, nil 318 } 319 size := m.SizeVT() 320 dAtA = make([]byte, size) 321 n, err := m.MarshalToSizedBufferVT(dAtA[:size]) 322 if err != nil { 323 return nil, err 324 } 325 return dAtA[:n], nil 326 } 327 328 func (m *Label) MarshalToVT(dAtA []byte) (int, error) { 329 size := m.SizeVT() 330 return m.MarshalToSizedBufferVT(dAtA[:size]) 331 } 332 333 func (m *Label) MarshalToSizedBufferVT(dAtA []byte) (int, error) { 334 if m == nil { 335 return 0, nil 336 } 337 i := len(dAtA) 338 _ = i 339 var l int 340 _ = l 341 if m.unknownFields != nil { 342 i -= len(m.unknownFields) 343 copy(dAtA[i:], m.unknownFields) 344 } 345 if m.NumUnit != 0 { 346 i = encodeVarint(dAtA, i, uint64(m.NumUnit)) 347 i-- 348 dAtA[i] = 0x20 349 } 350 if m.Num != 0 { 351 i = encodeVarint(dAtA, i, uint64(m.Num)) 352 i-- 353 dAtA[i] = 0x18 354 } 355 if m.Str != 0 { 356 i = encodeVarint(dAtA, i, uint64(m.Str)) 357 i-- 358 dAtA[i] = 0x10 359 } 360 if m.Key != 0 { 361 i = encodeVarint(dAtA, i, uint64(m.Key)) 362 i-- 363 dAtA[i] = 0x8 364 } 365 return len(dAtA) - i, nil 366 } 367 368 func (m *Mapping) MarshalVT() (dAtA []byte, err error) { 369 if m == nil { 370 return nil, nil 371 } 372 size := m.SizeVT() 373 dAtA = make([]byte, size) 374 n, err := m.MarshalToSizedBufferVT(dAtA[:size]) 375 if err != nil { 376 return nil, err 377 } 378 return dAtA[:n], nil 379 } 380 381 func (m *Mapping) MarshalToVT(dAtA []byte) (int, error) { 382 size := m.SizeVT() 383 return m.MarshalToSizedBufferVT(dAtA[:size]) 384 } 385 386 func (m *Mapping) MarshalToSizedBufferVT(dAtA []byte) (int, error) { 387 if m == nil { 388 return 0, nil 389 } 390 i := len(dAtA) 391 _ = i 392 var l int 393 _ = l 394 if m.unknownFields != nil { 395 i -= len(m.unknownFields) 396 copy(dAtA[i:], m.unknownFields) 397 } 398 if m.HasInlineFrames { 399 i-- 400 if m.HasInlineFrames { 401 dAtA[i] = 1 402 } else { 403 dAtA[i] = 0 404 } 405 i-- 406 dAtA[i] = 0x50 407 } 408 if m.HasLineNumbers { 409 i-- 410 if m.HasLineNumbers { 411 dAtA[i] = 1 412 } else { 413 dAtA[i] = 0 414 } 415 i-- 416 dAtA[i] = 0x48 417 } 418 if m.HasFilenames { 419 i-- 420 if m.HasFilenames { 421 dAtA[i] = 1 422 } else { 423 dAtA[i] = 0 424 } 425 i-- 426 dAtA[i] = 0x40 427 } 428 if m.HasFunctions { 429 i-- 430 if m.HasFunctions { 431 dAtA[i] = 1 432 } else { 433 dAtA[i] = 0 434 } 435 i-- 436 dAtA[i] = 0x38 437 } 438 if m.BuildId != 0 { 439 i = encodeVarint(dAtA, i, uint64(m.BuildId)) 440 i-- 441 dAtA[i] = 0x30 442 } 443 if m.Filename != 0 { 444 i = encodeVarint(dAtA, i, uint64(m.Filename)) 445 i-- 446 dAtA[i] = 0x28 447 } 448 if m.FileOffset != 0 { 449 i = encodeVarint(dAtA, i, uint64(m.FileOffset)) 450 i-- 451 dAtA[i] = 0x20 452 } 453 if m.MemoryLimit != 0 { 454 i = encodeVarint(dAtA, i, uint64(m.MemoryLimit)) 455 i-- 456 dAtA[i] = 0x18 457 } 458 if m.MemoryStart != 0 { 459 i = encodeVarint(dAtA, i, uint64(m.MemoryStart)) 460 i-- 461 dAtA[i] = 0x10 462 } 463 if m.Id != 0 { 464 i = encodeVarint(dAtA, i, uint64(m.Id)) 465 i-- 466 dAtA[i] = 0x8 467 } 468 return len(dAtA) - i, nil 469 } 470 471 func (m *Location) MarshalVT() (dAtA []byte, err error) { 472 if m == nil { 473 return nil, nil 474 } 475 size := m.SizeVT() 476 dAtA = make([]byte, size) 477 n, err := m.MarshalToSizedBufferVT(dAtA[:size]) 478 if err != nil { 479 return nil, err 480 } 481 return dAtA[:n], nil 482 } 483 484 func (m *Location) MarshalToVT(dAtA []byte) (int, error) { 485 size := m.SizeVT() 486 return m.MarshalToSizedBufferVT(dAtA[:size]) 487 } 488 489 func (m *Location) MarshalToSizedBufferVT(dAtA []byte) (int, error) { 490 if m == nil { 491 return 0, nil 492 } 493 i := len(dAtA) 494 _ = i 495 var l int 496 _ = l 497 if m.unknownFields != nil { 498 i -= len(m.unknownFields) 499 copy(dAtA[i:], m.unknownFields) 500 } 501 if m.IsFolded { 502 i-- 503 if m.IsFolded { 504 dAtA[i] = 1 505 } else { 506 dAtA[i] = 0 507 } 508 i-- 509 dAtA[i] = 0x28 510 } 511 if len(m.Line) > 0 { 512 for iNdEx := len(m.Line) - 1; iNdEx >= 0; iNdEx-- { 513 size, err := m.Line[iNdEx].MarshalToSizedBufferVT(dAtA[:i]) 514 if err != nil { 515 return 0, err 516 } 517 i -= size 518 i = encodeVarint(dAtA, i, uint64(size)) 519 i-- 520 dAtA[i] = 0x22 521 } 522 } 523 if m.Address != 0 { 524 i = encodeVarint(dAtA, i, uint64(m.Address)) 525 i-- 526 dAtA[i] = 0x18 527 } 528 if m.MappingId != 0 { 529 i = encodeVarint(dAtA, i, uint64(m.MappingId)) 530 i-- 531 dAtA[i] = 0x10 532 } 533 if m.Id != 0 { 534 i = encodeVarint(dAtA, i, uint64(m.Id)) 535 i-- 536 dAtA[i] = 0x8 537 } 538 return len(dAtA) - i, nil 539 } 540 541 func (m *Line) MarshalVT() (dAtA []byte, err error) { 542 if m == nil { 543 return nil, nil 544 } 545 size := m.SizeVT() 546 dAtA = make([]byte, size) 547 n, err := m.MarshalToSizedBufferVT(dAtA[:size]) 548 if err != nil { 549 return nil, err 550 } 551 return dAtA[:n], nil 552 } 553 554 func (m *Line) MarshalToVT(dAtA []byte) (int, error) { 555 size := m.SizeVT() 556 return m.MarshalToSizedBufferVT(dAtA[:size]) 557 } 558 559 func (m *Line) MarshalToSizedBufferVT(dAtA []byte) (int, error) { 560 if m == nil { 561 return 0, nil 562 } 563 i := len(dAtA) 564 _ = i 565 var l int 566 _ = l 567 if m.unknownFields != nil { 568 i -= len(m.unknownFields) 569 copy(dAtA[i:], m.unknownFields) 570 } 571 if m.Line != 0 { 572 i = encodeVarint(dAtA, i, uint64(m.Line)) 573 i-- 574 dAtA[i] = 0x10 575 } 576 if m.FunctionId != 0 { 577 i = encodeVarint(dAtA, i, uint64(m.FunctionId)) 578 i-- 579 dAtA[i] = 0x8 580 } 581 return len(dAtA) - i, nil 582 } 583 584 func (m *Function) MarshalVT() (dAtA []byte, err error) { 585 if m == nil { 586 return nil, nil 587 } 588 size := m.SizeVT() 589 dAtA = make([]byte, size) 590 n, err := m.MarshalToSizedBufferVT(dAtA[:size]) 591 if err != nil { 592 return nil, err 593 } 594 return dAtA[:n], nil 595 } 596 597 func (m *Function) MarshalToVT(dAtA []byte) (int, error) { 598 size := m.SizeVT() 599 return m.MarshalToSizedBufferVT(dAtA[:size]) 600 } 601 602 func (m *Function) MarshalToSizedBufferVT(dAtA []byte) (int, error) { 603 if m == nil { 604 return 0, nil 605 } 606 i := len(dAtA) 607 _ = i 608 var l int 609 _ = l 610 if m.unknownFields != nil { 611 i -= len(m.unknownFields) 612 copy(dAtA[i:], m.unknownFields) 613 } 614 if m.StartLine != 0 { 615 i = encodeVarint(dAtA, i, uint64(m.StartLine)) 616 i-- 617 dAtA[i] = 0x28 618 } 619 if m.Filename != 0 { 620 i = encodeVarint(dAtA, i, uint64(m.Filename)) 621 i-- 622 dAtA[i] = 0x20 623 } 624 if m.SystemName != 0 { 625 i = encodeVarint(dAtA, i, uint64(m.SystemName)) 626 i-- 627 dAtA[i] = 0x18 628 } 629 if m.Name != 0 { 630 i = encodeVarint(dAtA, i, uint64(m.Name)) 631 i-- 632 dAtA[i] = 0x10 633 } 634 if m.Id != 0 { 635 i = encodeVarint(dAtA, i, uint64(m.Id)) 636 i-- 637 dAtA[i] = 0x8 638 } 639 return len(dAtA) - i, nil 640 } 641 642 func encodeVarint(dAtA []byte, offset int, v uint64) int { 643 offset -= sov(v) 644 base := offset 645 for v >= 1<<7 { 646 dAtA[offset] = uint8(v&0x7f | 0x80) 647 v >>= 7 648 offset++ 649 } 650 dAtA[offset] = uint8(v) 651 return base 652 } 653 654 var vtprotoPool_Profile = sync.Pool{ 655 New: func() interface{} { 656 return &Profile{} 657 }, 658 } 659 660 func (m *Profile) ResetVT() { 661 f0 := m.SampleType[:0] 662 f1 := m.Sample[:0] 663 f2 := m.Mapping[:0] 664 f3 := m.Location[:0] 665 f4 := m.Function[:0] 666 f5 := m.StringTable[:0] 667 f6 := m.Comment[:0] 668 m.Reset() 669 m.SampleType = f0 670 m.Sample = f1 671 m.Mapping = f2 672 m.Location = f3 673 m.Function = f4 674 m.StringTable = f5 675 m.Comment = f6 676 } 677 func (m *Profile) ReturnToVTPool() { 678 if m != nil { 679 m.ResetVT() 680 vtprotoPool_Profile.Put(m) 681 } 682 } 683 func ProfileFromVTPool() *Profile { 684 return vtprotoPool_Profile.Get().(*Profile) 685 } 686 func (m *Profile) SizeVT() (n int) { 687 if m == nil { 688 return 0 689 } 690 var l int 691 _ = l 692 if len(m.SampleType) > 0 { 693 for _, e := range m.SampleType { 694 l = e.SizeVT() 695 n += 1 + l + sov(uint64(l)) 696 } 697 } 698 if len(m.Sample) > 0 { 699 for _, e := range m.Sample { 700 l = e.SizeVT() 701 n += 1 + l + sov(uint64(l)) 702 } 703 } 704 if len(m.Mapping) > 0 { 705 for _, e := range m.Mapping { 706 l = e.SizeVT() 707 n += 1 + l + sov(uint64(l)) 708 } 709 } 710 if len(m.Location) > 0 { 711 for _, e := range m.Location { 712 l = e.SizeVT() 713 n += 1 + l + sov(uint64(l)) 714 } 715 } 716 if len(m.Function) > 0 { 717 for _, e := range m.Function { 718 l = e.SizeVT() 719 n += 1 + l + sov(uint64(l)) 720 } 721 } 722 if len(m.StringTable) > 0 { 723 for _, s := range m.StringTable { 724 l = len(s) 725 n += 1 + l + sov(uint64(l)) 726 } 727 } 728 if m.DropFrames != 0 { 729 n += 1 + sov(uint64(m.DropFrames)) 730 } 731 if m.KeepFrames != 0 { 732 n += 1 + sov(uint64(m.KeepFrames)) 733 } 734 if m.TimeNanos != 0 { 735 n += 1 + sov(uint64(m.TimeNanos)) 736 } 737 if m.DurationNanos != 0 { 738 n += 1 + sov(uint64(m.DurationNanos)) 739 } 740 if m.PeriodType != nil { 741 l = m.PeriodType.SizeVT() 742 n += 1 + l + sov(uint64(l)) 743 } 744 if m.Period != 0 { 745 n += 1 + sov(uint64(m.Period)) 746 } 747 if len(m.Comment) > 0 { 748 l = 0 749 for _, e := range m.Comment { 750 l += sov(uint64(e)) 751 } 752 n += 1 + sov(uint64(l)) + l 753 } 754 if m.DefaultSampleType != 0 { 755 n += 1 + sov(uint64(m.DefaultSampleType)) 756 } 757 if m.unknownFields != nil { 758 n += len(m.unknownFields) 759 } 760 return n 761 } 762 763 func (m *ValueType) SizeVT() (n int) { 764 if m == nil { 765 return 0 766 } 767 var l int 768 _ = l 769 if m.Type != 0 { 770 n += 1 + sov(uint64(m.Type)) 771 } 772 if m.Unit != 0 { 773 n += 1 + sov(uint64(m.Unit)) 774 } 775 if m.unknownFields != nil { 776 n += len(m.unknownFields) 777 } 778 return n 779 } 780 781 func (m *Sample) SizeVT() (n int) { 782 if m == nil { 783 return 0 784 } 785 var l int 786 _ = l 787 if len(m.LocationId) > 0 { 788 l = 0 789 for _, e := range m.LocationId { 790 l += sov(uint64(e)) 791 } 792 n += 1 + sov(uint64(l)) + l 793 } 794 if len(m.Value) > 0 { 795 l = 0 796 for _, e := range m.Value { 797 l += sov(uint64(e)) 798 } 799 n += 1 + sov(uint64(l)) + l 800 } 801 if len(m.Label) > 0 { 802 for _, e := range m.Label { 803 l = e.SizeVT() 804 n += 1 + l + sov(uint64(l)) 805 } 806 } 807 if m.unknownFields != nil { 808 n += len(m.unknownFields) 809 } 810 return n 811 } 812 813 func (m *Label) SizeVT() (n int) { 814 if m == nil { 815 return 0 816 } 817 var l int 818 _ = l 819 if m.Key != 0 { 820 n += 1 + sov(uint64(m.Key)) 821 } 822 if m.Str != 0 { 823 n += 1 + sov(uint64(m.Str)) 824 } 825 if m.Num != 0 { 826 n += 1 + sov(uint64(m.Num)) 827 } 828 if m.NumUnit != 0 { 829 n += 1 + sov(uint64(m.NumUnit)) 830 } 831 if m.unknownFields != nil { 832 n += len(m.unknownFields) 833 } 834 return n 835 } 836 837 func (m *Mapping) SizeVT() (n int) { 838 if m == nil { 839 return 0 840 } 841 var l int 842 _ = l 843 if m.Id != 0 { 844 n += 1 + sov(uint64(m.Id)) 845 } 846 if m.MemoryStart != 0 { 847 n += 1 + sov(uint64(m.MemoryStart)) 848 } 849 if m.MemoryLimit != 0 { 850 n += 1 + sov(uint64(m.MemoryLimit)) 851 } 852 if m.FileOffset != 0 { 853 n += 1 + sov(uint64(m.FileOffset)) 854 } 855 if m.Filename != 0 { 856 n += 1 + sov(uint64(m.Filename)) 857 } 858 if m.BuildId != 0 { 859 n += 1 + sov(uint64(m.BuildId)) 860 } 861 if m.HasFunctions { 862 n += 2 863 } 864 if m.HasFilenames { 865 n += 2 866 } 867 if m.HasLineNumbers { 868 n += 2 869 } 870 if m.HasInlineFrames { 871 n += 2 872 } 873 if m.unknownFields != nil { 874 n += len(m.unknownFields) 875 } 876 return n 877 } 878 879 func (m *Location) SizeVT() (n int) { 880 if m == nil { 881 return 0 882 } 883 var l int 884 _ = l 885 if m.Id != 0 { 886 n += 1 + sov(uint64(m.Id)) 887 } 888 if m.MappingId != 0 { 889 n += 1 + sov(uint64(m.MappingId)) 890 } 891 if m.Address != 0 { 892 n += 1 + sov(uint64(m.Address)) 893 } 894 if len(m.Line) > 0 { 895 for _, e := range m.Line { 896 l = e.SizeVT() 897 n += 1 + l + sov(uint64(l)) 898 } 899 } 900 if m.IsFolded { 901 n += 2 902 } 903 if m.unknownFields != nil { 904 n += len(m.unknownFields) 905 } 906 return n 907 } 908 909 func (m *Line) SizeVT() (n int) { 910 if m == nil { 911 return 0 912 } 913 var l int 914 _ = l 915 if m.FunctionId != 0 { 916 n += 1 + sov(uint64(m.FunctionId)) 917 } 918 if m.Line != 0 { 919 n += 1 + sov(uint64(m.Line)) 920 } 921 if m.unknownFields != nil { 922 n += len(m.unknownFields) 923 } 924 return n 925 } 926 927 func (m *Function) SizeVT() (n int) { 928 if m == nil { 929 return 0 930 } 931 var l int 932 _ = l 933 if m.Id != 0 { 934 n += 1 + sov(uint64(m.Id)) 935 } 936 if m.Name != 0 { 937 n += 1 + sov(uint64(m.Name)) 938 } 939 if m.SystemName != 0 { 940 n += 1 + sov(uint64(m.SystemName)) 941 } 942 if m.Filename != 0 { 943 n += 1 + sov(uint64(m.Filename)) 944 } 945 if m.StartLine != 0 { 946 n += 1 + sov(uint64(m.StartLine)) 947 } 948 if m.unknownFields != nil { 949 n += len(m.unknownFields) 950 } 951 return n 952 } 953 954 func sov(x uint64) (n int) { 955 return (bits.Len64(x|1) + 6) / 7 956 } 957 func soz(x uint64) (n int) { 958 return sov(uint64((x << 1) ^ uint64((int64(x) >> 63)))) 959 } 960 func (m *Profile) UnmarshalVT(dAtA []byte) error { 961 l := len(dAtA) 962 iNdEx := 0 963 for iNdEx < l { 964 preIndex := iNdEx 965 var wire uint64 966 for shift := uint(0); ; shift += 7 { 967 if shift >= 64 { 968 return ErrIntOverflow 969 } 970 if iNdEx >= l { 971 return io.ErrUnexpectedEOF 972 } 973 b := dAtA[iNdEx] 974 iNdEx++ 975 wire |= uint64(b&0x7F) << shift 976 if b < 0x80 { 977 break 978 } 979 } 980 fieldNum := int32(wire >> 3) 981 wireType := int(wire & 0x7) 982 if wireType == 4 { 983 return fmt.Errorf("proto: Profile: wiretype end group for non-group") 984 } 985 if fieldNum <= 0 { 986 return fmt.Errorf("proto: Profile: illegal tag %d (wire type %d)", fieldNum, wire) 987 } 988 switch fieldNum { 989 case 1: 990 if wireType != 2 { 991 return fmt.Errorf("proto: wrong wireType = %d for field SampleType", wireType) 992 } 993 var msglen int 994 for shift := uint(0); ; shift += 7 { 995 if shift >= 64 { 996 return ErrIntOverflow 997 } 998 if iNdEx >= l { 999 return io.ErrUnexpectedEOF 1000 } 1001 b := dAtA[iNdEx] 1002 iNdEx++ 1003 msglen |= int(b&0x7F) << shift 1004 if b < 0x80 { 1005 break 1006 } 1007 } 1008 if msglen < 0 { 1009 return ErrInvalidLength 1010 } 1011 postIndex := iNdEx + msglen 1012 if postIndex < 0 { 1013 return ErrInvalidLength 1014 } 1015 if postIndex > l { 1016 return io.ErrUnexpectedEOF 1017 } 1018 if len(m.SampleType) == cap(m.SampleType) { 1019 m.SampleType = append(m.SampleType, &ValueType{}) 1020 } else { 1021 m.SampleType = m.SampleType[:len(m.SampleType)+1] 1022 if m.SampleType[len(m.SampleType)-1] == nil { 1023 m.SampleType[len(m.SampleType)-1] = &ValueType{} 1024 } 1025 } 1026 if err := m.SampleType[len(m.SampleType)-1].UnmarshalVT(dAtA[iNdEx:postIndex]); err != nil { 1027 return err 1028 } 1029 iNdEx = postIndex 1030 case 2: 1031 if wireType != 2 { 1032 return fmt.Errorf("proto: wrong wireType = %d for field Sample", wireType) 1033 } 1034 var msglen int 1035 for shift := uint(0); ; shift += 7 { 1036 if shift >= 64 { 1037 return ErrIntOverflow 1038 } 1039 if iNdEx >= l { 1040 return io.ErrUnexpectedEOF 1041 } 1042 b := dAtA[iNdEx] 1043 iNdEx++ 1044 msglen |= int(b&0x7F) << shift 1045 if b < 0x80 { 1046 break 1047 } 1048 } 1049 if msglen < 0 { 1050 return ErrInvalidLength 1051 } 1052 postIndex := iNdEx + msglen 1053 if postIndex < 0 { 1054 return ErrInvalidLength 1055 } 1056 if postIndex > l { 1057 return io.ErrUnexpectedEOF 1058 } 1059 if len(m.Sample) == cap(m.Sample) { 1060 m.Sample = append(m.Sample, &Sample{}) 1061 } else { 1062 m.Sample = m.Sample[:len(m.Sample)+1] 1063 if m.Sample[len(m.Sample)-1] == nil { 1064 m.Sample[len(m.Sample)-1] = &Sample{} 1065 } 1066 } 1067 if err := m.Sample[len(m.Sample)-1].UnmarshalVT(dAtA[iNdEx:postIndex]); err != nil { 1068 return err 1069 } 1070 iNdEx = postIndex 1071 case 3: 1072 if wireType != 2 { 1073 return fmt.Errorf("proto: wrong wireType = %d for field Mapping", wireType) 1074 } 1075 var msglen int 1076 for shift := uint(0); ; shift += 7 { 1077 if shift >= 64 { 1078 return ErrIntOverflow 1079 } 1080 if iNdEx >= l { 1081 return io.ErrUnexpectedEOF 1082 } 1083 b := dAtA[iNdEx] 1084 iNdEx++ 1085 msglen |= int(b&0x7F) << shift 1086 if b < 0x80 { 1087 break 1088 } 1089 } 1090 if msglen < 0 { 1091 return ErrInvalidLength 1092 } 1093 postIndex := iNdEx + msglen 1094 if postIndex < 0 { 1095 return ErrInvalidLength 1096 } 1097 if postIndex > l { 1098 return io.ErrUnexpectedEOF 1099 } 1100 if len(m.Mapping) == cap(m.Mapping) { 1101 m.Mapping = append(m.Mapping, &Mapping{}) 1102 } else { 1103 m.Mapping = m.Mapping[:len(m.Mapping)+1] 1104 if m.Mapping[len(m.Mapping)-1] == nil { 1105 m.Mapping[len(m.Mapping)-1] = &Mapping{} 1106 } 1107 } 1108 if err := m.Mapping[len(m.Mapping)-1].UnmarshalVT(dAtA[iNdEx:postIndex]); err != nil { 1109 return err 1110 } 1111 iNdEx = postIndex 1112 case 4: 1113 if wireType != 2 { 1114 return fmt.Errorf("proto: wrong wireType = %d for field Location", wireType) 1115 } 1116 var msglen int 1117 for shift := uint(0); ; shift += 7 { 1118 if shift >= 64 { 1119 return ErrIntOverflow 1120 } 1121 if iNdEx >= l { 1122 return io.ErrUnexpectedEOF 1123 } 1124 b := dAtA[iNdEx] 1125 iNdEx++ 1126 msglen |= int(b&0x7F) << shift 1127 if b < 0x80 { 1128 break 1129 } 1130 } 1131 if msglen < 0 { 1132 return ErrInvalidLength 1133 } 1134 postIndex := iNdEx + msglen 1135 if postIndex < 0 { 1136 return ErrInvalidLength 1137 } 1138 if postIndex > l { 1139 return io.ErrUnexpectedEOF 1140 } 1141 if len(m.Location) == cap(m.Location) { 1142 m.Location = append(m.Location, &Location{}) 1143 } else { 1144 m.Location = m.Location[:len(m.Location)+1] 1145 if m.Location[len(m.Location)-1] == nil { 1146 m.Location[len(m.Location)-1] = &Location{} 1147 } 1148 } 1149 if err := m.Location[len(m.Location)-1].UnmarshalVT(dAtA[iNdEx:postIndex]); err != nil { 1150 return err 1151 } 1152 iNdEx = postIndex 1153 case 5: 1154 if wireType != 2 { 1155 return fmt.Errorf("proto: wrong wireType = %d for field Function", wireType) 1156 } 1157 var msglen int 1158 for shift := uint(0); ; shift += 7 { 1159 if shift >= 64 { 1160 return ErrIntOverflow 1161 } 1162 if iNdEx >= l { 1163 return io.ErrUnexpectedEOF 1164 } 1165 b := dAtA[iNdEx] 1166 iNdEx++ 1167 msglen |= int(b&0x7F) << shift 1168 if b < 0x80 { 1169 break 1170 } 1171 } 1172 if msglen < 0 { 1173 return ErrInvalidLength 1174 } 1175 postIndex := iNdEx + msglen 1176 if postIndex < 0 { 1177 return ErrInvalidLength 1178 } 1179 if postIndex > l { 1180 return io.ErrUnexpectedEOF 1181 } 1182 if len(m.Function) == cap(m.Function) { 1183 m.Function = append(m.Function, &Function{}) 1184 } else { 1185 m.Function = m.Function[:len(m.Function)+1] 1186 if m.Function[len(m.Function)-1] == nil { 1187 m.Function[len(m.Function)-1] = &Function{} 1188 } 1189 } 1190 if err := m.Function[len(m.Function)-1].UnmarshalVT(dAtA[iNdEx:postIndex]); err != nil { 1191 return err 1192 } 1193 iNdEx = postIndex 1194 case 6: 1195 if wireType != 2 { 1196 return fmt.Errorf("proto: wrong wireType = %d for field StringTable", wireType) 1197 } 1198 var stringLen uint64 1199 for shift := uint(0); ; shift += 7 { 1200 if shift >= 64 { 1201 return ErrIntOverflow 1202 } 1203 if iNdEx >= l { 1204 return io.ErrUnexpectedEOF 1205 } 1206 b := dAtA[iNdEx] 1207 iNdEx++ 1208 stringLen |= uint64(b&0x7F) << shift 1209 if b < 0x80 { 1210 break 1211 } 1212 } 1213 intStringLen := int(stringLen) 1214 if intStringLen < 0 { 1215 return ErrInvalidLength 1216 } 1217 postIndex := iNdEx + intStringLen 1218 if postIndex < 0 { 1219 return ErrInvalidLength 1220 } 1221 if postIndex > l { 1222 return io.ErrUnexpectedEOF 1223 } 1224 m.StringTable = append(m.StringTable, string(dAtA[iNdEx:postIndex])) 1225 iNdEx = postIndex 1226 case 7: 1227 if wireType != 0 { 1228 return fmt.Errorf("proto: wrong wireType = %d for field DropFrames", wireType) 1229 } 1230 m.DropFrames = 0 1231 for shift := uint(0); ; shift += 7 { 1232 if shift >= 64 { 1233 return ErrIntOverflow 1234 } 1235 if iNdEx >= l { 1236 return io.ErrUnexpectedEOF 1237 } 1238 b := dAtA[iNdEx] 1239 iNdEx++ 1240 m.DropFrames |= int64(b&0x7F) << shift 1241 if b < 0x80 { 1242 break 1243 } 1244 } 1245 case 8: 1246 if wireType != 0 { 1247 return fmt.Errorf("proto: wrong wireType = %d for field KeepFrames", wireType) 1248 } 1249 m.KeepFrames = 0 1250 for shift := uint(0); ; shift += 7 { 1251 if shift >= 64 { 1252 return ErrIntOverflow 1253 } 1254 if iNdEx >= l { 1255 return io.ErrUnexpectedEOF 1256 } 1257 b := dAtA[iNdEx] 1258 iNdEx++ 1259 m.KeepFrames |= int64(b&0x7F) << shift 1260 if b < 0x80 { 1261 break 1262 } 1263 } 1264 case 9: 1265 if wireType != 0 { 1266 return fmt.Errorf("proto: wrong wireType = %d for field TimeNanos", wireType) 1267 } 1268 m.TimeNanos = 0 1269 for shift := uint(0); ; shift += 7 { 1270 if shift >= 64 { 1271 return ErrIntOverflow 1272 } 1273 if iNdEx >= l { 1274 return io.ErrUnexpectedEOF 1275 } 1276 b := dAtA[iNdEx] 1277 iNdEx++ 1278 m.TimeNanos |= int64(b&0x7F) << shift 1279 if b < 0x80 { 1280 break 1281 } 1282 } 1283 case 10: 1284 if wireType != 0 { 1285 return fmt.Errorf("proto: wrong wireType = %d for field DurationNanos", wireType) 1286 } 1287 m.DurationNanos = 0 1288 for shift := uint(0); ; shift += 7 { 1289 if shift >= 64 { 1290 return ErrIntOverflow 1291 } 1292 if iNdEx >= l { 1293 return io.ErrUnexpectedEOF 1294 } 1295 b := dAtA[iNdEx] 1296 iNdEx++ 1297 m.DurationNanos |= int64(b&0x7F) << shift 1298 if b < 0x80 { 1299 break 1300 } 1301 } 1302 case 11: 1303 if wireType != 2 { 1304 return fmt.Errorf("proto: wrong wireType = %d for field PeriodType", wireType) 1305 } 1306 var msglen int 1307 for shift := uint(0); ; shift += 7 { 1308 if shift >= 64 { 1309 return ErrIntOverflow 1310 } 1311 if iNdEx >= l { 1312 return io.ErrUnexpectedEOF 1313 } 1314 b := dAtA[iNdEx] 1315 iNdEx++ 1316 msglen |= int(b&0x7F) << shift 1317 if b < 0x80 { 1318 break 1319 } 1320 } 1321 if msglen < 0 { 1322 return ErrInvalidLength 1323 } 1324 postIndex := iNdEx + msglen 1325 if postIndex < 0 { 1326 return ErrInvalidLength 1327 } 1328 if postIndex > l { 1329 return io.ErrUnexpectedEOF 1330 } 1331 if m.PeriodType == nil { 1332 m.PeriodType = &ValueType{} 1333 } 1334 if err := m.PeriodType.UnmarshalVT(dAtA[iNdEx:postIndex]); err != nil { 1335 return err 1336 } 1337 iNdEx = postIndex 1338 case 12: 1339 if wireType != 0 { 1340 return fmt.Errorf("proto: wrong wireType = %d for field Period", wireType) 1341 } 1342 m.Period = 0 1343 for shift := uint(0); ; shift += 7 { 1344 if shift >= 64 { 1345 return ErrIntOverflow 1346 } 1347 if iNdEx >= l { 1348 return io.ErrUnexpectedEOF 1349 } 1350 b := dAtA[iNdEx] 1351 iNdEx++ 1352 m.Period |= int64(b&0x7F) << shift 1353 if b < 0x80 { 1354 break 1355 } 1356 } 1357 case 13: 1358 if wireType == 0 { 1359 var v int64 1360 for shift := uint(0); ; shift += 7 { 1361 if shift >= 64 { 1362 return ErrIntOverflow 1363 } 1364 if iNdEx >= l { 1365 return io.ErrUnexpectedEOF 1366 } 1367 b := dAtA[iNdEx] 1368 iNdEx++ 1369 v |= int64(b&0x7F) << shift 1370 if b < 0x80 { 1371 break 1372 } 1373 } 1374 m.Comment = append(m.Comment, v) 1375 } else if wireType == 2 { 1376 var packedLen int 1377 for shift := uint(0); ; shift += 7 { 1378 if shift >= 64 { 1379 return ErrIntOverflow 1380 } 1381 if iNdEx >= l { 1382 return io.ErrUnexpectedEOF 1383 } 1384 b := dAtA[iNdEx] 1385 iNdEx++ 1386 packedLen |= int(b&0x7F) << shift 1387 if b < 0x80 { 1388 break 1389 } 1390 } 1391 if packedLen < 0 { 1392 return ErrInvalidLength 1393 } 1394 postIndex := iNdEx + packedLen 1395 if postIndex < 0 { 1396 return ErrInvalidLength 1397 } 1398 if postIndex > l { 1399 return io.ErrUnexpectedEOF 1400 } 1401 var elementCount int 1402 var count int 1403 for _, integer := range dAtA[iNdEx:postIndex] { 1404 if integer < 128 { 1405 count++ 1406 } 1407 } 1408 elementCount = count 1409 if elementCount != 0 && len(m.Comment) == 0 && cap(m.Comment) < elementCount { 1410 m.Comment = make([]int64, 0, elementCount) 1411 } 1412 for iNdEx < postIndex { 1413 var v int64 1414 for shift := uint(0); ; shift += 7 { 1415 if shift >= 64 { 1416 return ErrIntOverflow 1417 } 1418 if iNdEx >= l { 1419 return io.ErrUnexpectedEOF 1420 } 1421 b := dAtA[iNdEx] 1422 iNdEx++ 1423 v |= int64(b&0x7F) << shift 1424 if b < 0x80 { 1425 break 1426 } 1427 } 1428 m.Comment = append(m.Comment, v) 1429 } 1430 } else { 1431 return fmt.Errorf("proto: wrong wireType = %d for field Comment", wireType) 1432 } 1433 case 14: 1434 if wireType != 0 { 1435 return fmt.Errorf("proto: wrong wireType = %d for field DefaultSampleType", wireType) 1436 } 1437 m.DefaultSampleType = 0 1438 for shift := uint(0); ; shift += 7 { 1439 if shift >= 64 { 1440 return ErrIntOverflow 1441 } 1442 if iNdEx >= l { 1443 return io.ErrUnexpectedEOF 1444 } 1445 b := dAtA[iNdEx] 1446 iNdEx++ 1447 m.DefaultSampleType |= int64(b&0x7F) << shift 1448 if b < 0x80 { 1449 break 1450 } 1451 } 1452 default: 1453 iNdEx = preIndex 1454 skippy, err := skip(dAtA[iNdEx:]) 1455 if err != nil { 1456 return err 1457 } 1458 if (skippy < 0) || (iNdEx+skippy) < 0 { 1459 return ErrInvalidLength 1460 } 1461 if (iNdEx + skippy) > l { 1462 return io.ErrUnexpectedEOF 1463 } 1464 m.unknownFields = append(m.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) 1465 iNdEx += skippy 1466 } 1467 } 1468 1469 if iNdEx > l { 1470 return io.ErrUnexpectedEOF 1471 } 1472 return nil 1473 } 1474 func (m *ValueType) UnmarshalVT(dAtA []byte) error { 1475 l := len(dAtA) 1476 iNdEx := 0 1477 for iNdEx < l { 1478 preIndex := iNdEx 1479 var wire uint64 1480 for shift := uint(0); ; shift += 7 { 1481 if shift >= 64 { 1482 return ErrIntOverflow 1483 } 1484 if iNdEx >= l { 1485 return io.ErrUnexpectedEOF 1486 } 1487 b := dAtA[iNdEx] 1488 iNdEx++ 1489 wire |= uint64(b&0x7F) << shift 1490 if b < 0x80 { 1491 break 1492 } 1493 } 1494 fieldNum := int32(wire >> 3) 1495 wireType := int(wire & 0x7) 1496 if wireType == 4 { 1497 return fmt.Errorf("proto: ValueType: wiretype end group for non-group") 1498 } 1499 if fieldNum <= 0 { 1500 return fmt.Errorf("proto: ValueType: illegal tag %d (wire type %d)", fieldNum, wire) 1501 } 1502 switch fieldNum { 1503 case 1: 1504 if wireType != 0 { 1505 return fmt.Errorf("proto: wrong wireType = %d for field Type", wireType) 1506 } 1507 m.Type = 0 1508 for shift := uint(0); ; shift += 7 { 1509 if shift >= 64 { 1510 return ErrIntOverflow 1511 } 1512 if iNdEx >= l { 1513 return io.ErrUnexpectedEOF 1514 } 1515 b := dAtA[iNdEx] 1516 iNdEx++ 1517 m.Type |= int64(b&0x7F) << shift 1518 if b < 0x80 { 1519 break 1520 } 1521 } 1522 case 2: 1523 if wireType != 0 { 1524 return fmt.Errorf("proto: wrong wireType = %d for field Unit", wireType) 1525 } 1526 m.Unit = 0 1527 for shift := uint(0); ; shift += 7 { 1528 if shift >= 64 { 1529 return ErrIntOverflow 1530 } 1531 if iNdEx >= l { 1532 return io.ErrUnexpectedEOF 1533 } 1534 b := dAtA[iNdEx] 1535 iNdEx++ 1536 m.Unit |= int64(b&0x7F) << shift 1537 if b < 0x80 { 1538 break 1539 } 1540 } 1541 default: 1542 iNdEx = preIndex 1543 skippy, err := skip(dAtA[iNdEx:]) 1544 if err != nil { 1545 return err 1546 } 1547 if (skippy < 0) || (iNdEx+skippy) < 0 { 1548 return ErrInvalidLength 1549 } 1550 if (iNdEx + skippy) > l { 1551 return io.ErrUnexpectedEOF 1552 } 1553 m.unknownFields = append(m.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) 1554 iNdEx += skippy 1555 } 1556 } 1557 1558 if iNdEx > l { 1559 return io.ErrUnexpectedEOF 1560 } 1561 return nil 1562 } 1563 func (m *Sample) UnmarshalVT(dAtA []byte) error { 1564 l := len(dAtA) 1565 iNdEx := 0 1566 for iNdEx < l { 1567 preIndex := iNdEx 1568 var wire uint64 1569 for shift := uint(0); ; shift += 7 { 1570 if shift >= 64 { 1571 return ErrIntOverflow 1572 } 1573 if iNdEx >= l { 1574 return io.ErrUnexpectedEOF 1575 } 1576 b := dAtA[iNdEx] 1577 iNdEx++ 1578 wire |= uint64(b&0x7F) << shift 1579 if b < 0x80 { 1580 break 1581 } 1582 } 1583 fieldNum := int32(wire >> 3) 1584 wireType := int(wire & 0x7) 1585 if wireType == 4 { 1586 return fmt.Errorf("proto: Sample: wiretype end group for non-group") 1587 } 1588 if fieldNum <= 0 { 1589 return fmt.Errorf("proto: Sample: illegal tag %d (wire type %d)", fieldNum, wire) 1590 } 1591 switch fieldNum { 1592 case 1: 1593 if wireType == 0 { 1594 var v uint64 1595 for shift := uint(0); ; shift += 7 { 1596 if shift >= 64 { 1597 return ErrIntOverflow 1598 } 1599 if iNdEx >= l { 1600 return io.ErrUnexpectedEOF 1601 } 1602 b := dAtA[iNdEx] 1603 iNdEx++ 1604 v |= uint64(b&0x7F) << shift 1605 if b < 0x80 { 1606 break 1607 } 1608 } 1609 m.LocationId = append(m.LocationId, v) 1610 } else if wireType == 2 { 1611 var packedLen int 1612 for shift := uint(0); ; shift += 7 { 1613 if shift >= 64 { 1614 return ErrIntOverflow 1615 } 1616 if iNdEx >= l { 1617 return io.ErrUnexpectedEOF 1618 } 1619 b := dAtA[iNdEx] 1620 iNdEx++ 1621 packedLen |= int(b&0x7F) << shift 1622 if b < 0x80 { 1623 break 1624 } 1625 } 1626 if packedLen < 0 { 1627 return ErrInvalidLength 1628 } 1629 postIndex := iNdEx + packedLen 1630 if postIndex < 0 { 1631 return ErrInvalidLength 1632 } 1633 if postIndex > l { 1634 return io.ErrUnexpectedEOF 1635 } 1636 var elementCount int 1637 var count int 1638 for _, integer := range dAtA[iNdEx:postIndex] { 1639 if integer < 128 { 1640 count++ 1641 } 1642 } 1643 elementCount = count 1644 if elementCount != 0 && len(m.LocationId) == 0 { 1645 m.LocationId = make([]uint64, 0, elementCount) 1646 } 1647 for iNdEx < postIndex { 1648 var v uint64 1649 for shift := uint(0); ; shift += 7 { 1650 if shift >= 64 { 1651 return ErrIntOverflow 1652 } 1653 if iNdEx >= l { 1654 return io.ErrUnexpectedEOF 1655 } 1656 b := dAtA[iNdEx] 1657 iNdEx++ 1658 v |= uint64(b&0x7F) << shift 1659 if b < 0x80 { 1660 break 1661 } 1662 } 1663 m.LocationId = append(m.LocationId, v) 1664 } 1665 } else { 1666 return fmt.Errorf("proto: wrong wireType = %d for field LocationId", wireType) 1667 } 1668 case 2: 1669 if wireType == 0 { 1670 var v int64 1671 for shift := uint(0); ; shift += 7 { 1672 if shift >= 64 { 1673 return ErrIntOverflow 1674 } 1675 if iNdEx >= l { 1676 return io.ErrUnexpectedEOF 1677 } 1678 b := dAtA[iNdEx] 1679 iNdEx++ 1680 v |= int64(b&0x7F) << shift 1681 if b < 0x80 { 1682 break 1683 } 1684 } 1685 m.Value = append(m.Value, v) 1686 } else if wireType == 2 { 1687 var packedLen int 1688 for shift := uint(0); ; shift += 7 { 1689 if shift >= 64 { 1690 return ErrIntOverflow 1691 } 1692 if iNdEx >= l { 1693 return io.ErrUnexpectedEOF 1694 } 1695 b := dAtA[iNdEx] 1696 iNdEx++ 1697 packedLen |= int(b&0x7F) << shift 1698 if b < 0x80 { 1699 break 1700 } 1701 } 1702 if packedLen < 0 { 1703 return ErrInvalidLength 1704 } 1705 postIndex := iNdEx + packedLen 1706 if postIndex < 0 { 1707 return ErrInvalidLength 1708 } 1709 if postIndex > l { 1710 return io.ErrUnexpectedEOF 1711 } 1712 var elementCount int 1713 var count int 1714 for _, integer := range dAtA[iNdEx:postIndex] { 1715 if integer < 128 { 1716 count++ 1717 } 1718 } 1719 elementCount = count 1720 if elementCount != 0 && len(m.Value) == 0 { 1721 m.Value = make([]int64, 0, elementCount) 1722 } 1723 for iNdEx < postIndex { 1724 var v int64 1725 for shift := uint(0); ; shift += 7 { 1726 if shift >= 64 { 1727 return ErrIntOverflow 1728 } 1729 if iNdEx >= l { 1730 return io.ErrUnexpectedEOF 1731 } 1732 b := dAtA[iNdEx] 1733 iNdEx++ 1734 v |= int64(b&0x7F) << shift 1735 if b < 0x80 { 1736 break 1737 } 1738 } 1739 m.Value = append(m.Value, v) 1740 } 1741 } else { 1742 return fmt.Errorf("proto: wrong wireType = %d for field Value", wireType) 1743 } 1744 case 3: 1745 if wireType != 2 { 1746 return fmt.Errorf("proto: wrong wireType = %d for field Label", wireType) 1747 } 1748 var msglen int 1749 for shift := uint(0); ; shift += 7 { 1750 if shift >= 64 { 1751 return ErrIntOverflow 1752 } 1753 if iNdEx >= l { 1754 return io.ErrUnexpectedEOF 1755 } 1756 b := dAtA[iNdEx] 1757 iNdEx++ 1758 msglen |= int(b&0x7F) << shift 1759 if b < 0x80 { 1760 break 1761 } 1762 } 1763 if msglen < 0 { 1764 return ErrInvalidLength 1765 } 1766 postIndex := iNdEx + msglen 1767 if postIndex < 0 { 1768 return ErrInvalidLength 1769 } 1770 if postIndex > l { 1771 return io.ErrUnexpectedEOF 1772 } 1773 m.Label = append(m.Label, &Label{}) 1774 if err := m.Label[len(m.Label)-1].UnmarshalVT(dAtA[iNdEx:postIndex]); err != nil { 1775 return err 1776 } 1777 iNdEx = postIndex 1778 default: 1779 iNdEx = preIndex 1780 skippy, err := skip(dAtA[iNdEx:]) 1781 if err != nil { 1782 return err 1783 } 1784 if (skippy < 0) || (iNdEx+skippy) < 0 { 1785 return ErrInvalidLength 1786 } 1787 if (iNdEx + skippy) > l { 1788 return io.ErrUnexpectedEOF 1789 } 1790 m.unknownFields = append(m.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) 1791 iNdEx += skippy 1792 } 1793 } 1794 1795 if iNdEx > l { 1796 return io.ErrUnexpectedEOF 1797 } 1798 return nil 1799 } 1800 func (m *Label) UnmarshalVT(dAtA []byte) error { 1801 l := len(dAtA) 1802 iNdEx := 0 1803 for iNdEx < l { 1804 preIndex := iNdEx 1805 var wire uint64 1806 for shift := uint(0); ; shift += 7 { 1807 if shift >= 64 { 1808 return ErrIntOverflow 1809 } 1810 if iNdEx >= l { 1811 return io.ErrUnexpectedEOF 1812 } 1813 b := dAtA[iNdEx] 1814 iNdEx++ 1815 wire |= uint64(b&0x7F) << shift 1816 if b < 0x80 { 1817 break 1818 } 1819 } 1820 fieldNum := int32(wire >> 3) 1821 wireType := int(wire & 0x7) 1822 if wireType == 4 { 1823 return fmt.Errorf("proto: Label: wiretype end group for non-group") 1824 } 1825 if fieldNum <= 0 { 1826 return fmt.Errorf("proto: Label: illegal tag %d (wire type %d)", fieldNum, wire) 1827 } 1828 switch fieldNum { 1829 case 1: 1830 if wireType != 0 { 1831 return fmt.Errorf("proto: wrong wireType = %d for field Key", wireType) 1832 } 1833 m.Key = 0 1834 for shift := uint(0); ; shift += 7 { 1835 if shift >= 64 { 1836 return ErrIntOverflow 1837 } 1838 if iNdEx >= l { 1839 return io.ErrUnexpectedEOF 1840 } 1841 b := dAtA[iNdEx] 1842 iNdEx++ 1843 m.Key |= int64(b&0x7F) << shift 1844 if b < 0x80 { 1845 break 1846 } 1847 } 1848 case 2: 1849 if wireType != 0 { 1850 return fmt.Errorf("proto: wrong wireType = %d for field Str", wireType) 1851 } 1852 m.Str = 0 1853 for shift := uint(0); ; shift += 7 { 1854 if shift >= 64 { 1855 return ErrIntOverflow 1856 } 1857 if iNdEx >= l { 1858 return io.ErrUnexpectedEOF 1859 } 1860 b := dAtA[iNdEx] 1861 iNdEx++ 1862 m.Str |= int64(b&0x7F) << shift 1863 if b < 0x80 { 1864 break 1865 } 1866 } 1867 case 3: 1868 if wireType != 0 { 1869 return fmt.Errorf("proto: wrong wireType = %d for field Num", wireType) 1870 } 1871 m.Num = 0 1872 for shift := uint(0); ; shift += 7 { 1873 if shift >= 64 { 1874 return ErrIntOverflow 1875 } 1876 if iNdEx >= l { 1877 return io.ErrUnexpectedEOF 1878 } 1879 b := dAtA[iNdEx] 1880 iNdEx++ 1881 m.Num |= int64(b&0x7F) << shift 1882 if b < 0x80 { 1883 break 1884 } 1885 } 1886 case 4: 1887 if wireType != 0 { 1888 return fmt.Errorf("proto: wrong wireType = %d for field NumUnit", wireType) 1889 } 1890 m.NumUnit = 0 1891 for shift := uint(0); ; shift += 7 { 1892 if shift >= 64 { 1893 return ErrIntOverflow 1894 } 1895 if iNdEx >= l { 1896 return io.ErrUnexpectedEOF 1897 } 1898 b := dAtA[iNdEx] 1899 iNdEx++ 1900 m.NumUnit |= int64(b&0x7F) << shift 1901 if b < 0x80 { 1902 break 1903 } 1904 } 1905 default: 1906 iNdEx = preIndex 1907 skippy, err := skip(dAtA[iNdEx:]) 1908 if err != nil { 1909 return err 1910 } 1911 if (skippy < 0) || (iNdEx+skippy) < 0 { 1912 return ErrInvalidLength 1913 } 1914 if (iNdEx + skippy) > l { 1915 return io.ErrUnexpectedEOF 1916 } 1917 m.unknownFields = append(m.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) 1918 iNdEx += skippy 1919 } 1920 } 1921 1922 if iNdEx > l { 1923 return io.ErrUnexpectedEOF 1924 } 1925 return nil 1926 } 1927 func (m *Mapping) UnmarshalVT(dAtA []byte) error { 1928 l := len(dAtA) 1929 iNdEx := 0 1930 for iNdEx < l { 1931 preIndex := iNdEx 1932 var wire uint64 1933 for shift := uint(0); ; shift += 7 { 1934 if shift >= 64 { 1935 return ErrIntOverflow 1936 } 1937 if iNdEx >= l { 1938 return io.ErrUnexpectedEOF 1939 } 1940 b := dAtA[iNdEx] 1941 iNdEx++ 1942 wire |= uint64(b&0x7F) << shift 1943 if b < 0x80 { 1944 break 1945 } 1946 } 1947 fieldNum := int32(wire >> 3) 1948 wireType := int(wire & 0x7) 1949 if wireType == 4 { 1950 return fmt.Errorf("proto: Mapping: wiretype end group for non-group") 1951 } 1952 if fieldNum <= 0 { 1953 return fmt.Errorf("proto: Mapping: illegal tag %d (wire type %d)", fieldNum, wire) 1954 } 1955 switch fieldNum { 1956 case 1: 1957 if wireType != 0 { 1958 return fmt.Errorf("proto: wrong wireType = %d for field Id", wireType) 1959 } 1960 m.Id = 0 1961 for shift := uint(0); ; shift += 7 { 1962 if shift >= 64 { 1963 return ErrIntOverflow 1964 } 1965 if iNdEx >= l { 1966 return io.ErrUnexpectedEOF 1967 } 1968 b := dAtA[iNdEx] 1969 iNdEx++ 1970 m.Id |= uint64(b&0x7F) << shift 1971 if b < 0x80 { 1972 break 1973 } 1974 } 1975 case 2: 1976 if wireType != 0 { 1977 return fmt.Errorf("proto: wrong wireType = %d for field MemoryStart", wireType) 1978 } 1979 m.MemoryStart = 0 1980 for shift := uint(0); ; shift += 7 { 1981 if shift >= 64 { 1982 return ErrIntOverflow 1983 } 1984 if iNdEx >= l { 1985 return io.ErrUnexpectedEOF 1986 } 1987 b := dAtA[iNdEx] 1988 iNdEx++ 1989 m.MemoryStart |= uint64(b&0x7F) << shift 1990 if b < 0x80 { 1991 break 1992 } 1993 } 1994 case 3: 1995 if wireType != 0 { 1996 return fmt.Errorf("proto: wrong wireType = %d for field MemoryLimit", wireType) 1997 } 1998 m.MemoryLimit = 0 1999 for shift := uint(0); ; shift += 7 { 2000 if shift >= 64 { 2001 return ErrIntOverflow 2002 } 2003 if iNdEx >= l { 2004 return io.ErrUnexpectedEOF 2005 } 2006 b := dAtA[iNdEx] 2007 iNdEx++ 2008 m.MemoryLimit |= uint64(b&0x7F) << shift 2009 if b < 0x80 { 2010 break 2011 } 2012 } 2013 case 4: 2014 if wireType != 0 { 2015 return fmt.Errorf("proto: wrong wireType = %d for field FileOffset", wireType) 2016 } 2017 m.FileOffset = 0 2018 for shift := uint(0); ; shift += 7 { 2019 if shift >= 64 { 2020 return ErrIntOverflow 2021 } 2022 if iNdEx >= l { 2023 return io.ErrUnexpectedEOF 2024 } 2025 b := dAtA[iNdEx] 2026 iNdEx++ 2027 m.FileOffset |= uint64(b&0x7F) << shift 2028 if b < 0x80 { 2029 break 2030 } 2031 } 2032 case 5: 2033 if wireType != 0 { 2034 return fmt.Errorf("proto: wrong wireType = %d for field Filename", wireType) 2035 } 2036 m.Filename = 0 2037 for shift := uint(0); ; shift += 7 { 2038 if shift >= 64 { 2039 return ErrIntOverflow 2040 } 2041 if iNdEx >= l { 2042 return io.ErrUnexpectedEOF 2043 } 2044 b := dAtA[iNdEx] 2045 iNdEx++ 2046 m.Filename |= int64(b&0x7F) << shift 2047 if b < 0x80 { 2048 break 2049 } 2050 } 2051 case 6: 2052 if wireType != 0 { 2053 return fmt.Errorf("proto: wrong wireType = %d for field BuildId", wireType) 2054 } 2055 m.BuildId = 0 2056 for shift := uint(0); ; shift += 7 { 2057 if shift >= 64 { 2058 return ErrIntOverflow 2059 } 2060 if iNdEx >= l { 2061 return io.ErrUnexpectedEOF 2062 } 2063 b := dAtA[iNdEx] 2064 iNdEx++ 2065 m.BuildId |= int64(b&0x7F) << shift 2066 if b < 0x80 { 2067 break 2068 } 2069 } 2070 case 7: 2071 if wireType != 0 { 2072 return fmt.Errorf("proto: wrong wireType = %d for field HasFunctions", wireType) 2073 } 2074 var v int 2075 for shift := uint(0); ; shift += 7 { 2076 if shift >= 64 { 2077 return ErrIntOverflow 2078 } 2079 if iNdEx >= l { 2080 return io.ErrUnexpectedEOF 2081 } 2082 b := dAtA[iNdEx] 2083 iNdEx++ 2084 v |= int(b&0x7F) << shift 2085 if b < 0x80 { 2086 break 2087 } 2088 } 2089 m.HasFunctions = bool(v != 0) 2090 case 8: 2091 if wireType != 0 { 2092 return fmt.Errorf("proto: wrong wireType = %d for field HasFilenames", wireType) 2093 } 2094 var v int 2095 for shift := uint(0); ; shift += 7 { 2096 if shift >= 64 { 2097 return ErrIntOverflow 2098 } 2099 if iNdEx >= l { 2100 return io.ErrUnexpectedEOF 2101 } 2102 b := dAtA[iNdEx] 2103 iNdEx++ 2104 v |= int(b&0x7F) << shift 2105 if b < 0x80 { 2106 break 2107 } 2108 } 2109 m.HasFilenames = bool(v != 0) 2110 case 9: 2111 if wireType != 0 { 2112 return fmt.Errorf("proto: wrong wireType = %d for field HasLineNumbers", wireType) 2113 } 2114 var v int 2115 for shift := uint(0); ; shift += 7 { 2116 if shift >= 64 { 2117 return ErrIntOverflow 2118 } 2119 if iNdEx >= l { 2120 return io.ErrUnexpectedEOF 2121 } 2122 b := dAtA[iNdEx] 2123 iNdEx++ 2124 v |= int(b&0x7F) << shift 2125 if b < 0x80 { 2126 break 2127 } 2128 } 2129 m.HasLineNumbers = bool(v != 0) 2130 case 10: 2131 if wireType != 0 { 2132 return fmt.Errorf("proto: wrong wireType = %d for field HasInlineFrames", wireType) 2133 } 2134 var v int 2135 for shift := uint(0); ; shift += 7 { 2136 if shift >= 64 { 2137 return ErrIntOverflow 2138 } 2139 if iNdEx >= l { 2140 return io.ErrUnexpectedEOF 2141 } 2142 b := dAtA[iNdEx] 2143 iNdEx++ 2144 v |= int(b&0x7F) << shift 2145 if b < 0x80 { 2146 break 2147 } 2148 } 2149 m.HasInlineFrames = bool(v != 0) 2150 default: 2151 iNdEx = preIndex 2152 skippy, err := skip(dAtA[iNdEx:]) 2153 if err != nil { 2154 return err 2155 } 2156 if (skippy < 0) || (iNdEx+skippy) < 0 { 2157 return ErrInvalidLength 2158 } 2159 if (iNdEx + skippy) > l { 2160 return io.ErrUnexpectedEOF 2161 } 2162 m.unknownFields = append(m.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) 2163 iNdEx += skippy 2164 } 2165 } 2166 2167 if iNdEx > l { 2168 return io.ErrUnexpectedEOF 2169 } 2170 return nil 2171 } 2172 func (m *Location) UnmarshalVT(dAtA []byte) error { 2173 l := len(dAtA) 2174 iNdEx := 0 2175 for iNdEx < l { 2176 preIndex := iNdEx 2177 var wire uint64 2178 for shift := uint(0); ; shift += 7 { 2179 if shift >= 64 { 2180 return ErrIntOverflow 2181 } 2182 if iNdEx >= l { 2183 return io.ErrUnexpectedEOF 2184 } 2185 b := dAtA[iNdEx] 2186 iNdEx++ 2187 wire |= uint64(b&0x7F) << shift 2188 if b < 0x80 { 2189 break 2190 } 2191 } 2192 fieldNum := int32(wire >> 3) 2193 wireType := int(wire & 0x7) 2194 if wireType == 4 { 2195 return fmt.Errorf("proto: Location: wiretype end group for non-group") 2196 } 2197 if fieldNum <= 0 { 2198 return fmt.Errorf("proto: Location: illegal tag %d (wire type %d)", fieldNum, wire) 2199 } 2200 switch fieldNum { 2201 case 1: 2202 if wireType != 0 { 2203 return fmt.Errorf("proto: wrong wireType = %d for field Id", wireType) 2204 } 2205 m.Id = 0 2206 for shift := uint(0); ; shift += 7 { 2207 if shift >= 64 { 2208 return ErrIntOverflow 2209 } 2210 if iNdEx >= l { 2211 return io.ErrUnexpectedEOF 2212 } 2213 b := dAtA[iNdEx] 2214 iNdEx++ 2215 m.Id |= uint64(b&0x7F) << shift 2216 if b < 0x80 { 2217 break 2218 } 2219 } 2220 case 2: 2221 if wireType != 0 { 2222 return fmt.Errorf("proto: wrong wireType = %d for field MappingId", wireType) 2223 } 2224 m.MappingId = 0 2225 for shift := uint(0); ; shift += 7 { 2226 if shift >= 64 { 2227 return ErrIntOverflow 2228 } 2229 if iNdEx >= l { 2230 return io.ErrUnexpectedEOF 2231 } 2232 b := dAtA[iNdEx] 2233 iNdEx++ 2234 m.MappingId |= uint64(b&0x7F) << shift 2235 if b < 0x80 { 2236 break 2237 } 2238 } 2239 case 3: 2240 if wireType != 0 { 2241 return fmt.Errorf("proto: wrong wireType = %d for field Address", wireType) 2242 } 2243 m.Address = 0 2244 for shift := uint(0); ; shift += 7 { 2245 if shift >= 64 { 2246 return ErrIntOverflow 2247 } 2248 if iNdEx >= l { 2249 return io.ErrUnexpectedEOF 2250 } 2251 b := dAtA[iNdEx] 2252 iNdEx++ 2253 m.Address |= uint64(b&0x7F) << shift 2254 if b < 0x80 { 2255 break 2256 } 2257 } 2258 case 4: 2259 if wireType != 2 { 2260 return fmt.Errorf("proto: wrong wireType = %d for field Line", wireType) 2261 } 2262 var msglen int 2263 for shift := uint(0); ; shift += 7 { 2264 if shift >= 64 { 2265 return ErrIntOverflow 2266 } 2267 if iNdEx >= l { 2268 return io.ErrUnexpectedEOF 2269 } 2270 b := dAtA[iNdEx] 2271 iNdEx++ 2272 msglen |= int(b&0x7F) << shift 2273 if b < 0x80 { 2274 break 2275 } 2276 } 2277 if msglen < 0 { 2278 return ErrInvalidLength 2279 } 2280 postIndex := iNdEx + msglen 2281 if postIndex < 0 { 2282 return ErrInvalidLength 2283 } 2284 if postIndex > l { 2285 return io.ErrUnexpectedEOF 2286 } 2287 m.Line = append(m.Line, &Line{}) 2288 if err := m.Line[len(m.Line)-1].UnmarshalVT(dAtA[iNdEx:postIndex]); err != nil { 2289 return err 2290 } 2291 iNdEx = postIndex 2292 case 5: 2293 if wireType != 0 { 2294 return fmt.Errorf("proto: wrong wireType = %d for field IsFolded", wireType) 2295 } 2296 var v int 2297 for shift := uint(0); ; shift += 7 { 2298 if shift >= 64 { 2299 return ErrIntOverflow 2300 } 2301 if iNdEx >= l { 2302 return io.ErrUnexpectedEOF 2303 } 2304 b := dAtA[iNdEx] 2305 iNdEx++ 2306 v |= int(b&0x7F) << shift 2307 if b < 0x80 { 2308 break 2309 } 2310 } 2311 m.IsFolded = bool(v != 0) 2312 default: 2313 iNdEx = preIndex 2314 skippy, err := skip(dAtA[iNdEx:]) 2315 if err != nil { 2316 return err 2317 } 2318 if (skippy < 0) || (iNdEx+skippy) < 0 { 2319 return ErrInvalidLength 2320 } 2321 if (iNdEx + skippy) > l { 2322 return io.ErrUnexpectedEOF 2323 } 2324 m.unknownFields = append(m.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) 2325 iNdEx += skippy 2326 } 2327 } 2328 2329 if iNdEx > l { 2330 return io.ErrUnexpectedEOF 2331 } 2332 return nil 2333 } 2334 func (m *Line) UnmarshalVT(dAtA []byte) error { 2335 l := len(dAtA) 2336 iNdEx := 0 2337 for iNdEx < l { 2338 preIndex := iNdEx 2339 var wire uint64 2340 for shift := uint(0); ; shift += 7 { 2341 if shift >= 64 { 2342 return ErrIntOverflow 2343 } 2344 if iNdEx >= l { 2345 return io.ErrUnexpectedEOF 2346 } 2347 b := dAtA[iNdEx] 2348 iNdEx++ 2349 wire |= uint64(b&0x7F) << shift 2350 if b < 0x80 { 2351 break 2352 } 2353 } 2354 fieldNum := int32(wire >> 3) 2355 wireType := int(wire & 0x7) 2356 if wireType == 4 { 2357 return fmt.Errorf("proto: Line: wiretype end group for non-group") 2358 } 2359 if fieldNum <= 0 { 2360 return fmt.Errorf("proto: Line: illegal tag %d (wire type %d)", fieldNum, wire) 2361 } 2362 switch fieldNum { 2363 case 1: 2364 if wireType != 0 { 2365 return fmt.Errorf("proto: wrong wireType = %d for field FunctionId", wireType) 2366 } 2367 m.FunctionId = 0 2368 for shift := uint(0); ; shift += 7 { 2369 if shift >= 64 { 2370 return ErrIntOverflow 2371 } 2372 if iNdEx >= l { 2373 return io.ErrUnexpectedEOF 2374 } 2375 b := dAtA[iNdEx] 2376 iNdEx++ 2377 m.FunctionId |= uint64(b&0x7F) << shift 2378 if b < 0x80 { 2379 break 2380 } 2381 } 2382 case 2: 2383 if wireType != 0 { 2384 return fmt.Errorf("proto: wrong wireType = %d for field Line", wireType) 2385 } 2386 m.Line = 0 2387 for shift := uint(0); ; shift += 7 { 2388 if shift >= 64 { 2389 return ErrIntOverflow 2390 } 2391 if iNdEx >= l { 2392 return io.ErrUnexpectedEOF 2393 } 2394 b := dAtA[iNdEx] 2395 iNdEx++ 2396 m.Line |= int64(b&0x7F) << shift 2397 if b < 0x80 { 2398 break 2399 } 2400 } 2401 default: 2402 iNdEx = preIndex 2403 skippy, err := skip(dAtA[iNdEx:]) 2404 if err != nil { 2405 return err 2406 } 2407 if (skippy < 0) || (iNdEx+skippy) < 0 { 2408 return ErrInvalidLength 2409 } 2410 if (iNdEx + skippy) > l { 2411 return io.ErrUnexpectedEOF 2412 } 2413 m.unknownFields = append(m.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) 2414 iNdEx += skippy 2415 } 2416 } 2417 2418 if iNdEx > l { 2419 return io.ErrUnexpectedEOF 2420 } 2421 return nil 2422 } 2423 func (m *Function) UnmarshalVT(dAtA []byte) error { 2424 l := len(dAtA) 2425 iNdEx := 0 2426 for iNdEx < l { 2427 preIndex := iNdEx 2428 var wire uint64 2429 for shift := uint(0); ; shift += 7 { 2430 if shift >= 64 { 2431 return ErrIntOverflow 2432 } 2433 if iNdEx >= l { 2434 return io.ErrUnexpectedEOF 2435 } 2436 b := dAtA[iNdEx] 2437 iNdEx++ 2438 wire |= uint64(b&0x7F) << shift 2439 if b < 0x80 { 2440 break 2441 } 2442 } 2443 fieldNum := int32(wire >> 3) 2444 wireType := int(wire & 0x7) 2445 if wireType == 4 { 2446 return fmt.Errorf("proto: Function: wiretype end group for non-group") 2447 } 2448 if fieldNum <= 0 { 2449 return fmt.Errorf("proto: Function: illegal tag %d (wire type %d)", fieldNum, wire) 2450 } 2451 switch fieldNum { 2452 case 1: 2453 if wireType != 0 { 2454 return fmt.Errorf("proto: wrong wireType = %d for field Id", wireType) 2455 } 2456 m.Id = 0 2457 for shift := uint(0); ; shift += 7 { 2458 if shift >= 64 { 2459 return ErrIntOverflow 2460 } 2461 if iNdEx >= l { 2462 return io.ErrUnexpectedEOF 2463 } 2464 b := dAtA[iNdEx] 2465 iNdEx++ 2466 m.Id |= uint64(b&0x7F) << shift 2467 if b < 0x80 { 2468 break 2469 } 2470 } 2471 case 2: 2472 if wireType != 0 { 2473 return fmt.Errorf("proto: wrong wireType = %d for field Name", wireType) 2474 } 2475 m.Name = 0 2476 for shift := uint(0); ; shift += 7 { 2477 if shift >= 64 { 2478 return ErrIntOverflow 2479 } 2480 if iNdEx >= l { 2481 return io.ErrUnexpectedEOF 2482 } 2483 b := dAtA[iNdEx] 2484 iNdEx++ 2485 m.Name |= int64(b&0x7F) << shift 2486 if b < 0x80 { 2487 break 2488 } 2489 } 2490 case 3: 2491 if wireType != 0 { 2492 return fmt.Errorf("proto: wrong wireType = %d for field SystemName", wireType) 2493 } 2494 m.SystemName = 0 2495 for shift := uint(0); ; shift += 7 { 2496 if shift >= 64 { 2497 return ErrIntOverflow 2498 } 2499 if iNdEx >= l { 2500 return io.ErrUnexpectedEOF 2501 } 2502 b := dAtA[iNdEx] 2503 iNdEx++ 2504 m.SystemName |= int64(b&0x7F) << shift 2505 if b < 0x80 { 2506 break 2507 } 2508 } 2509 case 4: 2510 if wireType != 0 { 2511 return fmt.Errorf("proto: wrong wireType = %d for field Filename", wireType) 2512 } 2513 m.Filename = 0 2514 for shift := uint(0); ; shift += 7 { 2515 if shift >= 64 { 2516 return ErrIntOverflow 2517 } 2518 if iNdEx >= l { 2519 return io.ErrUnexpectedEOF 2520 } 2521 b := dAtA[iNdEx] 2522 iNdEx++ 2523 m.Filename |= int64(b&0x7F) << shift 2524 if b < 0x80 { 2525 break 2526 } 2527 } 2528 case 5: 2529 if wireType != 0 { 2530 return fmt.Errorf("proto: wrong wireType = %d for field StartLine", wireType) 2531 } 2532 m.StartLine = 0 2533 for shift := uint(0); ; shift += 7 { 2534 if shift >= 64 { 2535 return ErrIntOverflow 2536 } 2537 if iNdEx >= l { 2538 return io.ErrUnexpectedEOF 2539 } 2540 b := dAtA[iNdEx] 2541 iNdEx++ 2542 m.StartLine |= int64(b&0x7F) << shift 2543 if b < 0x80 { 2544 break 2545 } 2546 } 2547 default: 2548 iNdEx = preIndex 2549 skippy, err := skip(dAtA[iNdEx:]) 2550 if err != nil { 2551 return err 2552 } 2553 if (skippy < 0) || (iNdEx+skippy) < 0 { 2554 return ErrInvalidLength 2555 } 2556 if (iNdEx + skippy) > l { 2557 return io.ErrUnexpectedEOF 2558 } 2559 m.unknownFields = append(m.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) 2560 iNdEx += skippy 2561 } 2562 } 2563 2564 if iNdEx > l { 2565 return io.ErrUnexpectedEOF 2566 } 2567 return nil 2568 } 2569 func skip(dAtA []byte) (n int, err error) { 2570 l := len(dAtA) 2571 iNdEx := 0 2572 depth := 0 2573 for iNdEx < l { 2574 var wire uint64 2575 for shift := uint(0); ; shift += 7 { 2576 if shift >= 64 { 2577 return 0, ErrIntOverflow 2578 } 2579 if iNdEx >= l { 2580 return 0, io.ErrUnexpectedEOF 2581 } 2582 b := dAtA[iNdEx] 2583 iNdEx++ 2584 wire |= (uint64(b) & 0x7F) << shift 2585 if b < 0x80 { 2586 break 2587 } 2588 } 2589 wireType := int(wire & 0x7) 2590 switch wireType { 2591 case 0: 2592 for shift := uint(0); ; shift += 7 { 2593 if shift >= 64 { 2594 return 0, ErrIntOverflow 2595 } 2596 if iNdEx >= l { 2597 return 0, io.ErrUnexpectedEOF 2598 } 2599 iNdEx++ 2600 if dAtA[iNdEx-1] < 0x80 { 2601 break 2602 } 2603 } 2604 case 1: 2605 iNdEx += 8 2606 case 2: 2607 var length int 2608 for shift := uint(0); ; shift += 7 { 2609 if shift >= 64 { 2610 return 0, ErrIntOverflow 2611 } 2612 if iNdEx >= l { 2613 return 0, io.ErrUnexpectedEOF 2614 } 2615 b := dAtA[iNdEx] 2616 iNdEx++ 2617 length |= (int(b) & 0x7F) << shift 2618 if b < 0x80 { 2619 break 2620 } 2621 } 2622 if length < 0 { 2623 return 0, ErrInvalidLength 2624 } 2625 iNdEx += length 2626 case 3: 2627 depth++ 2628 case 4: 2629 if depth == 0 { 2630 return 0, ErrUnexpectedEndOfGroup 2631 } 2632 depth-- 2633 case 5: 2634 iNdEx += 4 2635 default: 2636 return 0, fmt.Errorf("proto: illegal wireType %d", wireType) 2637 } 2638 if iNdEx < 0 { 2639 return 0, ErrInvalidLength 2640 } 2641 if depth == 0 { 2642 return iNdEx, nil 2643 } 2644 } 2645 return 0, io.ErrUnexpectedEOF 2646 } 2647 2648 var ( 2649 ErrInvalidLength = fmt.Errorf("proto: negative length found during unmarshaling") 2650 ErrIntOverflow = fmt.Errorf("proto: integer overflow") 2651 ErrUnexpectedEndOfGroup = fmt.Errorf("proto: unexpected end of group") 2652 )