{
ZEND_ASSERT(node->children >= 1);
if (node->children == 1) {
- node->child.single.child = NULL;
+ node->child.single = NULL;
} else {
HashTable *ht = node->child.ht;
zend_hash_index_del(ht, (zend_ulong) child);
if (node->children == 2) {
zend_generator *other_child;
ZEND_HASH_FOREACH_PTR(ht, other_child) {
- node->child.single.child = other_child;
+ node->child.single = other_child;
break;
} ZEND_HASH_FOREACH_END();
zend_hash_destroy(ht);
zend_generator_node *node = &generator->node;
if (node->children == 0) {
- node->child.single.child = child;
+ node->child.single = child;
} else {
if (node->children == 1) {
HashTable *ht = emalloc(sizeof(HashTable));
zend_hash_init(ht, 0, NULL, NULL, 0);
zend_hash_index_add_new_ptr(ht,
- (zend_ulong) node->child.single.child, node->child.single.child);
+ (zend_ulong) node->child.single, node->child.single);
node->child.ht = ht;
}
static zend_generator *get_new_root(zend_generator *generator, zend_generator *root)
{
while (!root->execute_data && root->node.children == 1) {
- root = root->node.child.single.child;
+ root = root->node.child.single;
}
if (root->execute_data) {
uint32_t children;
union {
HashTable *ht; /* if multiple children */
- struct { /* if one child */
- zend_generator *leaf; /* TODO: Unused, remove. */
- zend_generator *child;
- } single;
+ zend_generator *single; /* if one child */
} child;
/* One generator can cache a direct pointer to the current root.
* The leaf member points back to the generator using the root cache. */