groovy-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Paul King <pa...@asert.com.au>
Subject Re: About if statement in the right hand of assignment statement
Date Wed, 27 Sep 2017 13:22:15 GMT
My understanding is that the current implementation just adds returns at
the correct places to make it appear like an if statement at the end of a
method is a pseudo expression. So if you just move the whole if statement
into a private method and call that in the declaration statement,
everything else might come for free.

Cheers, Paul.

On Wed, Sep 27, 2017 at 10:30 PM, Daniel Sun <realbluesun@hotmail.com>
wrote:

> Hi Paul,
>
>       I have not investigated the bytecode generation of if statement, so I
> just provide a reference implementation ;)
>
>       It's better to implement at the bytecode level(both static and
> dynamic).
>
>
> Cheers,
> Daniel.Sun
>
>
>
> --
> Sent from: http://groovy.329449.n5.nabble.com/Groovy-Dev-f372993.html
>

Mime
View raw message