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

Function fxBuildKeys

xs/sources/xsPlatforms.c:88–109  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

86#if mxUseDefaultBuildKeys
87
88void fxBuildKeys(txMachine* the)
89{
90 int i = 0;
91 {
92 txSlot* key = fxFindKey(the);
93 key->flag = XS_INTERNAL_FLAG | XS_DONT_DELETE_FLAG;
94 i++;
95 }
96 for (; i < XS_SYMBOL_ID_COUNT; i++) {
97 txSlot* key = fxFindKey(the);
98 txSlot* instance = fxNewInstance(the);
99 txSlot* property = fxNextSymbolProperty(the, instance, i, XS_NO_ID, XS_INTERNAL_FLAG);
100 fxNextStringXProperty(the, property, gxIDStrings[i], XS_NO_ID, XS_INTERNAL_FLAG);
101 key->flag = XS_INTERNAL_FLAG | XS_DONT_DELETE_FLAG;
102 key->kind = XS_REFERENCE_KIND;
103 key->value.reference = instance;
104 mxPop();
105 }
106 for (; i < XS_ID_COUNT; i++) {
107 fxID(the, gxIDStrings[i]);
108 }
109}
110
111#endif /* mxUseDefaultBuildKeys */
112

Callers 1

fxCreateMachineFunction · 0.70

Calls 5

fxFindKeyFunction · 0.85
fxNewInstanceFunction · 0.85
fxNextSymbolPropertyFunction · 0.85
fxNextStringXPropertyFunction · 0.85
fxIDFunction · 0.85

Tested by

no test coverage detected