A few more fixes, and test fastdecode under Kokoro.

pull/13171/head
Joshua Haberman 4 years ago
parent 55f3569cd2
commit b928696942
  1. 2
      BUILD
  2. 488
      cmake/google/protobuf/descriptor.upb.c
  3. 16
      kokoro/ubuntu/build.sh
  4. 2
      upb/decode.int.h
  5. 9
      upb/decode_fast.c
  6. 4
      upb/msg.h

@ -38,7 +38,7 @@ config_setting(
upb_fasttable_enabled(
name = "fasttable_enabled",
build_setting_default = True,
build_setting_default = False,
visibility = ["//visibility:public"],
)

@ -23,10 +23,8 @@ static const upb_msglayout_field google_protobuf_FileDescriptorSet__fields[1] =
const upb_msglayout google_protobuf_FileDescriptorSet_msginit = {
&google_protobuf_FileDescriptorSet_submsgs[0],
&google_protobuf_FileDescriptorSet__fields[0],
UPB_SIZE(8, 8), 1, false, 8,
UPB_SIZE(8, 8), 1, false, 255,
{
{0x0000000000000000, &fastdecode_generic},
{0x000000003f00000a, &upb_prm_1bt_max192b},
},
};
@ -57,24 +55,8 @@ static const upb_msglayout_field google_protobuf_FileDescriptorProto__fields[12]
const upb_msglayout google_protobuf_FileDescriptorProto_msginit = {
&google_protobuf_FileDescriptorProto_submsgs[0],
&google_protobuf_FileDescriptorProto__fields[0],
UPB_SIZE(64, 128), 12, false, 120,
UPB_SIZE(64, 128), 12, false, 255,
{
{0x0000000000000000, &fastdecode_generic},
{0x000800000100000a, &upb_pss_1bt},
{0x0018000002000012, &upb_pss_1bt},
{0x004800003f00001a, &upb_prs_1bt},
{0x005000003f000022, &upb_prm_1bt_max128b},
{0x005800003f01002a, &upb_prm_1bt_max128b},
{0x006000003f040032, &upb_prm_1bt_max64b},
{0x006800003f02003a, &upb_prm_1bt_max128b},
{0x0038000003030042, &upb_psm_1bt_max256b},
{0x004000000405004a, &upb_psm_1bt_max64b},
{0x007000003f000050, &upb_prv4_1bt},
{0x007800003f000058, &upb_prv4_1bt},
{0x0028000005000062, &upb_pss_1bt},
{0x0000000000000000, &fastdecode_generic},
{0x0000000000000000, &fastdecode_generic},
{0x0000000000000000, &fastdecode_generic},
},
};
@ -104,24 +86,8 @@ static const upb_msglayout_field google_protobuf_DescriptorProto__fields[10] = {
const upb_msglayout google_protobuf_DescriptorProto_msginit = {
&google_protobuf_DescriptorProto_submsgs[0],
&google_protobuf_DescriptorProto__fields[0],
UPB_SIZE(48, 96), 10, false, 120,
UPB_SIZE(48, 96), 10, false, 255,
{
{0x0000000000000000, &fastdecode_generic},
{0x000800000100000a, &upb_pss_1bt},
{0x002000003f040012, &upb_prm_1bt_max128b},
{0x002800003f00001a, &upb_prm_1bt_max128b},
{0x003000003f030022, &upb_prm_1bt_max128b},
{0x003800003f01002a, &upb_prm_1bt_max64b},
{0x004000003f040032, &upb_prm_1bt_max128b},
{0x001800000205003a, &upb_psm_1bt_max64b},
{0x004800003f060042, &upb_prm_1bt_max64b},
{0x005000003f02004a, &upb_prm_1bt_max64b},
{0x005800003f000052, &upb_prs_1bt},
{0x0000000000000000, &fastdecode_generic},
{0x0000000000000000, &fastdecode_generic},
{0x0000000000000000, &fastdecode_generic},
{0x0000000000000000, &fastdecode_generic},
{0x0000000000000000, &fastdecode_generic},
},
};
@ -138,12 +104,8 @@ static const upb_msglayout_field google_protobuf_DescriptorProto_ExtensionRange_
const upb_msglayout google_protobuf_DescriptorProto_ExtensionRange_msginit = {
&google_protobuf_DescriptorProto_ExtensionRange_submsgs[0],
&google_protobuf_DescriptorProto_ExtensionRange__fields[0],
UPB_SIZE(16, 24), 3, false, 24,
UPB_SIZE(16, 24), 3, false, 255,
{
{0x0000000000000000, &fastdecode_generic},
{0x0004000001000008, &upb_psv4_1bt},
{0x0008000002000010, &upb_psv4_1bt},
{0x001000000300001a, &upb_psm_1bt_max64b},
},
};
@ -155,12 +117,8 @@ static const upb_msglayout_field google_protobuf_DescriptorProto_ReservedRange__
const upb_msglayout google_protobuf_DescriptorProto_ReservedRange_msginit = {
NULL,
&google_protobuf_DescriptorProto_ReservedRange__fields[0],
UPB_SIZE(16, 16), 2, false, 24,
UPB_SIZE(16, 16), 2, false, 255,
{
{0x0000000000000000, &fastdecode_generic},
{0x0004000001000008, &upb_psv4_1bt},
{0x0008000002000010, &upb_psv4_1bt},
{0x0000000000000000, &fastdecode_generic},
},
};
@ -175,40 +133,8 @@ static const upb_msglayout_field google_protobuf_ExtensionRangeOptions__fields[1
const upb_msglayout google_protobuf_ExtensionRangeOptions_msginit = {
&google_protobuf_ExtensionRangeOptions_submsgs[0],
&google_protobuf_ExtensionRangeOptions__fields[0],
UPB_SIZE(8, 8), 1, false, 248,
UPB_SIZE(8, 8), 1, false, 255,
{
{0x0000000000000000, &fastdecode_generic},
{0x0000000000000000, &fastdecode_generic},
{0x0000000000000000, &fastdecode_generic},
{0x0000000000000000, &fastdecode_generic},
{0x0000000000000000, &fastdecode_generic},
{0x0000000000000000, &fastdecode_generic},
{0x0000000000000000, &fastdecode_generic},
{0x0000000000000000, &fastdecode_generic},
{0x0000000000000000, &fastdecode_generic},
{0x0000000000000000, &fastdecode_generic},
{0x0000000000000000, &fastdecode_generic},
{0x0000000000000000, &fastdecode_generic},
{0x0000000000000000, &fastdecode_generic},
{0x0000000000000000, &fastdecode_generic},
{0x0000000000000000, &fastdecode_generic},
{0x0000000000000000, &fastdecode_generic},
{0x0000000000000000, &fastdecode_generic},
{0x0000000000000000, &fastdecode_generic},
{0x0000000000000000, &fastdecode_generic},
{0x0000000000000000, &fastdecode_generic},
{0x0000000000000000, &fastdecode_generic},
{0x0000000000000000, &fastdecode_generic},
{0x0000000000000000, &fastdecode_generic},
{0x000000003f003eba, &upb_prm_2bt_max128b},
{0x0000000000000000, &fastdecode_generic},
{0x0000000000000000, &fastdecode_generic},
{0x0000000000000000, &fastdecode_generic},
{0x0000000000000000, &fastdecode_generic},
{0x0000000000000000, &fastdecode_generic},
{0x0000000000000000, &fastdecode_generic},
{0x0000000000000000, &fastdecode_generic},
{0x0000000000000000, &fastdecode_generic},
},
};
@ -233,40 +159,8 @@ static const upb_msglayout_field google_protobuf_FieldDescriptorProto__fields[11
const upb_msglayout google_protobuf_FieldDescriptorProto_msginit = {
&google_protobuf_FieldDescriptorProto_submsgs[0],
&google_protobuf_FieldDescriptorProto__fields[0],
UPB_SIZE(72, 112), 11, false, 248,
UPB_SIZE(72, 112), 11, false, 255,
{
{0x0000000000000000, &fastdecode_generic},
{0x001800000100000a, &upb_pss_1bt},
{0x0028000002000012, &upb_pss_1bt},
{0x000c000003000018, &upb_psv4_1bt},
{0x0004000004000020, &upb_psv4_1bt},
{0x0008000005000028, &upb_psv4_1bt},
{0x0038000006000032, &upb_pss_1bt},
{0x004800000700003a, &upb_pss_1bt},
{0x0068000008000042, &upb_psm_1bt_max64b},
{0x0010000009000048, &upb_psv4_1bt},
{0x005800000a000052, &upb_pss_1bt},
{0x0000000000000000, &fastdecode_generic},
{0x0000000000000000, &fastdecode_generic},
{0x0000000000000000, &fastdecode_generic},
{0x0000000000000000, &fastdecode_generic},
{0x0000000000000000, &fastdecode_generic},
{0x0000000000000000, &fastdecode_generic},
{0x001400000b000188, &upb_psb1_2bt},
{0x0000000000000000, &fastdecode_generic},
{0x0000000000000000, &fastdecode_generic},
{0x0000000000000000, &fastdecode_generic},
{0x0000000000000000, &fastdecode_generic},
{0x0000000000000000, &fastdecode_generic},
{0x0000000000000000, &fastdecode_generic},
{0x0000000000000000, &fastdecode_generic},
{0x0000000000000000, &fastdecode_generic},
{0x0000000000000000, &fastdecode_generic},
{0x0000000000000000, &fastdecode_generic},
{0x0000000000000000, &fastdecode_generic},
{0x0000000000000000, &fastdecode_generic},
{0x0000000000000000, &fastdecode_generic},
{0x0000000000000000, &fastdecode_generic},
},
};
@ -282,12 +176,8 @@ static const upb_msglayout_field google_protobuf_OneofDescriptorProto__fields[2]
const upb_msglayout google_protobuf_OneofDescriptorProto_msginit = {
&google_protobuf_OneofDescriptorProto_submsgs[0],
&google_protobuf_OneofDescriptorProto__fields[0],
UPB_SIZE(16, 32), 2, false, 24,
UPB_SIZE(16, 32), 2, false, 255,
{
{0x0000000000000000, &fastdecode_generic},
{0x000800000100000a, &upb_pss_1bt},
{0x0018000002000012, &upb_psm_1bt_max64b},
{0x0000000000000000, &fastdecode_generic},
},
};
@ -308,16 +198,8 @@ static const upb_msglayout_field google_protobuf_EnumDescriptorProto__fields[5]
const upb_msglayout google_protobuf_EnumDescriptorProto_msginit = {
&google_protobuf_EnumDescriptorProto_submsgs[0],
&google_protobuf_EnumDescriptorProto__fields[0],
UPB_SIZE(32, 64), 5, false, 56,
UPB_SIZE(32, 64), 5, false, 255,
{
{0x0000000000000000, &fastdecode_generic},
{0x000800000100000a, &upb_pss_1bt},
{0x002000003f020012, &upb_prm_1bt_max64b},
{0x001800000201001a, &upb_psm_1bt_max64b},
{0x002800003f000022, &upb_prm_1bt_max64b},
{0x003000003f00002a, &upb_prs_1bt},
{0x0000000000000000, &fastdecode_generic},
{0x0000000000000000, &fastdecode_generic},
},
};
@ -329,12 +211,8 @@ static const upb_msglayout_field google_protobuf_EnumDescriptorProto_EnumReserve
const upb_msglayout google_protobuf_EnumDescriptorProto_EnumReservedRange_msginit = {
NULL,
&google_protobuf_EnumDescriptorProto_EnumReservedRange__fields[0],
UPB_SIZE(16, 16), 2, false, 24,
UPB_SIZE(16, 16), 2, false, 255,
{
{0x0000000000000000, &fastdecode_generic},
{0x0004000001000008, &upb_psv4_1bt},
{0x0008000002000010, &upb_psv4_1bt},
{0x0000000000000000, &fastdecode_generic},
},
};
@ -351,12 +229,8 @@ static const upb_msglayout_field google_protobuf_EnumValueDescriptorProto__field
const upb_msglayout google_protobuf_EnumValueDescriptorProto_msginit = {
&google_protobuf_EnumValueDescriptorProto_submsgs[0],
&google_protobuf_EnumValueDescriptorProto__fields[0],
UPB_SIZE(24, 32), 3, false, 24,
UPB_SIZE(24, 32), 3, false, 255,
{
{0x0000000000000000, &fastdecode_generic},
{0x000800000100000a, &upb_pss_1bt},
{0x0004000002000010, &upb_psv4_1bt},
{0x001800000300001a, &upb_psm_1bt_max64b},
},
};
@ -374,12 +248,8 @@ static const upb_msglayout_field google_protobuf_ServiceDescriptorProto__fields[
const upb_msglayout google_protobuf_ServiceDescriptorProto_msginit = {
&google_protobuf_ServiceDescriptorProto_submsgs[0],
&google_protobuf_ServiceDescriptorProto__fields[0],
UPB_SIZE(24, 48), 3, false, 24,
UPB_SIZE(24, 48), 3, false, 255,
{
{0x0000000000000000, &fastdecode_generic},
{0x000800000100000a, &upb_pss_1bt},
{0x002000003f000012, &upb_prm_1bt_max128b},
{0x001800000201001a, &upb_psm_1bt_max64b},
},
};
@ -399,16 +269,8 @@ static const upb_msglayout_field google_protobuf_MethodDescriptorProto__fields[6
const upb_msglayout google_protobuf_MethodDescriptorProto_msginit = {
&google_protobuf_MethodDescriptorProto_submsgs[0],
&google_protobuf_MethodDescriptorProto__fields[0],
UPB_SIZE(32, 64), 6, false, 56,
UPB_SIZE(32, 64), 6, false, 255,
{
{0x0000000000000000, &fastdecode_generic},
{0x000800000100000a, &upb_pss_1bt},
{0x0018000002000012, &upb_pss_1bt},
{0x002800000300001a, &upb_pss_1bt},
{0x0038000004000022, &upb_psm_1bt_max64b},
{0x0001000005000028, &upb_psb1_1bt},
{0x0002000006000030, &upb_psb1_1bt},
{0x0000000000000000, &fastdecode_generic},
},
};
@ -443,40 +305,8 @@ static const upb_msglayout_field google_protobuf_FileOptions__fields[21] = {
const upb_msglayout google_protobuf_FileOptions_msginit = {
&google_protobuf_FileOptions_submsgs[0],
&google_protobuf_FileOptions__fields[0],
UPB_SIZE(104, 192), 21, false, 248,
UPB_SIZE(104, 192), 21, false, 255,
{
{0x0000000000000000, &fastdecode_generic},
{0x001800000100000a, &upb_pss_1bt},
{0x0000000000000000, &fastdecode_generic},
{0x0000000000000000, &fastdecode_generic},
{0x0000000000000000, &fastdecode_generic},
{0x0000000000000000, &fastdecode_generic},
{0x0000000000000000, &fastdecode_generic},
{0x0000000000000000, &fastdecode_generic},
{0x0028000002000042, &upb_pss_1bt},
{0x0004000003000048, &upb_psv4_1bt},
{0x0008000004000050, &upb_psb1_1bt},
{0x003800000500005a, &upb_pss_1bt},
{0x0000000000000000, &fastdecode_generic},
{0x0000000000000000, &fastdecode_generic},
{0x0000000000000000, &fastdecode_generic},
{0x0000000000000000, &fastdecode_generic},
{0x0009000006000180, &upb_psb1_2bt},
{0x000a000007000188, &upb_psb1_2bt},
{0x000b000008000190, &upb_psb1_2bt},
{0x0000000000000000, &fastdecode_generic},
{0x000c0000090001a0, &upb_psb1_2bt},
{0x005800000e0002aa, &upb_pss_2bt},
{0x0000000000000000, &fastdecode_generic},
{0x000d00000a0001b8, &upb_psb1_2bt},
{0x00780000100002c2, &upb_pss_2bt},
{0x00880000110002ca, &upb_pss_2bt},
{0x00100000120002d0, &upb_psb1_2bt},
{0x000e00000b0001d8, &upb_psb1_2bt},
{0x00980000130002e2, &upb_pss_2bt},
{0x00a80000140002ea, &upb_pss_2bt},
{0x0000000000000000, &fastdecode_generic},
{0x000f00000c0001f8, &upb_psb1_2bt},
},
};
@ -495,40 +325,8 @@ static const upb_msglayout_field google_protobuf_MessageOptions__fields[5] = {
const upb_msglayout google_protobuf_MessageOptions_msginit = {
&google_protobuf_MessageOptions_submsgs[0],
&google_protobuf_MessageOptions__fields[0],
UPB_SIZE(16, 16), 5, false, 248,
UPB_SIZE(16, 16), 5, false, 255,
{
{0x0000000000000000, &fastdecode_generic},
{0x0001000001000008, &upb_psb1_1bt},
{0x0002000002000010, &upb_psb1_1bt},
{0x0003000003000018, &upb_psb1_1bt},
{0x0000000000000000, &fastdecode_generic},
{0x0000000000000000, &fastdecode_generic},
{0x0000000000000000, &fastdecode_generic},
{0x0004000004000038, &upb_psb1_1bt},
{0x0000000000000000, &fastdecode_generic},
{0x0000000000000000, &fastdecode_generic},
{0x0000000000000000, &fastdecode_generic},
{0x0000000000000000, &fastdecode_generic},
{0x0000000000000000, &fastdecode_generic},
{0x0000000000000000, &fastdecode_generic},
{0x0000000000000000, &fastdecode_generic},
{0x0000000000000000, &fastdecode_generic},
{0x0000000000000000, &fastdecode_generic},
{0x0000000000000000, &fastdecode_generic},
{0x0000000000000000, &fastdecode_generic},
{0x0000000000000000, &fastdecode_generic},
{0x0000000000000000, &fastdecode_generic},
{0x0000000000000000, &fastdecode_generic},
{0x0000000000000000, &fastdecode_generic},
{0x000800003f003eba, &upb_prm_2bt_max128b},
{0x0000000000000000, &fastdecode_generic},
{0x0000000000000000, &fastdecode_generic},
{0x0000000000000000, &fastdecode_generic},
{0x0000000000000000, &fastdecode_generic},
{0x0000000000000000, &fastdecode_generic},
{0x0000000000000000, &fastdecode_generic},
{0x0000000000000000, &fastdecode_generic},
{0x0000000000000000, &fastdecode_generic},
},
};
@ -549,40 +347,8 @@ static const upb_msglayout_field google_protobuf_FieldOptions__fields[7] = {
const upb_msglayout google_protobuf_FieldOptions_msginit = {
&google_protobuf_FieldOptions_submsgs[0],
&google_protobuf_FieldOptions__fields[0],
UPB_SIZE(24, 24), 7, false, 248,
UPB_SIZE(24, 24), 7, false, 255,
{
{0x0000000000000000, &fastdecode_generic},
{0x0004000001000008, &upb_psv4_1bt},
{0x000c000002000010, &upb_psb1_1bt},
{0x000d000003000018, &upb_psb1_1bt},
{0x0000000000000000, &fastdecode_generic},
{0x000e000004000028, &upb_psb1_1bt},
{0x0008000005000030, &upb_psv4_1bt},
{0x0000000000000000, &fastdecode_generic},
{0x0000000000000000, &fastdecode_generic},
{0x0000000000000000, &fastdecode_generic},
{0x000f000006000050, &upb_psb1_1bt},
{0x0000000000000000, &fastdecode_generic},
{0x0000000000000000, &fastdecode_generic},
{0x0000000000000000, &fastdecode_generic},
{0x0000000000000000, &fastdecode_generic},
{0x0000000000000000, &fastdecode_generic},
{0x0000000000000000, &fastdecode_generic},
{0x0000000000000000, &fastdecode_generic},
{0x0000000000000000, &fastdecode_generic},
{0x0000000000000000, &fastdecode_generic},
{0x0000000000000000, &fastdecode_generic},
{0x0000000000000000, &fastdecode_generic},
{0x0000000000000000, &fastdecode_generic},
{0x001000003f003eba, &upb_prm_2bt_max128b},
{0x0000000000000000, &fastdecode_generic},
{0x0000000000000000, &fastdecode_generic},
{0x0000000000000000, &fastdecode_generic},
{0x0000000000000000, &fastdecode_generic},
{0x0000000000000000, &fastdecode_generic},
{0x0000000000000000, &fastdecode_generic},
{0x0000000000000000, &fastdecode_generic},
{0x0000000000000000, &fastdecode_generic},
},
};
@ -597,40 +363,8 @@ static const upb_msglayout_field google_protobuf_OneofOptions__fields[1] = {
const upb_msglayout google_protobuf_OneofOptions_msginit = {
&google_protobuf_OneofOptions_submsgs[0],
&google_protobuf_OneofOptions__fields[0],
UPB_SIZE(8, 8), 1, false, 248,
UPB_SIZE(8, 8), 1, false, 255,
{
{0x0000000000000000, &fastdecode_generic},
{0x0000000000000000, &fastdecode_generic},
{0x0000000000000000, &fastdecode_generic},
{0x0000000000000000, &fastdecode_generic},
{0x0000000000000000, &fastdecode_generic},
{0x0000000000000000, &fastdecode_generic},
{0x0000000000000000, &fastdecode_generic},
{0x0000000000000000, &fastdecode_generic},
{0x0000000000000000, &fastdecode_generic},
{0x0000000000000000, &fastdecode_generic},
{0x0000000000000000, &fastdecode_generic},
{0x0000000000000000, &fastdecode_generic},
{0x0000000000000000, &fastdecode_generic},
{0x0000000000000000, &fastdecode_generic},
{0x0000000000000000, &fastdecode_generic},
{0x0000000000000000, &fastdecode_generic},
{0x0000000000000000, &fastdecode_generic},
{0x0000000000000000, &fastdecode_generic},
{0x0000000000000000, &fastdecode_generic},
{0x0000000000000000, &fastdecode_generic},
{0x0000000000000000, &fastdecode_generic},
{0x0000000000000000, &fastdecode_generic},
{0x0000000000000000, &fastdecode_generic},
{0x000000003f003eba, &upb_prm_2bt_max128b},
{0x0000000000000000, &fastdecode_generic},
{0x0000000000000000, &fastdecode_generic},
{0x0000000000000000, &fastdecode_generic},
{0x0000000000000000, &fastdecode_generic},
{0x0000000000000000, &fastdecode_generic},
{0x0000000000000000, &fastdecode_generic},
{0x0000000000000000, &fastdecode_generic},
{0x0000000000000000, &fastdecode_generic},
},
};
@ -647,40 +381,8 @@ static const upb_msglayout_field google_protobuf_EnumOptions__fields[3] = {
const upb_msglayout google_protobuf_EnumOptions_msginit = {
&google_protobuf_EnumOptions_submsgs[0],
&google_protobuf_EnumOptions__fields[0],
UPB_SIZE(8, 16), 3, false, 248,
UPB_SIZE(8, 16), 3, false, 255,
{
{0x0000000000000000, &fastdecode_generic},
{0x0000000000000000, &fastdecode_generic},
{0x0001000001000010, &upb_psb1_1bt},
{0x0002000002000018, &upb_psb1_1bt},
{0x0000000000000000, &fastdecode_generic},
{0x0000000000000000, &fastdecode_generic},
{0x0000000000000000, &fastdecode_generic},
{0x0000000000000000, &fastdecode_generic},
{0x0000000000000000, &fastdecode_generic},
{0x0000000000000000, &fastdecode_generic},
{0x0000000000000000, &fastdecode_generic},
{0x0000000000000000, &fastdecode_generic},
{0x0000000000000000, &fastdecode_generic},
{0x0000000000000000, &fastdecode_generic},
{0x0000000000000000, &fastdecode_generic},
{0x0000000000000000, &fastdecode_generic},
{0x0000000000000000, &fastdecode_generic},
{0x0000000000000000, &fastdecode_generic},
{0x0000000000000000, &fastdecode_generic},
{0x0000000000000000, &fastdecode_generic},
{0x0000000000000000, &fastdecode_generic},
{0x0000000000000000, &fastdecode_generic},
{0x0000000000000000, &fastdecode_generic},
{0x000800003f003eba, &upb_prm_2bt_max128b},
{0x0000000000000000, &fastdecode_generic},
{0x0000000000000000, &fastdecode_generic},
{0x0000000000000000, &fastdecode_generic},
{0x0000000000000000, &fastdecode_generic},
{0x0000000000000000, &fastdecode_generic},
{0x0000000000000000, &fastdecode_generic},
{0x0000000000000000, &fastdecode_generic},
{0x0000000000000000, &fastdecode_generic},
},
};
@ -696,40 +398,8 @@ static const upb_msglayout_field google_protobuf_EnumValueOptions__fields[2] = {
const upb_msglayout google_protobuf_EnumValueOptions_msginit = {
&google_protobuf_EnumValueOptions_submsgs[0],
&google_protobuf_EnumValueOptions__fields[0],
UPB_SIZE(8, 16), 2, false, 248,
UPB_SIZE(8, 16), 2, false, 255,
{
{0x0000000000000000, &fastdecode_generic},
{0x0001000001000008, &upb_psb1_1bt},
{0x0000000000000000, &fastdecode_generic},
{0x0000000000000000, &fastdecode_generic},
{0x0000000000000000, &fastdecode_generic},
{0x0000000000000000, &fastdecode_generic},
{0x0000000000000000, &fastdecode_generic},
{0x0000000000000000, &fastdecode_generic},
{0x0000000000000000, &fastdecode_generic},
{0x0000000000000000, &fastdecode_generic},
{0x0000000000000000, &fastdecode_generic},
{0x0000000000000000, &fastdecode_generic},
{0x0000000000000000, &fastdecode_generic},
{0x0000000000000000, &fastdecode_generic},
{0x0000000000000000, &fastdecode_generic},
{0x0000000000000000, &fastdecode_generic},
{0x0000000000000000, &fastdecode_generic},
{0x0000000000000000, &fastdecode_generic},
{0x0000000000000000, &fastdecode_generic},
{0x0000000000000000, &fastdecode_generic},
{0x0000000000000000, &fastdecode_generic},
{0x0000000000000000, &fastdecode_generic},
{0x0000000000000000, &fastdecode_generic},
{0x000800003f003eba, &upb_prm_2bt_max128b},
{0x0000000000000000, &fastdecode_generic},
{0x0000000000000000, &fastdecode_generic},
{0x0000000000000000, &fastdecode_generic},
{0x0000000000000000, &fastdecode_generic},
{0x0000000000000000, &fastdecode_generic},
{0x0000000000000000, &fastdecode_generic},
{0x0000000000000000, &fastdecode_generic},
{0x0000000000000000, &fastdecode_generic},
},
};
@ -745,40 +415,8 @@ static const upb_msglayout_field google_protobuf_ServiceOptions__fields[2] = {
const upb_msglayout google_protobuf_ServiceOptions_msginit = {
&google_protobuf_ServiceOptions_submsgs[0],
&google_protobuf_ServiceOptions__fields[0],
UPB_SIZE(8, 16), 2, false, 248,
UPB_SIZE(8, 16), 2, false, 255,
{
{0x0000000000000000, &fastdecode_generic},
{0x0000000000000000, &fastdecode_generic},
{0x0000000000000000, &fastdecode_generic},
{0x0000000000000000, &fastdecode_generic},
{0x0000000000000000, &fastdecode_generic},
{0x0000000000000000, &fastdecode_generic},
{0x0000000000000000, &fastdecode_generic},
{0x0000000000000000, &fastdecode_generic},
{0x0000000000000000, &fastdecode_generic},
{0x0000000000000000, &fastdecode_generic},
{0x0000000000000000, &fastdecode_generic},
{0x0000000000000000, &fastdecode_generic},
{0x0000000000000000, &fastdecode_generic},
{0x0000000000000000, &fastdecode_generic},
{0x0000000000000000, &fastdecode_generic},
{0x0000000000000000, &fastdecode_generic},
{0x0000000000000000, &fastdecode_generic},
{0x0001000001000288, &upb_psb1_2bt},
{0x0000000000000000, &fastdecode_generic},
{0x0000000000000000, &fastdecode_generic},
{0x0000000000000000, &fastdecode_generic},
{0x0000000000000000, &fastdecode_generic},
{0x0000000000000000, &fastdecode_generic},
{0x000800003f003eba, &upb_prm_2bt_max128b},
{0x0000000000000000, &fastdecode_generic},
{0x0000000000000000, &fastdecode_generic},
{0x0000000000000000, &fastdecode_generic},
{0x0000000000000000, &fastdecode_generic},
{0x0000000000000000, &fastdecode_generic},
{0x0000000000000000, &fastdecode_generic},
{0x0000000000000000, &fastdecode_generic},
{0x0000000000000000, &fastdecode_generic},
},
};
@ -795,40 +433,8 @@ static const upb_msglayout_field google_protobuf_MethodOptions__fields[3] = {
const upb_msglayout google_protobuf_MethodOptions_msginit = {
&google_protobuf_MethodOptions_submsgs[0],
&google_protobuf_MethodOptions__fields[0],
UPB_SIZE(16, 24), 3, false, 248,
UPB_SIZE(16, 24), 3, false, 255,
{
{0x0000000000000000, &fastdecode_generic},
{0x0000000000000000, &fastdecode_generic},
{0x0000000000000000, &fastdecode_generic},
{0x0000000000000000, &fastdecode_generic},
{0x0000000000000000, &fastdecode_generic},
{0x0000000000000000, &fastdecode_generic},
{0x0000000000000000, &fastdecode_generic},
{0x0000000000000000, &fastdecode_generic},
{0x0000000000000000, &fastdecode_generic},
{0x0000000000000000, &fastdecode_generic},
{0x0000000000000000, &fastdecode_generic},
{0x0000000000000000, &fastdecode_generic},
{0x0000000000000000, &fastdecode_generic},
{0x0000000000000000, &fastdecode_generic},
{0x0000000000000000, &fastdecode_generic},
{0x0000000000000000, &fastdecode_generic},
{0x0000000000000000, &fastdecode_generic},
{0x0008000001000288, &upb_psb1_2bt},
{0x0004000002000290, &upb_psv4_2bt},
{0x0000000000000000, &fastdecode_generic},
{0x0000000000000000, &fastdecode_generic},
{0x0000000000000000, &fastdecode_generic},
{0x0000000000000000, &fastdecode_generic},
{0x001000003f003eba, &upb_prm_2bt_max128b},
{0x0000000000000000, &fastdecode_generic},
{0x0000000000000000, &fastdecode_generic},
{0x0000000000000000, &fastdecode_generic},
{0x0000000000000000, &fastdecode_generic},
{0x0000000000000000, &fastdecode_generic},
{0x0000000000000000, &fastdecode_generic},
{0x0000000000000000, &fastdecode_generic},
{0x0000000000000000, &fastdecode_generic},
},
};
@ -849,24 +455,8 @@ static const upb_msglayout_field google_protobuf_UninterpretedOption__fields[7]
const upb_msglayout google_protobuf_UninterpretedOption_msginit = {
&google_protobuf_UninterpretedOption_submsgs[0],
&google_protobuf_UninterpretedOption__fields[0],
UPB_SIZE(64, 96), 7, false, 120,
UPB_SIZE(64, 96), 7, false, 255,
{
{0x0000000000000000, &fastdecode_generic},
{0x0000000000000000, &fastdecode_generic},
{0x005000003f000012, &upb_prm_1bt_max64b},
{0x002000000100001a, &upb_pss_1bt},
{0x0008000002000020, &upb_psv8_1bt},
{0x0010000003000028, &upb_psv8_1bt},
{0x0018000004000031, &upb_psf8_1bt},
{0x003000000500003a, &upb_pss_1bt},
{0x0040000006000042, &upb_pss_1bt},
{0x0000000000000000, &fastdecode_generic},
{0x0000000000000000, &fastdecode_generic},
{0x0000000000000000, &fastdecode_generic},
{0x0000000000000000, &fastdecode_generic},
{0x0000000000000000, &fastdecode_generic},
{0x0000000000000000, &fastdecode_generic},
{0x0000000000000000, &fastdecode_generic},
},
};
@ -878,12 +468,8 @@ static const upb_msglayout_field google_protobuf_UninterpretedOption_NamePart__f
const upb_msglayout google_protobuf_UninterpretedOption_NamePart_msginit = {
NULL,
&google_protobuf_UninterpretedOption_NamePart__fields[0],
UPB_SIZE(16, 32), 2, false, 24,
UPB_SIZE(16, 32), 2, false, 255,
{
{0x0000000000000000, &fastdecode_generic},
{0x000800000100000a, &upb_pss_1bt},
{0x0001000002000010, &upb_psb1_1bt},
{0x0000000000000000, &fastdecode_generic},
},
};
@ -898,10 +484,8 @@ static const upb_msglayout_field google_protobuf_SourceCodeInfo__fields[1] = {
const upb_msglayout google_protobuf_SourceCodeInfo_msginit = {
&google_protobuf_SourceCodeInfo_submsgs[0],
&google_protobuf_SourceCodeInfo__fields[0],
UPB_SIZE(8, 8), 1, false, 8,
UPB_SIZE(8, 8), 1, false, 255,
{
{0x0000000000000000, &fastdecode_generic},
{0x000000003f00000a, &upb_prm_1bt_max128b},
},
};
@ -916,16 +500,8 @@ static const upb_msglayout_field google_protobuf_SourceCodeInfo_Location__fields
const upb_msglayout google_protobuf_SourceCodeInfo_Location_msginit = {
NULL,
&google_protobuf_SourceCodeInfo_Location__fields[0],
UPB_SIZE(32, 64), 5, false, 56,
UPB_SIZE(32, 64), 5, false, 255,
{
{0x0000000000000000, &fastdecode_generic},
{0x002800003f00000a, &upb_ppv4_1bt},
{0x003000003f000012, &upb_ppv4_1bt},
{0x000800000100001a, &upb_pss_1bt},
{0x0018000002000022, &upb_pss_1bt},
{0x0000000000000000, &fastdecode_generic},
{0x003800003f000032, &upb_prs_1bt},
{0x0000000000000000, &fastdecode_generic},
},
};
@ -940,10 +516,8 @@ static const upb_msglayout_field google_protobuf_GeneratedCodeInfo__fields[1] =
const upb_msglayout google_protobuf_GeneratedCodeInfo_msginit = {
&google_protobuf_GeneratedCodeInfo_submsgs[0],
&google_protobuf_GeneratedCodeInfo__fields[0],
UPB_SIZE(8, 8), 1, false, 8,
UPB_SIZE(8, 8), 1, false, 255,
{
{0x0000000000000000, &fastdecode_generic},
{0x000000003f00000a, &upb_prm_1bt_max64b},
},
};
@ -957,16 +531,8 @@ static const upb_msglayout_field google_protobuf_GeneratedCodeInfo_Annotation__f
const upb_msglayout google_protobuf_GeneratedCodeInfo_Annotation_msginit = {
NULL,
&google_protobuf_GeneratedCodeInfo_Annotation__fields[0],
UPB_SIZE(24, 48), 4, false, 56,
UPB_SIZE(24, 48), 4, false, 255,
{
{0x0000000000000000, &fastdecode_generic},
{0x002000003f00000a, &upb_ppv4_1bt},
{0x0010000001000012, &upb_pss_1bt},
{0x0004000002000018, &upb_psv4_1bt},
{0x0008000003000020, &upb_psv4_1bt},
{0x0000000000000000, &fastdecode_generic},
{0x0000000000000000, &fastdecode_generic},
{0x0000000000000000, &fastdecode_generic},
},
};

@ -11,15 +11,25 @@ fi
echo PATH=$PATH
ls -l `which cmake`
cmake --version
echo CC=${CC:-cc}
${CC:-cc} --version
# Log the bazel path and version.
which bazel
bazel version
cd $(dirname $0)/../..
bazel test --test_output=errors ...
if which gcc; then
gcc --version
bazel test --test_output=errors ...
# The checked-in code is with fasttable not enabled.
bazel test --test_output=errors ... --//:fasttable_enabled=true -- -cmake:test_generated_files
fi
if which clang; then
CC=clang bazel test --test_output=errors ...
# The checked-in code is with fasttable not enabled.
CC=clang bazel test --test_output=errors ... --//:fasttable_enabled=true -- -cmake:test_generated_files
fi
if [[ $(uname) = "Linux" ]]; then
# Verify the ASAN build. Have to exclude test_conformance_upb as protobuf

@ -99,7 +99,7 @@ const char *fastdecode_tagdispatch(upb_decstate *d, const char *ptr,
uint8_t mask = table;
uint64_t data;
size_t idx = tag & mask;
__builtin_assume((idx & 7) == 0);
UPB_ASSUME((idx & 7) == 0);
idx >>= 3;
data = table_p->fasttable[idx].field_data ^ tag;
return table_p->fasttable[idx].field_parser(d, ptr, msg, table, hasbits, data);

@ -47,8 +47,9 @@ static const char *fastdecode_isdonefallback(upb_decstate *d, const char *ptr,
}
UPB_FORCEINLINE
const char *fastdecode_dispatch(upb_decstate *d, const char *ptr, upb_msg *msg,
intptr_t table, uint64_t hasbits) {
static const char *fastdecode_dispatch(upb_decstate *d, const char *ptr,
upb_msg *msg, intptr_t table,
uint64_t hasbits) {
if (UPB_UNLIKELY(ptr >= d->limit_ptr)) {
int overrun = ptr - d->end;
if (UPB_LIKELY(overrun == d->limit)) {
@ -331,7 +332,7 @@ static const char *fastdecode_varint64(const char *ptr, uint64_t *val) {
*val += (byte - 1) << 63;
}
done:
__builtin_assume(ptr != NULL);
UPB_ASSUME(ptr != NULL);
return ptr;
}
@ -872,7 +873,7 @@ static const char *fastdecode_tosubmsg(upb_decstate *d, const char *ptr,
void *ctx) {
fastdecode_submsgdata *submsg = ctx;
ptr = fastdecode_dispatch(d, ptr, submsg->msg, submsg->table, 0);
__builtin_assume(ptr != NULL);
UPB_ASSUME(ptr != NULL);
return ptr;
}

@ -68,8 +68,8 @@ typedef struct upb_msglayout {
bool extendable;
uint8_t table_mask;
#if __STDC_VERSION__ >= 199901L
// To constant-initialize the tables of variable length, we need a flexible
// array member, and we need to compile in C99 mode.
/* To constant-initialize the tables of variable length, we need a flexible
* array member, and we need to compile in C99 mode. */
_upb_fasttable_entry fasttable[];
#else
_upb_fasttable_entry fasttable[1];

Loading…
Cancel
Save