| 3957 | } |
| 3958 | |
| 3959 | void fxObjectBindingNodeCodeAssign(void* it, void* param, txFlag flag) |
| 3960 | { |
| 3961 | txObjectBindingNode* self = it; |
| 3962 | txNode* item = self->items->first; |
| 3963 | txInteger object; |
| 3964 | txInteger at; |
| 3965 | txInteger c = 0; |
| 3966 | object = fxCoderUseTemporaryVariable(param); |
| 3967 | at = fxCoderUseTemporaryVariable(param); |
| 3968 | fxCoderAddByte(param, 1, XS_CODE_DUB); |
| 3969 | fxCoderAddByte(param, 0, XS_CODE_TO_INSTANCE); |
| 3970 | fxCoderAddIndex(param, -1, XS_CODE_PULL_LOCAL_1, object); |
| 3971 | if (self->flags & mxSpreadFlag) { |
| 3972 | fxCoderAddByte(param, 1, XS_CODE_UNDEFINED); |
| 3973 | fxCoderAddByte(param, 1, XS_CODE_COPY_OBJECT); |
| 3974 | fxCoderAddByte(param, 1, XS_CODE_CALL); |
| 3975 | fxCoderAddByte(param, 1, XS_CODE_OBJECT); |
| 3976 | fxCoderAddIndex(param, 1, XS_CODE_GET_LOCAL_1, object); |
| 3977 | c = 2; |
| 3978 | } |
| 3979 | while (item && (item->description->token != XS_TOKEN_REST_BINDING)) { |
| 3980 | if (item->description->token == XS_TOKEN_PROPERTY_BINDING) { |
| 3981 | if (self->flags & mxSpreadFlag) { |
| 3982 | fxCoderAddIndex(param, 1, XS_CODE_GET_LOCAL_1, object); |
| 3983 | fxCoderAddSymbol(param, 1, XS_CODE_SYMBOL, ((txPropertyBindingNode*)item)->symbol); |
| 3984 | fxCoderAddByte(param, 0, XS_CODE_AT); |
| 3985 | fxCoderAddByte(param, 0, XS_CODE_SWAP); |
| 3986 | fxCoderAddByte(param, -1, XS_CODE_POP); |
| 3987 | c++; |
| 3988 | } |
| 3989 | fxNodeDispatchCodeReference(((txPropertyBindingNode*)item)->binding, param, 1); |
| 3990 | fxCoderAddIndex(param, 1, XS_CODE_GET_LOCAL_1, object); |
| 3991 | fxCoderAddSymbol(param, 0, XS_CODE_GET_PROPERTY, ((txPropertyBindingNode*)item)->symbol); |
| 3992 | fxNodeDispatchCodeAssign(((txPropertyBindingNode*)item)->binding, param, 1); |
| 3993 | } |
| 3994 | else { |
| 3995 | fxCoderAddIndex(param, 1, XS_CODE_GET_LOCAL_1, object); |
| 3996 | fxNodeDispatchCode(((txPropertyBindingAtNode*)item)->at, param); |
| 3997 | fxCoderAddByte(param, 0, XS_CODE_AT); |
| 3998 | if (self->flags & mxSpreadFlag) { |
| 3999 | fxCoderAddIndex(param, 0, XS_CODE_SET_LOCAL_1, at); |
| 4000 | fxCoderAddByte(param, 0, XS_CODE_SWAP); |
| 4001 | fxCoderAddByte(param, -1, XS_CODE_POP); |
| 4002 | c++; |
| 4003 | } |
| 4004 | else { |
| 4005 | fxCoderAddIndex(param, -1, XS_CODE_PULL_LOCAL_1, at); |
| 4006 | fxCoderAddByte(param, -1, XS_CODE_POP); |
| 4007 | } |
| 4008 | fxNodeDispatchCodeReference(((txPropertyBindingAtNode*)item)->binding, param, 1); |
| 4009 | fxCoderAddIndex(param, 1, XS_CODE_GET_LOCAL_1, object); |
| 4010 | fxCoderAddIndex(param, 1, XS_CODE_GET_LOCAL_1, at); |
| 4011 | fxCoderAddByte(param, -1, XS_CODE_GET_PROPERTY_AT); |
| 4012 | fxNodeDispatchCodeAssign(((txPropertyBindingAtNode*)item)->binding, param, 1); |
| 4013 | } |
| 4014 | fxCoderAddByte(param, -1, XS_CODE_POP); |
| 4015 | item = item->next; |
| 4016 | } |
no test coverage detected