diff options
| author | Drahflow <drahflow@gmx.de> | 2014-03-26 00:48:47 +0100 |
|---|---|---|
| committer | Drahflow <drahflow@gmx.de> | 2014-03-26 00:48:47 +0100 |
| commit | 1bc64babd1405bfa70567d576cdef3e45b508b95 (patch) | |
| tree | b535d5bfb665b1422ef44e9bef087192b63b1b44 /compiler | |
| parent | 08b33426f756a79b7500b0bea5597924def2bf87 (diff) | |
Container types
Diffstat (limited to 'compiler')
| -rw-r--r-- | compiler/standardClient.ey | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/compiler/standardClient.ey b/compiler/standardClient.ey index d807533..36f8472 100644 --- a/compiler/standardClient.ey +++ b/compiler/standardClient.ey @@ -644,7 +644,11 @@ # Run from right (stacktop) argument to left (stacklow) argument: # Take topmost type, check whether it can be found in other stacks (from top) # Eliminate all matching types via function or loop creation - { _ ==f sys .typed .inputs ==inputs + { _ ==f _ sys .typed .inputs ==inputs + sys .typed .outputs ==outputs + + outputs len 1 gt { "multi-output function in auto-loop" die } rep + [ ] ==concreteArgs [ ] ==viewPortOffset @@ -795,7 +799,7 @@ [ loops _ len dearray ==loopIndex ] =loops loopIndex 0 ge { loopIndex concreteArgs * ==loopedOver - loopedOver cloneForLoop ==results + outputs len { loopedOver cloneForLoop } { [ ] } ? * ==results loopedOver getLoopStart ==i { i loopedOver isLoopEnd not } { [ concreteArgs _ len dearray ] ==concreteArgsCopy @@ -805,7 +809,7 @@ } each concreteArgsCopy stageCalls argTypes loops unravel - i loopedOver transformLoopIndex results =[] + outputs len { i loopedOver transformLoopIndex results =[] } rep # results dump # TODO: think about a single function returning multiple values # should be solved by producing two arrays side by side @@ -813,7 +817,7 @@ i loopedOver doLoopStep =i } loop - results + outputs len { results } rep # push @$data, [\@results, ['array', '[]', [['range', 0, $#results]], [undef]]]; # FIXME the undef can be determined } { |
