Lines Matching refs:iea
583 static UWord InEdgeArr__size ( const InEdgeArr* iea ) in InEdgeArr__size() argument
585 if (iea->has_var) { in InEdgeArr__size()
586 vg_assert(iea->n_fixed == 0); in InEdgeArr__size()
587 return VG_(sizeXA)(iea->edges.var); in InEdgeArr__size()
589 vg_assert(iea->n_fixed <= N_FIXED_IN_EDGE_ARR); in InEdgeArr__size()
590 return iea->n_fixed; in InEdgeArr__size()
594 static void InEdgeArr__makeEmpty ( InEdgeArr* iea ) in InEdgeArr__makeEmpty() argument
596 if (iea->has_var) { in InEdgeArr__makeEmpty()
597 vg_assert(iea->n_fixed == 0); in InEdgeArr__makeEmpty()
598 VG_(deleteXA)(iea->edges.var); in InEdgeArr__makeEmpty()
599 iea->edges.var = NULL; in InEdgeArr__makeEmpty()
600 iea->has_var = False; in InEdgeArr__makeEmpty()
602 vg_assert(iea->n_fixed <= N_FIXED_IN_EDGE_ARR); in InEdgeArr__makeEmpty()
603 iea->n_fixed = 0; in InEdgeArr__makeEmpty()
608 InEdge* InEdgeArr__index ( InEdgeArr* iea, UWord i ) in InEdgeArr__index() argument
610 if (iea->has_var) { in InEdgeArr__index()
611 vg_assert(iea->n_fixed == 0); in InEdgeArr__index()
612 return (InEdge*)VG_(indexXA)(iea->edges.var, i); in InEdgeArr__index()
614 vg_assert(i < iea->n_fixed); in InEdgeArr__index()
615 return &iea->edges.fixed[i]; in InEdgeArr__index()
620 void InEdgeArr__deleteIndex ( InEdgeArr* iea, UWord i ) in InEdgeArr__deleteIndex() argument
622 if (iea->has_var) { in InEdgeArr__deleteIndex()
623 vg_assert(iea->n_fixed == 0); in InEdgeArr__deleteIndex()
624 VG_(removeIndexXA)(iea->edges.var, i); in InEdgeArr__deleteIndex()
626 vg_assert(i < iea->n_fixed); in InEdgeArr__deleteIndex()
627 for (; i+1 < iea->n_fixed; i++) { in InEdgeArr__deleteIndex()
628 iea->edges.fixed[i] = iea->edges.fixed[i+1]; in InEdgeArr__deleteIndex()
630 iea->n_fixed--; in InEdgeArr__deleteIndex()
635 void InEdgeArr__add ( InEdgeArr* iea, InEdge* ie ) in InEdgeArr__add() argument
637 if (iea->has_var) { in InEdgeArr__add()
638 vg_assert(iea->n_fixed == 0); in InEdgeArr__add()
639 VG_(addToXA)(iea->edges.var, ie); in InEdgeArr__add()
641 vg_assert(iea->n_fixed <= N_FIXED_IN_EDGE_ARR); in InEdgeArr__add()
642 if (iea->n_fixed == N_FIXED_IN_EDGE_ARR) { in InEdgeArr__add()
648 VG_(hintSizeXA) (var, iea->n_fixed + 1); in InEdgeArr__add()
650 for (i = 0; i < iea->n_fixed; i++) { in InEdgeArr__add()
651 VG_(addToXA)(var, &iea->edges.fixed[i]); in InEdgeArr__add()
654 iea->n_fixed = 0; in InEdgeArr__add()
655 iea->has_var = True; in InEdgeArr__add()
656 iea->edges.var = var; in InEdgeArr__add()
659 iea->edges.fixed[iea->n_fixed++] = *ie; in InEdgeArr__add()