Differences From Artifact [e7f682556c]:
- File src/runtime/sparsearray.m — part of check-in [7806d917b9] at 2012-07-04 19:11:47 on branch trunk — sparsearray.m: Cast to 32 bit before shifting. (user: js, size: 4365) [annotate] [blame] [check-ins using]
To Artifact [ac1c630c4c]:
- File
src/runtime/sparsearray.m
— part of check-in
[345eb93240]
at
2012-07-17 01:09:50
on branch trunk
— Rename ERROR() to OBJC_ERROR().
ERROR seems to be defined on MinGW32 and it's likely that it's also used
on other systems, thus it's better to prefix it with OBJC_. (user: js, size: 4410) [annotate] [blame] [check-ins using]
︙ | ︙ | |||
30 31 32 33 34 35 36 | static void init(void) { uint_fast16_t i; empty_level2 = malloc(sizeof(struct objc_sparsearray_level2)); if (empty_level2 == NULL) | | | | 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 | static void init(void) { uint_fast16_t i; empty_level2 = malloc(sizeof(struct objc_sparsearray_level2)); if (empty_level2 == NULL) OBJC_ERROR("Not enough memory to allocate sparse array!"); empty_level2->empty = YES; #ifndef OF_SELUID16 empty_level3 = malloc(sizeof(struct objc_sparsearray_level3)); if (empty_level3 == NULL) OBJC_ERROR("Not enough memory to allocate sparse array!"); empty_level3->empty = YES; #endif #ifndef OF_SELUID16 for (i = 0; i < 256; i++) { empty_level2->buckets[i] = empty_level3; |
︙ | ︙ | |||
68 69 70 71 72 73 74 | init(); #else if (empty_level2 == NULL) init(); #endif if ((s = malloc(sizeof(struct objc_sparsearray))) == NULL) | | | 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 | init(); #else if (empty_level2 == NULL) init(); #endif if ((s = malloc(sizeof(struct objc_sparsearray))) == NULL) OBJC_ERROR("Not enough memory to allocate sparse array!"); for (i = 0; i < 256; i++) s->buckets[i] = empty_level2; return s; } |
︙ | ︙ | |||
143 144 145 146 147 148 149 | if (s->buckets[i]->empty) { struct objc_sparsearray_level2 *t; uint_fast16_t l; t = malloc(sizeof(struct objc_sparsearray_level2)); if (t == NULL) | | > | 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 | if (s->buckets[i]->empty) { struct objc_sparsearray_level2 *t; uint_fast16_t l; t = malloc(sizeof(struct objc_sparsearray_level2)); if (t == NULL) OBJC_ERROR("Not enough memory to insert into sparse " "array!"); t->empty = NO; for (l = 0; l < 256; l++) #ifndef OF_SELUID16 t->buckets[l] = empty_level3; #else |
︙ | ︙ | |||
165 166 167 168 169 170 171 | if (s->buckets[i]->buckets[j]->empty) { struct objc_sparsearray_level3 *t; uint_fast16_t l; t = malloc(sizeof(struct objc_sparsearray_level3)); if (t == NULL) | | > | 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 | if (s->buckets[i]->buckets[j]->empty) { struct objc_sparsearray_level3 *t; uint_fast16_t l; t = malloc(sizeof(struct objc_sparsearray_level3)); if (t == NULL) OBJC_ERROR("Not enough memory to insert into sparse " "array!"); t->empty = NO; for (l = 0; l < 256; l++) t->buckets[l] = NULL; s->buckets[i]->buckets[j] = t; |
︙ | ︙ |