aboutsummaryrefslogtreecommitdiff
path: root/src
Commit message (Collapse)AuthorAgeFilesLines
* Alpha 1 drop of Google's Objective C plugin and runtime support for protobufs.Thomas Van Lenten2015-05-0641-2/+5184
|
* Merge pull request #315 from brianduff/sync_from_aospJisi Liu2015-04-2913-25/+211
|\ | | | | Sync nanoproto from AOSP
| * Generate a CREATOR for each Parcelable message.Jeff Davidson2015-04-281-0/+11
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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.Brian Duff2015-04-281-2/+8
| | | | | | | | | | | | | | | | | | | | 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.Brian Duff2015-04-281-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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.Jeff Davidson2015-04-284-9/+68
| | | | | | | | | | | | | | | | | | | | @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.Brian Duff2015-04-2811-5/+104
| | | | | | | | | | | | Upstreamed from Another Place (cr/57247854). Change-Id: I2aaf59544c0f5ae21a51891d8a5eeda1dc722c90
| * When no clear() is generated, still initialize fields.Brian Duff2015-04-282-12/+21
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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.Brian Duff2015-04-281-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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".Feng Xiao2015-04-231-1/+11
|/
* Include all well-known type protos.Feng Xiao2015-04-208-21/+425
| | | | Change-Id: I122f1cee71a8a739ea603e52582cb0fa9698f0ed
* [PYTHON] Drop dependency on 'google.apputils'.Tamir Duberstein2015-04-101-3/+4
| | | | Use stdlib's 'unittest' instead.
* Change fixture name to be consistentTamir Duberstein2015-03-312-3/+3
| | | | | This fixes the problem where `make check` generates files not ignored by `.gitignore`.
* Delete "SEBS" (aka: Clean up Kenton's old trash)Kenton Varda2015-03-261-240/+0
| | | 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 XTamir Duberstein2015-03-181-1/+1
|
* Merge pull request #228 from cconroy/sanitize-enumsJisi Liu2015-03-165-5/+50
|\ | | | | Sanitize Enum names from collisions with reserved words.
| * Sanitize Enum names from collisions with reserved words.Chris Conroy2015-03-165-5/+50
| |
* | Revert pull request 175: Add support for the TILE-Gx processor family.Bo Yang2015-03-144-83/+0
| |
* | Add a missing proto file.Feng Xiao2015-03-132-1/+47
| | | | | | | | Change-Id: Ic98584616bd6ee49680273f0cdbe6d9c038ec0e9
* | Merge pull request #193 from TeBoring/sbPaul Yang2015-03-095-2/+215
|\ \ | | | | | | Implement a feature to generate a dependency file
| * | Fix absolute/relative path in outputBo Yang2015-02-092-12/+16
| | |
| * | Change target to output filenamesBo Yang2015-02-073-25/+73
| | |
| * | Fix commentBo Yang2015-02-041-2/+2
| | |
| * | Clean codeBo Yang2015-02-042-20/+20
| | |
| * | Remove "include sstream" from command_line_interface.ccBo Yang2015-02-041-1/+0
| | |
| * | Change flag for generating dependency file to "dependency_out". DeleteBo Yang2015-02-043-11/+12
| | | | | | | | | | | | test-driver
| * | Fix comments.Bo Yang2015-02-031-2/+2
| | |
| * | Implement a feature to generate a dependency file. By giving protoc the flagBo Yang2015-02-035-30/+99
| | | | | | | | | | | | | | | | | | | | | "--dependency_manifest_out=FILE", protoc will write dependencies of input proto files into FILE. In FILE, the format will be <full path to FILE>: <full path to 1st proto>\\\n <full path to 2nd proto> ... This cl is based on https://github.com/google/protobuf/pull/178
| * | Add support for outputting dependency manifest files, used by ninja and makeRichard Geary2015-01-232-0/+92
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Use --manifest-file=somefile.d to output the dependency manifest. This file will contain a list of files which were read by protoc as part of creating the output files. It doesn't include the plugin inputs if plugins are used, that could be a later extension. The manifest file is in the format <output file>: <input files>. The manifest file format only allows you to specify one output file, which isn't a problem as it's used to detect input changes in order to detect when to rerun the protoc command. The output file used in the manifest is the manifest filename itself; to use this in ninja you should declare the manifest file as the first output as well as the depfile input.
* | | Fix tile atomicops macro.Jisi Liu2015-03-051-6/+6
| | | | | | | | | | | | Change-Id: I1a3acadd059f87c26a2e26f3b7a169c0780e981e
* | | Merge pull request #175 from martiert/tile-supportJisi Liu2015-03-054-0/+83
|\ \ \ | |_|/ |/| | Add support for the TILE-Gx processor family.
| * | Add support for the TILE-Gx processor family.Martin Ertsaas2015-01-224-0/+83
| |/
* | Initialize data members in constructors instead of direct initialize inJisi Liu2015-03-011-3/+3
| | | | | | | | | | | | class definition, which is a C++11 extension. Change-Id: I477fe484d737f4c60c519d68f431940ffaa33431
* | use is_proto_enum instead of is_enum for repeated accessor field.Jisi Liu2015-03-011-1/+1
| | | | | | | | | | | | | | 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.Jisi Liu2015-03-011-14/+18
| | | | | | | | Change-Id: Ic0fdb52c17b9495c73b8ce15879531383a148585
* | Fix hash_map type parameter to add Alloc for other platforms.Jisi Liu2015-03-011-4/+6
| | | | | | | | Change-Id: Idc5fb65a2cc469d55aff6f2cde0b51b326be0963
* | Use portable GOOGLE_PROTOBUF_THREAD_LOCAL instead of __thread.Jisi Liu2015-03-012-2/+2
| | | | | | | | Change-Id: Iaa75f8333541bc378bea699e7f147c7f17b652ad
* | Down integrate from Google internal branch for C++ and Java.Jisi Liu2015-02-28106-3029/+10115
| | | | | | | | | | | | | | | | - Maps for C++ lite - C++ Arena optimizations. - Java Lite runtime code size optimization. Change-Id: I7537a4357c1cb385d23f9e8aa7ffdfeefe079f13
* | Merge pull request #185 from mzhaom/remove-unusedJisi Liu2015-02-262-26/+1
|\ \ | | | | | | Remove unused methods:
| * | Remove unused methods:Ming Zhao2015-01-292-26/+1
| | | | | | | | | | | | MessageTypeProtoName, IsVariableLenType
* | | Merge pull request #199 from google/wktJisi Liu2015-02-266-0/+635
|\ \ \ | | | | | | | | Add the .proto files for well-known types.
| * | | Add the .proto files for well-known types.Feng Xiao2015-02-096-0/+635
| | | |
* | | | Fix the order of BUILT_FILES so that pbconfig.h will be built beforeJisi Liu2015-02-251-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | anyother targets. Change-Id: I507009cd92a711739d7d58ccee93dfbf0a9fe135
* | | | Exclude pbconfg.h from dist, otherwise it breaks VS builds.Jisi Liu2015-02-251-3/+4
| | | | | | | | | | | | | | | | Change-Id: I7f745929b137b93c122448a4a2d9a7bbab6648d6
* | | | Merge pull request #221 from google/python_proto3Jisi Liu2015-02-254-10/+70
|\ \ \ \ | | | | | | | | | | Proto3 Python changes for v3.0.0-alpha-2
| * | | | Fixes for Python/C++ implementation in open-source:Josh Haberman2015-02-251-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * 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.
| * | | | Down integrate from Google internal.Jisi Liu2015-02-253-10/+69
| | | | | | | | | | | | | | | | | | | | Change-Id: I34d301133eea9c6f3a822c47d1f91e136fd33145
* | | | | Include shared_ptr.h into headers to make maps proto work. It is usedJisi Liu2015-02-251-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | in the map_field_inl.h Change-Id: Ieeaab5507ee34b317d76b5937beb67c298905eb4
* | | | | Make maps fields work on installed C++ protobufs.Jisi Liu2015-02-252-25/+44
|/ / / / | | | | | | | | | | | | Change-Id: Id937e25bbb35968ee76c92bd4a8ce6247408c443
* | | | Propogate onChange() event when getFooBuilder() is on an oneof messageJisi Liu2015-02-231-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | field. Change-Id: Idb5b53da5accd24038a895aba49b684eeee95814