Lines Matching defs:label

683       switch (field->label) {
961 bool packed = f->label == _UPB_LABEL_PACKED;
1115 } else if (f->label == _UPB_LABEL_MAP) {
3592 bool upb_fielddef_checklabel(int32_t label) { return between(label, 1, 3); }
3928 fields[0].label = UPB_LABEL_OPTIONAL;
3929 fields[1].label = UPB_LABEL_OPTIONAL;
3966 field->label = upb_fielddef_label(f);
3969 field->label = _UPB_LABEL_MAP;
3971 field->label = _UPB_LABEL_PACKED;
4476 "fields in oneof must have OPTIONAL label (%s)",
4560 upb_status_seterrf(ctx->status, "duplicate enum label '%s'", name2);
4730 * case, since enum defaults are specified with a label. */
6175 /* Defines a local label at the current PC location. All previous forward
6178 static void label(compiler *c, unsigned int label) {
6182 UPB_ASSERT(label < MAXLABEL);
6183 val = c->fwd_labels[label];
6190 c->fwd_labels[label] = EMPTYLABEL;
6191 c->back_labels[label] = pcofs(c);
6194 /* Creates a reference to a numbered label; either a forward reference
6197 * instructions that use this label and will be patched later when the label is
6198 * defined with label().
6202 static int32_t labelref(compiler *c, int label) {
6203 UPB_ASSERT(label < MAXLABEL);
6204 if (label == LABEL_DISPATCH) {
6207 } else if (label < 0) {
6208 /* Backward local label. Relative to the next instruction. */
6210 return c->back_labels[-label] - from;
6212 /* Forward local label: prepend to (possibly-empty) linked list. */
6213 int *lptr = &c->fwd_labels[label];
6293 int label = va_arg(ap, int);
6294 setofs(&instruction, labelref(c, label));
6300 int label = va_arg(ap, int);
6304 setofs(&instruction, labelref(c, label));
6309 int label = va_arg(ap, int);
6312 setofs(&instruction, labelref(c, label));
6574 label(c, LABEL_FIELD);
6587 label(c, LABEL_LOOPSTART);
6599 label(c, LABEL_LOOPBREAK);
6622 label(c, LABEL_FIELD);
6629 label(c, LABEL_LOOPSTART);
6640 label(c, LABEL_LOOPBREAK);
6665 label(c, LABEL_FIELD);
6686 label(c, LABEL_LOOPSTART);
6693 label(c, LABEL_LOOPSTART);
6698 label(c, LABEL_LOOPBREAK);
6731 label(c, LABEL_FIELD);
6763 /* Insert both a label and a dispatch table entry for this end-of-msg. */
6764 label(c, LABEL_ENDMSG);
8736 const char *label = upb_enumdef_iton(enum_def, val);
8737 if (label) {
8739 putf(p, "%s: %s", upb_fielddef_name(f), label);