MCPcopy Create free account
hub / github.com/marijnh/Eloquent-JavaScript / loop

Function loop

src/client/sandbox.mjs:286–293  ·  view source on GitHub ↗
(node)

Source from the content-addressed store, hash-verified

284 let patches = []
285 let backJump = ";if (++__c % 1000 === 0) __sandbox.tick();"
286 function loop(node) {
287 if (node.body.type == "BlockStatement") {
288 patches.push({from: node.body.end - 1, text: backJump})
289 } else {
290 patches.push({from: node.body.start, text: "{"},
291 {from: node.body.end, text: backJump + "}"})
292 }
293 }
294 let dependencies = []
295
296 walk.simple(ast, {

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected