MCPcopy Create free account
hub / github.com/witheve/Eve / toCommitted

Method toCommitted

src/runtime/changes.ts:228–256  ·  view source on GitHub ↗
(scopeLookup: Object)

Source from the content-addressed store, hash-verified

226
227
228 toCommitted(scopeLookup: Object) {
229 let commit = [];
230 let ix = 0;
231 let {positions, info} = this.finalChanges;
232 let indexes = this.index.indexes;
233 let keys = Object.keys(positions);
234 for(let key of keys) {
235 let pos = positions[key];
236 let count = info[pos];
237 if(count === 0) continue;
238 let scope = info[pos + 5];
239 if(scopeLookup && !scopeLookup[scope]) continue;
240
241 let action = count > 1 ? ChangeType.ADDED : ChangeType.REMOVED
242 let e = info[pos + 1];
243 let a = info[pos + 2];
244 let v = info[pos + 3];
245 let node = info[pos + 4];
246
247 commit[ix] = action;
248 commit[ix + 1] = e;
249 commit[ix + 2] = a;
250 commit[ix + 3] = v;
251 commit[ix + 4] = node;
252 commit[ix + 5] = scope;
253 ix += 6;
254 }
255 return commit;
256 }
257
258 result(scopeLookup?: Object) {
259 let insert = [];

Callers 1

onFixpointMethod · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected