Commit Graph

2445 Commits

Author SHA1 Message Date
Feng Xiao
4479076bbd Merge pull request #488 from AustinSchuh/ruby_test_fix
Modified FindRubyTestDir to use GOOGLE_THIRD_PARTY_PROTOBUF
2015-06-15 16:31:17 -07:00
Feng Xiao
9c8db515d5 Add a badge for AppVeyor build.
Change-Id: Ic59d78d699af0e5f50377f83c8a7ea9a78074d81
2015-06-15 15:36:09 -07:00
Jisi Liu
6f56b1a691 Merge pull request #498 from pherl/rmconfig
Remove config.h.include which is no longer needed
2015-06-13 23:56:17 -07:00
Jisi Liu
80da6d3727 Remove the file from Makefile.am
Change-Id: I2015df2409aa95401af658b40023c8f9b9d75068
2015-06-13 11:22:31 -07:00
Jisi Liu
9bbb78f167 Remove config.h.include which is no longer needed as pbconfig.h is not a
generated file now.

Change-Id: I68b397e7fa9248abc93d5c12efd5cd31e380c9ab
2015-06-13 08:47:46 -07:00
Jisi Liu
cf141287ea Merge pull request #495 from pherl/master
Make pbconfig.h independent of config.h
2015-06-13 08:44:19 -07:00
Jisi Liu
f48dca5044 Make pbconfig.h independent of config.h
Change-Id: I31ead985b4ac5b02fb7558d34c1da19fd837b50a
2015-06-13 00:01:09 -07:00
Feng Xiao
52737c2bc8 Add appveyor.xml for windows tests. 2015-06-12 23:41:29 -07:00
Feng Xiao
54a4cccb97 Merge pull request #481 from Qartar/master
Workaround for MSVC's string literal compiler limit.
2015-06-12 14:56:02 -07:00
Feng Xiao
68c8762b98 Merge pull request #489 from tamird/go-package-descriptor
Give descriptor.proto a go package
2015-06-12 13:41:54 -07:00
Qartar
2fe6d7bc57 Workaround for MSVC's string literal compiler limit.
Escape characters don't count for string literal size, no need to pre-generate escape string.

Added unit test to touch enormous cpp generated descriptor.

Updated makefile to include enormous_descriptor.proto

Fixed language compatibility error.
2015-06-12 13:23:09 -07:00
Jon Skeet
fb1547b388 Regenerate proto files 2015-06-12 13:11:54 +01:00
Jon Skeet
a8dae140c6 Fix oneof generator - forgot to provide variables... 2015-06-12 13:11:16 +01:00
Jon Skeet
7532f0256f Reimplement RepeatedField<T> using an array as the backing store.
This is effectively reimplementing List<T>, but with a few advantages:
- We know that an empty repeated field is common, so don't allocate an array until we need to
- With direct access to the array, we can easily convert enum values to int without boxing
- We can relax the restrictions over what happens if the repeated field is modified while iterating, avoiding so much checking

