src/share/vm/interpreter/bytecodes.hpp

changeset 1925
de91a2f25c7e
parent 1920
ab102d5d923e
child 1934
e9ff18c4ace7
     1.1 --- a/src/share/vm/interpreter/bytecodes.hpp	Tue May 25 13:18:49 2010 -0700
     1.2 +++ b/src/share/vm/interpreter/bytecodes.hpp	Thu May 27 09:54:07 2010 -0700
     1.3 @@ -353,8 +353,10 @@
     1.4    static const char* name           (Code code)    { check(code);      return _name          [code]; }
     1.5    static BasicType   result_type    (Code code)    { check(code);      return _result_type   [code]; }
     1.6    static int         depth          (Code code)    { check(code);      return _depth         [code]; }
     1.7 -  static int         length_for     (Code code)    { check(code);      return _lengths       [code] & 0xF; }
     1.8 -  static int         wide_length_for(Code code)    { check(code);      return _lengths       [code] >> 4; }
     1.9 +  // Note: Length functions must return <=0 for invalid bytecodes.
    1.10 +  // Calling check(code) in length functions would throw an unwanted assert.
    1.11 +  static int         length_for     (Code code)    { /*no check*/      return _lengths       [code] & 0xF; }
    1.12 +  static int         wide_length_for(Code code)    { /*no check*/      return _lengths       [code] >> 4; }
    1.13    static bool        can_trap       (Code code)    { check(code);      return has_all_flags(code, _bc_can_trap, false); }
    1.14    static Code        java_code      (Code code)    { check(code);      return _java_code     [code]; }
    1.15    static bool        can_rewrite    (Code code)    { check(code);      return has_all_flags(code, _bc_can_rewrite, false); }

mercurial