| 892 | } |
| 893 | |
| 894 | void fxIndexReference(txMachine* the, txSnapshot* snapshot, txSlot* theSlot) |
| 895 | { |
| 896 | txSlot* aSlot; |
| 897 | switch (theSlot->kind) { |
| 898 | case XS_REFERENCE_KIND: |
| 899 | aSlot = theSlot->value.reference; |
| 900 | if (!(aSlot->flag & XS_MARK_FLAG)) |
| 901 | fxIndexInstance(the, snapshot, aSlot); |
| 902 | break; |
| 903 | case XS_CLOSURE_KIND: |
| 904 | aSlot = theSlot->value.closure; |
| 905 | if (aSlot && (!(aSlot->flag & XS_MARK_FLAG))) { |
| 906 | fxIndexSlot(the, snapshot, aSlot); |
| 907 | fxIndexReference(the, snapshot, aSlot); |
| 908 | } |
| 909 | break; |
| 910 | case XS_INSTANCE_KIND: |
| 911 | if (!(theSlot->flag & XS_MARK_FLAG)) |
| 912 | fxIndexInstance(the, snapshot, theSlot); |
| 913 | break; |
| 914 | case XS_ACCESSOR_KIND: |
| 915 | aSlot = theSlot->value.accessor.getter; |
| 916 | if (aSlot && !(aSlot->flag & XS_MARK_FLAG)) |
| 917 | fxIndexInstance(the, snapshot, aSlot); |
| 918 | aSlot = theSlot->value.accessor.setter; |
| 919 | if (aSlot && !(aSlot->flag & XS_MARK_FLAG)) |
| 920 | fxIndexInstance(the, snapshot, aSlot); |
| 921 | break; |
| 922 | case XS_ARGUMENTS_SLOPPY_KIND: |
| 923 | case XS_ARGUMENTS_STRICT_KIND: |
| 924 | case XS_ARRAY_KIND: |
| 925 | case XS_STACK_KIND: |
| 926 | fxCheckCStack(the); |
| 927 | if ((aSlot = theSlot->value.array.address)) { |
| 928 | txIndex aLength = (((txChunk*)(((txByte*)aSlot) - sizeof(txChunk)))->size) / sizeof(txSlot); |
| 929 | while (aLength) { |
| 930 | fxIndexReference(the, snapshot, aSlot); |
| 931 | aSlot++; |
| 932 | aLength--; |
| 933 | } |
| 934 | } |
| 935 | break; |
| 936 | case XS_CODE_KIND: |
| 937 | case XS_CODE_X_KIND: |
| 938 | aSlot = theSlot->value.code.closures; |
| 939 | if (aSlot && !(aSlot->flag & XS_MARK_FLAG)) { |
| 940 | fxCheckCStack(the); |
| 941 | fxIndexInstance(the, snapshot, aSlot); |
| 942 | } |
| 943 | break; |
| 944 | case XS_HOME_KIND: |
| 945 | aSlot = theSlot->value.home.object; |
| 946 | if (aSlot && !(aSlot->flag & XS_MARK_FLAG)) { |
| 947 | fxCheckCStack(the); |
| 948 | fxIndexInstance(the, snapshot, aSlot); |
| 949 | } |
| 950 | aSlot = theSlot->value.home.module; |
| 951 | if (aSlot && !(aSlot->flag & XS_MARK_FLAG)) { |
no test coverage detected