This is somewhat risky, in that reimplementing a building block like this is *always* risky, but hey...
(The performance benefits are significant...)
2015-06-12 13:07:51 +01:00
Jon Skeet
5a33827eec Move Count checks into the serialization code
I wouldn't expect this to affect anything, but it appears to.
2015-06-12 11:52:14 +01:00
Jon Skeet
5685e98711 Simplify ComputeInt32Size to call ComputeInt32SizeNoTag. 2015-06-12 11:47:47 +01:00
Tamir Duberstein
66463d7e4b Give descriptor.proto a go package
This is currently done in golang/protobuf using `sed`. This change
should simplify things.
2015-06-12 06:40:18 -04:00
Jon Skeet
1b71db1180 Optimization of CalculateSize: avoid foreach over empty lists. 2015-06-12 11:19:50 +01:00
Jon Skeet
9b66768e25 Optimization to avoid foreach over empty lists. 2015-06-12 11:19:16 +01:00
Jon Skeet
4352744859 Use Length to check string/bytes fields for emptiness - it's faster than an equality check. 2015-06-12 11:18:37 +01:00
Jon Skeet
8fcde2cabd Fix oneof behaviour in the face of default values. 2015-06-12 11:17:07 +01:00
Jon Skeet
ca2adbd560 Fix incorrect handling of non-seekable streams.
This mirrors commit 7c86bbbc7a in the pull request to
the main protobuf project, but also reduces the size of the buffer created. (There's no point in
creating a 1024-byte buffer if we're only skipping 5 bytes...)
2015-06-12 09:57:04 +01:00
Jon Skeet
eb70bd0b60 Update the AddressBook tutorial to reflect the mutable design. 2015-06-12 09:53:44 +01:00
Jon Skeet
96ddf01aed Coded*Stream streamlining.
Remove ICodedInputStream and ICodedOutputStream, and rewrite CodedInputStream and CodedOutputStream to be specific to the binary format. If we want to support text-based formats, that can be a whole different serialization mechanism.
2015-06-12 09:53:12 +01:00
Jon Skeet
39aaf21d51 Reimplement enums as int values, and get rid of EnumHelper.
This makes repeated fields really awkward at the moment - but when we reimplement RepeatedField<T> to be backed by an array, we can cast the array directly...
2015-06-11 21:15:36 +01:00
Jon Skeet
ce0e348ded Optimize WriteRawInt32 for the common case of a value < 128, which is a single byte.
Aside from anything else, this will be used for all tags for fields 1-15.
2015-06-11 14:32:19 +01:00
Jon Skeet
35e4dbd518 Improve string encoding times.
Cache a reference to Encoding.UTF8 - the property access is (rather surprisingly) significant.
Additionally, when we detect that the string is all ASCII (due to the computed length in bytes being the length in characters), we can perform the encoding very efficiently ourselves.
2015-06-11 14:19:30 +01:00
Austin Schuh
1ecef1a2f5 Modified FindRubyTestDir to use GOOGLE_THIRD_PARTY_PROTOBUF 2015-06-10 23:33:07 -07:00
Jisi Liu
7b35416374 Merge pull request #486 from thomasvl/assets_podspec
Update podspec, rename assets to drop @
2015-06-10 13:17:59 -07:00
Thomas Van Lenten
0f2b4a0e82 Update podspec for files that can build now, rename assets to not need @ in the name. 2015-06-10 14:30:59 -04:00
Feng Xiao
91becaa867 Merge pull request #483 from thomasvl/fixup_travis_2
Remove the OS X checks from travis.sh, instead use excludes
2015-06-10 10:54:32 -07:00
Joshua Haberman
c35ac0789b Merge pull request #477 from haberman/upbupdate
Updated upb to latest version (C89).
2015-06-10 09:04:30 -07:00
Thomas Van Lenten
c4d3638f51 Remove the OS X checks from travis.sh, instead use excludes to not fire up a vm for something we can't test. 2015-06-10 08:51:06 -04:00
Paul Yang
686db5c355 Merge pull request #484 from TeBoring/temp
Update version number of objective-c to 3.0.0-alpha-4-pre
2015-06-09 17:18:50 -07:00
Paul Yang
fb466c13a7 Merge pull request #480 from thomasvl/objc_beta_drop
Beta quality drop of Objective C Support.
2015-06-09 17:17:45 -07:00
Bo Yang
9dd2bc4ea1 Update version number of objective-c to 3.0.0-alpha-4-pre 2015-06-09 16:16:46 -07:00
Jon Skeet
954e720837 Use expression trees to avoid boxing when converting enums. 2015-06-09 19:44:24 +01:00
Jon Skeet
e38294a62d First pass at the mutable API. Quite a bit more to do - in particular, it's pretty slow right now. 2015-06-09 19:30:44 +01:00
Josh Haberman
e3ce451b60 Fixed compiler warnings and added -std=c99.
upb no longer requires -std=c99 but the Ruby/C
code still uses C99 features.
2015-06-09 11:08:25 -07:00
Austin Schuh
fd73235f6b Refactored threadlocal logic.
Refactored the threadlocal logic for Android and IOS into logic in
platform_macro.h which computes a GOOGLE_PROTOBUF_NO_THREADLOCAL
define which is then used elsewhere.  This allows new platforms
without THREADLOCAL to be easily defined.
2015-06-08 18:49:16 -07:00
Josh Haberman
e8ed021ee7 Updated upb to latest version (C89).
Since this version of upb supports C89, all of the
extra compiler flags are no longer required.
2015-06-08 17:56:03 -07:00
Thomas Van Lenten
d846b0b059 Beta quality drop of Objective C Support.
- Add more to the ObjC dir readme.
- Merge the ExtensionField and ExtensionDescriptor to reduce overhead.
- Fix an initialization race.
- Clean up the Xcode schemes.
- Remove the class/enum filter.
- Remove some forced inline that were bloating things without proof of performance wins.
- Rename some internal types to avoid conflicts with the well know types protos.
- Drop the use of ApplyFunctions to the compiler/optimizer can do what it wants.
- Better document some possible future improvements.
- Add missing support for parsing repeated primitive fields in packed or unpacked forms.
- Improve -hash.
- Add *Count for repeated and map<> fields to avoid auto create when checking for them being set.
2015-06-08 17:17:22 -04:00
Feng Xiao
9cbdaedb86 Exclude 3 failing tests on osx from travis. 2015-06-08 13:00:45 -07:00
Feng Xiao
872beb738b Merge pull request #469 from xfxyjwf/vsprojects
Remove vsprojects.
2015-06-08 12:21:49 -07:00
Feng Xiao
3f9be70d06 Merge pull request #361 from brianduff/sync_aosp
Speed up little endian int/long writes.
2015-06-06 00:44:39 -07:00
Feng Xiao
b9baa47eaf Merge pull request #468 from AustinSchuh/unsigned_proto
Marked another compiler literal unsigned.
2015-06-06 00:40:51 -07:00
Feng Xiao
f51f1b7bb6 Merge pull request #467 from AustinSchuh/GOOGLE_PREDICT_FALSE
Fixed bug in GOOGLE_PREDICT_FALSE.
2015-06-06 00:39:12 -07:00
Feng Xiao
ee6b3d5529 Remove vsprojects. 2015-06-05 23:57:01 -07:00
Feng Xiao
dffd542bb8 Update ./update_file_lists.sh.
Make it executable and generate extract_includes.bat in the same directory.
2015-06-05 23:36:05 -07:00
Austin Schuh
307af628e6 Marked another compiler literal unsigned.
When compiling a protobuf with gcc 4.1.2 for powerpc, I ran into
another of the following warning message:

INFO: From Compiling my_proto.pb.cc powerpc-603e-linux-gcc:
bazel-out/local_linux-dbg/genfiles/my_proto.pb.cc: In member
   function `virtual void MyProto::Clear()':
   bazel-out/local_linux-dbg/genfiles/my_proto.pb.cc:223: warning: this
      decimal constant is unsigned only in ISO C90

The line in the proto file that was triggering it was:

  if (_has_bits_[24 / 32] & 4278190080) {
    ZR_(field1_, field2_);
  }

_has_bits_ is a uint32.  The constant mask should therefore be
unsigned.  This change updates the constant to be generated as
unsigned.
2015-06-05 22:46:01 -07:00