Skip to content

Commit

Permalink
doc: add a future todo to the comments
Browse files Browse the repository at this point in the history
  • Loading branch information
EagleoutIce committed Aug 3, 2023
1 parent 41f8d2c commit 556f415
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/dataflow/internal/linker.ts
Original file line number Diff line number Diff line change
Expand Up @@ -146,8 +146,9 @@ function linkFunctionCall(graph: DataflowGraph, id: NodeId, info: DataflowGraphN
for (const def of functionDefs.values()) {
guard(def.tag === 'function-definition', () => `expected function definition, but got ${def.tag}`)

// TODO: this is currently just a temporary hack, we need a clean way to separate closures that apply after the function body and the reads that apply within the body
if(info.environment !== undefined) {
// for each open ingoing reference, try to resolve it hear, and if so add a read edge from the call to signal that it reads it
// for each open ingoing reference, try to resolve it here, and if so add a read edge from the call to signal that it reads it
for (const ingoing of def.subflow.in) {
const defs = resolveByName(ingoing.name, LocalScope, info.environment)
if (defs === undefined) {
Expand Down

0 comments on commit 556f415

Please sign in to comment.