src/share/vm/oops/methodOop.hpp

changeset 3969
1d7922586cf6
parent 3931
dd785aabe02b
child 3974
93c71eb28866
     1.1 --- a/src/share/vm/oops/methodOop.hpp	Mon Jul 23 13:04:59 2012 -0700
     1.2 +++ b/src/share/vm/oops/methodOop.hpp	Tue Jul 24 10:51:00 2012 -0700
     1.3 @@ -124,7 +124,9 @@
     1.4    u1                _intrinsic_id;               // vmSymbols::intrinsic_id (0 == _none)
     1.5    u1                _jfr_towrite  : 1,           // Flags
     1.6                      _force_inline : 1,
     1.7 -                                  : 6;
     1.8 +                    _hidden       : 1,
     1.9 +                    _dont_inline  : 1,
    1.10 +                                  : 4;
    1.11    u2                _interpreter_throwout_count; // Count of times method was exited via exception while interpreting
    1.12    u2                _number_of_breakpoints;      // fullspeed debugging support
    1.13    InvocationCounter _invocation_counter;         // Incremented before each activation of the method - used to trigger frequency-based optimizations
    1.14 @@ -245,7 +247,7 @@
    1.15    void set_constants(constantPoolOop c)          { constMethod()->set_constants(c); }
    1.16  
    1.17    // max stack
    1.18 -  int  max_stack() const                         { return _max_stack; }
    1.19 +  int  max_stack() const                         { return _max_stack + extra_stack_entries(); }
    1.20    void set_max_stack(int size)                   { _max_stack = size; }
    1.21  
    1.22    // max locals
    1.23 @@ -590,28 +592,19 @@
    1.24    bool is_overridden_in(klassOop k) const;
    1.25  
    1.26    // JSR 292 support
    1.27 -  bool is_method_handle_invoke() const              { return access_flags().is_method_handle_invoke(); }
    1.28 -  static bool is_method_handle_invoke_name(vmSymbols::SID name_sid);
    1.29 -  static bool is_method_handle_invoke_name(Symbol* name) {
    1.30 -    return is_method_handle_invoke_name(vmSymbols::find_sid(name));
    1.31 -  }
    1.32 -  // Tests if this method is an internal adapter frame from the
    1.33 -  // MethodHandleCompiler.
    1.34 -  bool is_method_handle_adapter() const;
    1.35 -  static methodHandle make_invoke_method(KlassHandle holder,
    1.36 -                                         Symbol* name, //invokeExact or invokeGeneric
    1.37 -                                         Symbol* signature, //anything at all
    1.38 -                                         Handle method_type,
    1.39 -                                         TRAPS);
    1.40 +  bool is_method_handle_intrinsic() const;          // MethodHandles::is_signature_polymorphic_intrinsic(intrinsic_id)
    1.41 +  bool is_compiled_lambda_form() const;             // intrinsic_id() == vmIntrinsics::_compiledLambdaForm
    1.42 +  bool has_member_arg() const;                      // intrinsic_id() == vmIntrinsics::_linkToSpecial, etc.
    1.43 +  static methodHandle make_method_handle_intrinsic(vmIntrinsics::ID iid, // _invokeBasic, _linkToVirtual
    1.44 +                                                   Symbol* signature, //anything at all
    1.45 +                                                   TRAPS);
    1.46    static klassOop check_non_bcp_klass(klassOop klass);
    1.47    // these operate only on invoke methods:
    1.48 -  oop method_handle_type() const;
    1.49 -  static jint* method_type_offsets_chain();  // series of pointer-offsets, terminated by -1
    1.50    // presize interpreter frames for extra interpreter stack entries, if needed
    1.51    // method handles want to be able to push a few extra values (e.g., a bound receiver), and
    1.52    // invokedynamic sometimes needs to push a bootstrap method, call site, and arglist,
    1.53    // all without checking for a stack overflow
    1.54 -  static int extra_stack_entries() { return EnableInvokeDynamic ? (int) MethodHandlePushLimit + 3 : 0; }
    1.55 +  static int extra_stack_entries() { return EnableInvokeDynamic ? 2 : 0; }
    1.56    static int extra_stack_words();  // = extra_stack_entries() * Interpreter::stackElementSize()
    1.57  
    1.58    // RedefineClasses() support:
    1.59 @@ -656,8 +649,12 @@
    1.60    bool jfr_towrite()                 { return _jfr_towrite; }
    1.61    void set_jfr_towrite(bool towrite) { _jfr_towrite = towrite; }
    1.62  
    1.63 -  bool force_inline()            { return _force_inline; }
    1.64 -  void set_force_inline(bool fi) { _force_inline = fi; }
    1.65 +  bool     force_inline()       { return _force_inline;     }
    1.66 +  void set_force_inline(bool x) {        _force_inline = x; }
    1.67 +  bool     dont_inline()        { return _dont_inline;      }
    1.68 +  void set_dont_inline(bool x)  {        _dont_inline = x;  }
    1.69 +  bool  is_hidden()             { return _hidden;           }
    1.70 +  void set_hidden(bool x)       {        _hidden = x;       }
    1.71  
    1.72    // On-stack replacement support
    1.73    bool has_osr_nmethod(int level, bool match_level) {
    1.74 @@ -704,8 +701,8 @@
    1.75    static bool has_unloaded_classes_in_signature(methodHandle m, TRAPS);
    1.76  
    1.77    // Printing
    1.78 -  void print_short_name(outputStream* st)        /*PRODUCT_RETURN*/; // prints as klassname::methodname; Exposed so field engineers can debug VM
    1.79 -  void print_name(outputStream* st)              PRODUCT_RETURN; // prints as "virtual void foo(int)"
    1.80 +  void print_short_name(outputStream* st = tty)  /*PRODUCT_RETURN*/; // prints as klassname::methodname; Exposed so field engineers can debug VM
    1.81 +  void print_name(outputStream* st = tty)        PRODUCT_RETURN; // prints as "virtual void foo(int)"
    1.82  
    1.83    // Helper routine used for method sorting
    1.84    static void sort_methods(objArrayOop methods,

mercurial