Lines Matching defs:file

1 /* Amalgamated source file */
17 * // Code for this file.
23 * This file is private and must not be included by users!
2546 /* This file was generated by upbc (the upb compiler) from the input
2547 * file:
2551 * Do not edit -- your changes will be discarded when the file is
3028 /* This file was generated by upbc (the upb compiler) from the input
3029 * file:
3033 * Do not edit -- your changes will be discarded when the file is
3435 const upb_filedef *file;
3467 const upb_filedef *file;
3490 const upb_filedef *file;
3790 return e->file;
3917 return f->file;
4028 f->file->syntax == UPB_SYNTAX_PROTO2;
4050 return m->file;
4058 return m->file->syntax;
4425 f->file->syntax == UPB_SYNTAX_PROTO2) {
4528 upb_filedef *file; /* File we are building. */
4905 f = (upb_fielddef*)&ctx->file->exts[ctx->file->ext_count++];
4912 f->file = ctx->file;
4925 if (f->label_ == UPB_LABEL_REQUIRED && f->file->syntax == UPB_SYNTAX_PROTO3) {
4974 f->label_ == UPB_LABEL_REPEATED && f->file->syntax == UPB_SYNTAX_PROTO3;
4997 e = (upb_enumdef*)&ctx->file->enums[ctx->file->enum_count++];
5004 e->file = ctx->file;
5023 if (i == 0 && e->file->syntax == UPB_SYNTAX_PROTO3 && num != 0) {
5064 m = (upb_msgdef*)&ctx->file->msgs[ctx->file->msg_count++];
5071 m->file = ctx->file;
5206 if (f->file->syntax == UPB_SYNTAX_PROTO3) {
5235 symtab_addctx *ctx, upb_filedef *file,
5248 file->msgs = upb_malloc(alloc, sizeof(*file->msgs) * counts.msg_count);
5249 file->enums = upb_malloc(alloc, sizeof(*file->enums) * counts.enum_count);
5250 file->exts = upb_malloc(alloc, sizeof(*file->exts) * counts.ext_count);
5252 CHK_OOM(counts.msg_count == 0 || file->msgs);
5253 CHK_OOM(counts.enum_count == 0 || file->enums);
5254 CHK_OOM(counts.ext_count == 0 || file->exts);
5257 file->msg_count = 0;
5258 file->enum_count = 0;
5259 file->ext_count = 0;
5266 file->name =
5268 file->phpprefix = NULL;
5269 file->phpnamespace = NULL;
5275 file->package = strviewdup(ctx, package);
5277 file->package = NULL;
5285 file->syntax = UPB_SYNTAX_PROTO2;
5287 file->syntax = UPB_SYNTAX_PROTO3;
5294 file->syntax = UPB_SYNTAX_PROTO2;
5301 file->phpprefix = strviewdup(
5306 file->phpnamespace = strviewdup(
5313 file->deps = upb_malloc(alloc, sizeof(*file->deps) * n) ;
5314 CHK_OOM(n == 0 || file->deps);
5322 "Depends on file '" UPB_STRVIEW_FORMAT
5327 file->deps[i] = upb_value_getconstptr(v);
5333 CHK(create_msgdef(ctx, file->package, msgs[i]));
5339 CHK(create_enumdef(ctx, file->package, enums[i]));
5344 file->exts = upb_malloc(alloc, sizeof(*file->exts) * n);
5345 CHK_OOM(n == 0 || file->exts);
5347 CHK(create_fielddef(ctx, file->package, NULL, exts[i]));
5351 for (i = 0; i < (size_t)file->ext_count; i++) {
5352 CHK(resolve_fielddef(ctx, file->package, (upb_fielddef*)&file->exts[i]));
5355 for (i = 0; i < (size_t)file->msg_count; i++) {
5356 const upb_msgdef *m = &file->msgs[i];
5364 for (i = 0; i < (size_t)file->msg_count; i++) {
5365 const upb_msgdef *m = &file->msgs[i];
5374 const upb_filedef *file = ctx->file;
5378 CHK_OOM(upb_strtable_insert3(&s->files, file->name, strlen(file->name),
5379 upb_value_constptr(file), alloc));
5504 upb_filedef *file = upb_malloc(alloc, sizeof(*file));
5508 ctx.file = file;
5516 ok = file && upb_strtable_init2(&addtab, UPB_CTYPE_CONSTPTR, ctx.tmp) &&
5517 build_filedef(&ctx, file, file_proto) && upb_symtab_addtotabs(s, &ctx);
5520 return ok ? file : NULL;
5529 /* Include here since we want most of this file to be stdio-free. */
5536 google_protobuf_FileDescriptorProto *file;
5552 file = google_protobuf_FileDescriptorProto_parse(
5555 if (!file) {
5558 "Failed to parse compiled-in descriptor for file '%s'. This should "
5564 if (!_upb_symtab_addfile(s, file, init->layouts, &status)) goto err;