google-protobuf 3.3.0-x64-mingw32 → 3.4.0.1-x64-mingw32
Sign up to get free protection for your applications and to get access to all the features.
Potentially problematic release.
This version of google-protobuf might be problematic. Click here for more details.
- checksums.yaml +4 -4
- data/ext/google/protobuf_c/encode_decode.c +30 -29
- data/ext/google/protobuf_c/upb.c +453 -492
- data/ext/google/protobuf_c/upb.h +33 -14
- data/lib/google/2.0/protobuf_c.so +0 -0
- data/lib/google/2.1/protobuf_c.so +0 -0
- data/lib/google/2.2/protobuf_c.so +0 -0
- data/lib/google/2.3/protobuf_c.so +0 -0
- data/lib/google/2.4/protobuf_c.so +0 -0
- data/lib/google/protobuf/well_known_types.rb +1 -1
- data/tests/basic.rb +121 -4
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 36a78894b1953cdcb0db8f52dd337757a8647383
|
4
|
+
data.tar.gz: f818fab6926b5141cfb3ef713adf9d2e9d276ce7
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 31bd3e804c26e0505ba43f1abd77e236984d092f78654c5a6a24acb1fac83d5913bd69ea84c228118e6f3a12bda75f1eb111105a265bf880ee024ca1960a18ef
|
7
|
+
data.tar.gz: 6d88710beaa96f26ef384a43bfb672d15213c96c4fb110c406953729f77ee66f8726444cb4a760b7dc167d9f677c4a899b0368cbe8d426f31552173a2e12990b
|
@@ -914,13 +914,9 @@ void stringsink_uninit(stringsink *sink) {
|
|
914
914
|
// semantics, which means that we have true field presence, we will want to
|
915
915
|
// modify msgvisitor so that it emits all present fields rather than all
|
916
916
|
// non-default-value fields.
|
917
|
-
//
|
918
|
-
// Likewise, when implementing JSON serialization, we may need to have a
|
919
|
-
// 'verbose' mode that outputs all fields and a 'concise' mode that outputs only
|
920
|
-
// those with non-default values.
|
921
917
|
|
922
918
|
static void putmsg(VALUE msg, const Descriptor* desc,
|
923
|
-
upb_sink *sink, int depth);
|
919
|
+
upb_sink *sink, int depth, bool emit_defaults);
|
924
920
|
|
925
921
|
static upb_selector_t getsel(const upb_fielddef *f, upb_handlertype_t type) {
|
926
922
|
upb_selector_t ret;
|
@@ -952,7 +948,7 @@ static void putstr(VALUE str, const upb_fielddef *f, upb_sink *sink) {
|
|
952
948
|
}
|
953
949
|
|
954
950
|
static void putsubmsg(VALUE submsg, const upb_fielddef *f, upb_sink *sink,
|
955
|
-
int depth) {
|
951
|
+
int depth, bool emit_defaults) {
|
956
952
|
upb_sink subsink;
|
957
953
|
VALUE descriptor;
|
958
954
|
Descriptor* subdesc;
|
@@ -963,12 +959,12 @@ static void putsubmsg(VALUE submsg, const upb_fielddef *f, upb_sink *sink,
|
|
963
959
|
subdesc = ruby_to_Descriptor(descriptor);
|
964
960
|
|
965
961
|
upb_sink_startsubmsg(sink, getsel(f, UPB_HANDLER_STARTSUBMSG), &subsink);
|
966
|
-
putmsg(submsg, subdesc, &subsink, depth + 1);
|
962
|
+
putmsg(submsg, subdesc, &subsink, depth + 1, emit_defaults);
|
967
963
|
upb_sink_endsubmsg(sink, getsel(f, UPB_HANDLER_ENDSUBMSG));
|
968
964
|
}
|
969
965
|
|
970
966
|
static void putary(VALUE ary, const upb_fielddef *f, upb_sink *sink,
|
971
|
-
int depth) {
|
967
|
+
int depth, bool emit_defaults) {
|
972
968
|
upb_sink subsink;
|
973
969
|
upb_fieldtype_t type = upb_fielddef_type(f);
|
974
970
|
upb_selector_t sel = 0;
|
@@ -1005,7 +1001,7 @@ static void putary(VALUE ary, const upb_fielddef *f, upb_sink *sink,
|
|
1005
1001
|
putstr(*((VALUE *)memory), f, &subsink);
|
1006
1002
|
break;
|
1007
1003
|
case UPB_TYPE_MESSAGE:
|
1008
|
-
putsubmsg(*((VALUE *)memory), f, &subsink, depth);
|
1004
|
+
putsubmsg(*((VALUE *)memory), f, &subsink, depth, emit_defaults);
|
1009
1005
|
break;
|
1010
1006
|
|
1011
1007
|
#undef T
|
@@ -1019,7 +1015,8 @@ static void put_ruby_value(VALUE value,
|
|
1019
1015
|
const upb_fielddef *f,
|
1020
1016
|
VALUE type_class,
|
1021
1017
|
int depth,
|
1022
|
-
upb_sink *sink
|
1018
|
+
upb_sink *sink,
|
1019
|
+
bool emit_defaults) {
|
1023
1020
|
upb_selector_t sel = 0;
|
1024
1021
|
if (upb_fielddef_isprimitive(f)) {
|
1025
1022
|
sel = getsel(f, upb_handlers_getprimitivehandlertype(f));
|
@@ -1059,12 +1056,12 @@ static void put_ruby_value(VALUE value,
|
|
1059
1056
|
putstr(value, f, sink);
|
1060
1057
|
break;
|
1061
1058
|
case UPB_TYPE_MESSAGE:
|
1062
|
-
putsubmsg(value, f, sink, depth);
|
1059
|
+
putsubmsg(value, f, sink, depth, emit_defaults);
|
1063
1060
|
}
|
1064
1061
|
}
|
1065
1062
|
|
1066
1063
|
static void putmap(VALUE map, const upb_fielddef *f, upb_sink *sink,
|
1067
|
-
int depth) {
|
1064
|
+
int depth, bool emit_defaults) {
|
1068
1065
|
Map* self;
|
1069
1066
|
upb_sink subsink;
|
1070
1067
|
const upb_fielddef* key_field;
|
@@ -1090,9 +1087,9 @@ static void putmap(VALUE map, const upb_fielddef *f, upb_sink *sink,
|
|
1090
1087
|
&entry_sink);
|
1091
1088
|
upb_sink_startmsg(&entry_sink);
|
1092
1089
|
|
1093
|
-
put_ruby_value(key, key_field, Qnil, depth + 1, &entry_sink);
|
1090
|
+
put_ruby_value(key, key_field, Qnil, depth + 1, &entry_sink, emit_defaults);
|
1094
1091
|
put_ruby_value(value, value_field, self->value_type_class, depth + 1,
|
1095
|
-
&entry_sink);
|
1092
|
+
&entry_sink, emit_defaults);
|
1096
1093
|
|
1097
1094
|
upb_sink_endmsg(&entry_sink, &status);
|
1098
1095
|
upb_sink_endsubmsg(&subsink, getsel(f, UPB_HANDLER_ENDSUBMSG));
|
@@ -1102,7 +1099,7 @@ static void putmap(VALUE map, const upb_fielddef *f, upb_sink *sink,
|
|
1102
1099
|
}
|
1103
1100
|
|
1104
1101
|
static void putmsg(VALUE msg_rb, const Descriptor* desc,
|
1105
|
-
upb_sink *sink, int depth) {
|
1102
|
+
upb_sink *sink, int depth, bool emit_defaults) {
|
1106
1103
|
MessageHeader* msg;
|
1107
1104
|
upb_msg_field_iter i;
|
1108
1105
|
upb_status status;
|
@@ -1144,31 +1141,31 @@ static void putmsg(VALUE msg_rb, const Descriptor* desc,
|
|
1144
1141
|
|
1145
1142
|
if (is_map_field(f)) {
|
1146
1143
|
VALUE map = DEREF(msg, offset, VALUE);
|
1147
|
-
if (map != Qnil) {
|
1148
|
-
putmap(map, f, sink, depth);
|
1144
|
+
if (map != Qnil || emit_defaults) {
|
1145
|
+
putmap(map, f, sink, depth, emit_defaults);
|
1149
1146
|
}
|
1150
1147
|
} else if (upb_fielddef_isseq(f)) {
|
1151
1148
|
VALUE ary = DEREF(msg, offset, VALUE);
|
1152
1149
|
if (ary != Qnil) {
|
1153
|
-
putary(ary, f, sink, depth);
|
1150
|
+
putary(ary, f, sink, depth, emit_defaults);
|
1154
1151
|
}
|
1155
1152
|
} else if (upb_fielddef_isstring(f)) {
|
1156
1153
|
VALUE str = DEREF(msg, offset, VALUE);
|
1157
|
-
if (is_matching_oneof || RSTRING_LEN(str) > 0) {
|
1154
|
+
if (is_matching_oneof || emit_defaults || RSTRING_LEN(str) > 0) {
|
1158
1155
|
putstr(str, f, sink);
|
1159
1156
|
}
|
1160
1157
|
} else if (upb_fielddef_issubmsg(f)) {
|
1161
|
-
putsubmsg(DEREF(msg, offset, VALUE), f, sink, depth);
|
1158
|
+
putsubmsg(DEREF(msg, offset, VALUE), f, sink, depth, emit_defaults);
|
1162
1159
|
} else {
|
1163
1160
|
upb_selector_t sel = getsel(f, upb_handlers_getprimitivehandlertype(f));
|
1164
1161
|
|
1165
|
-
#define T(upbtypeconst, upbtype, ctype, default_value)
|
1166
|
-
case upbtypeconst: {
|
1167
|
-
ctype value = DEREF(msg, offset, ctype);
|
1168
|
-
if (is_matching_oneof || value != default_value) {
|
1169
|
-
upb_sink_put##upbtype(sink, sel, value);
|
1170
|
-
}
|
1171
|
-
}
|
1162
|
+
#define T(upbtypeconst, upbtype, ctype, default_value) \
|
1163
|
+
case upbtypeconst: { \
|
1164
|
+
ctype value = DEREF(msg, offset, ctype); \
|
1165
|
+
if (is_matching_oneof || emit_defaults || value != default_value) { \
|
1166
|
+
upb_sink_put##upbtype(sink, sel, value); \
|
1167
|
+
} \
|
1168
|
+
} \
|
1172
1169
|
break;
|
1173
1170
|
|
1174
1171
|
switch (upb_fielddef_type(f)) {
|
@@ -1246,7 +1243,7 @@ VALUE Message_encode(VALUE klass, VALUE msg_rb) {
|
|
1246
1243
|
stackenv_init(&se, "Error occurred during encoding: %s");
|
1247
1244
|
encoder = upb_pb_encoder_create(&se.env, serialize_handlers, &sink.sink);
|
1248
1245
|
|
1249
|
-
putmsg(msg_rb, desc, upb_pb_encoder_input(encoder), 0);
|
1246
|
+
putmsg(msg_rb, desc, upb_pb_encoder_input(encoder), 0, false);
|
1250
1247
|
|
1251
1248
|
ret = rb_str_new(sink.ptr, sink.len);
|
1252
1249
|
|
@@ -1268,6 +1265,7 @@ VALUE Message_encode_json(int argc, VALUE* argv, VALUE klass) {
|
|
1268
1265
|
Descriptor* desc = ruby_to_Descriptor(descriptor);
|
1269
1266
|
VALUE msg_rb;
|
1270
1267
|
VALUE preserve_proto_fieldnames = Qfalse;
|
1268
|
+
VALUE emit_defaults = Qfalse;
|
1271
1269
|
stringsink sink;
|
1272
1270
|
|
1273
1271
|
if (argc < 1 || argc > 2) {
|
@@ -1283,6 +1281,9 @@ VALUE Message_encode_json(int argc, VALUE* argv, VALUE klass) {
|
|
1283
1281
|
}
|
1284
1282
|
preserve_proto_fieldnames = rb_hash_lookup2(
|
1285
1283
|
hash_args, ID2SYM(rb_intern("preserve_proto_fieldnames")), Qfalse);
|
1284
|
+
|
1285
|
+
emit_defaults = rb_hash_lookup2(
|
1286
|
+
hash_args, ID2SYM(rb_intern("emit_defaults")), Qfalse);
|
1286
1287
|
}
|
1287
1288
|
|
1288
1289
|
stringsink_init(&sink);
|
@@ -1297,7 +1298,7 @@ VALUE Message_encode_json(int argc, VALUE* argv, VALUE klass) {
|
|
1297
1298
|
stackenv_init(&se, "Error occurred during encoding: %s");
|
1298
1299
|
printer = upb_json_printer_create(&se.env, serialize_handlers, &sink.sink);
|
1299
1300
|
|
1300
|
-
putmsg(msg_rb, desc, upb_json_printer_input(printer), 0);
|
1301
|
+
putmsg(msg_rb, desc, upb_json_printer_input(printer), 0, RTEST(emit_defaults));
|
1301
1302
|
|
1302
1303
|
ret = rb_enc_str_new(sink.ptr, sink.len, rb_utf8_encoding());
|
1303
1304
|
|
data/ext/google/protobuf_c/upb.c
CHANGED
@@ -377,13 +377,14 @@ bool _upb_def_validate(upb_def *const*defs, size_t n, upb_status *s) {
|
|
377
377
|
} else if (def->type == UPB_DEF_FIELD) {
|
378
378
|
upb_status_seterrmsg(s, "standalone fielddefs can not be frozen");
|
379
379
|
goto err;
|
380
|
-
} else if (def->type == UPB_DEF_ENUM) {
|
381
|
-
if (!upb_validate_enumdef(upb_dyncast_enumdef(def), s)) {
|
382
|
-
goto err;
|
383
|
-
}
|
384
380
|
} else {
|
385
381
|
/* Set now to detect transitive closure in the second pass. */
|
386
382
|
def->came_from_user = true;
|
383
|
+
|
384
|
+
if (def->type == UPB_DEF_ENUM &&
|
385
|
+
!upb_validate_enumdef(upb_dyncast_enumdef(def), s)) {
|
386
|
+
goto err;
|
387
|
+
}
|
387
388
|
}
|
388
389
|
}
|
389
390
|
|
@@ -710,43 +711,6 @@ upb_fielddef *upb_fielddef_new(const void *o) {
|
|
710
711
|
return f;
|
711
712
|
}
|
712
713
|
|
713
|
-
static upb_fielddef *upb_fielddef_dup(const upb_fielddef *f,
|
714
|
-
const void *owner) {
|
715
|
-
const char *srcname;
|
716
|
-
upb_fielddef *newf = upb_fielddef_new(owner);
|
717
|
-
if (!newf) return NULL;
|
718
|
-
upb_fielddef_settype(newf, upb_fielddef_type(f));
|
719
|
-
upb_fielddef_setlabel(newf, upb_fielddef_label(f));
|
720
|
-
upb_fielddef_setnumber(newf, upb_fielddef_number(f), NULL);
|
721
|
-
upb_fielddef_setname(newf, upb_fielddef_name(f), NULL);
|
722
|
-
if (f->default_is_string && f->defaultval.bytes) {
|
723
|
-
str_t *s = f->defaultval.bytes;
|
724
|
-
upb_fielddef_setdefaultstr(newf, s->str, s->len, NULL);
|
725
|
-
} else {
|
726
|
-
newf->default_is_string = f->default_is_string;
|
727
|
-
newf->defaultval = f->defaultval;
|
728
|
-
}
|
729
|
-
|
730
|
-
if (f->subdef_is_symbolic) {
|
731
|
-
srcname = f->sub.name; /* Might be NULL. */
|
732
|
-
} else {
|
733
|
-
srcname = f->sub.def ? upb_def_fullname(f->sub.def) : NULL;
|
734
|
-
}
|
735
|
-
if (srcname) {
|
736
|
-
char *newname = upb_gmalloc(strlen(f->sub.def->fullname) + 2);
|
737
|
-
if (!newname) {
|
738
|
-
upb_fielddef_unref(newf, owner);
|
739
|
-
return NULL;
|
740
|
-
}
|
741
|
-
strcpy(newname, ".");
|
742
|
-
strcat(newname, f->sub.def->fullname);
|
743
|
-
upb_fielddef_setsubdefname(newf, newname, NULL);
|
744
|
-
upb_gfree(newname);
|
745
|
-
}
|
746
|
-
|
747
|
-
return newf;
|
748
|
-
}
|
749
|
-
|
750
714
|
bool upb_fielddef_typeisset(const upb_fielddef *f) {
|
751
715
|
return f->type_is_set_;
|
752
716
|
}
|
@@ -1426,44 +1390,6 @@ err2:
|
|
1426
1390
|
return NULL;
|
1427
1391
|
}
|
1428
1392
|
|
1429
|
-
static upb_oneofdef *upb_oneofdef_dup(const upb_oneofdef *o, const void *owner);
|
1430
|
-
|
1431
|
-
static upb_msgdef *upb_msgdef_dup(const upb_msgdef *m, const void *owner) {
|
1432
|
-
bool ok;
|
1433
|
-
upb_msg_field_iter i;
|
1434
|
-
upb_msg_oneof_iter o;
|
1435
|
-
|
1436
|
-
upb_msgdef *newm = upb_msgdef_new(owner);
|
1437
|
-
if (!newm) return NULL;
|
1438
|
-
ok = upb_def_setfullname(upb_msgdef_upcast_mutable(newm),
|
1439
|
-
upb_def_fullname(upb_msgdef_upcast(m)),
|
1440
|
-
NULL);
|
1441
|
-
newm->map_entry = m->map_entry;
|
1442
|
-
newm->syntax = m->syntax;
|
1443
|
-
UPB_ASSERT(ok);
|
1444
|
-
for(upb_msg_field_begin(&i, m);
|
1445
|
-
!upb_msg_field_done(&i);
|
1446
|
-
upb_msg_field_next(&i)) {
|
1447
|
-
upb_fielddef *f = upb_fielddef_dup(upb_msg_iter_field(&i), &f);
|
1448
|
-
/* Fields in oneofs are dup'd below. */
|
1449
|
-
if (upb_fielddef_containingoneof(f)) continue;
|
1450
|
-
if (!f || !upb_msgdef_addfield(newm, f, &f, NULL)) {
|
1451
|
-
upb_msgdef_unref(newm, owner);
|
1452
|
-
return NULL;
|
1453
|
-
}
|
1454
|
-
}
|
1455
|
-
for(upb_msg_oneof_begin(&o, m);
|
1456
|
-
!upb_msg_oneof_done(&o);
|
1457
|
-
upb_msg_oneof_next(&o)) {
|
1458
|
-
upb_oneofdef *f = upb_oneofdef_dup(upb_msg_iter_oneof(&o), &f);
|
1459
|
-
if (!f || !upb_msgdef_addoneof(newm, f, &f, NULL)) {
|
1460
|
-
upb_msgdef_unref(newm, owner);
|
1461
|
-
return NULL;
|
1462
|
-
}
|
1463
|
-
}
|
1464
|
-
return newm;
|
1465
|
-
}
|
1466
|
-
|
1467
1393
|
bool upb_msgdef_freeze(upb_msgdef *m, upb_status *status) {
|
1468
1394
|
upb_def *d = upb_msgdef_upcast_mutable(m);
|
1469
1395
|
return upb_def_freeze(&d, 1, status);
|
@@ -1764,24 +1690,6 @@ err2:
|
|
1764
1690
|
return NULL;
|
1765
1691
|
}
|
1766
1692
|
|
1767
|
-
static upb_oneofdef *upb_oneofdef_dup(const upb_oneofdef *o,
|
1768
|
-
const void *owner) {
|
1769
|
-
bool ok;
|
1770
|
-
upb_oneof_iter i;
|
1771
|
-
upb_oneofdef *newo = upb_oneofdef_new(owner);
|
1772
|
-
if (!newo) return NULL;
|
1773
|
-
ok = upb_oneofdef_setname(newo, upb_oneofdef_name(o), NULL);
|
1774
|
-
UPB_ASSERT(ok);
|
1775
|
-
for (upb_oneof_begin(&i, o); !upb_oneof_done(&i); upb_oneof_next(&i)) {
|
1776
|
-
upb_fielddef *f = upb_fielddef_dup(upb_oneof_iter_field(&i), &f);
|
1777
|
-
if (!f || !upb_oneofdef_addfield(newo, f, &f, NULL)) {
|
1778
|
-
upb_oneofdef_unref(newo, owner);
|
1779
|
-
return NULL;
|
1780
|
-
}
|
1781
|
-
}
|
1782
|
-
return newo;
|
1783
|
-
}
|
1784
|
-
|
1785
1693
|
const char *upb_oneofdef_name(const upb_oneofdef *o) { return o->name; }
|
1786
1694
|
|
1787
1695
|
bool upb_oneofdef_setname(upb_oneofdef *o, const char *name, upb_status *s) {
|
@@ -1950,6 +1858,8 @@ static void freefiledef(upb_refcounted *r) {
|
|
1950
1858
|
upb_inttable_uninit(&f->deps);
|
1951
1859
|
upb_gfree((void*)f->name);
|
1952
1860
|
upb_gfree((void*)f->package);
|
1861
|
+
upb_gfree((void*)f->phpprefix);
|
1862
|
+
upb_gfree((void*)f->phpnamespace);
|
1953
1863
|
upb_gfree(f);
|
1954
1864
|
}
|
1955
1865
|
|
@@ -1964,6 +1874,8 @@ upb_filedef *upb_filedef_new(const void *owner) {
|
|
1964
1874
|
|
1965
1875
|
f->package = NULL;
|
1966
1876
|
f->name = NULL;
|
1877
|
+
f->phpprefix = NULL;
|
1878
|
+
f->phpnamespace = NULL;
|
1967
1879
|
f->syntax = UPB_SYNTAX_PROTO2;
|
1968
1880
|
|
1969
1881
|
if (!upb_refcounted_init(upb_filedef_upcast_mutable(f), &upb_filedef_vtbl,
|
@@ -1998,6 +1910,14 @@ const char *upb_filedef_package(const upb_filedef *f) {
|
|
1998
1910
|
return f->package;
|
1999
1911
|
}
|
2000
1912
|
|
1913
|
+
const char *upb_filedef_phpprefix(const upb_filedef *f) {
|
1914
|
+
return f->phpprefix;
|
1915
|
+
}
|
1916
|
+
|
1917
|
+
const char *upb_filedef_phpnamespace(const upb_filedef *f) {
|
1918
|
+
return f->phpnamespace;
|
1919
|
+
}
|
1920
|
+
|
2001
1921
|
upb_syntax_t upb_filedef_syntax(const upb_filedef *f) {
|
2002
1922
|
return f->syntax;
|
2003
1923
|
}
|
@@ -2054,6 +1974,30 @@ bool upb_filedef_setpackage(upb_filedef *f, const char *package,
|
|
2054
1974
|
return true;
|
2055
1975
|
}
|
2056
1976
|
|
1977
|
+
bool upb_filedef_setphpprefix(upb_filedef *f, const char *phpprefix,
|
1978
|
+
upb_status *s) {
|
1979
|
+
phpprefix = upb_gstrdup(phpprefix);
|
1980
|
+
if (!phpprefix) {
|
1981
|
+
upb_upberr_setoom(s);
|
1982
|
+
return false;
|
1983
|
+
}
|
1984
|
+
upb_gfree((void*)f->phpprefix);
|
1985
|
+
f->phpprefix = phpprefix;
|
1986
|
+
return true;
|
1987
|
+
}
|
1988
|
+
|
1989
|
+
bool upb_filedef_setphpnamespace(upb_filedef *f, const char *phpnamespace,
|
1990
|
+
upb_status *s) {
|
1991
|
+
phpnamespace = upb_gstrdup(phpnamespace);
|
1992
|
+
if (!phpnamespace) {
|
1993
|
+
upb_upberr_setoom(s);
|
1994
|
+
return false;
|
1995
|
+
}
|
1996
|
+
upb_gfree((void*)f->phpnamespace);
|
1997
|
+
f->phpnamespace = phpnamespace;
|
1998
|
+
return true;
|
1999
|
+
}
|
2000
|
+
|
2057
2001
|
bool upb_filedef_setsyntax(upb_filedef *f, upb_syntax_t syntax,
|
2058
2002
|
upb_status *s) {
|
2059
2003
|
UPB_UNUSED(s);
|
@@ -2240,57 +2184,14 @@ static bool symtab_add(upb_symtab *s, upb_def *const*defs, size_t n,
|
|
2240
2184
|
fullname);
|
2241
2185
|
goto err;
|
2242
2186
|
}
|
2243
|
-
upb_def_donateref(def, ref_donor, s);
|
2244
2187
|
if (!upb_strtable_insert(&addtab, fullname, upb_value_ptr(def)))
|
2245
2188
|
goto oom_err;
|
2246
|
-
def
|
2247
|
-
}
|
2248
|
-
}
|
2249
|
-
|
2250
|
-
/* Add standalone fielddefs (ie. extensions) to the appropriate messages.
|
2251
|
-
* If the appropriate message only exists in the existing symtab, duplicate
|
2252
|
-
* it so we have a mutable copy we can add the fields to. */
|
2253
|
-
for (i = 0; i < n; i++) {
|
2254
|
-
upb_def *def = defs[i];
|
2255
|
-
upb_fielddef *f = upb_dyncast_fielddef_mutable(def);
|
2256
|
-
const char *msgname;
|
2257
|
-
upb_value v;
|
2258
|
-
upb_msgdef *m;
|
2259
|
-
|
2260
|
-
if (!f) continue;
|
2261
|
-
msgname = upb_fielddef_containingtypename(f);
|
2262
|
-
/* We validated this earlier in this function. */
|
2263
|
-
UPB_ASSERT(msgname);
|
2264
|
-
|
2265
|
-
/* If the extendee name is absolutely qualified, move past the initial ".".
|
2266
|
-
* TODO(haberman): it is not obvious what it would mean if this was not
|
2267
|
-
* absolutely qualified. */
|
2268
|
-
if (msgname[0] == '.') {
|
2269
|
-
msgname++;
|
2270
|
-
}
|
2271
|
-
|
2272
|
-
if (upb_strtable_lookup(&addtab, msgname, &v)) {
|
2273
|
-
/* Extendee is in the set of defs the user asked us to add. */
|
2274
|
-
m = upb_value_getptr(v);
|
2275
|
-
} else {
|
2276
|
-
/* Need to find and dup the extendee from the existing symtab. */
|
2277
|
-
const upb_msgdef *frozen_m = upb_symtab_lookupmsg(s, msgname);
|
2278
|
-
if (!frozen_m) {
|
2279
|
-
upb_status_seterrf(status,
|
2280
|
-
"Tried to extend message %s that does not exist "
|
2281
|
-
"in this SymbolTable.",
|
2282
|
-
msgname);
|
2283
|
-
goto err;
|
2284
|
-
}
|
2285
|
-
m = upb_msgdef_dup(frozen_m, s);
|
2286
|
-
if (!m) goto oom_err;
|
2287
|
-
if (!upb_strtable_insert(&addtab, msgname, upb_value_ptr(m))) {
|
2288
|
-
upb_msgdef_unref(m, s);
|
2289
|
-
goto oom_err;
|
2290
|
-
}
|
2189
|
+
upb_def_donateref(def, ref_donor, s);
|
2291
2190
|
}
|
2292
2191
|
|
2293
|
-
if (
|
2192
|
+
if (upb_dyncast_fielddef_mutable(def)) {
|
2193
|
+
/* TODO(haberman): allow adding extensions attached to files. */
|
2194
|
+
upb_status_seterrf(status, "Can't add extensions to symtab.\n");
|
2294
2195
|
goto err;
|
2295
2196
|
}
|
2296
2197
|
}
|
@@ -2372,15 +2273,9 @@ static bool symtab_add(upb_symtab *s, upb_def *const*defs, size_t n,
|
|
2372
2273
|
for (i = 0; i < add_n; i++) {
|
2373
2274
|
upb_def *def = (upb_def*)add_objs[i];
|
2374
2275
|
const char *name = upb_def_fullname(def);
|
2375
|
-
upb_value v;
|
2376
2276
|
bool success;
|
2377
|
-
|
2378
|
-
if (upb_strtable_remove(&s->symtab, name, &v)) {
|
2379
|
-
const upb_def *def = upb_value_getptr(v);
|
2380
|
-
upb_def_unref(def, s);
|
2381
|
-
}
|
2382
2277
|
success = upb_strtable_insert(&s->symtab, name, upb_value_ptr(def));
|
2383
|
-
UPB_ASSERT(success
|
2278
|
+
UPB_ASSERT(success);
|
2384
2279
|
}
|
2385
2280
|
upb_gfree(add_defs);
|
2386
2281
|
return true;
|
@@ -3737,8 +3632,7 @@ static bool upb_visitor_visitmsg2(const upb_msg *msg,
|
|
3737
3632
|
CHECK_TRUE(upb_sink_putfloat(sink, sel, upb_msgval_getfloat(val)));
|
3738
3633
|
break;
|
3739
3634
|
case UPB_TYPE_DOUBLE:
|
3740
|
-
CHECK_TRUE(
|
3741
|
-
upb_sink_putdouble(sink, sel, upb_msgval_getdouble(val)));
|
3635
|
+
CHECK_TRUE(upb_sink_putdouble(sink, sel, upb_msgval_getdouble(val)));
|
3742
3636
|
break;
|
3743
3637
|
case UPB_TYPE_BOOL:
|
3744
3638
|
CHECK_TRUE(upb_sink_putbool(sink, sel, upb_msgval_getbool(val)));
|
@@ -3748,15 +3642,13 @@ static bool upb_visitor_visitmsg2(const upb_msg *msg,
|
|
3748
3642
|
CHECK_TRUE(upb_sink_putint32(sink, sel, upb_msgval_getint32(val)));
|
3749
3643
|
break;
|
3750
3644
|
case UPB_TYPE_UINT32:
|
3751
|
-
CHECK_TRUE(
|
3752
|
-
upb_sink_putuint32(sink, sel, upb_msgval_getuint32(val)));
|
3645
|
+
CHECK_TRUE(upb_sink_putuint32(sink, sel, upb_msgval_getuint32(val)));
|
3753
3646
|
break;
|
3754
3647
|
case UPB_TYPE_INT64:
|
3755
3648
|
CHECK_TRUE(upb_sink_putint64(sink, sel, upb_msgval_getint64(val)));
|
3756
3649
|
break;
|
3757
3650
|
case UPB_TYPE_UINT64:
|
3758
|
-
CHECK_TRUE(
|
3759
|
-
upb_sink_putuint64(sink, sel, upb_msgval_getuint64(val)));
|
3651
|
+
CHECK_TRUE(upb_sink_putuint64(sink, sel, upb_msgval_getuint64(val)));
|
3760
3652
|
break;
|
3761
3653
|
case UPB_TYPE_STRING:
|
3762
3654
|
case UPB_TYPE_BYTES:
|
@@ -6545,14 +6437,14 @@ size_t upb_env_bytesallocated(const upb_env *e) {
|
|
6545
6437
|
|
6546
6438
|
|
6547
6439
|
static const upb_msgdef msgs[22];
|
6548
|
-
static const upb_fielddef fields[
|
6440
|
+
static const upb_fielddef fields[107];
|
6549
6441
|
static const upb_enumdef enums[5];
|
6550
6442
|
static const upb_tabent strentries[236];
|
6551
6443
|
static const upb_tabent intentries[18];
|
6552
|
-
static const upb_tabval arrays[
|
6444
|
+
static const upb_tabval arrays[187];
|
6553
6445
|
|
6554
6446
|
#ifdef UPB_DEBUG_REFS
|
6555
|
-
static upb_inttable reftables[
|
6447
|
+
static upb_inttable reftables[268];
|
6556
6448
|
#endif
|
6557
6449
|
|
6558
6450
|
static const upb_msgdef msgs[22] = {
|
@@ -6567,20 +6459,20 @@ static const upb_msgdef msgs[22] = {
|
|
6567
6459
|
UPB_MSGDEF_INIT("google.protobuf.FieldOptions", 12, 1, UPB_INTTABLE_INIT(1, 1, UPB_CTYPE_PTR, 1, &intentries[4], &arrays[42], 11, 6), UPB_STRTABLE_INIT(7, 15, UPB_CTYPE_PTR, 4, &strentries[56]), false, UPB_SYNTAX_PROTO2, &reftables[16], &reftables[17]),
|
6568
6460
|
UPB_MSGDEF_INIT("google.protobuf.FileDescriptorProto", 42, 6, UPB_INTTABLE_INIT(0, 0, UPB_CTYPE_PTR, 0, NULL, &arrays[53], 13, 12), UPB_STRTABLE_INIT(12, 15, UPB_CTYPE_PTR, 4, &strentries[72]), false, UPB_SYNTAX_PROTO2, &reftables[18], &reftables[19]),
|
6569
6461
|
UPB_MSGDEF_INIT("google.protobuf.FileDescriptorSet", 6, 1, UPB_INTTABLE_INIT(0, 0, UPB_CTYPE_PTR, 0, NULL, &arrays[66], 2, 1), UPB_STRTABLE_INIT(1, 3, UPB_CTYPE_PTR, 2, &strentries[88]), false, UPB_SYNTAX_PROTO2, &reftables[20], &reftables[21]),
|
6570
|
-
UPB_MSGDEF_INIT("google.protobuf.FileOptions",
|
6571
|
-
UPB_MSGDEF_INIT("google.protobuf.MessageOptions", 10, 1, UPB_INTTABLE_INIT(1, 1, UPB_CTYPE_PTR, 1, &intentries[8], &arrays[
|
6572
|
-
UPB_MSGDEF_INIT("google.protobuf.MethodDescriptorProto", 15, 1, UPB_INTTABLE_INIT(0, 0, UPB_CTYPE_PTR, 0, NULL, &arrays[
|
6573
|
-
UPB_MSGDEF_INIT("google.protobuf.MethodOptions", 7, 1, UPB_INTTABLE_INIT(2, 3, UPB_CTYPE_PTR, 2, &intentries[10], &arrays[
|
6574
|
-
UPB_MSGDEF_INIT("google.protobuf.OneofDescriptorProto", 5, 0, UPB_INTTABLE_INIT(0, 0, UPB_CTYPE_PTR, 0, NULL, &arrays[
|
6575
|
-
UPB_MSGDEF_INIT("google.protobuf.ServiceDescriptorProto", 11, 2, UPB_INTTABLE_INIT(0, 0, UPB_CTYPE_PTR, 0, NULL, &arrays[
|
6576
|
-
UPB_MSGDEF_INIT("google.protobuf.ServiceOptions", 7, 1, UPB_INTTABLE_INIT(2, 3, UPB_CTYPE_PTR, 2, &intentries[14], &arrays[
|
6577
|
-
UPB_MSGDEF_INIT("google.protobuf.SourceCodeInfo", 6, 1, UPB_INTTABLE_INIT(0, 0, UPB_CTYPE_PTR, 0, NULL, &arrays[
|
6578
|
-
UPB_MSGDEF_INIT("google.protobuf.SourceCodeInfo.Location", 19, 0, UPB_INTTABLE_INIT(0, 0, UPB_CTYPE_PTR, 0, NULL, &arrays[
|
6579
|
-
UPB_MSGDEF_INIT("google.protobuf.UninterpretedOption", 18, 1, UPB_INTTABLE_INIT(0, 0, UPB_CTYPE_PTR, 0, NULL, &arrays[
|
6580
|
-
UPB_MSGDEF_INIT("google.protobuf.UninterpretedOption.NamePart", 6, 0, UPB_INTTABLE_INIT(0, 0, UPB_CTYPE_PTR, 0, NULL, &arrays[
|
6462
|
+
UPB_MSGDEF_INIT("google.protobuf.FileOptions", 37, 1, UPB_INTTABLE_INIT(1, 1, UPB_CTYPE_PTR, 1, &intentries[6], &arrays[68], 42, 17), UPB_STRTABLE_INIT(18, 31, UPB_CTYPE_PTR, 5, &strentries[92]), false, UPB_SYNTAX_PROTO2, &reftables[22], &reftables[23]),
|
6463
|
+
UPB_MSGDEF_INIT("google.protobuf.MessageOptions", 10, 1, UPB_INTTABLE_INIT(1, 1, UPB_CTYPE_PTR, 1, &intentries[8], &arrays[110], 8, 4), UPB_STRTABLE_INIT(5, 7, UPB_CTYPE_PTR, 3, &strentries[124]), false, UPB_SYNTAX_PROTO2, &reftables[24], &reftables[25]),
|
6464
|
+
UPB_MSGDEF_INIT("google.protobuf.MethodDescriptorProto", 15, 1, UPB_INTTABLE_INIT(0, 0, UPB_CTYPE_PTR, 0, NULL, &arrays[118], 7, 6), UPB_STRTABLE_INIT(6, 7, UPB_CTYPE_PTR, 3, &strentries[132]), false, UPB_SYNTAX_PROTO2, &reftables[26], &reftables[27]),
|
6465
|
+
UPB_MSGDEF_INIT("google.protobuf.MethodOptions", 7, 1, UPB_INTTABLE_INIT(2, 3, UPB_CTYPE_PTR, 2, &intentries[10], &arrays[125], 1, 0), UPB_STRTABLE_INIT(2, 3, UPB_CTYPE_PTR, 2, &strentries[140]), false, UPB_SYNTAX_PROTO2, &reftables[28], &reftables[29]),
|
6466
|
+
UPB_MSGDEF_INIT("google.protobuf.OneofDescriptorProto", 5, 0, UPB_INTTABLE_INIT(0, 0, UPB_CTYPE_PTR, 0, NULL, &arrays[126], 2, 1), UPB_STRTABLE_INIT(1, 3, UPB_CTYPE_PTR, 2, &strentries[144]), false, UPB_SYNTAX_PROTO2, &reftables[30], &reftables[31]),
|
6467
|
+
UPB_MSGDEF_INIT("google.protobuf.ServiceDescriptorProto", 11, 2, UPB_INTTABLE_INIT(0, 0, UPB_CTYPE_PTR, 0, NULL, &arrays[128], 4, 3), UPB_STRTABLE_INIT(3, 3, UPB_CTYPE_PTR, 2, &strentries[148]), false, UPB_SYNTAX_PROTO2, &reftables[32], &reftables[33]),
|
6468
|
+
UPB_MSGDEF_INIT("google.protobuf.ServiceOptions", 7, 1, UPB_INTTABLE_INIT(2, 3, UPB_CTYPE_PTR, 2, &intentries[14], &arrays[132], 1, 0), UPB_STRTABLE_INIT(2, 3, UPB_CTYPE_PTR, 2, &strentries[152]), false, UPB_SYNTAX_PROTO2, &reftables[34], &reftables[35]),
|
6469
|
+
UPB_MSGDEF_INIT("google.protobuf.SourceCodeInfo", 6, 1, UPB_INTTABLE_INIT(0, 0, UPB_CTYPE_PTR, 0, NULL, &arrays[133], 2, 1), UPB_STRTABLE_INIT(1, 3, UPB_CTYPE_PTR, 2, &strentries[156]), false, UPB_SYNTAX_PROTO2, &reftables[36], &reftables[37]),
|
6470
|
+
UPB_MSGDEF_INIT("google.protobuf.SourceCodeInfo.Location", 19, 0, UPB_INTTABLE_INIT(0, 0, UPB_CTYPE_PTR, 0, NULL, &arrays[135], 7, 5), UPB_STRTABLE_INIT(5, 7, UPB_CTYPE_PTR, 3, &strentries[160]), false, UPB_SYNTAX_PROTO2, &reftables[38], &reftables[39]),
|
6471
|
+
UPB_MSGDEF_INIT("google.protobuf.UninterpretedOption", 18, 1, UPB_INTTABLE_INIT(0, 0, UPB_CTYPE_PTR, 0, NULL, &arrays[142], 9, 7), UPB_STRTABLE_INIT(7, 15, UPB_CTYPE_PTR, 4, &strentries[168]), false, UPB_SYNTAX_PROTO2, &reftables[40], &reftables[41]),
|
6472
|
+
UPB_MSGDEF_INIT("google.protobuf.UninterpretedOption.NamePart", 6, 0, UPB_INTTABLE_INIT(0, 0, UPB_CTYPE_PTR, 0, NULL, &arrays[151], 3, 2), UPB_STRTABLE_INIT(2, 3, UPB_CTYPE_PTR, 2, &strentries[184]), false, UPB_SYNTAX_PROTO2, &reftables[42], &reftables[43]),
|
6581
6473
|
};
|
6582
6474
|
|
6583
|
-
static const upb_fielddef fields[
|
6475
|
+
static const upb_fielddef fields[107] = {
|
6584
6476
|
UPB_FIELDDEF_INIT(UPB_LABEL_OPTIONAL, UPB_TYPE_STRING, 0, false, false, false, false, "aggregate_value", 8, &msgs[20], NULL, 15, 6, {0},&reftables[44], &reftables[45]),
|
6585
6477
|
UPB_FIELDDEF_INIT(UPB_LABEL_OPTIONAL, UPB_TYPE_BOOL, 0, false, false, false, false, "allow_alias", 2, &msgs[4], NULL, 6, 1, {0},&reftables[46], &reftables[47]),
|
6586
6478
|
UPB_FIELDDEF_INIT(UPB_LABEL_OPTIONAL, UPB_TYPE_BOOL, 0, false, false, false, false, "cc_enable_arenas", 31, &msgs[11], NULL, 23, 12, {0},&reftables[48], &reftables[49]),
|
@@ -6590,18 +6482,18 @@ static const upb_fielddef fields[105] = {
|
|
6590
6482
|
UPB_FIELDDEF_INIT(UPB_LABEL_OPTIONAL, UPB_TYPE_ENUM, 0, false, false, false, false, "ctype", 1, &msgs[8], (const upb_def*)(&enums[2]), 6, 1, {0},&reftables[56], &reftables[57]),
|
6591
6483
|
UPB_FIELDDEF_INIT(UPB_LABEL_OPTIONAL, UPB_TYPE_STRING, 0, false, false, false, false, "default_value", 7, &msgs[7], NULL, 16, 7, {0},&reftables[58], &reftables[59]),
|
6592
6484
|
UPB_FIELDDEF_INIT(UPB_LABEL_REPEATED, UPB_TYPE_STRING, 0, false, false, false, false, "dependency", 3, &msgs[9], NULL, 30, 8, {0},&reftables[60], &reftables[61]),
|
6593
|
-
UPB_FIELDDEF_INIT(UPB_LABEL_OPTIONAL, UPB_TYPE_BOOL, 0, false, false, false, false, "deprecated", 3, &msgs[
|
6594
|
-
UPB_FIELDDEF_INIT(UPB_LABEL_OPTIONAL, UPB_TYPE_BOOL, 0, false, false, false, false, "deprecated",
|
6595
|
-
UPB_FIELDDEF_INIT(UPB_LABEL_OPTIONAL, UPB_TYPE_BOOL, 0, false, false, false, false, "deprecated",
|
6485
|
+
UPB_FIELDDEF_INIT(UPB_LABEL_OPTIONAL, UPB_TYPE_BOOL, 0, false, false, false, false, "deprecated", 3, &msgs[8], NULL, 8, 3, {0},&reftables[62], &reftables[63]),
|
6486
|
+
UPB_FIELDDEF_INIT(UPB_LABEL_OPTIONAL, UPB_TYPE_BOOL, 0, false, false, false, false, "deprecated", 33, &msgs[14], NULL, 6, 1, {0},&reftables[64], &reftables[65]),
|
6487
|
+
UPB_FIELDDEF_INIT(UPB_LABEL_OPTIONAL, UPB_TYPE_BOOL, 0, false, false, false, false, "deprecated", 3, &msgs[12], NULL, 8, 3, {0},&reftables[66], &reftables[67]),
|
6596
6488
|
UPB_FIELDDEF_INIT(UPB_LABEL_OPTIONAL, UPB_TYPE_BOOL, 0, false, false, false, false, "deprecated", 23, &msgs[11], NULL, 21, 10, {0},&reftables[68], &reftables[69]),
|
6597
|
-
UPB_FIELDDEF_INIT(UPB_LABEL_OPTIONAL, UPB_TYPE_BOOL, 0, false, false, false, false, "deprecated",
|
6598
|
-
UPB_FIELDDEF_INIT(UPB_LABEL_OPTIONAL, UPB_TYPE_BOOL, 0, false, false, false, false, "deprecated",
|
6599
|
-
UPB_FIELDDEF_INIT(UPB_LABEL_OPTIONAL, UPB_TYPE_BOOL, 0, false, false, false, false, "deprecated",
|
6489
|
+
UPB_FIELDDEF_INIT(UPB_LABEL_OPTIONAL, UPB_TYPE_BOOL, 0, false, false, false, false, "deprecated", 1, &msgs[6], NULL, 6, 1, {0},&reftables[70], &reftables[71]),
|
6490
|
+
UPB_FIELDDEF_INIT(UPB_LABEL_OPTIONAL, UPB_TYPE_BOOL, 0, false, false, false, false, "deprecated", 3, &msgs[4], NULL, 7, 2, {0},&reftables[72], &reftables[73]),
|
6491
|
+
UPB_FIELDDEF_INIT(UPB_LABEL_OPTIONAL, UPB_TYPE_BOOL, 0, false, false, false, false, "deprecated", 33, &msgs[17], NULL, 6, 1, {0},&reftables[74], &reftables[75]),
|
6600
6492
|
UPB_FIELDDEF_INIT(UPB_LABEL_OPTIONAL, UPB_TYPE_DOUBLE, 0, false, false, false, false, "double_value", 6, &msgs[20], NULL, 11, 4, {0},&reftables[76], &reftables[77]),
|
6601
6493
|
UPB_FIELDDEF_INIT(UPB_LABEL_OPTIONAL, UPB_TYPE_INT32, UPB_INTFMT_VARIABLE, false, false, false, false, "end", 2, &msgs[2], NULL, 3, 1, {0},&reftables[78], &reftables[79]),
|
6602
6494
|
UPB_FIELDDEF_INIT(UPB_LABEL_OPTIONAL, UPB_TYPE_INT32, UPB_INTFMT_VARIABLE, false, false, false, false, "end", 2, &msgs[1], NULL, 3, 1, {0},&reftables[80], &reftables[81]),
|
6603
|
-
UPB_FIELDDEF_INIT(UPB_LABEL_REPEATED, UPB_TYPE_MESSAGE, 0, false, false, false, false, "enum_type",
|
6604
|
-
UPB_FIELDDEF_INIT(UPB_LABEL_REPEATED, UPB_TYPE_MESSAGE, 0, false, false, false, false, "enum_type",
|
6495
|
+
UPB_FIELDDEF_INIT(UPB_LABEL_REPEATED, UPB_TYPE_MESSAGE, 0, false, false, false, false, "enum_type", 5, &msgs[9], (const upb_def*)(&msgs[3]), 13, 1, {0},&reftables[82], &reftables[83]),
|
6496
|
+
UPB_FIELDDEF_INIT(UPB_LABEL_REPEATED, UPB_TYPE_MESSAGE, 0, false, false, false, false, "enum_type", 4, &msgs[0], (const upb_def*)(&msgs[3]), 18, 2, {0},&reftables[84], &reftables[85]),
|
6605
6497
|
UPB_FIELDDEF_INIT(UPB_LABEL_OPTIONAL, UPB_TYPE_STRING, 0, false, false, false, false, "extendee", 2, &msgs[7], NULL, 7, 2, {0},&reftables[86], &reftables[87]),
|
6606
6498
|
UPB_FIELDDEF_INIT(UPB_LABEL_REPEATED, UPB_TYPE_MESSAGE, 0, false, false, false, false, "extension", 6, &msgs[0], (const upb_def*)(&msgs[7]), 24, 4, {0},&reftables[88], &reftables[89]),
|
6607
6499
|
UPB_FIELDDEF_INIT(UPB_LABEL_REPEATED, UPB_TYPE_MESSAGE, 0, false, false, false, false, "extension", 7, &msgs[9], (const upb_def*)(&msgs[7]), 19, 3, {0},&reftables[90], &reftables[91]),
|
@@ -6630,77 +6522,79 @@ static const upb_fielddef fields[105] = {
|
|
6630
6522
|
UPB_FIELDDEF_INIT(UPB_LABEL_OPTIONAL, UPB_TYPE_BOOL, 0, false, false, false, false, "message_set_wire_format", 1, &msgs[12], NULL, 6, 1, {0},&reftables[136], &reftables[137]),
|
6631
6523
|
UPB_FIELDDEF_INIT(UPB_LABEL_REPEATED, UPB_TYPE_MESSAGE, 0, false, false, false, false, "message_type", 4, &msgs[9], (const upb_def*)(&msgs[0]), 10, 0, {0},&reftables[138], &reftables[139]),
|
6632
6524
|
UPB_FIELDDEF_INIT(UPB_LABEL_REPEATED, UPB_TYPE_MESSAGE, 0, false, false, false, false, "method", 2, &msgs[16], (const upb_def*)(&msgs[13]), 6, 0, {0},&reftables[140], &reftables[141]),
|
6633
|
-
UPB_FIELDDEF_INIT(
|
6634
|
-
UPB_FIELDDEF_INIT(UPB_LABEL_OPTIONAL, UPB_TYPE_STRING, 0, false, false, false, false, "name", 1, &msgs[
|
6635
|
-
UPB_FIELDDEF_INIT(
|
6636
|
-
UPB_FIELDDEF_INIT(UPB_LABEL_OPTIONAL, UPB_TYPE_STRING, 0, false, false, false, false, "name", 1, &msgs[
|
6637
|
-
UPB_FIELDDEF_INIT(UPB_LABEL_OPTIONAL, UPB_TYPE_STRING, 0, false, false, false, false, "name", 1, &msgs[
|
6638
|
-
UPB_FIELDDEF_INIT(UPB_LABEL_OPTIONAL, UPB_TYPE_STRING, 0, false, false, false, false, "name", 1, &msgs[
|
6639
|
-
UPB_FIELDDEF_INIT(UPB_LABEL_OPTIONAL, UPB_TYPE_STRING, 0, false, false, false, false, "name", 1, &msgs[
|
6640
|
-
UPB_FIELDDEF_INIT(UPB_LABEL_OPTIONAL, UPB_TYPE_STRING, 0, false, false, false, false, "name", 1, &msgs[
|
6641
|
-
UPB_FIELDDEF_INIT(UPB_LABEL_OPTIONAL, UPB_TYPE_STRING, 0, false, false, false, false, "name", 1, &msgs[
|
6525
|
+
UPB_FIELDDEF_INIT(UPB_LABEL_REPEATED, UPB_TYPE_MESSAGE, 0, false, false, false, false, "name", 2, &msgs[20], (const upb_def*)(&msgs[21]), 5, 0, {0},&reftables[142], &reftables[143]),
|
6526
|
+
UPB_FIELDDEF_INIT(UPB_LABEL_OPTIONAL, UPB_TYPE_STRING, 0, false, false, false, false, "name", 1, &msgs[5], NULL, 4, 1, {0},&reftables[144], &reftables[145]),
|
6527
|
+
UPB_FIELDDEF_INIT(UPB_LABEL_OPTIONAL, UPB_TYPE_STRING, 0, false, false, false, false, "name", 1, &msgs[9], NULL, 22, 6, {0},&reftables[146], &reftables[147]),
|
6528
|
+
UPB_FIELDDEF_INIT(UPB_LABEL_OPTIONAL, UPB_TYPE_STRING, 0, false, false, false, false, "name", 1, &msgs[3], NULL, 8, 2, {0},&reftables[148], &reftables[149]),
|
6529
|
+
UPB_FIELDDEF_INIT(UPB_LABEL_OPTIONAL, UPB_TYPE_STRING, 0, false, false, false, false, "name", 1, &msgs[16], NULL, 8, 2, {0},&reftables[150], &reftables[151]),
|
6530
|
+
UPB_FIELDDEF_INIT(UPB_LABEL_OPTIONAL, UPB_TYPE_STRING, 0, false, false, false, false, "name", 1, &msgs[15], NULL, 2, 0, {0},&reftables[152], &reftables[153]),
|
6531
|
+
UPB_FIELDDEF_INIT(UPB_LABEL_OPTIONAL, UPB_TYPE_STRING, 0, false, false, false, false, "name", 1, &msgs[13], NULL, 4, 1, {0},&reftables[154], &reftables[155]),
|
6532
|
+
UPB_FIELDDEF_INIT(UPB_LABEL_OPTIONAL, UPB_TYPE_STRING, 0, false, false, false, false, "name", 1, &msgs[7], NULL, 4, 1, {0},&reftables[156], &reftables[157]),
|
6533
|
+
UPB_FIELDDEF_INIT(UPB_LABEL_OPTIONAL, UPB_TYPE_STRING, 0, false, false, false, false, "name", 1, &msgs[0], NULL, 32, 8, {0},&reftables[158], &reftables[159]),
|
6642
6534
|
UPB_FIELDDEF_INIT(UPB_LABEL_REQUIRED, UPB_TYPE_STRING, 0, false, false, false, false, "name_part", 1, &msgs[21], NULL, 2, 0, {0},&reftables[160], &reftables[161]),
|
6643
6535
|
UPB_FIELDDEF_INIT(UPB_LABEL_OPTIONAL, UPB_TYPE_INT64, UPB_INTFMT_VARIABLE, false, false, false, false, "negative_int_value", 5, &msgs[20], NULL, 10, 3, {0},&reftables[162], &reftables[163]),
|
6644
6536
|
UPB_FIELDDEF_INIT(UPB_LABEL_REPEATED, UPB_TYPE_MESSAGE, 0, false, false, false, false, "nested_type", 3, &msgs[0], (const upb_def*)(&msgs[0]), 15, 1, {0},&reftables[164], &reftables[165]),
|
6645
6537
|
UPB_FIELDDEF_INIT(UPB_LABEL_OPTIONAL, UPB_TYPE_BOOL, 0, false, false, false, false, "no_standard_descriptor_accessor", 2, &msgs[12], NULL, 7, 2, {0},&reftables[166], &reftables[167]),
|
6646
|
-
UPB_FIELDDEF_INIT(UPB_LABEL_OPTIONAL, UPB_TYPE_INT32, UPB_INTFMT_VARIABLE, false, false, false, false, "number",
|
6647
|
-
UPB_FIELDDEF_INIT(UPB_LABEL_OPTIONAL, UPB_TYPE_INT32, UPB_INTFMT_VARIABLE, false, false, false, false, "number",
|
6538
|
+
UPB_FIELDDEF_INIT(UPB_LABEL_OPTIONAL, UPB_TYPE_INT32, UPB_INTFMT_VARIABLE, false, false, false, false, "number", 3, &msgs[7], NULL, 10, 3, {0},&reftables[168], &reftables[169]),
|
6539
|
+
UPB_FIELDDEF_INIT(UPB_LABEL_OPTIONAL, UPB_TYPE_INT32, UPB_INTFMT_VARIABLE, false, false, false, false, "number", 2, &msgs[5], NULL, 7, 2, {0},&reftables[170], &reftables[171]),
|
6648
6540
|
UPB_FIELDDEF_INIT(UPB_LABEL_OPTIONAL, UPB_TYPE_STRING, 0, false, false, false, false, "objc_class_prefix", 36, &msgs[11], NULL, 24, 13, {0},&reftables[172], &reftables[173]),
|
6649
6541
|
UPB_FIELDDEF_INIT(UPB_LABEL_REPEATED, UPB_TYPE_MESSAGE, 0, false, false, false, false, "oneof_decl", 8, &msgs[0], (const upb_def*)(&msgs[15]), 28, 6, {0},&reftables[174], &reftables[175]),
|
6650
6542
|
UPB_FIELDDEF_INIT(UPB_LABEL_OPTIONAL, UPB_TYPE_INT32, UPB_INTFMT_VARIABLE, false, false, false, false, "oneof_index", 9, &msgs[7], NULL, 19, 8, {0},&reftables[176], &reftables[177]),
|
6651
6543
|
UPB_FIELDDEF_INIT(UPB_LABEL_OPTIONAL, UPB_TYPE_ENUM, 0, false, false, false, false, "optimize_for", 9, &msgs[11], (const upb_def*)(&enums[4]), 12, 3, {0},&reftables[178], &reftables[179]),
|
6652
6544
|
UPB_FIELDDEF_INIT(UPB_LABEL_OPTIONAL, UPB_TYPE_MESSAGE, 0, false, false, false, false, "options", 7, &msgs[0], (const upb_def*)(&msgs[12]), 25, 5, {0},&reftables[180], &reftables[181]),
|
6653
6545
|
UPB_FIELDDEF_INIT(UPB_LABEL_OPTIONAL, UPB_TYPE_MESSAGE, 0, false, false, false, false, "options", 8, &msgs[9], (const upb_def*)(&msgs[11]), 20, 4, {0},&reftables[182], &reftables[183]),
|
6654
|
-
UPB_FIELDDEF_INIT(UPB_LABEL_OPTIONAL, UPB_TYPE_MESSAGE, 0, false, false, false, false, "options",
|
6655
|
-
UPB_FIELDDEF_INIT(UPB_LABEL_OPTIONAL, UPB_TYPE_MESSAGE, 0, false, false, false, false, "options",
|
6546
|
+
UPB_FIELDDEF_INIT(UPB_LABEL_OPTIONAL, UPB_TYPE_MESSAGE, 0, false, false, false, false, "options", 8, &msgs[7], (const upb_def*)(&msgs[8]), 3, 0, {0},&reftables[184], &reftables[185]),
|
6547
|
+
UPB_FIELDDEF_INIT(UPB_LABEL_OPTIONAL, UPB_TYPE_MESSAGE, 0, false, false, false, false, "options", 4, &msgs[13], (const upb_def*)(&msgs[14]), 3, 0, {0},&reftables[186], &reftables[187]),
|
6656
6548
|
UPB_FIELDDEF_INIT(UPB_LABEL_OPTIONAL, UPB_TYPE_MESSAGE, 0, false, false, false, false, "options", 3, &msgs[16], (const upb_def*)(&msgs[17]), 7, 1, {0},&reftables[188], &reftables[189]),
|
6657
|
-
UPB_FIELDDEF_INIT(UPB_LABEL_OPTIONAL, UPB_TYPE_MESSAGE, 0, false, false, false, false, "options", 3, &msgs[
|
6658
|
-
UPB_FIELDDEF_INIT(UPB_LABEL_OPTIONAL, UPB_TYPE_MESSAGE, 0, false, false, false, false, "options", 3, &msgs[
|
6549
|
+
UPB_FIELDDEF_INIT(UPB_LABEL_OPTIONAL, UPB_TYPE_MESSAGE, 0, false, false, false, false, "options", 3, &msgs[3], (const upb_def*)(&msgs[4]), 7, 1, {0},&reftables[190], &reftables[191]),
|
6550
|
+
UPB_FIELDDEF_INIT(UPB_LABEL_OPTIONAL, UPB_TYPE_MESSAGE, 0, false, false, false, false, "options", 3, &msgs[5], (const upb_def*)(&msgs[6]), 3, 0, {0},&reftables[192], &reftables[193]),
|
6659
6551
|
UPB_FIELDDEF_INIT(UPB_LABEL_OPTIONAL, UPB_TYPE_STRING, 0, false, false, false, false, "output_type", 3, &msgs[13], NULL, 10, 3, {0},&reftables[194], &reftables[195]),
|
6660
6552
|
UPB_FIELDDEF_INIT(UPB_LABEL_OPTIONAL, UPB_TYPE_STRING, 0, false, false, false, false, "package", 2, &msgs[9], NULL, 25, 7, {0},&reftables[196], &reftables[197]),
|
6661
6553
|
UPB_FIELDDEF_INIT(UPB_LABEL_OPTIONAL, UPB_TYPE_BOOL, 0, false, false, false, false, "packed", 2, &msgs[8], NULL, 7, 2, {0},&reftables[198], &reftables[199]),
|
6662
6554
|
UPB_FIELDDEF_INIT(UPB_LABEL_REPEATED, UPB_TYPE_INT32, UPB_INTFMT_VARIABLE, false, false, false, true, "path", 1, &msgs[19], NULL, 4, 0, {0},&reftables[200], &reftables[201]),
|
6663
|
-
UPB_FIELDDEF_INIT(UPB_LABEL_OPTIONAL,
|
6664
|
-
UPB_FIELDDEF_INIT(
|
6665
|
-
UPB_FIELDDEF_INIT(UPB_LABEL_OPTIONAL,
|
6666
|
-
UPB_FIELDDEF_INIT(UPB_LABEL_REPEATED,
|
6667
|
-
UPB_FIELDDEF_INIT(
|
6668
|
-
UPB_FIELDDEF_INIT(
|
6669
|
-
UPB_FIELDDEF_INIT(UPB_LABEL_REPEATED, UPB_TYPE_MESSAGE, 0, false, false, false, false, "
|
6670
|
-
UPB_FIELDDEF_INIT(UPB_LABEL_OPTIONAL,
|
6671
|
-
UPB_FIELDDEF_INIT(UPB_LABEL_REPEATED,
|
6672
|
-
UPB_FIELDDEF_INIT(UPB_LABEL_OPTIONAL,
|
6673
|
-
UPB_FIELDDEF_INIT(
|
6674
|
-
UPB_FIELDDEF_INIT(UPB_LABEL_OPTIONAL,
|
6675
|
-
UPB_FIELDDEF_INIT(UPB_LABEL_OPTIONAL,
|
6676
|
-
UPB_FIELDDEF_INIT(UPB_LABEL_OPTIONAL,
|
6677
|
-
UPB_FIELDDEF_INIT(UPB_LABEL_OPTIONAL,
|
6678
|
-
UPB_FIELDDEF_INIT(UPB_LABEL_OPTIONAL, UPB_TYPE_STRING, 0, false, false, false, false, "
|
6679
|
-
UPB_FIELDDEF_INIT(
|
6680
|
-
UPB_FIELDDEF_INIT(
|
6681
|
-
UPB_FIELDDEF_INIT(UPB_LABEL_REPEATED, UPB_TYPE_MESSAGE, 0, false, false, false, false, "uninterpreted_option", 999, &msgs[
|
6682
|
-
UPB_FIELDDEF_INIT(UPB_LABEL_REPEATED, UPB_TYPE_MESSAGE, 0, false, false, false, false, "uninterpreted_option", 999, &msgs[
|
6683
|
-
UPB_FIELDDEF_INIT(UPB_LABEL_REPEATED, UPB_TYPE_MESSAGE, 0, false, false, false, false, "uninterpreted_option", 999, &msgs[
|
6555
|
+
UPB_FIELDDEF_INIT(UPB_LABEL_OPTIONAL, UPB_TYPE_STRING, 0, false, false, false, false, "php_class_prefix", 40, &msgs[11], NULL, 31, 16, {0},&reftables[202], &reftables[203]),
|
6556
|
+
UPB_FIELDDEF_INIT(UPB_LABEL_OPTIONAL, UPB_TYPE_STRING, 0, false, false, false, false, "php_namespace", 41, &msgs[11], NULL, 34, 17, {0},&reftables[204], &reftables[205]),
|
6557
|
+
UPB_FIELDDEF_INIT(UPB_LABEL_OPTIONAL, UPB_TYPE_UINT64, UPB_INTFMT_VARIABLE, false, false, false, false, "positive_int_value", 4, &msgs[20], NULL, 9, 2, {0},&reftables[206], &reftables[207]),
|
6558
|
+
UPB_FIELDDEF_INIT(UPB_LABEL_REPEATED, UPB_TYPE_INT32, UPB_INTFMT_VARIABLE, false, false, false, false, "public_dependency", 10, &msgs[9], NULL, 35, 9, {0},&reftables[208], &reftables[209]),
|
6559
|
+
UPB_FIELDDEF_INIT(UPB_LABEL_OPTIONAL, UPB_TYPE_BOOL, 0, false, false, false, false, "py_generic_services", 18, &msgs[11], NULL, 19, 8, {0},&reftables[210], &reftables[211]),
|
6560
|
+
UPB_FIELDDEF_INIT(UPB_LABEL_REPEATED, UPB_TYPE_STRING, 0, false, false, false, false, "reserved_name", 10, &msgs[0], NULL, 37, 9, {0},&reftables[212], &reftables[213]),
|
6561
|
+
UPB_FIELDDEF_INIT(UPB_LABEL_REPEATED, UPB_TYPE_MESSAGE, 0, false, false, false, false, "reserved_range", 9, &msgs[0], (const upb_def*)(&msgs[2]), 31, 7, {0},&reftables[214], &reftables[215]),
|
6562
|
+
UPB_FIELDDEF_INIT(UPB_LABEL_OPTIONAL, UPB_TYPE_BOOL, 0, false, false, false, false, "server_streaming", 6, &msgs[13], NULL, 14, 5, {0},&reftables[216], &reftables[217]),
|
6563
|
+
UPB_FIELDDEF_INIT(UPB_LABEL_REPEATED, UPB_TYPE_MESSAGE, 0, false, false, false, false, "service", 6, &msgs[9], (const upb_def*)(&msgs[16]), 16, 2, {0},&reftables[218], &reftables[219]),
|
6564
|
+
UPB_FIELDDEF_INIT(UPB_LABEL_OPTIONAL, UPB_TYPE_MESSAGE, 0, false, false, false, false, "source_code_info", 9, &msgs[9], (const upb_def*)(&msgs[18]), 21, 5, {0},&reftables[220], &reftables[221]),
|
6565
|
+
UPB_FIELDDEF_INIT(UPB_LABEL_REPEATED, UPB_TYPE_INT32, UPB_INTFMT_VARIABLE, false, false, false, true, "span", 2, &msgs[19], NULL, 7, 1, {0},&reftables[222], &reftables[223]),
|
6566
|
+
UPB_FIELDDEF_INIT(UPB_LABEL_OPTIONAL, UPB_TYPE_INT32, UPB_INTFMT_VARIABLE, false, false, false, false, "start", 1, &msgs[2], NULL, 2, 0, {0},&reftables[224], &reftables[225]),
|
6567
|
+
UPB_FIELDDEF_INIT(UPB_LABEL_OPTIONAL, UPB_TYPE_INT32, UPB_INTFMT_VARIABLE, false, false, false, false, "start", 1, &msgs[1], NULL, 2, 0, {0},&reftables[226], &reftables[227]),
|
6568
|
+
UPB_FIELDDEF_INIT(UPB_LABEL_OPTIONAL, UPB_TYPE_BYTES, 0, false, false, false, false, "string_value", 7, &msgs[20], NULL, 12, 5, {0},&reftables[228], &reftables[229]),
|
6569
|
+
UPB_FIELDDEF_INIT(UPB_LABEL_OPTIONAL, UPB_TYPE_STRING, 0, false, false, false, false, "syntax", 12, &msgs[9], NULL, 39, 11, {0},&reftables[230], &reftables[231]),
|
6570
|
+
UPB_FIELDDEF_INIT(UPB_LABEL_OPTIONAL, UPB_TYPE_STRING, 0, false, false, false, false, "trailing_comments", 4, &msgs[19], NULL, 11, 3, {0},&reftables[232], &reftables[233]),
|
6571
|
+
UPB_FIELDDEF_INIT(UPB_LABEL_OPTIONAL, UPB_TYPE_ENUM, 0, false, false, false, false, "type", 5, &msgs[7], (const upb_def*)(&enums[1]), 12, 5, {0},&reftables[234], &reftables[235]),
|
6572
|
+
UPB_FIELDDEF_INIT(UPB_LABEL_OPTIONAL, UPB_TYPE_STRING, 0, false, false, false, false, "type_name", 6, &msgs[7], NULL, 13, 6, {0},&reftables[236], &reftables[237]),
|
6573
|
+
UPB_FIELDDEF_INIT(UPB_LABEL_REPEATED, UPB_TYPE_MESSAGE, 0, false, false, false, false, "uninterpreted_option", 999, &msgs[12], (const upb_def*)(&msgs[20]), 5, 0, {0},&reftables[238], &reftables[239]),
|
6574
|
+
UPB_FIELDDEF_INIT(UPB_LABEL_REPEATED, UPB_TYPE_MESSAGE, 0, false, false, false, false, "uninterpreted_option", 999, &msgs[17], (const upb_def*)(&msgs[20]), 5, 0, {0},&reftables[240], &reftables[241]),
|
6575
|
+
UPB_FIELDDEF_INIT(UPB_LABEL_REPEATED, UPB_TYPE_MESSAGE, 0, false, false, false, false, "uninterpreted_option", 999, &msgs[11], (const upb_def*)(&msgs[20]), 5, 0, {0},&reftables[242], &reftables[243]),
|
6684
6576
|
UPB_FIELDDEF_INIT(UPB_LABEL_REPEATED, UPB_TYPE_MESSAGE, 0, false, false, false, false, "uninterpreted_option", 999, &msgs[14], (const upb_def*)(&msgs[20]), 5, 0, {0},&reftables[244], &reftables[245]),
|
6685
|
-
UPB_FIELDDEF_INIT(UPB_LABEL_REPEATED, UPB_TYPE_MESSAGE, 0, false, false, false, false, "uninterpreted_option", 999, &msgs[
|
6686
|
-
UPB_FIELDDEF_INIT(UPB_LABEL_REPEATED, UPB_TYPE_MESSAGE, 0, false, false, false, false, "
|
6687
|
-
UPB_FIELDDEF_INIT(
|
6688
|
-
UPB_FIELDDEF_INIT(UPB_LABEL_REPEATED,
|
6577
|
+
UPB_FIELDDEF_INIT(UPB_LABEL_REPEATED, UPB_TYPE_MESSAGE, 0, false, false, false, false, "uninterpreted_option", 999, &msgs[8], (const upb_def*)(&msgs[20]), 5, 0, {0},&reftables[246], &reftables[247]),
|
6578
|
+
UPB_FIELDDEF_INIT(UPB_LABEL_REPEATED, UPB_TYPE_MESSAGE, 0, false, false, false, false, "uninterpreted_option", 999, &msgs[6], (const upb_def*)(&msgs[20]), 5, 0, {0},&reftables[248], &reftables[249]),
|
6579
|
+
UPB_FIELDDEF_INIT(UPB_LABEL_REPEATED, UPB_TYPE_MESSAGE, 0, false, false, false, false, "uninterpreted_option", 999, &msgs[4], (const upb_def*)(&msgs[20]), 5, 0, {0},&reftables[250], &reftables[251]),
|
6580
|
+
UPB_FIELDDEF_INIT(UPB_LABEL_REPEATED, UPB_TYPE_MESSAGE, 0, false, false, false, false, "value", 2, &msgs[3], (const upb_def*)(&msgs[5]), 6, 0, {0},&reftables[252], &reftables[253]),
|
6581
|
+
UPB_FIELDDEF_INIT(UPB_LABEL_OPTIONAL, UPB_TYPE_BOOL, 0, false, false, false, false, "weak", 10, &msgs[8], NULL, 11, 6, {0},&reftables[254], &reftables[255]),
|
6582
|
+
UPB_FIELDDEF_INIT(UPB_LABEL_REPEATED, UPB_TYPE_INT32, UPB_INTFMT_VARIABLE, false, false, false, false, "weak_dependency", 11, &msgs[9], NULL, 38, 10, {0},&reftables[256], &reftables[257]),
|
6689
6583
|
};
|
6690
6584
|
|
6691
6585
|
static const upb_enumdef enums[5] = {
|
6692
|
-
UPB_ENUMDEF_INIT("google.protobuf.FieldDescriptorProto.Label", UPB_STRTABLE_INIT(3, 3, UPB_CTYPE_INT32, 2, &strentries[188]), UPB_INTTABLE_INIT(0, 0, UPB_CTYPE_CSTR, 0, NULL, &arrays[
|
6693
|
-
UPB_ENUMDEF_INIT("google.protobuf.FieldDescriptorProto.Type", UPB_STRTABLE_INIT(18, 31, UPB_CTYPE_INT32, 5, &strentries[192]), UPB_INTTABLE_INIT(0, 0, UPB_CTYPE_CSTR, 0, NULL, &arrays[
|
6694
|
-
UPB_ENUMDEF_INIT("google.protobuf.FieldOptions.CType", UPB_STRTABLE_INIT(3, 3, UPB_CTYPE_INT32, 2, &strentries[224]), UPB_INTTABLE_INIT(0, 0, UPB_CTYPE_CSTR, 0, NULL, &arrays[
|
6695
|
-
UPB_ENUMDEF_INIT("google.protobuf.FieldOptions.JSType", UPB_STRTABLE_INIT(3, 3, UPB_CTYPE_INT32, 2, &strentries[228]), UPB_INTTABLE_INIT(0, 0, UPB_CTYPE_CSTR, 0, NULL, &arrays[
|
6696
|
-
UPB_ENUMDEF_INIT("google.protobuf.FileOptions.OptimizeMode", UPB_STRTABLE_INIT(3, 3, UPB_CTYPE_INT32, 2, &strentries[232]), UPB_INTTABLE_INIT(0, 0, UPB_CTYPE_CSTR, 0, NULL, &arrays[
|
6586
|
+
UPB_ENUMDEF_INIT("google.protobuf.FieldDescriptorProto.Label", UPB_STRTABLE_INIT(3, 3, UPB_CTYPE_INT32, 2, &strentries[188]), UPB_INTTABLE_INIT(0, 0, UPB_CTYPE_CSTR, 0, NULL, &arrays[154], 4, 3), 0, &reftables[258], &reftables[259]),
|
6587
|
+
UPB_ENUMDEF_INIT("google.protobuf.FieldDescriptorProto.Type", UPB_STRTABLE_INIT(18, 31, UPB_CTYPE_INT32, 5, &strentries[192]), UPB_INTTABLE_INIT(0, 0, UPB_CTYPE_CSTR, 0, NULL, &arrays[158], 19, 18), 0, &reftables[260], &reftables[261]),
|
6588
|
+
UPB_ENUMDEF_INIT("google.protobuf.FieldOptions.CType", UPB_STRTABLE_INIT(3, 3, UPB_CTYPE_INT32, 2, &strentries[224]), UPB_INTTABLE_INIT(0, 0, UPB_CTYPE_CSTR, 0, NULL, &arrays[177], 3, 3), 0, &reftables[262], &reftables[263]),
|
6589
|
+
UPB_ENUMDEF_INIT("google.protobuf.FieldOptions.JSType", UPB_STRTABLE_INIT(3, 3, UPB_CTYPE_INT32, 2, &strentries[228]), UPB_INTTABLE_INIT(0, 0, UPB_CTYPE_CSTR, 0, NULL, &arrays[180], 3, 3), 0, &reftables[264], &reftables[265]),
|
6590
|
+
UPB_ENUMDEF_INIT("google.protobuf.FileOptions.OptimizeMode", UPB_STRTABLE_INIT(3, 3, UPB_CTYPE_INT32, 2, &strentries[232]), UPB_INTTABLE_INIT(0, 0, UPB_CTYPE_CSTR, 0, NULL, &arrays[183], 4, 3), 0, &reftables[266], &reftables[267]),
|
6697
6591
|
};
|
6698
6592
|
|
6699
6593
|
static const upb_tabent strentries[236] = {
|
6700
6594
|
{UPB_TABKEY_STR("\011", "\000", "\000", "\000", "extension"), UPB_TABVALUE_PTR_INIT(&fields[22]), NULL},
|
6701
6595
|
{UPB_TABKEY_NONE, UPB_TABVALUE_EMPTY_INIT, NULL},
|
6702
|
-
{UPB_TABKEY_STR("\015", "\000", "\000", "\000", "reserved_name"), UPB_TABVALUE_PTR_INIT(&fields[
|
6703
|
-
{UPB_TABKEY_STR("\004", "\000", "\000", "\000", "name"), UPB_TABVALUE_PTR_INIT(&fields[
|
6596
|
+
{UPB_TABKEY_STR("\015", "\000", "\000", "\000", "reserved_name"), UPB_TABVALUE_PTR_INIT(&fields[84]), NULL},
|
6597
|
+
{UPB_TABKEY_STR("\004", "\000", "\000", "\000", "name"), UPB_TABVALUE_PTR_INIT(&fields[57]), NULL},
|
6704
6598
|
{UPB_TABKEY_NONE, UPB_TABVALUE_EMPTY_INIT, NULL},
|
6705
6599
|
{UPB_TABKEY_NONE, UPB_TABVALUE_EMPTY_INIT, NULL},
|
6706
6600
|
{UPB_TABKEY_NONE, UPB_TABVALUE_EMPTY_INIT, NULL},
|
@@ -6709,53 +6603,53 @@ static const upb_tabent strentries[236] = {
|
|
6709
6603
|
{UPB_TABKEY_NONE, UPB_TABVALUE_EMPTY_INIT, NULL},
|
6710
6604
|
{UPB_TABKEY_STR("\013", "\000", "\000", "\000", "nested_type"), UPB_TABVALUE_PTR_INIT(&fields[60]), NULL},
|
6711
6605
|
{UPB_TABKEY_NONE, UPB_TABVALUE_EMPTY_INIT, NULL},
|
6712
|
-
{UPB_TABKEY_STR("\016", "\000", "\000", "\000", "reserved_range"), UPB_TABVALUE_PTR_INIT(&fields[
|
6606
|
+
{UPB_TABKEY_STR("\016", "\000", "\000", "\000", "reserved_range"), UPB_TABVALUE_PTR_INIT(&fields[85]), NULL},
|
6713
6607
|
{UPB_TABKEY_STR("\007", "\000", "\000", "\000", "options"), UPB_TABVALUE_PTR_INIT(&fields[68]), NULL},
|
6714
6608
|
{UPB_TABKEY_STR("\012", "\000", "\000", "\000", "oneof_decl"), UPB_TABVALUE_PTR_INIT(&fields[65]), NULL},
|
6715
|
-
{UPB_TABKEY_STR("\011", "\000", "\000", "\000", "enum_type"), UPB_TABVALUE_PTR_INIT(&fields[
|
6716
|
-
{UPB_TABKEY_STR("\005", "\000", "\000", "\000", "start"), UPB_TABVALUE_PTR_INIT(&fields[
|
6609
|
+
{UPB_TABKEY_STR("\011", "\000", "\000", "\000", "enum_type"), UPB_TABVALUE_PTR_INIT(&fields[20]), &strentries[13]},
|
6610
|
+
{UPB_TABKEY_STR("\005", "\000", "\000", "\000", "start"), UPB_TABVALUE_PTR_INIT(&fields[91]), NULL},
|
6717
6611
|
{UPB_TABKEY_STR("\003", "\000", "\000", "\000", "end"), UPB_TABVALUE_PTR_INIT(&fields[18]), NULL},
|
6718
6612
|
{UPB_TABKEY_NONE, UPB_TABVALUE_EMPTY_INIT, NULL},
|
6719
6613
|
{UPB_TABKEY_NONE, UPB_TABVALUE_EMPTY_INIT, NULL},
|
6720
|
-
{UPB_TABKEY_STR("\005", "\000", "\000", "\000", "start"), UPB_TABVALUE_PTR_INIT(&fields[
|
6614
|
+
{UPB_TABKEY_STR("\005", "\000", "\000", "\000", "start"), UPB_TABVALUE_PTR_INIT(&fields[90]), NULL},
|
6721
6615
|
{UPB_TABKEY_STR("\003", "\000", "\000", "\000", "end"), UPB_TABVALUE_PTR_INIT(&fields[17]), NULL},
|
6722
6616
|
{UPB_TABKEY_NONE, UPB_TABVALUE_EMPTY_INIT, NULL},
|
6723
6617
|
{UPB_TABKEY_NONE, UPB_TABVALUE_EMPTY_INIT, NULL},
|
6724
6618
|
{UPB_TABKEY_NONE, UPB_TABVALUE_EMPTY_INIT, NULL},
|
6725
|
-
{UPB_TABKEY_STR("\005", "\000", "\000", "\000", "value"), UPB_TABVALUE_PTR_INIT(&fields[
|
6726
|
-
{UPB_TABKEY_STR("\007", "\000", "\000", "\000", "options"), UPB_TABVALUE_PTR_INIT(&fields[
|
6727
|
-
{UPB_TABKEY_STR("\004", "\000", "\000", "\000", "name"), UPB_TABVALUE_PTR_INIT(&fields[
|
6728
|
-
{UPB_TABKEY_STR("\024", "\000", "\000", "\000", "uninterpreted_option"), UPB_TABVALUE_PTR_INIT(&fields[
|
6729
|
-
{UPB_TABKEY_STR("\012", "\000", "\000", "\000", "deprecated"), UPB_TABVALUE_PTR_INIT(&fields[
|
6619
|
+
{UPB_TABKEY_STR("\005", "\000", "\000", "\000", "value"), UPB_TABVALUE_PTR_INIT(&fields[104]), NULL},
|
6620
|
+
{UPB_TABKEY_STR("\007", "\000", "\000", "\000", "options"), UPB_TABVALUE_PTR_INIT(&fields[73]), NULL},
|
6621
|
+
{UPB_TABKEY_STR("\004", "\000", "\000", "\000", "name"), UPB_TABVALUE_PTR_INIT(&fields[52]), &strentries[26]},
|
6622
|
+
{UPB_TABKEY_STR("\024", "\000", "\000", "\000", "uninterpreted_option"), UPB_TABVALUE_PTR_INIT(&fields[103]), NULL},
|
6623
|
+
{UPB_TABKEY_STR("\012", "\000", "\000", "\000", "deprecated"), UPB_TABVALUE_PTR_INIT(&fields[14]), NULL},
|
6730
6624
|
{UPB_TABKEY_STR("\013", "\000", "\000", "\000", "allow_alias"), UPB_TABVALUE_PTR_INIT(&fields[1]), NULL},
|
6731
6625
|
{UPB_TABKEY_NONE, UPB_TABVALUE_EMPTY_INIT, NULL},
|
6732
|
-
{UPB_TABKEY_STR("\006", "\000", "\000", "\000", "number"), UPB_TABVALUE_PTR_INIT(&fields[
|
6626
|
+
{UPB_TABKEY_STR("\006", "\000", "\000", "\000", "number"), UPB_TABVALUE_PTR_INIT(&fields[63]), NULL},
|
6733
6627
|
{UPB_TABKEY_NONE, UPB_TABVALUE_EMPTY_INIT, NULL},
|
6734
|
-
{UPB_TABKEY_STR("\007", "\000", "\000", "\000", "options"), UPB_TABVALUE_PTR_INIT(&fields[
|
6735
|
-
{UPB_TABKEY_STR("\004", "\000", "\000", "\000", "name"), UPB_TABVALUE_PTR_INIT(&fields[
|
6736
|
-
{UPB_TABKEY_STR("\024", "\000", "\000", "\000", "uninterpreted_option"), UPB_TABVALUE_PTR_INIT(&fields[
|
6737
|
-
{UPB_TABKEY_STR("\012", "\000", "\000", "\000", "deprecated"), UPB_TABVALUE_PTR_INIT(&fields[
|
6628
|
+
{UPB_TABKEY_STR("\007", "\000", "\000", "\000", "options"), UPB_TABVALUE_PTR_INIT(&fields[74]), NULL},
|
6629
|
+
{UPB_TABKEY_STR("\004", "\000", "\000", "\000", "name"), UPB_TABVALUE_PTR_INIT(&fields[50]), &strentries[34]},
|
6630
|
+
{UPB_TABKEY_STR("\024", "\000", "\000", "\000", "uninterpreted_option"), UPB_TABVALUE_PTR_INIT(&fields[102]), NULL},
|
6631
|
+
{UPB_TABKEY_STR("\012", "\000", "\000", "\000", "deprecated"), UPB_TABVALUE_PTR_INIT(&fields[13]), NULL},
|
6738
6632
|
{UPB_TABKEY_NONE, UPB_TABVALUE_EMPTY_INIT, NULL},
|
6739
6633
|
{UPB_TABKEY_NONE, UPB_TABVALUE_EMPTY_INIT, NULL},
|
6740
6634
|
{UPB_TABKEY_STR("\013", "\000", "\000", "\000", "oneof_index"), UPB_TABVALUE_PTR_INIT(&fields[66]), NULL},
|
6741
6635
|
{UPB_TABKEY_STR("\005", "\000", "\000", "\000", "label"), UPB_TABVALUE_PTR_INIT(&fields[40]), NULL},
|
6742
6636
|
{UPB_TABKEY_NONE, UPB_TABVALUE_EMPTY_INIT, NULL},
|
6743
|
-
{UPB_TABKEY_STR("\004", "\000", "\000", "\000", "name"), UPB_TABVALUE_PTR_INIT(&fields[
|
6637
|
+
{UPB_TABKEY_STR("\004", "\000", "\000", "\000", "name"), UPB_TABVALUE_PTR_INIT(&fields[56]), NULL},
|
6744
6638
|
{UPB_TABKEY_NONE, UPB_TABVALUE_EMPTY_INIT, NULL},
|
6745
6639
|
{UPB_TABKEY_NONE, UPB_TABVALUE_EMPTY_INIT, NULL},
|
6746
6640
|
{UPB_TABKEY_NONE, UPB_TABVALUE_EMPTY_INIT, NULL},
|
6747
6641
|
{UPB_TABKEY_NONE, UPB_TABVALUE_EMPTY_INIT, NULL},
|
6748
|
-
{UPB_TABKEY_STR("\006", "\000", "\000", "\000", "number"), UPB_TABVALUE_PTR_INIT(&fields[
|
6642
|
+
{UPB_TABKEY_STR("\006", "\000", "\000", "\000", "number"), UPB_TABVALUE_PTR_INIT(&fields[62]), &strentries[53]},
|
6749
6643
|
{UPB_TABKEY_NONE, UPB_TABVALUE_EMPTY_INIT, NULL},
|
6750
6644
|
{UPB_TABKEY_STR("\010", "\000", "\000", "\000", "extendee"), UPB_TABVALUE_PTR_INIT(&fields[21]), NULL},
|
6751
|
-
{UPB_TABKEY_STR("\011", "\000", "\000", "\000", "type_name"), UPB_TABVALUE_PTR_INIT(&fields[
|
6645
|
+
{UPB_TABKEY_STR("\011", "\000", "\000", "\000", "type_name"), UPB_TABVALUE_PTR_INIT(&fields[96]), NULL},
|
6752
6646
|
{UPB_TABKEY_STR("\011", "\000", "\000", "\000", "json_name"), UPB_TABVALUE_PTR_INIT(&fields[38]), NULL},
|
6753
|
-
{UPB_TABKEY_STR("\004", "\000", "\000", "\000", "type"), UPB_TABVALUE_PTR_INIT(&fields[
|
6647
|
+
{UPB_TABKEY_STR("\004", "\000", "\000", "\000", "type"), UPB_TABVALUE_PTR_INIT(&fields[95]), &strentries[50]},
|
6754
6648
|
{UPB_TABKEY_STR("\015", "\000", "\000", "\000", "default_value"), UPB_TABVALUE_PTR_INIT(&fields[7]), NULL},
|
6755
|
-
{UPB_TABKEY_STR("\007", "\000", "\000", "\000", "options"), UPB_TABVALUE_PTR_INIT(&fields[
|
6756
|
-
{UPB_TABKEY_STR("\024", "\000", "\000", "\000", "uninterpreted_option"), UPB_TABVALUE_PTR_INIT(&fields[
|
6649
|
+
{UPB_TABKEY_STR("\007", "\000", "\000", "\000", "options"), UPB_TABVALUE_PTR_INIT(&fields[70]), NULL},
|
6650
|
+
{UPB_TABKEY_STR("\024", "\000", "\000", "\000", "uninterpreted_option"), UPB_TABVALUE_PTR_INIT(&fields[101]), NULL},
|
6757
6651
|
{UPB_TABKEY_NONE, UPB_TABVALUE_EMPTY_INIT, NULL},
|
6758
|
-
{UPB_TABKEY_STR("\004", "\000", "\000", "\000", "weak"), UPB_TABVALUE_PTR_INIT(&fields[
|
6652
|
+
{UPB_TABKEY_STR("\004", "\000", "\000", "\000", "weak"), UPB_TABVALUE_PTR_INIT(&fields[105]), NULL},
|
6759
6653
|
{UPB_TABKEY_NONE, UPB_TABVALUE_EMPTY_INIT, NULL},
|
6760
6654
|
{UPB_TABKEY_NONE, UPB_TABVALUE_EMPTY_INIT, NULL},
|
6761
6655
|
{UPB_TABKEY_NONE, UPB_TABVALUE_EMPTY_INIT, NULL},
|
@@ -6766,25 +6660,25 @@ static const upb_tabent strentries[236] = {
|
|
6766
6660
|
{UPB_TABKEY_STR("\005", "\000", "\000", "\000", "ctype"), UPB_TABVALUE_PTR_INIT(&fields[6]), NULL},
|
6767
6661
|
{UPB_TABKEY_NONE, UPB_TABVALUE_EMPTY_INIT, NULL},
|
6768
6662
|
{UPB_TABKEY_STR("\006", "\000", "\000", "\000", "jstype"), UPB_TABVALUE_PTR_INIT(&fields[39]), NULL},
|
6769
|
-
{UPB_TABKEY_STR("\012", "\000", "\000", "\000", "deprecated"), UPB_TABVALUE_PTR_INIT(&fields[
|
6663
|
+
{UPB_TABKEY_STR("\012", "\000", "\000", "\000", "deprecated"), UPB_TABVALUE_PTR_INIT(&fields[9]), NULL},
|
6770
6664
|
{UPB_TABKEY_NONE, UPB_TABVALUE_EMPTY_INIT, NULL},
|
6771
6665
|
{UPB_TABKEY_NONE, UPB_TABVALUE_EMPTY_INIT, NULL},
|
6772
6666
|
{UPB_TABKEY_STR("\011", "\000", "\000", "\000", "extension"), UPB_TABVALUE_PTR_INIT(&fields[23]), NULL},
|
6773
|
-
{UPB_TABKEY_STR("\017", "\000", "\000", "\000", "weak_dependency"), UPB_TABVALUE_PTR_INIT(&fields[
|
6667
|
+
{UPB_TABKEY_STR("\017", "\000", "\000", "\000", "weak_dependency"), UPB_TABVALUE_PTR_INIT(&fields[106]), NULL},
|
6774
6668
|
{UPB_TABKEY_NONE, UPB_TABVALUE_EMPTY_INIT, NULL},
|
6775
|
-
{UPB_TABKEY_STR("\004", "\000", "\000", "\000", "name"), UPB_TABVALUE_PTR_INIT(&fields[
|
6776
|
-
{UPB_TABKEY_STR("\007", "\000", "\000", "\000", "service"), UPB_TABVALUE_PTR_INIT(&fields[
|
6669
|
+
{UPB_TABKEY_STR("\004", "\000", "\000", "\000", "name"), UPB_TABVALUE_PTR_INIT(&fields[51]), NULL},
|
6670
|
+
{UPB_TABKEY_STR("\007", "\000", "\000", "\000", "service"), UPB_TABVALUE_PTR_INIT(&fields[87]), NULL},
|
6777
6671
|
{UPB_TABKEY_NONE, UPB_TABVALUE_EMPTY_INIT, NULL},
|
6778
|
-
{UPB_TABKEY_STR("\020", "\000", "\000", "\000", "source_code_info"), UPB_TABVALUE_PTR_INIT(&fields[
|
6672
|
+
{UPB_TABKEY_STR("\020", "\000", "\000", "\000", "source_code_info"), UPB_TABVALUE_PTR_INIT(&fields[88]), NULL},
|
6779
6673
|
{UPB_TABKEY_NONE, UPB_TABVALUE_EMPTY_INIT, NULL},
|
6780
6674
|
{UPB_TABKEY_NONE, UPB_TABVALUE_EMPTY_INIT, NULL},
|
6781
|
-
{UPB_TABKEY_STR("\006", "\000", "\000", "\000", "syntax"), UPB_TABVALUE_PTR_INIT(&fields[
|
6675
|
+
{UPB_TABKEY_STR("\006", "\000", "\000", "\000", "syntax"), UPB_TABVALUE_PTR_INIT(&fields[93]), NULL},
|
6782
6676
|
{UPB_TABKEY_STR("\012", "\000", "\000", "\000", "dependency"), UPB_TABVALUE_PTR_INIT(&fields[8]), NULL},
|
6783
6677
|
{UPB_TABKEY_STR("\014", "\000", "\000", "\000", "message_type"), UPB_TABVALUE_PTR_INIT(&fields[47]), NULL},
|
6784
6678
|
{UPB_TABKEY_STR("\007", "\000", "\000", "\000", "package"), UPB_TABVALUE_PTR_INIT(&fields[76]), NULL},
|
6785
6679
|
{UPB_TABKEY_STR("\007", "\000", "\000", "\000", "options"), UPB_TABVALUE_PTR_INIT(&fields[69]), &strentries[86]},
|
6786
|
-
{UPB_TABKEY_STR("\011", "\000", "\000", "\000", "enum_type"), UPB_TABVALUE_PTR_INIT(&fields[
|
6787
|
-
{UPB_TABKEY_STR("\021", "\000", "\000", "\000", "public_dependency"), UPB_TABVALUE_PTR_INIT(&fields[
|
6680
|
+
{UPB_TABKEY_STR("\011", "\000", "\000", "\000", "enum_type"), UPB_TABVALUE_PTR_INIT(&fields[19]), NULL},
|
6681
|
+
{UPB_TABKEY_STR("\021", "\000", "\000", "\000", "public_dependency"), UPB_TABVALUE_PTR_INIT(&fields[82]), &strentries[85]},
|
6788
6682
|
{UPB_TABKEY_NONE, UPB_TABVALUE_EMPTY_INIT, NULL},
|
6789
6683
|
{UPB_TABKEY_STR("\004", "\000", "\000", "\000", "file"), UPB_TABVALUE_PTR_INIT(&fields[26]), NULL},
|
6790
6684
|
{UPB_TABKEY_NONE, UPB_TABVALUE_EMPTY_INIT, NULL},
|
@@ -6792,7 +6686,7 @@ static const upb_tabent strentries[236] = {
|
|
6792
6686
|
{UPB_TABKEY_NONE, UPB_TABVALUE_EMPTY_INIT, NULL},
|
6793
6687
|
{UPB_TABKEY_NONE, UPB_TABVALUE_EMPTY_INIT, NULL},
|
6794
6688
|
{UPB_TABKEY_STR("\023", "\000", "\000", "\000", "cc_generic_services"), UPB_TABVALUE_PTR_INIT(&fields[3]), NULL},
|
6795
|
-
{UPB_TABKEY_STR("\020", "\000", "\000", "\000", "csharp_namespace"), UPB_TABVALUE_PTR_INIT(&fields[5]),
|
6689
|
+
{UPB_TABKEY_STR("\020", "\000", "\000", "\000", "csharp_namespace"), UPB_TABVALUE_PTR_INIT(&fields[5]), &strentries[116]},
|
6796
6690
|
{UPB_TABKEY_NONE, UPB_TABVALUE_EMPTY_INIT, NULL},
|
6797
6691
|
{UPB_TABKEY_NONE, UPB_TABVALUE_EMPTY_INIT, NULL},
|
6798
6692
|
{UPB_TABKEY_NONE, UPB_TABVALUE_EMPTY_INIT, NULL},
|
@@ -6805,17 +6699,17 @@ static const upb_tabent strentries[236] = {
|
|
6805
6699
|
{UPB_TABKEY_NONE, UPB_TABVALUE_EMPTY_INIT, NULL},
|
6806
6700
|
{UPB_TABKEY_NONE, UPB_TABVALUE_EMPTY_INIT, NULL},
|
6807
6701
|
{UPB_TABKEY_STR("\024", "\000", "\000", "\000", "java_outer_classname"), UPB_TABVALUE_PTR_INIT(&fields[34]), NULL},
|
6808
|
-
{UPB_TABKEY_STR("\
|
6702
|
+
{UPB_TABKEY_STR("\015", "\000", "\000", "\000", "php_namespace"), UPB_TABVALUE_PTR_INIT(&fields[80]), &strentries[113]},
|
6809
6703
|
{UPB_TABKEY_NONE, UPB_TABVALUE_EMPTY_INIT, NULL},
|
6810
6704
|
{UPB_TABKEY_NONE, UPB_TABVALUE_EMPTY_INIT, NULL},
|
6811
6705
|
{UPB_TABKEY_NONE, UPB_TABVALUE_EMPTY_INIT, NULL},
|
6812
6706
|
{UPB_TABKEY_STR("\023", "\000", "\000", "\000", "java_multiple_files"), UPB_TABVALUE_PTR_INIT(&fields[33]), &strentries[117]},
|
6813
|
-
{
|
6707
|
+
{UPB_TABKEY_STR("\024", "\000", "\000", "\000", "uninterpreted_option"), UPB_TABVALUE_PTR_INIT(&fields[99]), NULL},
|
6814
6708
|
{UPB_TABKEY_STR("\025", "\000", "\000", "\000", "java_generic_services"), UPB_TABVALUE_PTR_INIT(&fields[32]), &strentries[118]},
|
6815
6709
|
{UPB_TABKEY_STR("\035", "\000", "\000", "\000", "java_generate_equals_and_hash"), UPB_TABVALUE_PTR_INIT(&fields[31]), NULL},
|
6816
|
-
{
|
6710
|
+
{UPB_TABKEY_STR("\020", "\000", "\000", "\000", "php_class_prefix"), UPB_TABVALUE_PTR_INIT(&fields[79]), NULL},
|
6817
6711
|
{UPB_TABKEY_STR("\037", "\000", "\000", "\000", "javanano_use_deprecated_package"), UPB_TABVALUE_PTR_INIT(&fields[37]), &strentries[123]},
|
6818
|
-
{UPB_TABKEY_STR("\023", "\000", "\000", "\000", "py_generic_services"), UPB_TABVALUE_PTR_INIT(&fields[
|
6712
|
+
{UPB_TABKEY_STR("\023", "\000", "\000", "\000", "py_generic_services"), UPB_TABVALUE_PTR_INIT(&fields[83]), NULL},
|
6819
6713
|
{UPB_TABKEY_STR("\014", "\000", "\000", "\000", "optimize_for"), UPB_TABVALUE_PTR_INIT(&fields[67]), NULL},
|
6820
6714
|
{UPB_TABKEY_STR("\026", "\000", "\000", "\000", "java_string_check_utf8"), UPB_TABVALUE_PTR_INIT(&fields[36]), NULL},
|
6821
6715
|
{UPB_TABKEY_STR("\012", "\000", "\000", "\000", "deprecated"), UPB_TABVALUE_PTR_INIT(&fields[12]), &strentries[119]},
|
@@ -6825,32 +6719,32 @@ static const upb_tabent strentries[236] = {
|
|
6825
6719
|
{UPB_TABKEY_NONE, UPB_TABVALUE_EMPTY_INIT, NULL},
|
6826
6720
|
{UPB_TABKEY_NONE, UPB_TABVALUE_EMPTY_INIT, NULL},
|
6827
6721
|
{UPB_TABKEY_NONE, UPB_TABVALUE_EMPTY_INIT, NULL},
|
6828
|
-
{UPB_TABKEY_STR("\024", "\000", "\000", "\000", "uninterpreted_option"), UPB_TABVALUE_PTR_INIT(&fields[
|
6829
|
-
{UPB_TABKEY_STR("\012", "\000", "\000", "\000", "deprecated"), UPB_TABVALUE_PTR_INIT(&fields[
|
6722
|
+
{UPB_TABKEY_STR("\024", "\000", "\000", "\000", "uninterpreted_option"), UPB_TABVALUE_PTR_INIT(&fields[97]), NULL},
|
6723
|
+
{UPB_TABKEY_STR("\012", "\000", "\000", "\000", "deprecated"), UPB_TABVALUE_PTR_INIT(&fields[11]), NULL},
|
6830
6724
|
{UPB_TABKEY_STR("\011", "\000", "\000", "\000", "map_entry"), UPB_TABVALUE_PTR_INIT(&fields[45]), NULL},
|
6831
6725
|
{UPB_TABKEY_STR("\037", "\000", "\000", "\000", "no_standard_descriptor_accessor"), UPB_TABVALUE_PTR_INIT(&fields[61]), NULL},
|
6832
6726
|
{UPB_TABKEY_NONE, UPB_TABVALUE_EMPTY_INIT, NULL},
|
6833
6727
|
{UPB_TABKEY_STR("\020", "\000", "\000", "\000", "client_streaming"), UPB_TABVALUE_PTR_INIT(&fields[4]), NULL},
|
6834
|
-
{UPB_TABKEY_STR("\020", "\000", "\000", "\000", "server_streaming"), UPB_TABVALUE_PTR_INIT(&fields[
|
6835
|
-
{UPB_TABKEY_STR("\004", "\000", "\000", "\000", "name"), UPB_TABVALUE_PTR_INIT(&fields[
|
6728
|
+
{UPB_TABKEY_STR("\020", "\000", "\000", "\000", "server_streaming"), UPB_TABVALUE_PTR_INIT(&fields[86]), NULL},
|
6729
|
+
{UPB_TABKEY_STR("\004", "\000", "\000", "\000", "name"), UPB_TABVALUE_PTR_INIT(&fields[55]), NULL},
|
6836
6730
|
{UPB_TABKEY_STR("\012", "\000", "\000", "\000", "input_type"), UPB_TABVALUE_PTR_INIT(&fields[29]), NULL},
|
6837
6731
|
{UPB_TABKEY_NONE, UPB_TABVALUE_EMPTY_INIT, NULL},
|
6838
6732
|
{UPB_TABKEY_STR("\013", "\000", "\000", "\000", "output_type"), UPB_TABVALUE_PTR_INIT(&fields[75]), NULL},
|
6839
|
-
{UPB_TABKEY_STR("\007", "\000", "\000", "\000", "options"), UPB_TABVALUE_PTR_INIT(&fields[
|
6733
|
+
{UPB_TABKEY_STR("\007", "\000", "\000", "\000", "options"), UPB_TABVALUE_PTR_INIT(&fields[71]), NULL},
|
6840
6734
|
{UPB_TABKEY_STR("\024", "\000", "\000", "\000", "uninterpreted_option"), UPB_TABVALUE_PTR_INIT(&fields[100]), NULL},
|
6841
|
-
{UPB_TABKEY_STR("\012", "\000", "\000", "\000", "deprecated"), UPB_TABVALUE_PTR_INIT(&fields[
|
6735
|
+
{UPB_TABKEY_STR("\012", "\000", "\000", "\000", "deprecated"), UPB_TABVALUE_PTR_INIT(&fields[10]), NULL},
|
6842
6736
|
{UPB_TABKEY_NONE, UPB_TABVALUE_EMPTY_INIT, NULL},
|
6843
6737
|
{UPB_TABKEY_NONE, UPB_TABVALUE_EMPTY_INIT, NULL},
|
6844
6738
|
{UPB_TABKEY_NONE, UPB_TABVALUE_EMPTY_INIT, NULL},
|
6845
6739
|
{UPB_TABKEY_NONE, UPB_TABVALUE_EMPTY_INIT, NULL},
|
6846
6740
|
{UPB_TABKEY_NONE, UPB_TABVALUE_EMPTY_INIT, NULL},
|
6847
|
-
{UPB_TABKEY_STR("\004", "\000", "\000", "\000", "name"), UPB_TABVALUE_PTR_INIT(&fields[
|
6741
|
+
{UPB_TABKEY_STR("\004", "\000", "\000", "\000", "name"), UPB_TABVALUE_PTR_INIT(&fields[54]), NULL},
|
6848
6742
|
{UPB_TABKEY_NONE, UPB_TABVALUE_EMPTY_INIT, NULL},
|
6849
6743
|
{UPB_TABKEY_STR("\007", "\000", "\000", "\000", "options"), UPB_TABVALUE_PTR_INIT(&fields[72]), &strentries[150]},
|
6850
6744
|
{UPB_TABKEY_STR("\006", "\000", "\000", "\000", "method"), UPB_TABVALUE_PTR_INIT(&fields[48]), NULL},
|
6851
|
-
{UPB_TABKEY_STR("\004", "\000", "\000", "\000", "name"), UPB_TABVALUE_PTR_INIT(&fields[
|
6852
|
-
{UPB_TABKEY_STR("\024", "\000", "\000", "\000", "uninterpreted_option"), UPB_TABVALUE_PTR_INIT(&fields[
|
6853
|
-
{UPB_TABKEY_STR("\012", "\000", "\000", "\000", "deprecated"), UPB_TABVALUE_PTR_INIT(&fields[
|
6745
|
+
{UPB_TABKEY_STR("\004", "\000", "\000", "\000", "name"), UPB_TABVALUE_PTR_INIT(&fields[53]), &strentries[149]},
|
6746
|
+
{UPB_TABKEY_STR("\024", "\000", "\000", "\000", "uninterpreted_option"), UPB_TABVALUE_PTR_INIT(&fields[98]), NULL},
|
6747
|
+
{UPB_TABKEY_STR("\012", "\000", "\000", "\000", "deprecated"), UPB_TABVALUE_PTR_INIT(&fields[15]), NULL},
|
6854
6748
|
{UPB_TABKEY_NONE, UPB_TABVALUE_EMPTY_INIT, NULL},
|
6855
6749
|
{UPB_TABKEY_NONE, UPB_TABVALUE_EMPTY_INIT, NULL},
|
6856
6750
|
{UPB_TABKEY_NONE, UPB_TABVALUE_EMPTY_INIT, NULL},
|
@@ -6860,15 +6754,15 @@ static const upb_tabent strentries[236] = {
|
|
6860
6754
|
{UPB_TABKEY_NONE, UPB_TABVALUE_EMPTY_INIT, NULL},
|
6861
6755
|
{UPB_TABKEY_NONE, UPB_TABVALUE_EMPTY_INIT, NULL},
|
6862
6756
|
{UPB_TABKEY_NONE, UPB_TABVALUE_EMPTY_INIT, NULL},
|
6863
|
-
{UPB_TABKEY_STR("\004", "\000", "\000", "\000", "span"), UPB_TABVALUE_PTR_INIT(&fields[
|
6757
|
+
{UPB_TABKEY_STR("\004", "\000", "\000", "\000", "span"), UPB_TABVALUE_PTR_INIT(&fields[89]), &strentries[167]},
|
6864
6758
|
{UPB_TABKEY_STR("\031", "\000", "\000", "\000", "leading_detached_comments"), UPB_TABVALUE_PTR_INIT(&fields[43]), &strentries[165]},
|
6865
|
-
{UPB_TABKEY_STR("\021", "\000", "\000", "\000", "trailing_comments"), UPB_TABVALUE_PTR_INIT(&fields[
|
6759
|
+
{UPB_TABKEY_STR("\021", "\000", "\000", "\000", "trailing_comments"), UPB_TABVALUE_PTR_INIT(&fields[94]), NULL},
|
6866
6760
|
{UPB_TABKEY_STR("\020", "\000", "\000", "\000", "leading_comments"), UPB_TABVALUE_PTR_INIT(&fields[42]), &strentries[164]},
|
6867
6761
|
{UPB_TABKEY_STR("\004", "\000", "\000", "\000", "path"), UPB_TABVALUE_PTR_INIT(&fields[78]), NULL},
|
6868
6762
|
{UPB_TABKEY_STR("\014", "\000", "\000", "\000", "double_value"), UPB_TABVALUE_PTR_INIT(&fields[16]), NULL},
|
6869
6763
|
{UPB_TABKEY_NONE, UPB_TABVALUE_EMPTY_INIT, NULL},
|
6870
6764
|
{UPB_TABKEY_NONE, UPB_TABVALUE_EMPTY_INIT, NULL},
|
6871
|
-
{UPB_TABKEY_STR("\004", "\000", "\000", "\000", "name"), UPB_TABVALUE_PTR_INIT(&fields[
|
6765
|
+
{UPB_TABKEY_STR("\004", "\000", "\000", "\000", "name"), UPB_TABVALUE_PTR_INIT(&fields[49]), NULL},
|
6872
6766
|
{UPB_TABKEY_NONE, UPB_TABVALUE_EMPTY_INIT, NULL},
|
6873
6767
|
{UPB_TABKEY_NONE, UPB_TABVALUE_EMPTY_INIT, NULL},
|
6874
6768
|
{UPB_TABKEY_NONE, UPB_TABVALUE_EMPTY_INIT, NULL},
|
@@ -6878,9 +6772,9 @@ static const upb_tabent strentries[236] = {
|
|
6878
6772
|
{UPB_TABKEY_NONE, UPB_TABVALUE_EMPTY_INIT, NULL},
|
6879
6773
|
{UPB_TABKEY_NONE, UPB_TABVALUE_EMPTY_INIT, NULL},
|
6880
6774
|
{UPB_TABKEY_NONE, UPB_TABVALUE_EMPTY_INIT, NULL},
|
6881
|
-
{UPB_TABKEY_STR("\022", "\000", "\000", "\000", "positive_int_value"), UPB_TABVALUE_PTR_INIT(&fields[
|
6775
|
+
{UPB_TABKEY_STR("\022", "\000", "\000", "\000", "positive_int_value"), UPB_TABVALUE_PTR_INIT(&fields[81]), NULL},
|
6882
6776
|
{UPB_TABKEY_STR("\020", "\000", "\000", "\000", "identifier_value"), UPB_TABVALUE_PTR_INIT(&fields[28]), NULL},
|
6883
|
-
{UPB_TABKEY_STR("\014", "\000", "\000", "\000", "string_value"), UPB_TABVALUE_PTR_INIT(&fields[
|
6777
|
+
{UPB_TABKEY_STR("\014", "\000", "\000", "\000", "string_value"), UPB_TABVALUE_PTR_INIT(&fields[92]), &strentries[182]},
|
6884
6778
|
{UPB_TABKEY_NONE, UPB_TABVALUE_EMPTY_INIT, NULL},
|
6885
6779
|
{UPB_TABKEY_NONE, UPB_TABVALUE_EMPTY_INIT, NULL},
|
6886
6780
|
{UPB_TABKEY_STR("\014", "\000", "\000", "\000", "is_extension"), UPB_TABVALUE_PTR_INIT(&fields[30]), NULL},
|
@@ -6937,92 +6831,92 @@ static const upb_tabent strentries[236] = {
|
|
6937
6831
|
|
6938
6832
|
static const upb_tabent intentries[18] = {
|
6939
6833
|
{UPB_TABKEY_NONE, UPB_TABVALUE_EMPTY_INIT, NULL},
|
6940
|
-
{UPB_TABKEY_NUM(999), UPB_TABVALUE_PTR_INIT(&fields[
|
6834
|
+
{UPB_TABKEY_NUM(999), UPB_TABVALUE_PTR_INIT(&fields[103]), NULL},
|
6941
6835
|
{UPB_TABKEY_NONE, UPB_TABVALUE_EMPTY_INIT, NULL},
|
6942
|
-
{UPB_TABKEY_NUM(999), UPB_TABVALUE_PTR_INIT(&fields[
|
6836
|
+
{UPB_TABKEY_NUM(999), UPB_TABVALUE_PTR_INIT(&fields[102]), NULL},
|
6943
6837
|
{UPB_TABKEY_NONE, UPB_TABVALUE_EMPTY_INIT, NULL},
|
6944
|
-
{UPB_TABKEY_NUM(999), UPB_TABVALUE_PTR_INIT(&fields[
|
6838
|
+
{UPB_TABKEY_NUM(999), UPB_TABVALUE_PTR_INIT(&fields[101]), NULL},
|
6945
6839
|
{UPB_TABKEY_NONE, UPB_TABVALUE_EMPTY_INIT, NULL},
|
6946
|
-
{UPB_TABKEY_NUM(999), UPB_TABVALUE_PTR_INIT(&fields[
|
6840
|
+
{UPB_TABKEY_NUM(999), UPB_TABVALUE_PTR_INIT(&fields[99]), NULL},
|
6947
6841
|
{UPB_TABKEY_NONE, UPB_TABVALUE_EMPTY_INIT, NULL},
|
6948
|
-
{UPB_TABKEY_NUM(999), UPB_TABVALUE_PTR_INIT(&fields[
|
6842
|
+
{UPB_TABKEY_NUM(999), UPB_TABVALUE_PTR_INIT(&fields[97]), NULL},
|
6949
6843
|
{UPB_TABKEY_NONE, UPB_TABVALUE_EMPTY_INIT, NULL},
|
6950
|
-
{UPB_TABKEY_NUM(33), UPB_TABVALUE_PTR_INIT(&fields[
|
6844
|
+
{UPB_TABKEY_NUM(33), UPB_TABVALUE_PTR_INIT(&fields[10]), NULL},
|
6951
6845
|
{UPB_TABKEY_NONE, UPB_TABVALUE_EMPTY_INIT, NULL},
|
6952
6846
|
{UPB_TABKEY_NUM(999), UPB_TABVALUE_PTR_INIT(&fields[100]), NULL},
|
6953
6847
|
{UPB_TABKEY_NONE, UPB_TABVALUE_EMPTY_INIT, NULL},
|
6954
|
-
{UPB_TABKEY_NUM(33), UPB_TABVALUE_PTR_INIT(&fields[
|
6848
|
+
{UPB_TABKEY_NUM(33), UPB_TABVALUE_PTR_INIT(&fields[15]), NULL},
|
6955
6849
|
{UPB_TABKEY_NONE, UPB_TABVALUE_EMPTY_INIT, NULL},
|
6956
|
-
{UPB_TABKEY_NUM(999), UPB_TABVALUE_PTR_INIT(&fields[
|
6850
|
+
{UPB_TABKEY_NUM(999), UPB_TABVALUE_PTR_INIT(&fields[98]), NULL},
|
6957
6851
|
};
|
6958
6852
|
|
6959
|
-
static const upb_tabval arrays[
|
6853
|
+
static const upb_tabval arrays[187] = {
|
6960
6854
|
UPB_TABVALUE_EMPTY_INIT,
|
6961
|
-
UPB_TABVALUE_PTR_INIT(&fields[
|
6855
|
+
UPB_TABVALUE_PTR_INIT(&fields[57]),
|
6962
6856
|
UPB_TABVALUE_PTR_INIT(&fields[25]),
|
6963
6857
|
UPB_TABVALUE_PTR_INIT(&fields[60]),
|
6964
|
-
UPB_TABVALUE_PTR_INIT(&fields[
|
6858
|
+
UPB_TABVALUE_PTR_INIT(&fields[20]),
|
6965
6859
|
UPB_TABVALUE_PTR_INIT(&fields[24]),
|
6966
6860
|
UPB_TABVALUE_PTR_INIT(&fields[22]),
|
6967
6861
|
UPB_TABVALUE_PTR_INIT(&fields[68]),
|
6968
6862
|
UPB_TABVALUE_PTR_INIT(&fields[65]),
|
6969
|
-
UPB_TABVALUE_PTR_INIT(&fields[
|
6970
|
-
UPB_TABVALUE_PTR_INIT(&fields[
|
6863
|
+
UPB_TABVALUE_PTR_INIT(&fields[85]),
|
6864
|
+
UPB_TABVALUE_PTR_INIT(&fields[84]),
|
6971
6865
|
UPB_TABVALUE_EMPTY_INIT,
|
6972
|
-
UPB_TABVALUE_PTR_INIT(&fields[
|
6866
|
+
UPB_TABVALUE_PTR_INIT(&fields[91]),
|
6973
6867
|
UPB_TABVALUE_PTR_INIT(&fields[18]),
|
6974
6868
|
UPB_TABVALUE_EMPTY_INIT,
|
6975
|
-
UPB_TABVALUE_PTR_INIT(&fields[
|
6869
|
+
UPB_TABVALUE_PTR_INIT(&fields[90]),
|
6976
6870
|
UPB_TABVALUE_PTR_INIT(&fields[17]),
|
6977
6871
|
UPB_TABVALUE_EMPTY_INIT,
|
6978
|
-
UPB_TABVALUE_PTR_INIT(&fields[
|
6979
|
-
UPB_TABVALUE_PTR_INIT(&fields[
|
6980
|
-
UPB_TABVALUE_PTR_INIT(&fields[
|
6872
|
+
UPB_TABVALUE_PTR_INIT(&fields[52]),
|
6873
|
+
UPB_TABVALUE_PTR_INIT(&fields[104]),
|
6874
|
+
UPB_TABVALUE_PTR_INIT(&fields[73]),
|
6981
6875
|
UPB_TABVALUE_EMPTY_INIT,
|
6982
6876
|
UPB_TABVALUE_EMPTY_INIT,
|
6983
6877
|
UPB_TABVALUE_PTR_INIT(&fields[1]),
|
6984
|
-
UPB_TABVALUE_PTR_INIT(&fields[
|
6878
|
+
UPB_TABVALUE_PTR_INIT(&fields[14]),
|
6985
6879
|
UPB_TABVALUE_EMPTY_INIT,
|
6986
|
-
UPB_TABVALUE_PTR_INIT(&fields[
|
6987
|
-
UPB_TABVALUE_PTR_INIT(&fields[
|
6988
|
-
UPB_TABVALUE_PTR_INIT(&fields[
|
6880
|
+
UPB_TABVALUE_PTR_INIT(&fields[50]),
|
6881
|
+
UPB_TABVALUE_PTR_INIT(&fields[63]),
|
6882
|
+
UPB_TABVALUE_PTR_INIT(&fields[74]),
|
6989
6883
|
UPB_TABVALUE_EMPTY_INIT,
|
6990
|
-
UPB_TABVALUE_PTR_INIT(&fields[
|
6884
|
+
UPB_TABVALUE_PTR_INIT(&fields[13]),
|
6991
6885
|
UPB_TABVALUE_EMPTY_INIT,
|
6992
|
-
UPB_TABVALUE_PTR_INIT(&fields[
|
6886
|
+
UPB_TABVALUE_PTR_INIT(&fields[56]),
|
6993
6887
|
UPB_TABVALUE_PTR_INIT(&fields[21]),
|
6994
|
-
UPB_TABVALUE_PTR_INIT(&fields[
|
6888
|
+
UPB_TABVALUE_PTR_INIT(&fields[62]),
|
6995
6889
|
UPB_TABVALUE_PTR_INIT(&fields[40]),
|
6996
|
-
UPB_TABVALUE_PTR_INIT(&fields[
|
6997
|
-
UPB_TABVALUE_PTR_INIT(&fields[
|
6890
|
+
UPB_TABVALUE_PTR_INIT(&fields[95]),
|
6891
|
+
UPB_TABVALUE_PTR_INIT(&fields[96]),
|
6998
6892
|
UPB_TABVALUE_PTR_INIT(&fields[7]),
|
6999
|
-
UPB_TABVALUE_PTR_INIT(&fields[
|
6893
|
+
UPB_TABVALUE_PTR_INIT(&fields[70]),
|
7000
6894
|
UPB_TABVALUE_PTR_INIT(&fields[66]),
|
7001
6895
|
UPB_TABVALUE_PTR_INIT(&fields[38]),
|
7002
6896
|
UPB_TABVALUE_EMPTY_INIT,
|
7003
6897
|
UPB_TABVALUE_PTR_INIT(&fields[6]),
|
7004
6898
|
UPB_TABVALUE_PTR_INIT(&fields[77]),
|
7005
|
-
UPB_TABVALUE_PTR_INIT(&fields[
|
6899
|
+
UPB_TABVALUE_PTR_INIT(&fields[9]),
|
7006
6900
|
UPB_TABVALUE_EMPTY_INIT,
|
7007
6901
|
UPB_TABVALUE_PTR_INIT(&fields[41]),
|
7008
6902
|
UPB_TABVALUE_PTR_INIT(&fields[39]),
|
7009
6903
|
UPB_TABVALUE_EMPTY_INIT,
|
7010
6904
|
UPB_TABVALUE_EMPTY_INIT,
|
7011
6905
|
UPB_TABVALUE_EMPTY_INIT,
|
7012
|
-
UPB_TABVALUE_PTR_INIT(&fields[
|
6906
|
+
UPB_TABVALUE_PTR_INIT(&fields[105]),
|
7013
6907
|
UPB_TABVALUE_EMPTY_INIT,
|
7014
|
-
UPB_TABVALUE_PTR_INIT(&fields[
|
6908
|
+
UPB_TABVALUE_PTR_INIT(&fields[51]),
|
7015
6909
|
UPB_TABVALUE_PTR_INIT(&fields[76]),
|
7016
6910
|
UPB_TABVALUE_PTR_INIT(&fields[8]),
|
7017
6911
|
UPB_TABVALUE_PTR_INIT(&fields[47]),
|
7018
|
-
UPB_TABVALUE_PTR_INIT(&fields[
|
7019
|
-
UPB_TABVALUE_PTR_INIT(&fields[
|
6912
|
+
UPB_TABVALUE_PTR_INIT(&fields[19]),
|
6913
|
+
UPB_TABVALUE_PTR_INIT(&fields[87]),
|
7020
6914
|
UPB_TABVALUE_PTR_INIT(&fields[23]),
|
7021
6915
|
UPB_TABVALUE_PTR_INIT(&fields[69]),
|
7022
|
-
UPB_TABVALUE_PTR_INIT(&fields[
|
7023
|
-
UPB_TABVALUE_PTR_INIT(&fields[
|
7024
|
-
UPB_TABVALUE_PTR_INIT(&fields[
|
7025
|
-
UPB_TABVALUE_PTR_INIT(&fields[
|
6916
|
+
UPB_TABVALUE_PTR_INIT(&fields[88]),
|
6917
|
+
UPB_TABVALUE_PTR_INIT(&fields[82]),
|
6918
|
+
UPB_TABVALUE_PTR_INIT(&fields[106]),
|
6919
|
+
UPB_TABVALUE_PTR_INIT(&fields[93]),
|
7026
6920
|
UPB_TABVALUE_EMPTY_INIT,
|
7027
6921
|
UPB_TABVALUE_PTR_INIT(&fields[26]),
|
7028
6922
|
UPB_TABVALUE_EMPTY_INIT,
|
@@ -7043,7 +6937,7 @@ static const upb_tabval arrays[184] = {
|
|
7043
6937
|
UPB_TABVALUE_EMPTY_INIT,
|
7044
6938
|
UPB_TABVALUE_PTR_INIT(&fields[3]),
|
7045
6939
|
UPB_TABVALUE_PTR_INIT(&fields[32]),
|
7046
|
-
UPB_TABVALUE_PTR_INIT(&fields[
|
6940
|
+
UPB_TABVALUE_PTR_INIT(&fields[83]),
|
7047
6941
|
UPB_TABVALUE_EMPTY_INIT,
|
7048
6942
|
UPB_TABVALUE_PTR_INIT(&fields[31]),
|
7049
6943
|
UPB_TABVALUE_EMPTY_INIT,
|
@@ -7065,25 +6959,28 @@ static const upb_tabval arrays[184] = {
|
|
7065
6959
|
UPB_TABVALUE_PTR_INIT(&fields[5]),
|
7066
6960
|
UPB_TABVALUE_PTR_INIT(&fields[37]),
|
7067
6961
|
UPB_TABVALUE_EMPTY_INIT,
|
6962
|
+
UPB_TABVALUE_PTR_INIT(&fields[79]),
|
6963
|
+
UPB_TABVALUE_PTR_INIT(&fields[80]),
|
6964
|
+
UPB_TABVALUE_EMPTY_INIT,
|
7068
6965
|
UPB_TABVALUE_PTR_INIT(&fields[46]),
|
7069
6966
|
UPB_TABVALUE_PTR_INIT(&fields[61]),
|
7070
|
-
UPB_TABVALUE_PTR_INIT(&fields[
|
6967
|
+
UPB_TABVALUE_PTR_INIT(&fields[11]),
|
7071
6968
|
UPB_TABVALUE_EMPTY_INIT,
|
7072
6969
|
UPB_TABVALUE_EMPTY_INIT,
|
7073
6970
|
UPB_TABVALUE_EMPTY_INIT,
|
7074
6971
|
UPB_TABVALUE_PTR_INIT(&fields[45]),
|
7075
6972
|
UPB_TABVALUE_EMPTY_INIT,
|
7076
|
-
UPB_TABVALUE_PTR_INIT(&fields[
|
6973
|
+
UPB_TABVALUE_PTR_INIT(&fields[55]),
|
7077
6974
|
UPB_TABVALUE_PTR_INIT(&fields[29]),
|
7078
6975
|
UPB_TABVALUE_PTR_INIT(&fields[75]),
|
7079
|
-
UPB_TABVALUE_PTR_INIT(&fields[
|
6976
|
+
UPB_TABVALUE_PTR_INIT(&fields[71]),
|
7080
6977
|
UPB_TABVALUE_PTR_INIT(&fields[4]),
|
7081
|
-
UPB_TABVALUE_PTR_INIT(&fields[
|
6978
|
+
UPB_TABVALUE_PTR_INIT(&fields[86]),
|
7082
6979
|
UPB_TABVALUE_EMPTY_INIT,
|
7083
6980
|
UPB_TABVALUE_EMPTY_INIT,
|
7084
|
-
UPB_TABVALUE_PTR_INIT(&fields[
|
6981
|
+
UPB_TABVALUE_PTR_INIT(&fields[54]),
|
7085
6982
|
UPB_TABVALUE_EMPTY_INIT,
|
7086
|
-
UPB_TABVALUE_PTR_INIT(&fields[
|
6983
|
+
UPB_TABVALUE_PTR_INIT(&fields[53]),
|
7087
6984
|
UPB_TABVALUE_PTR_INIT(&fields[48]),
|
7088
6985
|
UPB_TABVALUE_PTR_INIT(&fields[72]),
|
7089
6986
|
UPB_TABVALUE_EMPTY_INIT,
|
@@ -7091,19 +6988,19 @@ static const upb_tabval arrays[184] = {
|
|
7091
6988
|
UPB_TABVALUE_PTR_INIT(&fields[44]),
|
7092
6989
|
UPB_TABVALUE_EMPTY_INIT,
|
7093
6990
|
UPB_TABVALUE_PTR_INIT(&fields[78]),
|
7094
|
-
UPB_TABVALUE_PTR_INIT(&fields[
|
6991
|
+
UPB_TABVALUE_PTR_INIT(&fields[89]),
|
7095
6992
|
UPB_TABVALUE_PTR_INIT(&fields[42]),
|
7096
|
-
UPB_TABVALUE_PTR_INIT(&fields[
|
6993
|
+
UPB_TABVALUE_PTR_INIT(&fields[94]),
|
7097
6994
|
UPB_TABVALUE_EMPTY_INIT,
|
7098
6995
|
UPB_TABVALUE_PTR_INIT(&fields[43]),
|
7099
6996
|
UPB_TABVALUE_EMPTY_INIT,
|
7100
6997
|
UPB_TABVALUE_EMPTY_INIT,
|
7101
|
-
UPB_TABVALUE_PTR_INIT(&fields[
|
6998
|
+
UPB_TABVALUE_PTR_INIT(&fields[49]),
|
7102
6999
|
UPB_TABVALUE_PTR_INIT(&fields[28]),
|
7103
|
-
UPB_TABVALUE_PTR_INIT(&fields[
|
7000
|
+
UPB_TABVALUE_PTR_INIT(&fields[81]),
|
7104
7001
|
UPB_TABVALUE_PTR_INIT(&fields[59]),
|
7105
7002
|
UPB_TABVALUE_PTR_INIT(&fields[16]),
|
7106
|
-
UPB_TABVALUE_PTR_INIT(&fields[
|
7003
|
+
UPB_TABVALUE_PTR_INIT(&fields[92]),
|
7107
7004
|
UPB_TABVALUE_PTR_INIT(&fields[0]),
|
7108
7005
|
UPB_TABVALUE_EMPTY_INIT,
|
7109
7006
|
UPB_TABVALUE_PTR_INIT(&fields[58]),
|
@@ -7144,7 +7041,11 @@ static const upb_tabval arrays[184] = {
|
|
7144
7041
|
};
|
7145
7042
|
|
7146
7043
|
#ifdef UPB_DEBUG_REFS
|
7147
|
-
static upb_inttable reftables[
|
7044
|
+
static upb_inttable reftables[268] = {
|
7045
|
+
UPB_EMPTY_INTTABLE_INIT(UPB_CTYPE_PTR),
|
7046
|
+
UPB_EMPTY_INTTABLE_INIT(UPB_CTYPE_PTR),
|
7047
|
+
UPB_EMPTY_INTTABLE_INIT(UPB_CTYPE_PTR),
|
7048
|
+
UPB_EMPTY_INTTABLE_INIT(UPB_CTYPE_PTR),
|
7148
7049
|
UPB_EMPTY_INTTABLE_INIT(UPB_CTYPE_PTR),
|
7149
7050
|
UPB_EMPTY_INTTABLE_INIT(UPB_CTYPE_PTR),
|
7150
7051
|
UPB_EMPTY_INTTABLE_INIT(UPB_CTYPE_PTR),
|
@@ -7686,6 +7587,37 @@ static size_t file_onpackage(void *closure, const void *hd, const char *buf,
|
|
7686
7587
|
return n;
|
7687
7588
|
}
|
7688
7589
|
|
7590
|
+
static size_t file_onphpnamespace(void *closure, const void *hd,
|
7591
|
+
const char *buf, size_t n,
|
7592
|
+
const upb_bufhandle *handle) {
|
7593
|
+
upb_descreader *r = closure;
|
7594
|
+
char *php_namespace;
|
7595
|
+
bool ok;
|
7596
|
+
UPB_UNUSED(hd);
|
7597
|
+
UPB_UNUSED(handle);
|
7598
|
+
|
7599
|
+
php_namespace = upb_gstrndup(buf, n);
|
7600
|
+
ok = upb_filedef_setphpnamespace(r->file, php_namespace, NULL);
|
7601
|
+
upb_gfree(php_namespace);
|
7602
|
+
UPB_ASSERT(ok);
|
7603
|
+
return n;
|
7604
|
+
}
|
7605
|
+
|
7606
|
+
static size_t file_onphpprefix(void *closure, const void *hd, const char *buf,
|
7607
|
+
size_t n, const upb_bufhandle *handle) {
|
7608
|
+
upb_descreader *r = closure;
|
7609
|
+
char *prefix;
|
7610
|
+
bool ok;
|
7611
|
+
UPB_UNUSED(hd);
|
7612
|
+
UPB_UNUSED(handle);
|
7613
|
+
|
7614
|
+
prefix = upb_gstrndup(buf, n);
|
7615
|
+
ok = upb_filedef_setphpprefix(r->file, prefix, NULL);
|
7616
|
+
upb_gfree(prefix);
|
7617
|
+
UPB_ASSERT(ok);
|
7618
|
+
return n;
|
7619
|
+
}
|
7620
|
+
|
7689
7621
|
static size_t file_onsyntax(void *closure, const void *hd, const char *buf,
|
7690
7622
|
size_t n, const upb_bufhandle *handle) {
|
7691
7623
|
upb_descreader *r = closure;
|
@@ -8212,6 +8144,11 @@ static void reghandlers(const void *closure, upb_handlers *h) {
|
|
8212
8144
|
upb_handlers_setbool(h, F(FieldOptions, packed), &field_onpacked, NULL);
|
8213
8145
|
} else if (upbdefs_google_protobuf_MessageOptions_is(m)) {
|
8214
8146
|
upb_handlers_setbool(h, F(MessageOptions, map_entry), &msg_onmapentry, NULL);
|
8147
|
+
} else if (upbdefs_google_protobuf_FileOptions_is(m)) {
|
8148
|
+
upb_handlers_setstring(h, F(FileOptions, php_class_prefix),
|
8149
|
+
&file_onphpprefix, NULL);
|
8150
|
+
upb_handlers_setstring(h, F(FileOptions, php_namespace),
|
8151
|
+
&file_onphpnamespace, NULL);
|
8215
8152
|
}
|
8216
8153
|
|
8217
8154
|
UPB_ASSERT(upb_ok(upb_handlers_status(h)));
|
@@ -10759,7 +10696,7 @@ static size_t encode_strbuf(void *c, const void *hd, const char *buf,
|
|
10759
10696
|
T(double, double, dbl2uint64, encode_fixed64)
|
10760
10697
|
T(float, float, flt2uint32, encode_fixed32)
|
10761
10698
|
T(int64, int64_t, uint64_t, encode_varint)
|
10762
|
-
T(int32, int32_t,
|
10699
|
+
T(int32, int32_t, int64_t, encode_varint)
|
10763
10700
|
T(fixed64, uint64_t, uint64_t, encode_fixed64)
|
10764
10701
|
T(fixed32, uint32_t, uint32_t, encode_fixed32)
|
10765
10702
|
T(bool, bool, bool, encode_varint)
|
@@ -11374,57 +11311,6 @@ done:
|
|
11374
11311
|
return r;
|
11375
11312
|
}
|
11376
11313
|
|
11377
|
-
/* Given an encoded varint v, returns an integer with a single bit set that
|
11378
|
-
* indicates the end of the varint. Subtracting one from this value will
|
11379
|
-
* yield a mask that leaves only bits that are part of the varint. Returns
|
11380
|
-
* 0 if the varint is unterminated. */
|
11381
|
-
static uint64_t upb_get_vstopbit(uint64_t v) {
|
11382
|
-
uint64_t cbits = v | 0x7f7f7f7f7f7f7f7fULL;
|
11383
|
-
return ~cbits & (cbits+1);
|
11384
|
-
}
|
11385
|
-
|
11386
|
-
/* A branchless decoder. Credit to Pascal Massimino for the bit-twiddling. */
|
11387
|
-
upb_decoderet upb_vdecode_max8_massimino(upb_decoderet r) {
|
11388
|
-
uint64_t b;
|
11389
|
-
uint64_t stop_bit;
|
11390
|
-
upb_decoderet my_r;
|
11391
|
-
memcpy(&b, r.p, sizeof(b));
|
11392
|
-
stop_bit = upb_get_vstopbit(b);
|
11393
|
-
b = (b & 0x7f7f7f7f7f7f7f7fULL) & (stop_bit - 1);
|
11394
|
-
b += b & 0x007f007f007f007fULL;
|
11395
|
-
b += 3 * (b & 0x0000ffff0000ffffULL);
|
11396
|
-
b += 15 * (b & 0x00000000ffffffffULL);
|
11397
|
-
if (stop_bit == 0) {
|
11398
|
-
/* Error: unterminated varint. */
|
11399
|
-
upb_decoderet err_r = {(void*)0, 0};
|
11400
|
-
return err_r;
|
11401
|
-
}
|
11402
|
-
my_r = upb_decoderet_make(r.p + ((__builtin_ctzll(stop_bit) + 1) / 8),
|
11403
|
-
r.val | (b << 7));
|
11404
|
-
return my_r;
|
11405
|
-
}
|
11406
|
-
|
11407
|
-
/* A branchless decoder. Credit to Daniel Wright for the bit-twiddling. */
|
11408
|
-
upb_decoderet upb_vdecode_max8_wright(upb_decoderet r) {
|
11409
|
-
uint64_t b;
|
11410
|
-
uint64_t stop_bit;
|
11411
|
-
upb_decoderet my_r;
|
11412
|
-
memcpy(&b, r.p, sizeof(b));
|
11413
|
-
stop_bit = upb_get_vstopbit(b);
|
11414
|
-
b &= (stop_bit - 1);
|
11415
|
-
b = ((b & 0x7f007f007f007f00ULL) >> 1) | (b & 0x007f007f007f007fULL);
|
11416
|
-
b = ((b & 0xffff0000ffff0000ULL) >> 2) | (b & 0x0000ffff0000ffffULL);
|
11417
|
-
b = ((b & 0xffffffff00000000ULL) >> 4) | (b & 0x00000000ffffffffULL);
|
11418
|
-
if (stop_bit == 0) {
|
11419
|
-
/* Error: unterminated varint. */
|
11420
|
-
upb_decoderet err_r = {(void*)0, 0};
|
11421
|
-
return err_r;
|
11422
|
-
}
|
11423
|
-
my_r = upb_decoderet_make(r.p + ((__builtin_ctzll(stop_bit) + 1) / 8),
|
11424
|
-
r.val | (b << 14));
|
11425
|
-
return my_r;
|
11426
|
-
}
|
11427
|
-
|
11428
11314
|
#line 1 "upb/json/parser.rl"
|
11429
11315
|
/*
|
11430
11316
|
** upb::json::Parser (upb_json_parser)
|
@@ -11447,8 +11333,9 @@ upb_decoderet upb_vdecode_max8_wright(upb_decoderet r) {
|
|
11447
11333
|
** - handling of keys/escape-sequences/etc that span input buffers.
|
11448
11334
|
*/
|
11449
11335
|
|
11450
|
-
#include <assert.h>
|
11451
11336
|
#include <errno.h>
|
11337
|
+
#include <float.h>
|
11338
|
+
#include <math.h>
|
11452
11339
|
#include <stdint.h>
|
11453
11340
|
#include <stdlib.h>
|
11454
11341
|
#include <string.h>
|
@@ -12033,103 +11920,156 @@ static void start_number(upb_json_parser *p, const char *ptr) {
|
|
12033
11920
|
capture_begin(p, ptr);
|
12034
11921
|
}
|
12035
11922
|
|
12036
|
-
static bool parse_number(upb_json_parser *p);
|
11923
|
+
static bool parse_number(upb_json_parser *p, bool is_quoted);
|
12037
11924
|
|
12038
11925
|
static bool end_number(upb_json_parser *p, const char *ptr) {
|
12039
11926
|
if (!capture_end(p, ptr)) {
|
12040
11927
|
return false;
|
12041
11928
|
}
|
12042
11929
|
|
12043
|
-
return parse_number(p);
|
11930
|
+
return parse_number(p, false);
|
12044
11931
|
}
|
12045
11932
|
|
12046
|
-
static bool
|
12047
|
-
|
12048
|
-
|
12049
|
-
const char *myend;
|
11933
|
+
static bool parse_number_from_buffer(upb_json_parser *p, const char *buf,
|
11934
|
+
const char *bufend, bool is_quoted) {
|
11935
|
+
size_t len = bufend - buf;
|
12050
11936
|
char *end;
|
11937
|
+
upb_fieldtype_t type = upb_fielddef_type(p->top->f);
|
11938
|
+
double val;
|
11939
|
+
double dummy;
|
12051
11940
|
|
12052
|
-
|
12053
|
-
* the input string, so we need to force a copy into a NULL-terminated buffer. */
|
12054
|
-
if (!multipart_text(p, "\0", 1, false)) {
|
11941
|
+
if (buf[0] == ' ') {
|
12055
11942
|
return false;
|
12056
11943
|
}
|
12057
11944
|
|
12058
|
-
|
12059
|
-
|
12060
|
-
|
12061
|
-
|
12062
|
-
|
12063
|
-
* handle correctly.
|
12064
|
-
*
|
12065
|
-
* XXX: Also, we can't handle large integers properly because strto[u]ll
|
12066
|
-
* isn't in C89.
|
12067
|
-
*
|
12068
|
-
* XXX: Also, we don't properly check floats for overflow, since strtof
|
12069
|
-
* isn't in C89. */
|
12070
|
-
switch (upb_fielddef_type(p->top->f)) {
|
11945
|
+
/* For integer types, first try parsing with integer-specific routines.
|
11946
|
+
* If these succeed, they will be more accurate for int64/uint64 than
|
11947
|
+
* strtod().
|
11948
|
+
*/
|
11949
|
+
switch (type) {
|
12071
11950
|
case UPB_TYPE_ENUM:
|
12072
11951
|
case UPB_TYPE_INT32: {
|
12073
|
-
long val = strtol(
|
12074
|
-
if (
|
12075
|
-
|
12076
|
-
else
|
11952
|
+
long val = strtol(buf, &end, 0);
|
11953
|
+
if (errno == ERANGE || end != bufend) {
|
11954
|
+
break;
|
11955
|
+
} else if (val > INT32_MAX || val < INT32_MIN) {
|
11956
|
+
return false;
|
11957
|
+
} else {
|
12077
11958
|
upb_sink_putint32(&p->top->sink, parser_getsel(p), val);
|
12078
|
-
|
12079
|
-
|
12080
|
-
case UPB_TYPE_INT64: {
|
12081
|
-
long long val = strtol(p->accumulated, &end, 0);
|
12082
|
-
if (val > INT64_MAX || val < INT64_MIN || errno == ERANGE || end != myend)
|
12083
|
-
goto err;
|
12084
|
-
else
|
12085
|
-
upb_sink_putint64(&p->top->sink, parser_getsel(p), val);
|
12086
|
-
break;
|
11959
|
+
return true;
|
11960
|
+
}
|
12087
11961
|
}
|
12088
11962
|
case UPB_TYPE_UINT32: {
|
12089
|
-
unsigned long val = strtoul(
|
12090
|
-
if (
|
12091
|
-
|
12092
|
-
else
|
11963
|
+
unsigned long val = strtoul(buf, &end, 0);
|
11964
|
+
if (end != bufend) {
|
11965
|
+
break;
|
11966
|
+
} else if (val > UINT32_MAX || errno == ERANGE) {
|
11967
|
+
return false;
|
11968
|
+
} else {
|
12093
11969
|
upb_sink_putuint32(&p->top->sink, parser_getsel(p), val);
|
12094
|
-
|
11970
|
+
return true;
|
11971
|
+
}
|
11972
|
+
}
|
11973
|
+
/* XXX: We can't handle [u]int64 properly on 32-bit machines because
|
11974
|
+
* strto[u]ll isn't in C89. */
|
11975
|
+
case UPB_TYPE_INT64: {
|
11976
|
+
long val = strtol(buf, &end, 0);
|
11977
|
+
if (errno == ERANGE || end != bufend) {
|
11978
|
+
break;
|
11979
|
+
} else {
|
11980
|
+
upb_sink_putint64(&p->top->sink, parser_getsel(p), val);
|
11981
|
+
return true;
|
11982
|
+
}
|
12095
11983
|
}
|
12096
11984
|
case UPB_TYPE_UINT64: {
|
12097
|
-
unsigned long
|
12098
|
-
if (
|
12099
|
-
|
12100
|
-
else
|
11985
|
+
unsigned long val = strtoul(p->accumulated, &end, 0);
|
11986
|
+
if (end != bufend) {
|
11987
|
+
break;
|
11988
|
+
} else if (errno == ERANGE) {
|
11989
|
+
return false;
|
11990
|
+
} else {
|
12101
11991
|
upb_sink_putuint64(&p->top->sink, parser_getsel(p), val);
|
12102
|
-
|
11992
|
+
return true;
|
11993
|
+
}
|
12103
11994
|
}
|
12104
|
-
|
12105
|
-
double val = strtod(p->accumulated, &end);
|
12106
|
-
if (errno == ERANGE || end != myend)
|
12107
|
-
goto err;
|
12108
|
-
else
|
12109
|
-
upb_sink_putdouble(&p->top->sink, parser_getsel(p), val);
|
11995
|
+
default:
|
12110
11996
|
break;
|
11997
|
+
}
|
11998
|
+
|
11999
|
+
if (type != UPB_TYPE_DOUBLE && type != UPB_TYPE_FLOAT && is_quoted) {
|
12000
|
+
/* Quoted numbers shouldn't support double forms for integer types. */
|
12001
|
+
return false;
|
12002
|
+
}
|
12003
|
+
|
12004
|
+
if (len == strlen("Infinity") && strcmp(buf, "Infinity") == 0) {
|
12005
|
+
/* C89 does not have an INFINITY macro. */
|
12006
|
+
val = 1.0 / 0.0;
|
12007
|
+
} else if (len == strlen("-Infinity") && strcmp(buf, "-Infinity") == 0) {
|
12008
|
+
val = -1.0 / 0.0;
|
12009
|
+
} else {
|
12010
|
+
val = strtod(buf, &end);
|
12011
|
+
if (errno == ERANGE || end != bufend) {
|
12012
|
+
return false;
|
12111
12013
|
}
|
12112
|
-
|
12113
|
-
|
12114
|
-
|
12115
|
-
|
12116
|
-
|
12117
|
-
|
12118
|
-
|
12014
|
+
}
|
12015
|
+
|
12016
|
+
switch (type) {
|
12017
|
+
#define CASE(capitaltype, smalltype, min, max) \
|
12018
|
+
case UPB_TYPE_ ## capitaltype: { \
|
12019
|
+
if (modf(val, &dummy) != 0 || val > max || val < min) { \
|
12020
|
+
return false; \
|
12021
|
+
} else { \
|
12022
|
+
upb_sink_put ## smalltype(&p->top->sink, parser_getsel(p), val); \
|
12023
|
+
return true; \
|
12024
|
+
} \
|
12025
|
+
break; \
|
12119
12026
|
}
|
12027
|
+
case UPB_TYPE_ENUM:
|
12028
|
+
CASE(INT32, int32, INT32_MIN, INT32_MAX);
|
12029
|
+
CASE(INT64, int64, INT64_MIN, INT64_MAX);
|
12030
|
+
CASE(UINT32, uint32, 0, UINT32_MAX);
|
12031
|
+
CASE(UINT64, uint64, 0, UINT64_MAX);
|
12032
|
+
#undef CASE
|
12033
|
+
|
12034
|
+
case UPB_TYPE_DOUBLE:
|
12035
|
+
upb_sink_putdouble(&p->top->sink, parser_getsel(p), val);
|
12036
|
+
return true;
|
12037
|
+
case UPB_TYPE_FLOAT:
|
12038
|
+
if (false /*val > FLT_MAX || val < -FLT_MAX*/) {
|
12039
|
+
return false;
|
12040
|
+
} else {
|
12041
|
+
upb_sink_putfloat(&p->top->sink, parser_getsel(p), val);
|
12042
|
+
return true;
|
12043
|
+
}
|
12120
12044
|
default:
|
12121
|
-
|
12045
|
+
return false;
|
12122
12046
|
}
|
12047
|
+
}
|
12123
12048
|
|
12124
|
-
|
12049
|
+
static bool parse_number(upb_json_parser *p, bool is_quoted) {
|
12050
|
+
size_t len;
|
12051
|
+
const char *buf;
|
12052
|
+
const char *bufend;
|
12125
12053
|
|
12126
|
-
|
12054
|
+
/* strtol() and friends unfortunately do not support specifying the length of
|
12055
|
+
* the input string, so we need to force a copy into a NULL-terminated buffer. */
|
12056
|
+
if (!multipart_text(p, "\0", 1, false)) {
|
12057
|
+
return false;
|
12058
|
+
}
|
12127
12059
|
|
12128
|
-
|
12129
|
-
|
12130
|
-
|
12131
|
-
|
12132
|
-
|
12060
|
+
buf = accumulate_getptr(p, &len);
|
12061
|
+
bufend = buf + len - 1; /* One for NULL. */
|
12062
|
+
errno = 0;
|
12063
|
+
|
12064
|
+
if (parse_number_from_buffer(p, buf, bufend, is_quoted)) {
|
12065
|
+
multipart_end(p);
|
12066
|
+
return true;
|
12067
|
+
} else {
|
12068
|
+
upb_status_seterrf(&p->status, "error parsing number: %s", buf);
|
12069
|
+
upb_env_reporterror(p->env, &p->status);
|
12070
|
+
multipart_end(p);
|
12071
|
+
return false;
|
12072
|
+
}
|
12133
12073
|
}
|
12134
12074
|
|
12135
12075
|
static bool parser_putbool(upb_json_parser *p, bool val) {
|
@@ -12182,17 +12122,16 @@ static bool start_stringval(upb_json_parser *p) {
|
|
12182
12122
|
multipart_startaccum(p);
|
12183
12123
|
return true;
|
12184
12124
|
}
|
12185
|
-
} else if (upb_fielddef_type(p->top->f)
|
12186
|
-
|
12187
|
-
|
12188
|
-
*
|
12189
|
-
*
|
12190
|
-
* once it is complete. */
|
12125
|
+
} else if (upb_fielddef_type(p->top->f) != UPB_TYPE_BOOL &&
|
12126
|
+
upb_fielddef_type(p->top->f) != UPB_TYPE_MESSAGE) {
|
12127
|
+
/* No need to push a frame -- numeric values in quotes remain in the
|
12128
|
+
* current parser frame. These values must accmulate so we can convert
|
12129
|
+
* them all at once at the end. */
|
12191
12130
|
multipart_startaccum(p);
|
12192
12131
|
return true;
|
12193
12132
|
} else {
|
12194
12133
|
upb_status_seterrf(&p->status,
|
12195
|
-
"String specified for
|
12134
|
+
"String specified for bool or submessage field: %s",
|
12196
12135
|
upb_fielddef_name(p->top->f));
|
12197
12136
|
upb_env_reporterror(p->env, &p->status);
|
12198
12137
|
return false;
|
@@ -12239,6 +12178,15 @@ static bool end_stringval(upb_json_parser *p) {
|
|
12239
12178
|
break;
|
12240
12179
|
}
|
12241
12180
|
|
12181
|
+
case UPB_TYPE_INT32:
|
12182
|
+
case UPB_TYPE_INT64:
|
12183
|
+
case UPB_TYPE_UINT32:
|
12184
|
+
case UPB_TYPE_UINT64:
|
12185
|
+
case UPB_TYPE_DOUBLE:
|
12186
|
+
case UPB_TYPE_FLOAT:
|
12187
|
+
ok = parse_number(p, true);
|
12188
|
+
break;
|
12189
|
+
|
12242
12190
|
default:
|
12243
12191
|
UPB_ASSERT(false);
|
12244
12192
|
upb_status_seterrmsg(&p->status, "Internal error in JSON decoder");
|
@@ -12282,7 +12230,7 @@ static bool parse_mapentry_key(upb_json_parser *p) {
|
|
12282
12230
|
case UPB_TYPE_UINT32:
|
12283
12231
|
case UPB_TYPE_UINT64:
|
12284
12232
|
/* Invoke end_number. The accum buffer has the number's text already. */
|
12285
|
-
if (!parse_number(p)) {
|
12233
|
+
if (!parse_number(p, true)) {
|
12286
12234
|
return false;
|
12287
12235
|
}
|
12288
12236
|
break;
|
@@ -12573,11 +12521,11 @@ static void end_object(upb_json_parser *p) {
|
|
12573
12521
|
* final state once, when the closing '"' is seen. */
|
12574
12522
|
|
12575
12523
|
|
12576
|
-
#line
|
12524
|
+
#line 1306 "upb/json/parser.rl"
|
12577
12525
|
|
12578
12526
|
|
12579
12527
|
|
12580
|
-
#line
|
12528
|
+
#line 1218 "upb/json/parser.c"
|
12581
12529
|
static const char _json_actions[] = {
|
12582
12530
|
0, 1, 0, 1, 2, 1, 3, 1,
|
12583
12531
|
5, 1, 6, 1, 7, 1, 8, 1,
|
@@ -12726,7 +12674,7 @@ static const int json_en_value_machine = 27;
|
|
12726
12674
|
static const int json_en_main = 1;
|
12727
12675
|
|
12728
12676
|
|
12729
|
-
#line
|
12677
|
+
#line 1309 "upb/json/parser.rl"
|
12730
12678
|
|
12731
12679
|
size_t parse(void *closure, const void *hd, const char *buf, size_t size,
|
12732
12680
|
const upb_bufhandle *handle) {
|
@@ -12748,7 +12696,7 @@ size_t parse(void *closure, const void *hd, const char *buf, size_t size,
|
|
12748
12696
|
capture_resume(parser, buf);
|
12749
12697
|
|
12750
12698
|
|
12751
|
-
#line
|
12699
|
+
#line 1389 "upb/json/parser.c"
|
12752
12700
|
{
|
12753
12701
|
int _klen;
|
12754
12702
|
unsigned int _trans;
|
@@ -12823,118 +12771,118 @@ _match:
|
|
12823
12771
|
switch ( *_acts++ )
|
12824
12772
|
{
|
12825
12773
|
case 0:
|
12826
|
-
#line
|
12774
|
+
#line 1221 "upb/json/parser.rl"
|
12827
12775
|
{ p--; {cs = stack[--top]; goto _again;} }
|
12828
12776
|
break;
|
12829
12777
|
case 1:
|
12830
|
-
#line
|
12778
|
+
#line 1222 "upb/json/parser.rl"
|
12831
12779
|
{ p--; {stack[top++] = cs; cs = 10; goto _again;} }
|
12832
12780
|
break;
|
12833
12781
|
case 2:
|
12834
|
-
#line
|
12782
|
+
#line 1226 "upb/json/parser.rl"
|
12835
12783
|
{ start_text(parser, p); }
|
12836
12784
|
break;
|
12837
12785
|
case 3:
|
12838
|
-
#line
|
12786
|
+
#line 1227 "upb/json/parser.rl"
|
12839
12787
|
{ CHECK_RETURN_TOP(end_text(parser, p)); }
|
12840
12788
|
break;
|
12841
12789
|
case 4:
|
12842
|
-
#line
|
12790
|
+
#line 1233 "upb/json/parser.rl"
|
12843
12791
|
{ start_hex(parser); }
|
12844
12792
|
break;
|
12845
12793
|
case 5:
|
12846
|
-
#line
|
12794
|
+
#line 1234 "upb/json/parser.rl"
|
12847
12795
|
{ hexdigit(parser, p); }
|
12848
12796
|
break;
|
12849
12797
|
case 6:
|
12850
|
-
#line
|
12798
|
+
#line 1235 "upb/json/parser.rl"
|
12851
12799
|
{ CHECK_RETURN_TOP(end_hex(parser)); }
|
12852
12800
|
break;
|
12853
12801
|
case 7:
|
12854
|
-
#line
|
12802
|
+
#line 1241 "upb/json/parser.rl"
|
12855
12803
|
{ CHECK_RETURN_TOP(escape(parser, p)); }
|
12856
12804
|
break;
|
12857
12805
|
case 8:
|
12858
|
-
#line
|
12806
|
+
#line 1247 "upb/json/parser.rl"
|
12859
12807
|
{ p--; {cs = stack[--top]; goto _again;} }
|
12860
12808
|
break;
|
12861
12809
|
case 9:
|
12862
|
-
#line
|
12810
|
+
#line 1250 "upb/json/parser.rl"
|
12863
12811
|
{ {stack[top++] = cs; cs = 19; goto _again;} }
|
12864
12812
|
break;
|
12865
12813
|
case 10:
|
12866
|
-
#line
|
12814
|
+
#line 1252 "upb/json/parser.rl"
|
12867
12815
|
{ p--; {stack[top++] = cs; cs = 27; goto _again;} }
|
12868
12816
|
break;
|
12869
12817
|
case 11:
|
12870
|
-
#line
|
12818
|
+
#line 1257 "upb/json/parser.rl"
|
12871
12819
|
{ start_member(parser); }
|
12872
12820
|
break;
|
12873
12821
|
case 12:
|
12874
|
-
#line
|
12822
|
+
#line 1258 "upb/json/parser.rl"
|
12875
12823
|
{ CHECK_RETURN_TOP(end_membername(parser)); }
|
12876
12824
|
break;
|
12877
12825
|
case 13:
|
12878
|
-
#line
|
12826
|
+
#line 1261 "upb/json/parser.rl"
|
12879
12827
|
{ end_member(parser); }
|
12880
12828
|
break;
|
12881
12829
|
case 14:
|
12882
|
-
#line
|
12830
|
+
#line 1267 "upb/json/parser.rl"
|
12883
12831
|
{ start_object(parser); }
|
12884
12832
|
break;
|
12885
12833
|
case 15:
|
12886
|
-
#line
|
12834
|
+
#line 1270 "upb/json/parser.rl"
|
12887
12835
|
{ end_object(parser); }
|
12888
12836
|
break;
|
12889
12837
|
case 16:
|
12890
|
-
#line
|
12838
|
+
#line 1276 "upb/json/parser.rl"
|
12891
12839
|
{ CHECK_RETURN_TOP(start_array(parser)); }
|
12892
12840
|
break;
|
12893
12841
|
case 17:
|
12894
|
-
#line
|
12842
|
+
#line 1280 "upb/json/parser.rl"
|
12895
12843
|
{ end_array(parser); }
|
12896
12844
|
break;
|
12897
12845
|
case 18:
|
12898
|
-
#line
|
12846
|
+
#line 1285 "upb/json/parser.rl"
|
12899
12847
|
{ start_number(parser, p); }
|
12900
12848
|
break;
|
12901
12849
|
case 19:
|
12902
|
-
#line
|
12850
|
+
#line 1286 "upb/json/parser.rl"
|
12903
12851
|
{ CHECK_RETURN_TOP(end_number(parser, p)); }
|
12904
12852
|
break;
|
12905
12853
|
case 20:
|
12906
|
-
#line
|
12854
|
+
#line 1288 "upb/json/parser.rl"
|
12907
12855
|
{ CHECK_RETURN_TOP(start_stringval(parser)); }
|
12908
12856
|
break;
|
12909
12857
|
case 21:
|
12910
|
-
#line
|
12858
|
+
#line 1289 "upb/json/parser.rl"
|
12911
12859
|
{ CHECK_RETURN_TOP(end_stringval(parser)); }
|
12912
12860
|
break;
|
12913
12861
|
case 22:
|
12914
|
-
#line
|
12862
|
+
#line 1291 "upb/json/parser.rl"
|
12915
12863
|
{ CHECK_RETURN_TOP(parser_putbool(parser, true)); }
|
12916
12864
|
break;
|
12917
12865
|
case 23:
|
12918
|
-
#line
|
12866
|
+
#line 1293 "upb/json/parser.rl"
|
12919
12867
|
{ CHECK_RETURN_TOP(parser_putbool(parser, false)); }
|
12920
12868
|
break;
|
12921
12869
|
case 24:
|
12922
|
-
#line
|
12870
|
+
#line 1295 "upb/json/parser.rl"
|
12923
12871
|
{ /* null value */ }
|
12924
12872
|
break;
|
12925
12873
|
case 25:
|
12926
|
-
#line
|
12874
|
+
#line 1297 "upb/json/parser.rl"
|
12927
12875
|
{ CHECK_RETURN_TOP(start_subobject(parser)); }
|
12928
12876
|
break;
|
12929
12877
|
case 26:
|
12930
|
-
#line
|
12878
|
+
#line 1298 "upb/json/parser.rl"
|
12931
12879
|
{ end_subobject(parser); }
|
12932
12880
|
break;
|
12933
12881
|
case 27:
|
12934
|
-
#line
|
12882
|
+
#line 1303 "upb/json/parser.rl"
|
12935
12883
|
{ p--; {cs = stack[--top]; goto _again;} }
|
12936
12884
|
break;
|
12937
|
-
#line
|
12885
|
+
#line 1575 "upb/json/parser.c"
|
12938
12886
|
}
|
12939
12887
|
}
|
12940
12888
|
|
@@ -12947,7 +12895,7 @@ _again:
|
|
12947
12895
|
_out: {}
|
12948
12896
|
}
|
12949
12897
|
|
12950
|
-
#line
|
12898
|
+
#line 1330 "upb/json/parser.rl"
|
12951
12899
|
|
12952
12900
|
if (p != pe) {
|
12953
12901
|
upb_status_seterrf(&parser->status, "Parse error at '%.*s'\n", pe - p, p);
|
@@ -12988,13 +12936,13 @@ static void json_parser_reset(upb_json_parser *p) {
|
|
12988
12936
|
|
12989
12937
|
/* Emit Ragel initialization of the parser. */
|
12990
12938
|
|
12991
|
-
#line
|
12939
|
+
#line 1629 "upb/json/parser.c"
|
12992
12940
|
{
|
12993
12941
|
cs = json_start;
|
12994
12942
|
top = 0;
|
12995
12943
|
}
|
12996
12944
|
|
12997
|
-
#line
|
12945
|
+
#line 1370 "upb/json/parser.rl"
|
12998
12946
|
p->current_state = cs;
|
12999
12947
|
p->parser_top = top;
|
13000
12948
|
accumulate_clear(p);
|
@@ -13291,10 +13239,23 @@ static void putstring(upb_json_printer *p, const char *buf, unsigned int len) {
|
|
13291
13239
|
* Right now we use %.8g and %.17g for float/double, respectively, to match
|
13292
13240
|
* proto2::util::JsonFormat's defaults. May want to change this later. */
|
13293
13241
|
|
13242
|
+
const char neginf[] = "\"-Infinity\"";
|
13243
|
+
const char inf[] = "\"Infinity\"";
|
13244
|
+
|
13294
13245
|
static size_t fmt_double(double val, char* buf, size_t length) {
|
13295
|
-
|
13296
|
-
|
13297
|
-
|
13246
|
+
if (val == (1.0 / 0.0)) {
|
13247
|
+
CHKLENGTH(length >= strlen(inf));
|
13248
|
+
strcpy(buf, inf);
|
13249
|
+
return strlen(inf);
|
13250
|
+
} else if (val == (-1.0 / 0.0)) {
|
13251
|
+
CHKLENGTH(length >= strlen(neginf));
|
13252
|
+
strcpy(buf, neginf);
|
13253
|
+
return strlen(neginf);
|
13254
|
+
} else {
|
13255
|
+
size_t n = _upb_snprintf(buf, length, "%.17g", val);
|
13256
|
+
CHKLENGTH(n > 0 && n < length);
|
13257
|
+
return n;
|
13258
|
+
}
|
13298
13259
|
}
|
13299
13260
|
|
13300
13261
|
static size_t fmt_float(float val, char* buf, size_t length) {
|