Lines Matching refs:subdef
178 const upb_def *subdef;
186 subdef = upb_fielddef_subdef(f);
187 if (subdef == NULL) {
188 upb_status_seterrf(s, "field %s.%s is missing required subdef",
193 if (!upb_def_isfrozen(subdef) && !subdef->came_from_user) {
195 "subdef of field %s.%s is not frozen or being frozen",
240 const upb_msgdef *subdef = upb_fielddef_msgsubdef(f);
241 if (upb_msgdef_mapentry(subdef) && !upb_fielddef_isseq(f)) {
1263 static bool upb_subdef_typecheck(upb_fielddef *f, const upb_def *subdef,
1266 if (upb_dyncast_msgdef(subdef)) return true;
1267 upb_status_seterrmsg(s, "invalid subdef type for this submessage field");
1270 if (upb_dyncast_enumdef(subdef)) return true;
1271 upb_status_seterrmsg(s, "invalid subdef type for this enum field");
1274 upb_status_seterrmsg(s, "only message and enum fields can have a subdef");
1287 bool upb_fielddef_setsubdef(upb_fielddef *f, const upb_def *subdef,
1291 if (subdef && !upb_subdef_typecheck(f, subdef, s)) return false;
1293 f->sub.def = subdef;
1299 bool upb_fielddef_setmsgsubdef(upb_fielddef *f, const upb_msgdef *subdef,
1301 return upb_fielddef_setsubdef(f, upb_msgdef_upcast(subdef), s);
1304 bool upb_fielddef_setenumsubdef(upb_fielddef *f, const upb_enumdef *subdef,
1306 return upb_fielddef_setsubdef(f, upb_enumdef_upcast(subdef), s);
1314 upb_status_seterrmsg(s, "field type does not accept a subdef");
2191 const upb_msgdef *subdef;
2196 subdef = upb_downcast_msgdef(upb_fielddef_subdef(f));
2197 if (upb_inttable_lookupptr(&s->tab, subdef, &subm_ent)) {
2200 upb_handlers *sub_mh = newformsg(subdef, &sub_mh, s);
3307 /* Subdef has not yet been visited; recurse on it. */
3311 /* Subdef is in the stack and hence in the current SCC. */
3893 const upb_def *subdef;
3896 subdef = upb_fielddef_subdef(f);
3899 if (def->base.group == subdef->base.group) continue;
3902 need_dup |= upb_resolve_dfs(subdef, addtab, new_owner, seen, s);
4079 upb_def *subdef = upb_resolvename(&addtab, base, name);
4080 if (subdef == NULL) {
4081 subdef = upb_resolvename(&s->symtab, base, name);
4083 if (subdef == NULL) {
4087 } else if (!upb_fielddef_setsubdef(f, subdef, status)) {