b0575e93e4c39dec69365b850088a1eb7f82c5b3 |
|
04-Jun-2016 |
Tamas Berghammer <tberghammer@google.com> |
Update from protobuf v2.6.1 to protobuf 3.0.0-beta-3 This change just copies the upstream code into the repository without fixing the Android.mk or fixing the possible cmpile errors. All of those will be fixed with foloowup CLs. Bug: b/28974522 Change-Id: I79fb3966dbef85915965692fa6ab14dc611ed9ea
/external/protobuf/src/google/protobuf/compiler/javanano/javanano_helpers.cc
|
ab7fb7fd396ab2a90a9fde19b9786359bf03443b |
|
31-Jul-2015 |
Daniel Weis <dweis@google.com> |
Revert "Update the nano Protocol Buffer compiler to generate code in a ".nano" suffixed package." This reverts commit 6be128fb6b66872025dae6c6acf16339509cdece. Change-Id: I2bfb4ffb4082f330c42ec9c64c70aa3e2870dfe7
/external/protobuf/src/google/protobuf/compiler/javanano/javanano_helpers.cc
|
6be128fb6b66872025dae6c6acf16339509cdece |
|
20-Jul-2015 |
Daniel Weis <dweis@google.com> |
Update the nano Protocol Buffer compiler to generate code in a ".nano" suffixed package. This change follows up on the foundation laid by https://android-review.googlesource.com/#/c/154532/; it leverages this descriptor option to conditionally generate code in a ".nano" suffixed package. The conditional behavior is present to enable teams to migrate incrementally to the new behavior and to serve as an intermediary step towards the elimination of any non-nano suffixed packages. If this change breaks your build, please review the announcement email sent out to android-eng@: https://groups.google.com/a/google.com/forum/#!msg/android-eng/Ga49081_y3k/YWxD42JtXzAJ Change-Id: Ia34468bc41e2f884d61356791b00f245852aaf68
/external/protobuf/src/google/protobuf/compiler/javanano/javanano_helpers.cc
|
339478eea8a7889d1c086d216f72fa63c1b5307d |
|
30-Sep-2014 |
Brian Duff <bduff@google.com> |
Adds a primitive enum mode for reftypes. This is a compatibility shim. Change-Id: Ia0b417d4621e391ede618d0b3b1c470c9896e0ff
/external/protobuf/src/google/protobuf/compiler/javanano/javanano_helpers.cc
|
ba13794999073dd15f7e3ed3bfb87ddac477e19b |
|
21-Jul-2014 |
Brian Duff <bduff@google.com> |
Don't return NULL from {Boxed}PrimitiveTypeName. The behavior of the string ctor is undefined when you pass NULL. This is checked strictly in C++11, so fails to compile. Change-Id: Id5e0984ad1d37f2d504f7c42ac23e52ed4a58903
/external/protobuf/src/google/protobuf/compiler/javanano/javanano_helpers.cc
|
afc1553a9eb56eff742828c9c819eafa363cdcc9 |
|
17-Feb-2014 |
Max Cai <maxtroy@google.com> |
Merge "Extension overhaul."
|
d888895a3b5cf764856d3a94ed526bf9994c1800 |
|
15-Jan-2014 |
Max Cai <maxtroy@google.com> |
Add validation when parsing enum fields. Invalid values from the wire are silently ignored. Unlike full/lite, the invalid values are not stored into the unknown fields, because there's no way to get them out from Nano's unknown fields without a matching Extension. Edited README and slightly moved it towards a standalone section for Nano, independent of the Micro section. Change-Id: I2c1eb07f4d6d8f3aea242b8ddd95b9c966f3f177
/external/protobuf/src/google/protobuf/compiler/javanano/javanano_helpers.cc
|
382ddccb550e1c822ef26a0e65988998f7446624 |
|
20-Nov-2013 |
Max Cai <maxtroy@google.com> |
Extension overhaul. - Get rid of TypeLiteral<T>. It was introduced to read the component type of a List<T> at runtime. But we use arrays everywhere else, and we can always read the component type of an array type at runtime. - Properly read/write "minor" types (e.g. sint32, sfixed32). The old implementation could only read/write data as the "typical" types (one per Java type), e.g. java.lang.Integer -> int32, java.lang.Long -> int64. So if e.g. an extension specifies sfixed32 as the type, it would be read/written in the totally incompatible int32 format. - Properly serialize repeated packed fields. The old implementation doesn't do packed serialization. As an added bonus, and to be more aligned with the rest of protobuf nano / main, repeated packable extensions can deserialize both packed and non-packed data. - Split Extension class into a hierarchy so under typical usage a large chunk of code dealing with primitive type extensions can be removed by ProGuard. Bug: https://code.google.com/p/android/issues/detail?id=62586 Change-Id: I0d692f35cc2a8ad3a5a1cb3ce001282b2356b041
/external/protobuf/src/google/protobuf/compiler/javanano/javanano_helpers.cc
|
5cc242074f189837b38e7768b57ccfb0bca258df |
|
09-Oct-2013 |
Max Cai <maxtroy@google.com> |
Avoid class initializers to help ProGuard. Class initializers prevent ProGuard from inlining any methods because it thinks the class initializer may have side effects. This is true for static methods, but instance methods can still be inlined, because to have an instance you will have touched the class and any class initializers would have run. But ProGuard only starts inlining instance methods of classes with class initializers from v4.11b6, and Android uses v4.4 now. This change tries to avoid the class initializers as much as possible, by delaying the initialization of the empty array and some fields' saved defaults until when they're needed. However, if the message hosts any extensions, they must be public static final and therefore introducing the class initializer. In that case we won't bother with lazy initialization. Change-Id: I00d8296f6eb0023112b93ee135cdb28dbd52b0b8
/external/protobuf/src/google/protobuf/compiler/javanano/javanano_helpers.cc
|
ccc48faf20dbf3b3cddcffe78d198876d543529b |
|
16-Oct-2013 |
Brian Duff <bduff@google.com> |
Implement hashCode() and equals() behind a generator option. The option is only called 'generate_equals' because: - equals() is the main thing; hashCode() is there only to complement equals(); - it's shorter; - toString() should not be included in this option because it's more for debugging and it's more likely to stop ProGuard from working well. Also shortened the "has bit" expression; was ((bitField & mask) == mask), now ((bitField & mask) != 0). Both the Java code and the bytecode are slightly shorter. Change-Id: Ic309a08a60883bf454eb6612679aa99611620e76
/external/protobuf/src/google/protobuf/compiler/javanano/javanano_helpers.cc
|
0b8579237336f221711a0aac42400eb31a58fed3 |
|
01-Oct-2013 |
Brian Duff <bduff@google.com> |
Add reftypes field generator option. This option generates fields as reference types, and serializes based on nullness. Change-Id: Ic32e0eebff59d14016cc9a19e15a9bb08ae0bba5 Signed-off-by: Brian Duff <bduff@google.com>
/external/protobuf/src/google/protobuf/compiler/javanano/javanano_helpers.cc
|
26266cd4660ffe1f3d6015b715713ee654c5b936 |
|
24-Sep-2013 |
Max Cai <maxtroy@google.com> |
Implement enum_style=java option. This javanano_out command line option creates a container interface at the normal place where the enum constants would reside, per enum definition. The java_multiple_files flag would now affect the file- scope enums with the shells. If the flag is true then file-scope container interfaces are created in their own files. Change-Id: Id52258fcff8d3dee9db8f3d8022147a811bf3565
/external/protobuf/src/google/protobuf/compiler/javanano/javanano_helpers.cc
|
e74fe623e115237968a3de1143d7cdb4df710858 |
|
20-Sep-2013 |
Max Cai <maxtroy@google.com> |
Accessor style for optional fields. This CL implements the 'optional_field_style=accessors' option. All optional fields will now be 1 Java field and 1 bit in a shared bitfield behind get/set/has/clear accessor methods. The setter performs null check for reference types (Strings and byte[]s). Also decentralized the clear code generation. Change-Id: I60ac78329e352e76c2f8139fba1f292383080ad3
/external/protobuf/src/google/protobuf/compiler/javanano/javanano_helpers.cc
|
47dee56155c7bdb9855e51ff08c99db306d11a2d |
|
18-Sep-2013 |
Max Cai <maxtroy@google.com> |
Add some bitfield helper methods from 2.4 Change-Id: Ib9bb549602f71a451d2107fb04de17877553860e
/external/protobuf/src/google/protobuf/compiler/javanano/javanano_helpers.cc
|
624c448fbef20a1a2fad2289f622b468c25763d1 |
|
29-Jul-2013 |
Max Cai <maxtroy@google.com> |
Fix outer classname for javamicro/javanano. - File class name is defined as the java_outer_classname option value or the file name ToCamelCase; never the single message's ClassName. - File-scope enums are translated to constants in the file class, regardless of java_multiple_files. - If java_multiple_files=true, and file's class name equals a message's class name, no error. This is done by detecting that the outer class is not needed and skipping the outer class codegen and clash checks. Note: there is a disparity between java[lite] and the previous java{micr|nan}o: when generating code for a single-message proto, the outer class is omitted by java{micr|nan}o if the file does not have java_outer_classname. This change makes java{micr|nan}o align with java[lite] codegen and create the outer class, but will print some info to warn of potential change of code. - Also fixed the "is_own_file" detection and made all parseX() methods static. Previously, all messages in a java_multiple_files=true file are (incorrectly) considered to be in their own files, including nested messages, causing them to become inner classes (instance- bound) and forcing the parseX() methods to lose the static modifier. - This change supersedes c/60164 and c/60086, which causes javanano to put enum values into enum shell classes if java_multiple_files=true. We now always use the parent class to host the enum values. A future change will add a command line option to provide more flexibility. - Elaborated in java/README.txt. Change-Id: I684932f90e0a028ef37c662b221def5ffa202439
/external/protobuf/src/google/protobuf/compiler/javanano/javanano_helpers.cc
|
8170787391efcb6cc6a8babc1cce35d5b1aff420 |
|
24-Jul-2013 |
Max Cai <maxtroy@google.com> |
Per-file java_multiple_files flag. Imported source files may have different values for the 'java_multiple_files' option to the main source file's. Whether the fully qualified Java name of an entity should include the outer class name depends on the flag value in the file defining the referenced entity, not the main file. This CL loads the flag values from the main and all transitively imported files into the params, and generates the fully qualified Java names accordingly. If the generator option 'java_multiple_files' is set, its value overrides any in-file values in all source/imported files. This is because this generator option is typically used on either none or all source files. Change-Id: Id6a4a42426d68961dc669487d38f35530deb7d8e
/external/protobuf/src/google/protobuf/compiler/javanano/javanano_helpers.cc
|
0f2ca89132ab81441f7eb351c7a053a8c8d9d1c3 |
|
22-Jul-2013 |
Chris Smith <cjs@google.com> |
Allow NaN/+inf/-inf defaults in micro/nano. Adds support for default values of NaN, infinity and negative infinity for floats and doubles in both the nano and micro java compiler. Change-Id: Ibc43e5ebb073e51d9a8181f3aa23b72e10015dca
/external/protobuf/src/google/protobuf/compiler/javanano/javanano_helpers.cc
|
f4e01452f159ae6b53f5edd25fa647ca2919ae10 |
|
18-Jul-2013 |
Tom Chao <chaot@google.com> |
Update nano to serialize java keywords properly. Change-Id: I7407d0fab609c336ecd73499e725aed0dd50f555
/external/protobuf/src/google/protobuf/compiler/javanano/javanano_helpers.cc
|
bf79e2de36143b8b617af136c403496515373bb6 |
|
07-Jun-2013 |
Brian Duff <bduff@google.com> |
Fix enum field references with java_multiple_files. When the java_multiple_files option is on, enums are placed in java class files based on the name of the original enum type. This fixes field references to such enum values to point to the correct class name when setting the default. Change-Id: I51a2e251c0d0ab1e45a182ba849d314232a74bac
/external/protobuf/src/google/protobuf/compiler/javanano/javanano_helpers.cc
|
64d8d8f89050c5ada85341f967af391f4716a7cb |
|
15-Mar-2013 |
Ulas Kirazci <ulas@google.com> |
Nano protobufs. Like micro protobufs except: - No setter/getter/hazzer functions. - Has state is not available. Outputs all fields != their default. - CodedInputStream can only take byte[] (not InputStream). - Repeated fields are in arrays, not ArrayList or Vector. - Unset messages/groups are null, not "defaultInstance()". - Required fields are always serialized. To use: - Link libprotobuf-java-2.3.0-nano runtime. - Use LOCAL_PROTOC_OPTIMIZE_TYPE := nano Change-Id: I7429015b3c5f7f38b7be01eb2d4927f7a9999c80
/external/protobuf/src/google/protobuf/compiler/javanano/javanano_helpers.cc
|