Home | History | Annotate | Download | only in protobuf

Lines Matching refs:addtab

3668  * (ie. submessage types).  Adds duplicates of existing defs to addtab
3670 * addtab is added.
3674 * 1. can reach a def that is being replaced by something in addtab, AND
3677 * exist in addtab)
3679 * ...then a duplicate (new copy) of D will be added to addtab.
3685 * our stack can reach a def in addtab or not. Once we figure this out, that
3691 * whether the SCC as a whole can reach any def in addtab, then we dup (or not)
3694 static bool upb_resolve_dfs(const upb_def *def, upb_strtable *addtab,
3720 if (upb_strtable_lookup(addtab, upb_def_fullname(def), &v)) {
3742 need_dup |= upb_resolve_dfs(subdef, addtab, new_owner, seen, s);
3749 /* Dup all defs in this SCC that don't already have entries in addtab. */
3756 if (!upb_strtable_lookup(addtab, name, NULL)) {
3760 if (!upb_strtable_insert(addtab, name, upb_value_ptr(newdef)))
3781 upb_strtable addtab;
3785 if (!upb_strtable_init(&addtab, UPB_CTYPE_PTR)) {
3818 if (upb_strtable_lookup(&addtab, fullname, NULL)) {
3826 if (!upb_strtable_insert(&addtab, fullname, upb_value_ptr(def)))
3853 if (upb_strtable_lookup(&addtab, msgname, &v)) {
3868 if (!upb_strtable_insert(&addtab, msgname, upb_value_ptr(m))) {
3885 upb_resolve_dfs(def, &addtab, s, &seen, status);
3891 upb_strtable_begin(&iter, &addtab);
3910 upb_def *subdef = upb_resolvename(&addtab, base, name);
3925 /* We need an array of the defs in addtab, for passing to upb_def_freeze. */
3926 add_defs = malloc(sizeof(void*) * upb_strtable_count(&addtab));
3928 upb_strtable_begin(&iter, &addtab);
3937 upb_strtable_uninit(&addtab);
3962 upb_strtable_begin(&iter, &addtab);
3974 upb_strtable_uninit(&addtab);