Lines Matching refs:dnp

290 	dt_node_t *dnp;  in dt_decl_protoform()  local
292 for (dnp = flist; dnp != fnp && dnp != NULL; dnp = dnp->dn_list) { in dt_decl_protoform()
293 if (dnp->dn_string != NULL && in dt_decl_protoform()
294 strcmp(dnp->dn_string, fnp->dn_string) == 0) in dt_decl_protoform()
316 dt_node_t *dnp; in dt_decl_prototype() local
318 for (dnp = plist; dnp != NULL; dnp = dnp->dn_list, i++) { in dt_decl_prototype()
320 if (dnp->dn_type == CTF_ERR && !(flags & DT_DP_VARARGS)) { in dt_decl_prototype()
321 dnerror(dnp, D_DECL_PROTO_VARARGS, "%s prototype may " in dt_decl_prototype()
325 if (dt_node_is_dynamic(dnp) && !(flags & DT_DP_DYNAMIC)) { in dt_decl_prototype()
326 dnerror(dnp, D_DECL_PROTO_TYPE, "%s prototype may not " in dt_decl_prototype()
328 kind, dt_node_type_name(dnp, n, sizeof (n)), in dt_decl_prototype()
329 dnp->dn_string ? dnp->dn_string : "(anonymous)", i); in dt_decl_prototype()
332 is_void = dt_node_is_void(dnp); in dt_decl_prototype()
336 dnerror(dnp, D_DECL_PROTO_TYPE, "%s prototype may not " in dt_decl_prototype()
338 kind, dt_node_type_name(dnp, n, sizeof (n)), in dt_decl_prototype()
339 dnp->dn_string ? dnp->dn_string : "(anonymous)", i); in dt_decl_prototype()
342 if (is_void && dnp->dn_string != NULL) { in dt_decl_prototype()
343 dnerror(dnp, D_DECL_PROTO_NAME, "void parameter may " in dt_decl_prototype()
344 "not have a name: %s\n", dnp->dn_string); in dt_decl_prototype()
347 if (dnp->dn_string != NULL && in dt_decl_prototype()
348 dt_decl_protoform(dnp, flist) != form) { in dt_decl_prototype()
349 dnerror(dnp, D_DECL_PROTO_FORM, "parameter is " in dt_decl_prototype()
351 form ? "not" : "already", kind, dnp->dn_string, i); in dt_decl_prototype()
354 if (dnp->dn_string == NULL && in dt_decl_prototype()
356 dnerror(dnp, D_DECL_PROTO_NAME, "parameter declaration " in dt_decl_prototype()
368 dt_decl_array(dt_node_t *dnp) in dt_decl_array() argument
384 if (dnp != NULL && dnp->dn_kind == DT_NODE_TYPE) { in dt_decl_array()
397 if (dnp != NULL && dnp->dn_kind != DT_NODE_TYPE) { in dt_decl_array()
398 dnp = ddp->dd_node = dt_node_cook(dnp, DT_IDFLG_REF); in dt_decl_array()
400 if (dt_node_is_posconst(dnp) == 0) { in dt_decl_array()
406 if (dnp->dn_value > UINT_MAX) in dt_decl_array()
409 } else if (dnp != NULL) { in dt_decl_array()
410 ddp->dd_node = dnp; in dt_decl_array()
411 (void) dt_decl_prototype(dnp, dnp, "array", DT_DP_ANON); in dt_decl_array()
429 dt_decl_func(dt_decl_t *pdp, dt_node_t *dnp) in dt_decl_func() argument
433 ddp->dd_node = dnp; in dt_decl_func()
435 (void) dt_decl_prototype(dnp, dnp, "function", in dt_decl_func()
504 dt_decl_member(dt_node_t *dnp) in dt_decl_member() argument
525 if (dnp == NULL && ident == NULL) in dt_decl_member()
567 if (dnp != NULL) { in dt_decl_member()
568 dnp = dt_node_cook(dnp, DT_IDFLG_REF); in dt_decl_member()
576 if (ident == NULL && dnp->dn_kind == DT_NODE_INT && in dt_decl_member()
577 dnp->dn_value == 0) { in dt_decl_member()
578 dt_node_free(dnp); in dt_decl_member()
582 if (dt_node_is_posconst(dnp) == 0) { in dt_decl_member()
594 if (dnp->dn_value > cte.cte_bits) { in dt_decl_member()
600 cte.cte_bits = (uint_t)dnp->dn_value; in dt_decl_member()
614 dt_node_free(dnp); in dt_decl_member()
693 dt_decl_enumerator(char *s, dt_node_t *dnp) in dt_decl_enumerator() argument
723 if (dnp != NULL) { in dt_decl_enumerator()
724 if (dnp->dn_kind != DT_NODE_IDENT || ctf_enum_value( in dt_decl_enumerator()
725 dsp->ds_ctfp, dsp->ds_type, dnp->dn_string, &value) != 0) { in dt_decl_enumerator()
726 dnp = dt_node_cook(dnp, DT_IDFLG_REF); in dt_decl_enumerator()
728 if (dnp->dn_kind != DT_NODE_INT) { in dt_decl_enumerator()
734 if ((intmax_t)dnp->dn_value > INT_MAX || in dt_decl_enumerator()
735 (intmax_t)dnp->dn_value < INT_MIN) { in dt_decl_enumerator()
740 value = (int)dnp->dn_value; in dt_decl_enumerator()
742 dt_node_free(dnp); in dt_decl_enumerator()
782 dnp = dt_node_int(value); in dt_decl_enumerator()
783 dt_node_type_assign(dnp, dsp->ds_ctfp, dsp->ds_type, B_FALSE); in dt_decl_enumerator()
792 assert(yypcb->pcb_list == dnp); in dt_decl_enumerator()
793 yypcb->pcb_list = dnp->dn_link; in dt_decl_enumerator()
794 dnp->dn_link = NULL; in dt_decl_enumerator()
797 inp->din_list = dnp; in dt_decl_enumerator()
798 inp->din_root = dnp; in dt_decl_enumerator()