aboutsummaryrefslogtreecommitdiffhomepage
path: root/src
Commit message (Collapse)AuthorAge
* Merge pull request #315 from brianduff/sync_from_aospGravatar Jisi Liu2015-04-29
|\ | | | | Sync nanoproto from AOSP
| * Generate a CREATOR for each Parcelable message.Gravatar Jeff Davidson2015-04-28
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This is less ideal from a dex count perspective because it requires a new variable for each message, and because most apps have proguard rules that will ensure that CREATOR classes are retained. However, it is required to be able to use nano protos inside of AIDL files, as the autogenerated AIDL code fails to compile otherwise. This is a substantial benefit as it allows for backwards-compatible parameters and return types in AIDL methods along the lines of safeparcel. Bug: 19084705 Change-Id: I66a2c0424b96cf8ff6b631b186cc4f9407dfc1f4
| * Inline unknownFieldData{Equals,HashCode} to generated code.Gravatar Brian Duff2015-04-28
| | | | | | | | | | | | | | | | | | | | It turns out dex (apparently) was inlining these protected final methods from ExtendableMessageNano into every message class. Removing these methods from the base class and inlining their code reduces the method count by 2 methods / message when the store_unknown_fields option is on. Change-Id: I0aa09f2016d39939c4c8b8219601793b8fab301f
| * Expose generate_clear as an option.Gravatar Brian Duff2015-04-28
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | I wasn't able to get the clear() method to inline into the constructor when optimizations are on in proguard. As a result, every message has an extra superfluous kept method assuming the app never uses clear() directly. There are a couple of instances where setting this option false is necessary in order to get code dexing successfully without hitting the method limit, e.g. https://goto.google.com/tltzq In this example, I tried turning on the method/inlining/unique and method/inlining/short optimizations before resorting to adding the generate_clear option, but the method count did not decrease. The clear() methods were contributing over a thousand extra methods. Change-Id: If6a9651d6a59cdf70b1040d8248779710ac73105
| * Generate @IntDef annotations for nanoproto enums.Gravatar Jeff Davidson2015-04-28
| | | | | | | | | | | | | | | | | | | | @IntDef is a support library annotation which allows build tools to determine the valid set of values for a given integer field when that field is intended to be restricted like an enum. This avoids the overhead of enums while still allowing for compile-time type checking in most circumstances. Change-Id: Iee02e0b49a8e069f6456572f538e0a0d301fdfd5
| * Add clone() method support for nano.Gravatar Brian Duff2015-04-28
| | | | | | | | | | | | Upstreamed from Another Place (cr/57247854). Change-Id: I2aaf59544c0f5ae21a51891d8a5eeda1dc722c90
| * When no clear() is generated, still initialize fields.Gravatar Brian Duff2015-04-28
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | https://android-review.googlesource.com/#/c/67890/ removed field initialization from the ctor, making it just call clear() instead. When I added the generate_clear option back (as part of the reftypes compat mode) in https://android-review.googlesource.com/#/c/109530/, I forgot to ensure that what clear() used to do was inlined in the constructor. This change fixes NPEs that are happening for users of reftypes_compat_mode who rely on unset repeated fields being empty arrays rather than null. Change-Id: Idb58746c60f4a4054b7ebb5c3b0e76b16ff88184
| * Fix bug with large extension field numbers.Gravatar Brian Duff2015-04-28
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Previously, extensions with field numbers greater than 268435455 would result in a compile time error in generated code that looks something like this: Foo.java:3178: error: integer number too large: 3346754610 3346754610); This is because we were trying to represent the tag number (an unsigned int) using a java int constant, but java int constants are signed, and can't exceed Integer.MAX_VALUE. Fixed by declaring it as a long instead, and casting it down to an int in the implementation. This is safe, because the tag value always fits in 32 bis. Change-Id: If2017bacb4e20af667eaeaf9b65ddc2c30a7709f
* | Include well-known type protos in "make install".Gravatar Feng Xiao2015-04-23
|/
* Include all well-known type protos.Gravatar Feng Xiao2015-04-20
| | | | Change-Id: I122f1cee71a8a739ea603e52582cb0fa9698f0ed
* [PYTHON] Drop dependency on 'google.apputils'.Gravatar Tamir Duberstein2015-04-10
| | | | Use stdlib's 'unittest' instead.
* Change fixture name to be consistentGravatar Tamir Duberstein2015-03-31
| | | | | This fixes the problem where `make check` generates files not ignored by `.gitignore`.
* Delete "SEBS" (aka: Clean up Kenton's old trash)Gravatar Kenton Varda2015-03-26
| | | The file `SEBS` is a build file for a toy build system I was writing in my spare time six years ago, back when I maintained protobufs. Arguably it was never appropriate for me to have placed this file in the protobuf tree, but it was convenient at the time and didn't seem to hurt anything. It clearly doesn't belong here now, though.
* Add OS X to travis; fix tests to pass on OS XGravatar Tamir Duberstein2015-03-18
|
* Merge pull request #228 from cconroy/sanitize-enumsGravatar Jisi Liu2015-03-16
|\ | | | | Sanitize Enum names from collisions with reserved words.
| * Sanitize Enum names from collisions with reserved words.Gravatar Chris Conroy2015-03-16
| |
* | Revert pull request 175: Add support for the TILE-Gx processor family.Gravatar Bo Yang2015-03-14
| |
* | Add a missing proto file.Gravatar Feng Xiao2015-03-13
| | | | | | | | Change-Id: Ic98584616bd6ee49680273f0cdbe6d9c038ec0e9
* | Merge pull request #193 from TeBoring/sbGravatar Paul Yang2015-03-09
|\ \ | | | | | | Implement a feature to generate a dependency file
* | | Fix tile atomicops macro.Gravatar Jisi Liu2015-03-05
| | | | | | | | | | | | Change-Id: I1a3acadd059f87c26a2e26f3b7a169c0780e981e
* | | Merge pull request #175 from martiert/tile-supportGravatar Jisi Liu2015-03-05
|\ \ \ | |_|/ |/| | Add support for the TILE-Gx processor family.
* | | Initialize data members in constructors instead of direct initialize inGravatar Jisi Liu2015-03-01
| | | | | | | | | | | | | | | | | | class definition, which is a C++11 extension. Change-Id: I477fe484d737f4c60c519d68f431940ffaa33431
* | | use is_proto_enum instead of is_enum for repeated accessor field.Gravatar Jisi Liu2015-03-01
| | | | | | | | | | | | | | | | | | | | | The later is not supported by some versions of MSVC and the former is more accurate for the use case. Change-Id: I7096226b1ebfef8340d288bbaf2788540aa3e97f
* | | Fix hash.h for MSVC and platforms without hash map/set support.Gravatar Jisi Liu2015-03-01
| | | | | | | | | | | | Change-Id: Ic0fdb52c17b9495c73b8ce15879531383a148585
* | | Fix hash_map type parameter to add Alloc for other platforms.Gravatar Jisi Liu2015-03-01
| | | | | | | | | | | | Change-Id: Idc5fb65a2cc469d55aff6f2cde0b51b326be0963
* | | Use portable GOOGLE_PROTOBUF_THREAD_LOCAL instead of __thread.Gravatar Jisi Liu2015-03-01
| | | | | | | | | | | | Change-Id: Iaa75f8333541bc378bea699e7f147c7f17b652ad
* | | Down integrate from Google internal branch for C++ and Java.Gravatar Jisi Liu2015-02-28
| | | | | | | | | | | | | | | | | | | | | | | | - Maps for C++ lite - C++ Arena optimizations. - Java Lite runtime code size optimization. Change-Id: I7537a4357c1cb385d23f9e8aa7ffdfeefe079f13
* | | Merge pull request #185 from mzhaom/remove-unusedGravatar Jisi Liu2015-02-26
|\ \ \ | | | | | | | | Remove unused methods:
* \ \ \ Merge pull request #199 from google/wktGravatar Jisi Liu2015-02-26
|\ \ \ \ | | | | | | | | | | Add the .proto files for well-known types.
* | | | | Fix the order of BUILT_FILES so that pbconfig.h will be built beforeGravatar Jisi Liu2015-02-25
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | anyother targets. Change-Id: I507009cd92a711739d7d58ccee93dfbf0a9fe135
* | | | | Exclude pbconfg.h from dist, otherwise it breaks VS builds.Gravatar Jisi Liu2015-02-25
| | | | | | | | | | | | | | | | | | | | Change-Id: I7f745929b137b93c122448a4a2d9a7bbab6648d6
* | | | | Merge pull request #221 from google/python_proto3Gravatar Jisi Liu2015-02-25
|\ \ \ \ \ | | | | | | | | | | | | Proto3 Python changes for v3.0.0-alpha-2
| * | | | | Fixes for Python/C++ implementation in open-source:Gravatar Josh Haberman2015-02-25
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * Rosy hack doesn't apply (that test should be removed for the open-source release). * Added our own copy of parameterized.py (the open-source version of Google Apputils doesn't contain it). * The C++ Descriptor object didn't implement extension_ranges. * Had to implement a hack around returning EncodeError, to work around the module-loading behavior of the test runner.
* | | | | | Include shared_ptr.h into headers to make maps proto work. It is usedGravatar Jisi Liu2015-02-25
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | in the map_field_inl.h Change-Id: Ieeaab5507ee34b317d76b5937beb67c298905eb4
| * | | | | Down integrate from Google internal.Gravatar Jisi Liu2015-02-25
| | | | | | | | | | | | | | | | | | | | | | | | Change-Id: I34d301133eea9c6f3a822c47d1f91e136fd33145
* | | | | | Make maps fields work on installed C++ protobufs.Gravatar Jisi Liu2015-02-25
|/ / / / / | | | | | | | | | | | | | | | Change-Id: Id937e25bbb35968ee76c92bd4a8ce6247408c443
* | | | | Propogate onChange() event when getFooBuilder() is on an oneof messageGravatar Jisi Liu2015-02-23
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | field. Change-Id: Idb5b53da5accd24038a895aba49b684eeee95814
* | | | | Add shutdown code for several newly introduced leaks;Gravatar Jisi Liu2015-02-21
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Disable commandline interface test for heap check tests. Change-Id: I02aa2ad9704e3c70dcecae8b3b3557b18607d455
* | | | | Use static_cast instead of dynamic_cast in arena unittest so that it canGravatar Jisi Liu2015-02-20
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | pass in systems without rtti. Change-Id: Ib32b47a66f14928de9399c49dbdb07263a30d1bc
* | | | | Fix review comments.Gravatar Jisi Liu2015-02-19
| | | | | | | | | | | | | | | | | | | | Change-Id: Iafd4a3aa9d55e31478bf070311eeadfe95ece4d7
* | | | | Remove the unused set common oneof variables in helperGravatar Jisi Liu2015-02-19
| | | | |
* | | | | fix equal and hash for bytes field for javanano oneofGravatar Jisi Liu2015-02-19
| | | | |
* | | | | Clear oneofs.Gravatar Jisi Liu2015-02-19
| | | | |
* | | | | hashcode and equals for oneofs in nano.Gravatar Jisi Liu2015-02-19
| | | | |
* | | | | Equals for message oneof field in nano.Gravatar Jisi Liu2015-02-19
| | | | |
* | | | | Oneof message level elements (consts, case getter/clear) and messsage type ↵Gravatar Jisi Liu2015-02-19
| | | | | | | | | | | | | | | | | | | | field oneof support.
* | | | | Initial check-in for message oneof.Gravatar Jisi Liu2015-02-19
| | | | |
* | | | | Initial check in for primitive oneof fields.Gravatar Jisi Liu2015-02-19
| | | | |
* | | | | Merge branch 'master' of github.com:google/protobufGravatar Josh Haberman2015-02-17
|\ \ \ \ \
* | | | | | Integrate changes from Google open-source branch.Gravatar Josh Haberman2015-02-17
| | | | | |