MCPcopy Create free account
hub / github.com/Moddable-OpenSource/moddable / fxParamsBindingNodeCode

Function fxParamsBindingNodeCode

xs/sources/xsCode.c:4120–4151  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

4118}
4119
4120void fxParamsBindingNodeCode(void* it, void* param)
4121{
4122 txParamsBindingNode* self = it;
4123 txNode* item = self->items->first;
4124 txInteger index = 0;
4125 if (self->declaration) {
4126 if (self->mapped)
4127 fxCoderAddIndex(param, 1, XS_CODE_ARGUMENTS_SLOPPY, self->items->length);
4128 else
4129 fxCoderAddIndex(param, 1, XS_CODE_ARGUMENTS_STRICT, self->items->length);
4130 if (self->declaration->flags & mxDeclareNodeClosureFlag)
4131 fxCoderAddIndex(param, 0, XS_CODE_VAR_CLOSURE_1, self->declaration->index);
4132 else
4133 fxCoderAddIndex(param, 0, XS_CODE_VAR_LOCAL_1, self->declaration->index);
4134 fxCoderAddByte(param, -1, XS_CODE_POP);
4135 }
4136 while (item) {
4137 if (item->description->token == XS_TOKEN_REST_BINDING) {
4138 fxNodeDispatchCodeReference(((txRestBindingNode*)item)->binding, param, 0);
4139 fxCoderAddIndex(param, 1, XS_CODE_ARGUMENTS, index);
4140 fxNodeDispatchCodeAssign(((txRestBindingNode*)item)->binding, param, 0);
4141 }
4142 else {
4143 fxNodeDispatchCodeReference(item, param, 0);
4144 fxCoderAddIndex(param, 1, XS_CODE_ARGUMENT, index);
4145 fxNodeDispatchCodeAssign(item, param, 0);
4146 }
4147 fxCoderAddByte(param, -1, XS_CODE_POP);
4148 item = item->next;
4149 index++;
4150 }
4151}
4152
4153void fxPostfixExpressionNodeCode(void* it, void* param)
4154{

Callers

nothing calls this directly

Calls 4

fxCoderAddIndexFunction · 0.85
fxCoderAddByteFunction · 0.85
fxNodeDispatchCodeAssignFunction · 0.85

Tested by

no test coverage detected