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

Function fxAccessNodeCodeThis

xs/sources/xsCode.c:2102–2119  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

2100}
2101
2102txFlag fxAccessNodeCodeThis(void* it, void* param, txFlag flag)
2103{
2104 txAccessNode* self = it;
2105 txDeclareNode* declaration = self->declaration;
2106 if (!flag)
2107 fxCoderAddByte(param, 1, XS_CODE_UNDEFINED);
2108 if (!declaration) {
2109 fxAccessNodeCodeReference(it, param, 0);
2110 if (flag)
2111 fxCoderAddByte(param, 1, XS_CODE_DUB);
2112 fxCoderAddSymbol(param, 0, XS_CODE_GET_THIS_VARIABLE, self->symbol);
2113 }
2114 else {
2115 fxCoderAddIndex(param, 1, (declaration->flags & mxDeclareNodeClosureFlag) ? XS_CODE_GET_CLOSURE_1 : XS_CODE_GET_LOCAL_1, declaration->index);
2116 flag = 0;
2117 }
2118 return flag;
2119}
2120
2121void fxAndExpressionNodeCode(void* it, void* param)
2122{

Callers

nothing calls this directly

Calls 4

fxCoderAddByteFunction · 0.85
fxCoderAddSymbolFunction · 0.85
fxCoderAddIndexFunction · 0.85

Tested by

no test coverage detected