Lines Matching refs:dsp
109 dt_scope_t *dsp = &yypcb->pcb_dstack; in dt_decl_reset() local
110 dt_decl_t *ddp = dsp->ds_decl; in dt_decl_reset()
113 dsp->ds_decl = ddp->dd_next; in dt_decl_reset()
116 ddp = dsp->ds_decl; in dt_decl_reset()
123 dt_scope_t *dsp = &yypcb->pcb_dstack; in dt_decl_push() local
124 dt_decl_t *top = dsp->ds_decl; in dt_decl_push()
134 dsp->ds_decl = ddp; in dt_decl_push()
142 dt_scope_t *dsp = &yypcb->pcb_dstack; in dt_decl_pop() local
145 dsp->ds_decl = NULL; in dt_decl_pop()
146 free(dsp->ds_ident); in dt_decl_pop()
147 dsp->ds_ident = NULL; in dt_decl_pop()
148 dsp->ds_ctfp = NULL; in dt_decl_pop()
149 dsp->ds_type = CTF_ERR; in dt_decl_pop()
150 dsp->ds_class = DT_DC_DEFAULT; in dt_decl_pop()
151 dsp->ds_enumval = -1; in dt_decl_pop()
159 dt_scope_t *dsp = &yypcb->pcb_dstack; in dt_decl_pop_param() local
161 if (dsp->ds_class != DT_DC_DEFAULT && dsp->ds_class != DT_DC_REGISTER) { in dt_decl_pop_param()
167 *idp = dsp->ds_ident; in dt_decl_pop_param()
168 dsp->ds_ident = NULL; in dt_decl_pop_param()
193 dt_scope_t *dsp = &yypcb->pcb_dstack; in dt_decl_ident() local
194 dt_decl_t *ddp = dsp->ds_decl; in dt_decl_ident()
196 if (dsp->ds_ident != NULL) { in dt_decl_ident()
202 dsp->ds_ident = name; in dt_decl_ident()
213 dt_scope_t *dsp = &yypcb->pcb_dstack; in dt_decl_class() local
215 if (dsp->ds_class != DT_DC_DEFAULT) { in dt_decl_class()
220 dsp->ds_class = class; in dt_decl_class()
388 dt_scope_t *dsp = &yypcb->pcb_dstack; in dt_decl_array() local
405 dsp->ds_decl = ddp->dd_next; in dt_decl_array()
523 dt_scope_t *dsp = yypcb->pcb_dstack.ds_next; in dt_decl_member() local
536 if (dsp == NULL) in dt_decl_member()
619 dtt.dtt_type = ctf_add_integer(dsp->ds_ctfp, in dt_decl_member()
624 ctf_update(dsp->ds_ctfp) == CTF_ERR) { in dt_decl_member()
627 ctf_errmsg(ctf_errno(dsp->ds_ctfp))); in dt_decl_member()
630 dtt.dtt_ctfp = dsp->ds_ctfp; in dt_decl_member()
640 if (dtt.dtt_ctfp != dsp->ds_ctfp && in dt_decl_member()
641 dtt.dtt_ctfp != ctf_parent_file(dsp->ds_ctfp)) { in dt_decl_member()
643 dtt.dtt_type = ctf_add_type(dsp->ds_ctfp, in dt_decl_member()
645 dtt.dtt_ctfp = dsp->ds_ctfp; in dt_decl_member()
654 if (ctf_add_member(dsp->ds_ctfp, dsp->ds_type, in dt_decl_member()
657 idname, ctf_errmsg(ctf_errno(dsp->ds_ctfp))); in dt_decl_member()
712 dt_scope_t *dsp = yypcb->pcb_dstack.ds_next; in dt_decl_enumerator() local
723 if (dsp == NULL) in dt_decl_enumerator()
726 assert(dsp->ds_decl->dd_kind == CTF_K_ENUM); in dt_decl_enumerator()
727 value = dsp->ds_enumval + 1; /* default is previous value plus one */ in dt_decl_enumerator()
741 dsp->ds_ctfp, dsp->ds_type, dnp->dn_string, &value) != 0) { in dt_decl_enumerator()
761 if (ctf_add_enumerator(dsp->ds_ctfp, dsp->ds_type, in dt_decl_enumerator()
762 name, value) == CTF_ERR || ctf_update(dsp->ds_ctfp) == CTF_ERR) { in dt_decl_enumerator()
764 name, ctf_errmsg(ctf_errno(dsp->ds_ctfp))); in dt_decl_enumerator()
767 dsp->ds_enumval = value; /* save most recent value */ in dt_decl_enumerator()
778 if (dsp->ds_ctfp == dtp->dt_ddefs->dm_ctfp) { in dt_decl_enumerator()
799 dt_node_type_assign(dnp, dsp->ds_ctfp, dsp->ds_type, B_FALSE); in dt_decl_enumerator()
817 idp->di_ctfp = dsp->ds_ctfp; in dt_decl_enumerator()
818 idp->di_type = dsp->ds_type; in dt_decl_enumerator()
1072 dt_scope_create(dt_scope_t *dsp) in dt_scope_create() argument
1074 dsp->ds_decl = NULL; in dt_scope_create()
1075 dsp->ds_next = NULL; in dt_scope_create()
1076 dsp->ds_ident = NULL; in dt_scope_create()
1077 dsp->ds_ctfp = NULL; in dt_scope_create()
1078 dsp->ds_type = CTF_ERR; in dt_scope_create()
1079 dsp->ds_class = DT_DC_DEFAULT; in dt_scope_create()
1080 dsp->ds_enumval = -1; in dt_scope_create()
1084 dt_scope_destroy(dt_scope_t *dsp) in dt_scope_destroy() argument
1088 for (; dsp != NULL; dsp = nsp) { in dt_scope_destroy()
1089 dt_decl_free(dsp->ds_decl); in dt_scope_destroy()
1090 free(dsp->ds_ident); in dt_scope_destroy()
1091 nsp = dsp->ds_next; in dt_scope_destroy()
1092 if (dsp != &yypcb->pcb_dstack) in dt_scope_destroy()
1093 free(dsp); in dt_scope_destroy()
1101 dt_scope_t *dsp = malloc(sizeof (dt_scope_t)); in dt_scope_push() local
1103 if (dsp == NULL) in dt_scope_push()
1106 dsp->ds_decl = rsp->ds_decl; in dt_scope_push()
1107 dsp->ds_next = rsp->ds_next; in dt_scope_push()
1108 dsp->ds_ident = rsp->ds_ident; in dt_scope_push()
1109 dsp->ds_ctfp = ctfp; in dt_scope_push()
1110 dsp->ds_type = type; in dt_scope_push()
1111 dsp->ds_class = rsp->ds_class; in dt_scope_push()
1112 dsp->ds_enumval = rsp->ds_enumval; in dt_scope_push()
1115 rsp->ds_next = dsp; in dt_scope_push()
1122 dt_scope_t *dsp = rsp->ds_next; in dt_scope_pop() local
1124 if (dsp == NULL) in dt_scope_pop()
1127 if (dsp->ds_ctfp != NULL && ctf_update(dsp->ds_ctfp) == CTF_ERR) { in dt_scope_pop()
1129 ctf_errmsg(ctf_errno(dsp->ds_ctfp))); in dt_scope_pop()
1135 rsp->ds_decl = dsp->ds_decl; in dt_scope_pop()
1136 rsp->ds_next = dsp->ds_next; in dt_scope_pop()
1137 rsp->ds_ident = dsp->ds_ident; in dt_scope_pop()
1138 rsp->ds_ctfp = dsp->ds_ctfp; in dt_scope_pop()
1139 rsp->ds_type = dsp->ds_type; in dt_scope_pop()
1140 rsp->ds_class = dsp->ds_class; in dt_scope_pop()
1141 rsp->ds_enumval = dsp->ds_enumval; in dt_scope_pop()
1143 free(dsp); in dt_scope_pop()