Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-8203005

The top-of-stack type specified for nofast_* bytecodes are wrong

    XMLWordPrintable

Details

    • b04

    Description

      In bytecodes.cpp, we have:

        // Note 2: The result type is T_ILLEGAL for bytecodes where the top of stack
        // type after execution is not only determined by the bytecode itself.

        // Java bytecodes
        // bytecode bytecode name format wide f. result tp stk traps
        def(_fast_aload_0 , "fast_aload_0" , "b" , NULL , T_OBJECT , 1, true , _aload_0 );
        def(_fast_iload , "fast_iload" , "bi" , NULL , T_INT , 1, false, _iload);

      but the following is wrong:

        def(_nofast_aload_0 , "nofast_aload_0" , "b" , NULL , T_ILLEGAL, 1, true , _aload_0 );
        def(_nofast_iload , "nofast_iload" , "bi" , NULL , T_ILLEGAL, 1, false, _iload );

      The correct type specifiers should be

      _nofast_aload_0 -> T_OBJECT
      _nofast_iload -> T_INT

      BTW, the Java code in SA's Bytecodes.java should also be fixed at the same time.

      Attachments

        Issue Links

          Activity

            People

              minqi Yumin Qi
              iklam Ioi Lam
              Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: