Lines Matching defs:method

3922     /* TODO(haberman): refactor this method so this special case is more
6037 static void freemethod(upb_pbdecodermethod *method) {
6038 upb_inttable_uninit(&method->dispatch);
6039 upb_gfree(method);
6286 const upb_pbdecodermethod *method = va_arg(ap, upb_pbdecodermethod *);
6287 put32(c, op | (method->code_base.ofs - (pcofs(c) + 1)) << 8);
6364 const upb_pbdecodermethod *method =
6368 upb_handlers_msgdef(method->dest_handlers_)));
6481 static void dispatchtarget(compiler *c, upb_pbdecodermethod *method,
6484 uint64_t ofs = pcofs(c) - method->code_base.ofs;
6486 upb_inttable *d = &method->dispatch;
6514 const upb_pbdecodermethod *method,
6517 upb_handlers_getsubhandlers(method->dest_handlers_, f);
6558 upb_pbdecodermethod *method) {
6559 const upb_handlers *h = upb_pbdecodermethod_desthandlers(method);
6560 const upb_pbdecodermethod *sub_m = find_submethod(c, method, f);
6584 dispatchtarget(c, method, f, wire_type);
6605 dispatchtarget(c, method, f, wire_type);
6619 upb_pbdecodermethod *method) {
6620 const upb_handlers *h = upb_pbdecodermethod_desthandlers(method);
6626 dispatchtarget(c, method, f, UPB_WIRE_TYPE_DELIMITED);
6646 dispatchtarget(c, method, f, UPB_WIRE_TYPE_DELIMITED);
6658 upb_pbdecodermethod *method) {
6659 const upb_handlers *h = upb_pbdecodermethod_desthandlers(method);
6683 dispatchtarget(c, method, f, UPB_WIRE_TYPE_DELIMITED);
6690 dispatchtarget(c, method, f, wire_type);
6705 dispatchtarget(c, method, f, wire_type);
6712 static void compile_method(compiler *c, upb_pbdecodermethod *method) {
6719 UPB_ASSERT(method);
6722 upb_inttable_uninit(&method->dispatch);
6723 upb_inttable_init(&method->dispatch, UPB_CTYPE_UINT64);
6725 h = upb_pbdecodermethod_desthandlers(method);
6728 method->code_base.ofs = pcofs(c);
6729 putop(c, OP_SETDISPATCH, &method->dispatch);
6740 generate_msgfield(c, f, method);
6743 generate_delimfield(c, f, method);
6745 generate_primitivefield(c, f, method);
6765 val = upb_value_uint64(pcofs(c) - method->code_base.ofs);
6766 upb_inttable_insert(&method->dispatch, DISPATCH_ENDMSG, val);
6771 upb_inttable_compact(&method->dispatch);
6775 * Returns the method for these handlers.
6777 * Generates a new method for every destination handlers reachable from "h". */
6782 upb_pbdecodermethod *method;
6787 method = newmethod(h, c->group);
6788 upb_inttable_insertptr(&c->group->methods, h, upb_value_ptr(method));
6799 /* We only generate a decoder method for submessages with handlers.
6816 upb_pbdecodermethod *method = upb_value_getptr(upb_inttable_iter_value(&i));
6817 compile_method(c, method);
6849 * bytecode (saved in method->code_base).
7830 const upb_pbdecodermethod *method = handler_data;
7857 if (p != method->code_base.ptr) p--;
9195 const upb_json_parsermethod *method;
9371 const upb_json_codecache *cache = p->method->cache;
9373 const upb_json_parsermethod *method;
9377 method = upb_value_getconstptr(v);
9379 frame->name_table = &method->name_table;
12292 const upb_json_parsermethod *method,
12304 p->method = method;
12309 upb_bytessink_reset(&p->input_, &method->input_handler_, p);