Lines Matching defs:table

195 ** The table uses chained scatter with Brent's variation (inspired by the Lua
203 ** The table must be homogenous (all values of the same type). In debug
500 /* A tagged union (stored untagged inside the table) so that we can check that
501 * clients calling table accessors are correctly typed without having to have
603 * ...depending on whether this is a string table or an int table. We would
632 * the subtlety is confined to table.c. */
641 /* Hash table entries.
643 * have the same const-ness as the table it's inside. But there's no way to
656 const upb_tabval *array; /* Array part of the table. See const note above. */
694 /* Initialize and uninitialize a table, respectively. If memory allocation
695 * failed, false is returned that the table is uninitialized. */
696 bool upb_inttable_init2(upb_inttable *table, upb_ctype_t ctype, upb_alloc *a);
697 bool upb_strtable_init2(upb_strtable *table, upb_ctype_t ctype, upb_alloc *a);
698 void upb_inttable_uninit2(upb_inttable *table, upb_alloc *a);
699 void upb_strtable_uninit2(upb_strtable *table, upb_alloc *a);
701 UPB_INLINE bool upb_inttable_init(upb_inttable *table, upb_ctype_t ctype) {
702 return upb_inttable_init2(table, ctype, &upb_alloc_global);
705 UPB_INLINE bool upb_strtable_init(upb_strtable *table, upb_ctype_t ctype) {
706 return upb_strtable_init2(table, ctype, &upb_alloc_global);
709 UPB_INLINE void upb_inttable_uninit(upb_inttable *table) {
710 upb_inttable_uninit2(table, &upb_alloc_global);
713 UPB_INLINE void upb_strtable_uninit(upb_strtable *table) {
714 upb_strtable_uninit2(table, &upb_alloc_global);
717 /* Returns the number of values in the table. */
732 * not already exist in the hash table. For string tables, the key must be
733 * NULL-terminated, and the table will make an internal copy of the key.
736 * If a table resize was required but memory allocation failed, false is
737 * returned and the table is unchanged. */
759 /* Looks up key in this table, returning "true" if the key was found.
771 /* Removes an item from the table. Returns true if the remove was successful,
814 /* Optimizes the table for the current set of entries, for both memory use and
816 * inserting more entries is legal, but will likely require a table resize. */
868 * Modifying the table invalidates iterators. upb_{str,int}table_done() is
869 * guaranteed to work even on an invalidated iterator, as long as the table it
871 * an invalidated iterator yields unspecified elements from the table, but it is
872 * guaranteed not to crash and to return real table elements (except when done()
955 /* These aren't real labels according to descriptor.proto, but in the table we
1131 upb_strtable table;
1152 /* Converting between internal table representation and user values.
1202 return map->table.t.count;
1209 bool ret = upb_strtable_lookup2(&map->table, k.data, k.size, &tabval);
1218 it.t = &map->table;
1233 upb_strtable_remove3(&map->table, strkey.data, strkey.size, NULL, a);
1234 return upb_strtable_insert3(&map->table, strkey.data, strkey.size, tabval, a);
1239 return upb_strtable_remove3(&map->table, k.data, k.size, NULL, NULL);
1243 upb_strtable_clear(&map->table);
3524 /* Deletes this key from the table. Returns true if the key was present. */
3555 ** A upb_handlers is like a virtual table for a upb_msgdef. Each field of the
3865 * table with functions corresponding to all the events that can fire while
4200 * not to store the entire attr like this. We do not expose the table's
4208 upb_handlers_tabent table[3];
5422 * *are* registered. That means that using selectors as table offsets prohibits
5423 * us from compacting the handler table at Freeze() time. If the table is very
5434 * Is there a way then to allow Handlers table compaction? */
5610 start = (func *)s.handler->table[UPB_STARTSTR_SELECTOR].func;
5614 s.handler->table[UPB_STARTSTR_SELECTOR].attr.handler_data,
5625 putbuf = (func *)s.handler->table[UPB_STRING_SELECTOR].func;
5628 return putbuf(subc, s.handler->table[UPB_STRING_SELECTOR].attr.handler_data,
5636 end = (func *)s.handler->table[UPB_ENDSTR_SELECTOR].func;
5640 s.handler->table[UPB_ENDSTR_SELECTOR].attr.handler_data);
6060 * the dispatch table pointer. We can optimze so that the JIT uses
6103 /* Dispatch table -- used by both bytecode decoder and JIT when encountering a
6105 * decoder.int.h for the layout of this table. */
6185 /* A special slot in the dispatch table that stores the epilogue (ENDMSG and/or
6193 /* The dispatch table layout is:
6201 * could key the table on fieldnum+wiretype, the table would be 8x sparser.