harmony-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "George Timoshenko (JIRA)" <j...@apache.org>
Subject [jira] Commented: (HARMONY-3098) [drlvm][jit][jet] fails to compile interlaced subroutines
Date Fri, 31 Aug 2007 11:48:30 GMT

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

George Timoshenko commented on HARMONY-3098:
--------------------------------------------

The byte code of 'main' is quite compact:

public static void main(java.lang.String[]);
  Code:
   0:   jsr     7
   3:   jsr     12
   6:   return
   7:   astore  1
   9:   jsr     16
   12:  astore  1
   14:  ret     1
   16:  ret     1
================================

As there are no 'astore 1' at offset 16, the instruction '16:  ret     1' returns the execution
to the '3' offset (stored into local 1 by inst at offset 7).

If we assume that we have  two subroutines here 

1) target is 7, respective 'ret' is at 16
2) target is 16, respective 'ret' is at 16

The test becomes issegal as it contradicts to JVM Spec:

When executing the ret instruction, which implements a return from a subroutine, there must
be only one possible subroutine from which the instruction can be returning. Two different
subroutines cannot "merge" their execution to a single ret instruction.
================================

Alternative opinion:

internal subroutine (target is 16, respective 'ret' is at 16)
is not a correct one. It just has jsr but there is no ret for this jsr in the test.
I.e. there is no internal subroutine actually just a jump implemented as jrs instruction.

>From this poin the test can pass Verifier. 


I suspect the second case works right now.
(JsrNoRet test passes on Interpreter and RI)




> [drlvm][jit][jet] fails to compile interlaced subroutines
> ---------------------------------------------------------
>
>                 Key: HARMONY-3098
>                 URL: https://issues.apache.org/jira/browse/HARMONY-3098
>             Project: Harmony
>          Issue Type: Bug
>          Components: DRLVM
>         Environment: Windows ia32
>            Reporter: Alexei Fedotov
>         Attachments: JsrNoRet.class, JsrNoRet.j, JsrNoRet2.class, JsrNoRet2.j
>
>
> JET fails to compile a subroutine. I have attached the test I used to reproduce the problem
and an attempt to localize it (in jasmin).
> jitrino.dll!Jitrino::Jet::JFrame::operator=()  Line 84 + 0x3	C++
> jitrino.dll!Jitrino::Jet::BBState::operator=()  + 0x10	C++
> jitrino.dll!Jitrino::Jet::Compiler::comp_gen_insts(unsigned int pc=3, unsigned int parentPC=7,
unsigned int jsr_lead=4294967295)  Line 881 + 0x8	C++
> jitrino.dll!Jitrino::Jet::Compiler::comp_gen_code_bb(unsigned int pc=3)  Line 819 + 0xe
C++
> jitrino.dll!Jitrino::Jet::Compiler::compile(void * ch=0x0013f42c, Method * method=0x02bc7a00,
const OpenMethodExecutionParams & params={...})  Line 394	C++
> jitrino.dll!Jitrino::Jet::compile_with_params(void * jit_handle=0x011e7ac0, void * ch=0x0013f42c,
Method * method=0x02bc7a00, OpenMethodExecutionParams params={...})  Line 523 + 0x2c	C++
> [...]

-- 
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