harmony-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Mikhail Fursov (JIRA)" <j...@apache.org>
Subject [jira] Commented: (HARMONY-3658) [drlvm][jit] Incorrect class resolution / initialization order in JET and OPT compilers
Date Thu, 31 May 2007 15:03:16 GMT

    [ https://issues.apache.org/jira/browse/HARMONY-3658?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12500388
] 

Mikhail Fursov commented on HARMONY-3658:
-----------------------------------------

Alexey, I didn't check client mode startup performance yet, will do tomorrow

> [drlvm][jit] Incorrect class resolution / initialization order in JET and OPT compilers
> ---------------------------------------------------------------------------------------
>
>                 Key: HARMONY-3658
>                 URL: https://issues.apache.org/jira/browse/HARMONY-3658
>             Project: Harmony
>          Issue Type: Bug
>          Components: DRLVM
>            Reporter: Mikhail Fursov
>            Assignee: Alexey Varlamov
>         Attachments: gdb.txt, static_init.diff, static_init2.diff, static_init3.diff
>
>
> While working on lazy resolution support in JIT I found the problem that both JET and
OPT process 'new' bytecode incorrectly:
> For the test below:
> public class Hello {
>     public static void main(String[] args) {
>         int x = 1;
>         try {
>             new Foo(x=0);
>         } catch (Error e) {
>             System.out.println(x);
>         }
>     }
> }
> class Foo {
>     static {
>         exception();
>     }
>     static void exception() {
>         throw new RuntimeException();
>     }
>     Foo(int x) {
>         System.out.println("FAILED!");
>     }
> }
> RI and interpreter print '0'
> while JET and OPT print '1'
> Disassembly:
>     public static void main(String args[])
>     {
>         int i = 1;
>     //    0    0:iconst_1        
>     //    1    1:istore_1        
>         try
>         {
>             new Foo(i = 0);
>     //    2    2:new             #2   <Class Foo>
>     //    3    5:dup             
>     //    4    6:iconst_0        
>     //    5    7:dup             
>     //    6    8:istore_1        
>     //    7    9:invokespecial   #3   <Method void Foo(int)>
>     //    8   12:pop             
>         }
>     //*   9   13:goto            24
>         catch(Error error)
>     //*  10   16:astore_2        
>         {
>             System.out.println(i);
>     //   11   17:getstatic       #5   <Field PrintStream System.out>
>     //   12   20:iload_1         
>     //   13   21:invokevirtual   #6   <Method void PrintStream.println(int)>
>         }
>     //   14   24:return          
>     }

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


Mime
View raw message