Jan Tattermusch
a690227398
Merge pull request #7351 from jtattermusch/protobuf_csharp_new_parsing
...
New Span-based C# parsing logic
2020-05-05 16:57:52 +02:00
Jon Skeet
ed5c874de3
Fix to C# support library code
...
(This was the only use of a HasXyz property for a message type.)
2020-05-01 09:06:44 +01:00
Jon Skeet
9926c9504b
Regenerate C# code based on the previous commit
...
(This removes the Has/Clear members for message types in proto2.)
2020-05-01 09:06:44 +01:00
Jan Tattermusch
7134d25eb8
Merge remote-tracking branch 'upstream/master' into protobuf_csharp_new_parsing
2020-04-27 13:18:07 +02:00
Jon Skeet
97737072f9
Add reflection support for proto3 optional fields
...
This is more involved than might be expected because the synthetic oneofs don't generate the properties we would usually expect to see.
2020-04-24 17:39:14 +01:00
Jon Skeet
bad9d753ae
Add unit tests for proto3 optional fields
...
(This isn't as exhaustive as it might be, but the behavior is basically the same as proto2 optional fields.)
2020-04-24 17:39:14 +01:00
Jon Skeet
b0649a088a
Regenerate C# code with the new generator, adding unittest_proto3_optional.proto
...
The changes in the existing proto2 code are solely around presence bits. The new generator allocated presence bits more efficiently. (Previously bits were sometimes allocated but never used.)
2020-04-24 17:39:14 +01:00
Jan Tattermusch
a1b9aa499e
get rid of extraneous ParserInternalState.codedInputStream field
2020-04-23 16:58:59 +02:00
Jan Tattermusch
eb38a3cdb8
adjust some TODOs in ParsingPrimitives.cs
2020-04-22 10:03:51 +02:00
Jan Tattermusch
dd97af88db
deduplicate ExtensionSet.TryMergeFieldFrom implementation, add test
2020-04-22 09:03:15 +02:00
Jan Tattermusch
cf49962c57
actually use ParsingPrimitives.ReadBytes and ReadString
2020-04-21 16:58:32 +02:00
Jan Tattermusch
d7c1fab00b
add benchmarks for parsing string and bytes
2020-04-21 16:31:32 +02:00
Jan Tattermusch
556cb8dc4b
remove unused internal method
2020-04-21 14:49:12 +02:00
Jan Tattermusch
7f42d7c65b
increase MapField test coverage
2020-04-21 14:44:13 +02:00
Jan Tattermusch
7c74e3901b
deduplicate MapField implementation
2020-04-21 14:32:15 +02:00
Jan Tattermusch
9ca70db2aa
remove a few more TODOs
2020-04-16 13:24:42 +02:00
Jan Tattermusch
a171f6d670
address a few TODOs
2020-04-16 13:02:11 +02:00
Jan Tattermusch
373b9eaeb2
optimize ParseRawLittleEndian32
2020-04-15 18:28:18 +02:00
Jan Tattermusch
17ea4d932f
add LegacyGeneratedCodeTest
2020-04-15 12:45:04 +02:00
Jan Tattermusch
f1d12ac768
also test with ParseContext in CodedInputStream test
2020-04-15 11:26:58 +02:00
Jan Tattermusch
9f00d3279b
add missing assert to CodedInputStreamTest.AssertReadVarint
2020-04-15 10:41:12 +02:00
Jan Tattermusch
238fd35f1d
improve test coverage
2020-04-15 10:08:19 +02:00
Joshua Haberman
74ad62759e
Sync from Piper @306496510
...
PROTOBUF_SYNC_PIPER
2020-04-14 12:55:41 -07:00
Jan Tattermusch
b2d5ceb1f7
speedup parsing multi-segment readOnlySequence
2020-04-14 19:24:19 +02:00
Jan Tattermusch
a980705bdb
attempt to fix CompatibilityTests
2020-04-14 18:16:18 +02:00
Jan Tattermusch
638a0813b4
increase coverage of GeneratedMessageTest
2020-04-14 18:04:47 +02:00
Jan Tattermusch
c2925d5b93
fix C# compatibility tests
2020-04-14 13:06:45 +02:00
Jan Tattermusch
0df7ddc805
regenerate
2020-04-14 12:47:32 +02:00
Jan Tattermusch
d7e2c8387a
change MergeFrom_Internal to InternalMergeFrom
2020-04-14 12:47:32 +02:00
Jan Tattermusch
3936114642
remove newline
2020-04-14 10:44:55 +02:00
James Newton-King
18bfd9e2e5
Fix net45 tests
2020-04-14 10:37:30 +02:00
Jan Tattermusch
07182a843c
optimize initialization of ParseContext
2020-04-14 09:37:59 +02:00
Jan Tattermusch
d17b5115d2
faster initialization of ParserInternalState
2020-04-14 09:37:59 +02:00
Jan Tattermusch
42eff9d640
ParseMessageBenchmark: parsing from ReadOnlySequence
2020-04-14 09:37:59 +02:00
Jan Tattermusch
5f836193c7
ParseRawPrimitivesBenchmark: compare CodedInputStream vs ParseContext
2020-04-14 09:37:59 +02:00
Jan Tattermusch
b2d2915439
make Google.Protobuf internals visible to benchmarks
2020-04-14 09:37:59 +02:00
Jan Tattermusch
3196ef9b5c
regenerate C# protos
2020-04-14 09:37:59 +02:00
Jan Tattermusch
220e7be708
make things build after codegen change
2020-04-14 09:37:58 +02:00
Jan Tattermusch
6d5bc90d48
add ParseFrom(ReadOnlySequence) methods
2020-04-14 09:37:58 +02:00
Jan Tattermusch
ea605381e6
make everything build
2020-04-14 09:37:58 +02:00
Jan Tattermusch
175c96565f
bring in new files
2020-04-14 09:37:57 +02:00
Jan Tattermusch
50e03cdde3
Merge pull request #7360 from jtattermusch/refactor_googlebenchmark
...
Refactor some Protobuf C# microbenchmarks
2020-04-13 17:34:22 +02:00
Jan Tattermusch
4116e65984
improve ParseMessageBenchmark maintainability
2020-04-07 11:56:37 +02:00
Joshua Haberman
503a2116aa
Sync from Piper @305053102
...
PROTOBUF_SYNC_PIPER
2020-04-06 09:57:03 -07:00
Jan Tattermusch
79cfc73293
refactor WrapperBechmark
2020-04-06 18:24:13 +02:00
Jan Tattermusch
a2cbd5a824
serialization benchmark improvements
2020-04-06 17:32:50 +02:00
Joshua Haberman
c649397029
Set execute bit on files if and only if they begin with (#!). ( #7347 )
...
* Set execute bit on files if and only if they begin with (#!).
Git only tracks the 'x' (executable) bit on each file. Prior to this
CL, our files were a random mix of executable and non-executable.
This change imposes some order by making files executable if and only
if they have shebang (#!) lines at the beginning.
We don't have any executable binaries checked into the repo, so
we shouldn't need to worry about that case.
* Added fix_permissions.sh script to set +x iff a file begins with (#!).
2020-04-01 15:28:25 -07:00
Joshua Haberman
9c676d83ea
Regenerated protos with ./generate_descriptor_proto.sh
2020-03-31 16:35:09 -07:00
Jan Tattermusch
f57ae5eac3
Merge pull request #7279 from jtattermusch/ParseRawPrimitivesBenchmark
...
Add benchmark for measuring raw primitive parsing speed
2020-03-12 19:11:39 +01:00
Jan Tattermusch
a0cc0e83cb
Remove unnecessary branch from ReadTag ( #7289 )
...
* Remove unnecesary branch from ReadTag
* address comments
2020-03-11 10:29:37 -07:00