lang: ast, funcs: Remove the secret channel from call
This removes the secret channel from the call function. Having it made it more complicated to write new function engines, and it's not clear why it was even needed in the first place. It seems that even the current generation of function engines work just fine without it. Co-authored-by: Samuel Gélineau <gelisam@gmail.com>
This commit is contained in:
@@ -25,6 +25,8 @@ Edge: FuncValue -> if # a
|
||||
Edge: FuncValue -> if # a
|
||||
Edge: FuncValue -> if # b
|
||||
Edge: FuncValue -> if # b
|
||||
Edge: call -> callSubgraphOutput # dummy
|
||||
Edge: call -> callSubgraphOutput # dummy
|
||||
Edge: const: bool(false) -> if # c
|
||||
Edge: const: bool(true) -> if # c
|
||||
Edge: if -> call # fn
|
||||
@@ -35,6 +37,8 @@ Vertex: FuncValue
|
||||
Vertex: FuncValue
|
||||
Vertex: call
|
||||
Vertex: call
|
||||
Vertex: callSubgraphOutput
|
||||
Vertex: callSubgraphOutput
|
||||
Vertex: const: bool(false)
|
||||
Vertex: const: bool(true)
|
||||
Vertex: if
|
||||
|
||||
@@ -12,5 +12,7 @@ $out = $fn()
|
||||
test "${out}" {}
|
||||
-- OUTPUT --
|
||||
Edge: FuncValue -> call # fn
|
||||
Edge: call -> callSubgraphOutput # dummy
|
||||
Vertex: FuncValue
|
||||
Vertex: call
|
||||
Vertex: callSubgraphOutput
|
||||
|
||||
@@ -11,5 +11,7 @@ $out = $fn()
|
||||
test "${out}" {}
|
||||
-- OUTPUT --
|
||||
Edge: FuncValue -> call # fn
|
||||
Edge: call -> callSubgraphOutput # dummy
|
||||
Vertex: FuncValue
|
||||
Vertex: call
|
||||
Vertex: callSubgraphOutput
|
||||
|
||||
@@ -13,11 +13,13 @@ $z = apply($add1, 1)
|
||||
test [fmt.printf("%d", $z),] {}
|
||||
-- OUTPUT --
|
||||
Edge: FuncValue -> call # fn
|
||||
Edge: call -> printf: func(format str, a int) str # a
|
||||
Edge: call -> callSubgraphOutput # dummy
|
||||
Edge: callSubgraphOutput -> printf: func(format str, a int) str # a
|
||||
Edge: const: str("%d") -> printf: func(format str, a int) str # format
|
||||
Edge: printf: func(format str, a int) str -> composite: []str # 0
|
||||
Vertex: FuncValue
|
||||
Vertex: call
|
||||
Vertex: callSubgraphOutput
|
||||
Vertex: composite: []str
|
||||
Vertex: const: int(1)
|
||||
Vertex: const: str("%d")
|
||||
|
||||
@@ -21,7 +21,8 @@ test [$lambda("hello"),] {}
|
||||
Edge: FuncValue -> if # a
|
||||
Edge: FuncValue -> if # b
|
||||
Edge: _operator -> if # c
|
||||
Edge: call -> composite: []str # 0
|
||||
Edge: call -> callSubgraphOutput # dummy
|
||||
Edge: callSubgraphOutput -> composite: []str # 0
|
||||
Edge: const: int(0) -> _operator # b
|
||||
Edge: const: int(10) -> _operator # a
|
||||
Edge: const: str(">") -> _operator # op
|
||||
@@ -30,6 +31,7 @@ Vertex: FuncValue
|
||||
Vertex: FuncValue
|
||||
Vertex: _operator
|
||||
Vertex: call
|
||||
Vertex: callSubgraphOutput
|
||||
Vertex: composite: []str
|
||||
Vertex: const: int(0)
|
||||
Vertex: const: int(10)
|
||||
|
||||
Reference in New Issue
Block a user