diff options
author | Martin Odersky <odersky@gmail.com> | 2003-09-23 10:44:18 +0000 |
---|---|---|
committer | Martin Odersky <odersky@gmail.com> | 2003-09-23 10:44:18 +0000 |
commit | ec5d770a7ce7dc76fb7a0639777f4eeacb74e613 (patch) | |
tree | 5398d779c5017bbe616791f4514917c885790621 /sources/scalac/transformer/UnCurry.java | |
parent | 409a65421cc625693a1c60af63dbf27c7efd63fb (diff) | |
download | scala-ec5d770a7ce7dc76fb7a0639777f4eeacb74e613.tar.gz scala-ec5d770a7ce7dc76fb7a0639777f4eeacb74e613.tar.bz2 scala-ec5d770a7ce7dc76fb7a0639777f4eeacb74e613.zip |
*** empty log message ***
Diffstat (limited to 'sources/scalac/transformer/UnCurry.java')
-rw-r--r-- | sources/scalac/transformer/UnCurry.java | 15 |
1 files changed, 12 insertions, 3 deletions
diff --git a/sources/scalac/transformer/UnCurry.java b/sources/scalac/transformer/UnCurry.java index f7d8ec796f..c317267842 100644 --- a/sources/scalac/transformer/UnCurry.java +++ b/sources/scalac/transformer/UnCurry.java @@ -17,9 +17,18 @@ import scalac.symtab.*; import Tree.*; import scalac.typechecker.DeSugarize ; -/** (1) Make all functions into one-argument functions - * (2) Convert `def' parameters to closures - * (3) Convert matches with non-visitor arguments to postfix applications +/** - uncurry all symbol and tree types (@see UnCurryPhase) + * - for every curried parameter list: (ps_1) ... (ps_n) ==> (ps_1, ..., ps_n) + * - for every curried application: f(args_1)...(args_n) ==> f(args_1, ..., args_n) + * - for every type application: f[Ts] ==> f[Ts]() unless followed by parameters + * - for every use of a parameterless function: f ==> f() and q.f ==> q.f() + * - for every def-parameter: def x: T ==> x: () => T + * - for every use of a def-parameter: x ==> x.apply() + * - for every argument to a def parameter `def x: T': + * if argument is not a reference to a def parameter: + * convert argument `e' to (expansion of) `() => e' + * - for every argument list that corresponds to a repeated parameter + * (a_1, ..., a_n) => (Sequence(a_1, ..., a_n)) */ public class UnCurry extends OwnerTransformer implements Modifiers { |