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

Function fxCheckEnvironmentAliases

xs/tools/xslSlot.c:231–257  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

229}
230
231void fxCheckEnvironmentAliases(txMachine* the, txSlot* environment, txAliasIDList* list)
232{
233 txSlot* closure = environment->next;
234 if (environment->flag & XS_LEVEL_FLAG)
235 return;
236 environment->flag |= XS_LEVEL_FLAG;
237 if (environment->value.instance.prototype)
238 fxCheckEnvironmentAliases(the, environment->value.instance.prototype, list);
239 while (closure) {
240 if (closure->kind == XS_CLOSURE_KIND) {
241 txSlot* slot = closure->value.closure;
242 mxPushLink(closureLink, closure->ID, XSL_ENVIRONMENT_FLAG);
243 if (slot->ID != XS_NO_ID) {
244 if (list->aliases[slot->ID] == 0) {
245 list->aliases[slot->ID] = 1;
246 fxCheckAliasesError(the, list, 0);
247 }
248 }
249 if (slot->kind == XS_REFERENCE_KIND) {
250 fxCheckInstanceAliases(the, slot->value.reference, list);
251 }
252 mxPopLink(closureLink);
253 }
254 closure = closure->next;
255 }
256 //environment->flag &= ~XS_LEVEL_FLAG;
257}
258
259void fxCheckInstanceAliases(txMachine* the, txSlot* instance, txAliasIDList* list)
260{

Callers 1

fxCheckInstanceAliasesFunction · 0.85

Calls 2

fxCheckAliasesErrorFunction · 0.85
fxCheckInstanceAliasesFunction · 0.85

Tested by

no test coverage detected