< prev index next >

hotspot/src/share/vm/interpreter/bytecodes.hpp

Print this page
rev 6907 : 8056071: compiler/whitebox/IsMethodCompilableTest.java fails with 'method() is not compilable after 3 iterations'
Summary: Always use MDO if valid and always compile trivial methods with C1 if available.
Reviewed-by: kvn, iveresov


 403   static Code        java_code      (Code code)    { check(code);      return _java_code     [code]; }
 404   static bool        can_rewrite    (Code code)    { check(code);      return has_all_flags(code, _bc_can_rewrite, false); }
 405   static bool        must_rewrite(Bytecodes::Code code) { return can_rewrite(code) && check_must_rewrite(code); }
 406   static bool        native_byte_order(Code code)  { check(code);      return has_all_flags(code, _fmt_has_nbo, false); }
 407   static bool        uses_cp_cache  (Code code)    { check(code);      return has_all_flags(code, _fmt_has_j, false); }
 408   // if 'end' is provided, it indicates the end of the code buffer which
 409   // should not be read past when parsing.
 410   static int         special_length_at(Bytecodes::Code code, address bcp, address end = NULL);
 411   static int         special_length_at(Method* method, address bcp, address end = NULL) { return special_length_at(code_at(method, bcp), bcp, end); }
 412   static int         raw_special_length_at(address bcp, address end = NULL);
 413   static int         length_for_code_at(Bytecodes::Code code, address bcp)  { int l = length_for(code); return l > 0 ? l : special_length_at(code, bcp); }
 414   static int         length_at      (Method* method, address bcp)  { return length_for_code_at(code_at(method, bcp), bcp); }
 415   static int         java_length_at (Method* method, address bcp)  { return length_for_code_at(java_code_at(method, bcp), bcp); }
 416   static bool        is_java_code   (Code code)    { return 0 <= code && code < number_of_java_codes; }
 417 
 418   static bool        is_aload       (Code code)    { return (code == _aload  || code == _aload_0  || code == _aload_1
 419                                                                              || code == _aload_2  || code == _aload_3); }
 420   static bool        is_astore      (Code code)    { return (code == _astore || code == _astore_0 || code == _astore_1
 421                                                                              || code == _astore_2 || code == _astore_3); }
 422 

 423   static bool        is_zero_const  (Code code)    { return (code == _aconst_null || code == _iconst_0
 424                                                            || code == _fconst_0 || code == _dconst_0); }

 425   static bool        is_invoke      (Code code)    { return (_invokevirtual <= code && code <= _invokedynamic); }
 426   static bool        has_receiver   (Code code)    { assert(is_invoke(code), "");  return code == _invokevirtual ||
 427                                                                                           code == _invokespecial ||
 428                                                                                           code == _invokeinterface; }
 429   static bool        has_optional_appendix(Code code) { return code == _invokedynamic || code == _invokehandle; }
 430 
 431   static int         compute_flags  (const char* format, int more_flags = 0);  // compute the flags
 432   static int         flags          (int code, bool is_wide) {
 433     assert(code == (u_char)code, "must be a byte");
 434     return _flags[code + (is_wide ? (1<<BitsPerByte) : 0)];
 435   }
 436   static int         format_bits    (Code code, bool is_wide) { return flags(code, is_wide) & _all_fmt_bits; }
 437   static bool        has_all_flags  (Code code, int test_flags, bool is_wide) {
 438     return (flags(code, is_wide) & test_flags) == test_flags;
 439   }
 440 
 441   // Initialization
 442   static void        initialize     ();
 443 };
 444 


 403   static Code        java_code      (Code code)    { check(code);      return _java_code     [code]; }
 404   static bool        can_rewrite    (Code code)    { check(code);      return has_all_flags(code, _bc_can_rewrite, false); }
 405   static bool        must_rewrite(Bytecodes::Code code) { return can_rewrite(code) && check_must_rewrite(code); }
 406   static bool        native_byte_order(Code code)  { check(code);      return has_all_flags(code, _fmt_has_nbo, false); }
 407   static bool        uses_cp_cache  (Code code)    { check(code);      return has_all_flags(code, _fmt_has_j, false); }
 408   // if 'end' is provided, it indicates the end of the code buffer which
 409   // should not be read past when parsing.
 410   static int         special_length_at(Bytecodes::Code code, address bcp, address end = NULL);
 411   static int         special_length_at(Method* method, address bcp, address end = NULL) { return special_length_at(code_at(method, bcp), bcp, end); }
 412   static int         raw_special_length_at(address bcp, address end = NULL);
 413   static int         length_for_code_at(Bytecodes::Code code, address bcp)  { int l = length_for(code); return l > 0 ? l : special_length_at(code, bcp); }
 414   static int         length_at      (Method* method, address bcp)  { return length_for_code_at(code_at(method, bcp), bcp); }
 415   static int         java_length_at (Method* method, address bcp)  { return length_for_code_at(java_code_at(method, bcp), bcp); }
 416   static bool        is_java_code   (Code code)    { return 0 <= code && code < number_of_java_codes; }
 417 
 418   static bool        is_aload       (Code code)    { return (code == _aload  || code == _aload_0  || code == _aload_1
 419                                                                              || code == _aload_2  || code == _aload_3); }
 420   static bool        is_astore      (Code code)    { return (code == _astore || code == _astore_0 || code == _astore_1
 421                                                                              || code == _astore_2 || code == _astore_3); }
 422 
 423   static bool        is_const       (Code code)    { return (_aconst_null <= code && code <= _ldc2_w); }
 424   static bool        is_zero_const  (Code code)    { return (code == _aconst_null || code == _iconst_0
 425                                                            || code == _fconst_0 || code == _dconst_0); }
 426   static bool        is_return      (Code code)    { return (_ireturn <= code && code <= _return); }
 427   static bool        is_invoke      (Code code)    { return (_invokevirtual <= code && code <= _invokedynamic); }
 428   static bool        has_receiver   (Code code)    { assert(is_invoke(code), "");  return code == _invokevirtual ||
 429                                                                                           code == _invokespecial ||
 430                                                                                           code == _invokeinterface; }
 431   static bool        has_optional_appendix(Code code) { return code == _invokedynamic || code == _invokehandle; }
 432 
 433   static int         compute_flags  (const char* format, int more_flags = 0);  // compute the flags
 434   static int         flags          (int code, bool is_wide) {
 435     assert(code == (u_char)code, "must be a byte");
 436     return _flags[code + (is_wide ? (1<<BitsPerByte) : 0)];
 437   }
 438   static int         format_bits    (Code code, bool is_wide) { return flags(code, is_wide) & _all_fmt_bits; }
 439   static bool        has_all_flags  (Code code, int test_flags, bool is_wide) {
 440     return (flags(code, is_wide) & test_flags) == test_flags;
 441   }
 442 
 443   // Initialization
 444   static void        initialize     ();
 445 };
 446 
< prev index next >