| 124 | } |
| 125 | |
| 126 | txBoolean fx_deepEqualEntries(txMachine* the, txSlot* limit, txBoolean strict, txBoolean paired) |
| 127 | { |
| 128 | txSlot* leftInstance = (the->stack + 1)->value.reference; |
| 129 | txSlot* letfTable = leftInstance->next; |
| 130 | txSlot* leftList = letfTable->next; |
| 131 | txSlot** leftAddress; |
| 132 | txSlot* leftBase; |
| 133 | txSlot* leftItem; |
| 134 | txSlot* leftProperty; |
| 135 | txSlot* rightInstance = the->stack->value.reference; |
| 136 | txSlot* rightTable = rightInstance->next; |
| 137 | txSlot* rightList = rightTable->next; |
| 138 | txSlot** rightAddress; |
| 139 | txSlot* rightBase; |
| 140 | txSlot* rightItem; |
| 141 | txSlot* rightProperty; |
| 142 | txBoolean result; |
| 143 | if (leftList->next->value.integer != rightList->next->value.integer) |
| 144 | return 0; |
| 145 | |
| 146 | mxPushList(); |
| 147 | leftBase = the->stack; |
| 148 | leftItem = leftList->value.list.first; |
| 149 | leftAddress = &(leftBase->value.list.first); |
| 150 | while (leftItem) { |
| 151 | leftProperty = *leftAddress = fxDuplicateSlot(the, leftItem); |
| 152 | leftItem = leftItem->next; |
| 153 | leftAddress = &(leftProperty->next); |
| 154 | } |
| 155 | |
| 156 | mxPushList(); |
| 157 | rightBase = the->stack; |
| 158 | rightItem = rightList->value.list.first; |
| 159 | rightAddress = &(rightBase->value.list.first); |
| 160 | while (rightItem) { |
| 161 | rightProperty = *rightAddress = fxDuplicateSlot(the, rightItem); |
| 162 | rightItem = rightItem->next; |
| 163 | rightAddress = &(rightProperty->next); |
| 164 | } |
| 165 | |
| 166 | leftProperty = leftBase->value.list.first; |
| 167 | while (leftProperty) { |
| 168 | rightAddress = &(rightBase->value.list.first); |
| 169 | while ((rightProperty = *rightAddress)) { |
| 170 | mxPushSlot(leftProperty); |
| 171 | mxPushSlot(rightProperty); |
| 172 | result = fx_deepEqualSlots(the, limit, strict); |
| 173 | if (paired) { |
| 174 | if (result) { |
| 175 | mxPushSlot(leftProperty->next); |
| 176 | mxPushSlot(rightProperty->next); |
| 177 | result = fx_deepEqualSlots(the, limit, strict); |
| 178 | } |
| 179 | if (result) { |
| 180 | *rightAddress = rightProperty->next->next; |
| 181 | break; |
| 182 | } |
| 183 | rightAddress = &(rightProperty->next->next); |
no test coverage detected