line numbers policy change for "multiline" expressions
Jonathan Gibbons
jonathan.gibbons at oracle.com
Mon Jan 27 09:30:51 PST 2014
Anna,
Curretly, there is no spec for the exact details of the content of the
line number table, and so it cannot be guaranteed not to change in the
future.
-- Jon
On 01/27/2014 03:32 AM, Anna Kozlova wrote:
> Hi all,
>
>
>
> Sorry if it was already discussed.
>
>
>
> Expressions which span over multiple lines are compiled to different lines
> and in previous versions they were all merged to the 'outer call' line.
>
>
>
> E.g. for code
>
>
>
> public static void main(String[] args) {
>
> foo(bar1(),
>
> bar());
>
> }
>
>
>
> Jdk 7:
>
>
>
> LINENUMBER 15 L1
>
> INVOKESTATIC start/LineNumbers.bar1 ()Ljava/lang/String;
>
> INVOKESTATIC start/LineNumbers.bar ()Ljava/lang/String;
>
> INVOKESTATIC start/LineNumbers.foo
> (Ljava/lang/String;Ljava/lang/String;)V
>
>
>
> Jdk 8:
>
>
>
> L1
>
> LINENUMBER 15 L1
>
> INVOKESTATIC start/LineNumbers.bar1 ()Ljava/lang/String;
>
> L2
>
> LINENUMBER 16 L2
>
> INVOKESTATIC start/LineNumbers.bar ()Ljava/lang/String;
>
> L3
>
> LINENUMBER 15 L3
>
> INVOKESTATIC start/LineNumbers.foo
> (Ljava/lang/String;Ljava/lang/String;)V
>
>
>
> Currently this breaks our debugger and it would be great to know if this
> behavior won't change in the release version.
>
>
>
> Thank you,
>
> Anna
>
>
More information about the lambda-dev
mailing list