On Wed, Nov 12, 2008 at 03:58:48AM +0900, Nobuyoshi Nakada wrote:
> * how to represent default arguments. They can be arbitrary
>   expressions not only simple literals, for instance,
>   preceeding parameters can be there, and any (parenthesized)
>   statements e.g. if, case, while, class, and etc.

Control structures are tricky but not impossible to decompile.  For example,
it's a reasonable to assume that a branchif instruction that branches
backward in the sequence is probably a while loop.

>   And as 1.9 merges bytecodes of those expressions into the
>   method body, so I don't think it's possible to discompile.

The instructions are in the method body, but are pointed to by the
arg_opt_table.  Each default value expression can be calculated by
decompiling the corresponding instructions in the table.

Paul