• Home
  • Raw
  • Download

Lines Matching refs:impl

31   Int8ArrayListImpl* impl;  in Int8ArrayListCreate()  local
35 impl = NEW(Int8ArrayListImpl, MTAG); in Int8ArrayListCreate()
36 if (impl == NULL) in Int8ArrayListCreate()
38 impl->Interface.add = &Int8ArrayList_Add; in Int8ArrayListCreate()
39 impl->Interface.contains = &Int8ArrayList_Contains; in Int8ArrayListCreate()
40 impl->Interface.destroy = &Int8ArrayList_Destroy; in Int8ArrayListCreate()
41 impl->Interface.get = &Int8ArrayList_Get; in Int8ArrayListCreate()
42 impl->Interface.getSize = &Int8ArrayList_GetSize; in Int8ArrayListCreate()
43 impl->Interface.remove = &Int8ArrayList_Remove; in Int8ArrayListCreate()
44 impl->Interface.removeAll = &Int8ArrayList_RemoveAll; in Int8ArrayListCreate()
45 impl->Interface.set = &Int8ArrayList_Set; in Int8ArrayListCreate()
46 impl->Interface.toStaticArray = &Int8ArrayList_ToStaticArray; in Int8ArrayListCreate()
47 impl->Interface.clone = &Int8ArrayList_Clone; in Int8ArrayListCreate()
48 impl->contents = MALLOC((INITIAL_SIZE + 1) * sizeof(asr_int8_t), MTAG); in Int8ArrayListCreate()
49 if (impl->contents == NULL) in Int8ArrayListCreate()
51 FREE(impl); in Int8ArrayListCreate()
54 impl->actualSize = INITIAL_SIZE; in Int8ArrayListCreate()
55 impl->virtualSize = 0; in Int8ArrayListCreate()
56 *self = (Int8ArrayList*) impl; in Int8ArrayListCreate()
63 Int8ArrayListImpl* impl; in Int8ArrayListImport() local
68 impl = (Int8ArrayListImpl*) self; in Int8ArrayListImport()
69 impl->contents = value; in Int8ArrayListImport()
77 Int8ArrayListImpl* impl = (Int8ArrayListImpl*) self; in Int8ArrayList_Add() local
79 if (impl->virtualSize >= impl->actualSize) in Int8ArrayList_Add()
82 asr_int8_t* temp = REALLOC(impl->contents, (impl->actualSize * 2 + 1) * sizeof(asr_int8_t)); in Int8ArrayList_Add()
85 impl->contents = temp; in Int8ArrayList_Add()
86 impl->actualSize *= 2; in Int8ArrayList_Add()
88 impl->contents[impl->virtualSize] = element; in Int8ArrayList_Add()
89 ++impl->virtualSize; in Int8ArrayList_Add()
95 Int8ArrayListImpl* impl = (Int8ArrayListImpl*) self; in Int8ArrayList_Remove() local
96 asr_int8_t* contents = impl->contents; /* cache pointer */ in Int8ArrayList_Remove()
97 size_t virtualSize = impl->virtualSize; /* cache value */ in Int8ArrayList_Remove()
112 impl->virtualSize = virtualSize; /* flush cache */ in Int8ArrayList_Remove()
113 if (virtualSize <= impl->actualSize / 4) in Int8ArrayList_Remove()
116 impl->contents = REALLOC(contents, (impl->actualSize / 2 + 1) * sizeof(asr_int8_t)); in Int8ArrayList_Remove()
117 passert(impl->contents != NULL); /* should never fail */ in Int8ArrayList_Remove()
118 impl->actualSize /= 2; in Int8ArrayList_Remove()
125 Int8ArrayListImpl* impl = (Int8ArrayListImpl*) self; in Int8ArrayList_RemoveAll() local
127 impl->virtualSize = 0; in Int8ArrayList_RemoveAll()
133 Int8ArrayListImpl* impl = (Int8ArrayListImpl*) self; in Int8ArrayList_Contains() local
135 size_t virtualSize = impl->virtualSize; /* cache value */ in Int8ArrayList_Contains()
136 asr_int8_t* contents = impl->contents; /* cache value */ in Int8ArrayList_Contains()
152 Int8ArrayListImpl* impl = (Int8ArrayListImpl*) self; in Int8ArrayList_Get() local
154 passert(index >= 0 && index <= impl->virtualSize); in Int8ArrayList_Get()
155 *element = impl->contents[index]; in Int8ArrayList_Get()
161 Int8ArrayListImpl* impl = (Int8ArrayListImpl*) self; in Int8ArrayList_Set() local
163 passert(index >= 0 && index <= impl->virtualSize); in Int8ArrayList_Set()
164 impl->contents[index] = element; in Int8ArrayList_Set()
170 Int8ArrayListImpl* impl = (Int8ArrayListImpl*) self; in Int8ArrayList_GetSize() local
172 *size = impl->virtualSize; in Int8ArrayList_GetSize()
178 Int8ArrayListImpl* impl = (Int8ArrayListImpl*) self; in Int8ArrayList_ToStaticArray() local
180 *newArray = impl->contents; in Int8ArrayList_ToStaticArray()
181 impl->contents = NULL; /* prevent free() from deallocating buffer */ in Int8ArrayList_ToStaticArray()
205 Int8ArrayListImpl* impl = (Int8ArrayListImpl*) self; in Int8ArrayList_Destroy() local
207 FREE(impl->contents); in Int8ArrayList_Destroy()
208 FREE(impl); in Int8ArrayList_Destroy()