src/share/vm/prims/methodHandleWalk.hpp

changeset 3105
c26de9aef2ed
parent 2982
ddd894528dbc
     1.1 --- a/src/share/vm/prims/methodHandleWalk.hpp	Fri Sep 02 04:28:59 2011 -0700
     1.2 +++ b/src/share/vm/prims/methodHandleWalk.hpp	Fri Sep 02 20:58:21 2011 -0700
     1.3 @@ -74,6 +74,7 @@
     1.4      set_method_handle(MethodHandle_vmtarget_oop(), THREAD);
     1.5    }
     1.6  
     1.7 +  Handle root()                 { return _root; }
     1.8    Handle method_handle()        { return _method_handle; }
     1.9    oop    method_handle_oop()    { return _method_handle(); }
    1.10    oop    method_type_oop()      { return MethodHandle_type_oop(); }
    1.11 @@ -110,7 +111,6 @@
    1.12    // the signature for each method.  The signatures are printed in
    1.13    // slot order to make it easier to understand.
    1.14    void print();
    1.15 -  static void print(Handle mh);
    1.16    static void print(oopDesc* mh);
    1.17  #endif
    1.18  };
    1.19 @@ -277,6 +277,10 @@
    1.20    KlassHandle  _target_klass;
    1.21    Thread*      _thread;
    1.22  
    1.23 +  int          _selectAlternative_bci; // These are used for capturing profiles from GWTs
    1.24 +  int          _taken_count;
    1.25 +  int          _not_taken_count;
    1.26 +
    1.27    // Values used by the compiler.
    1.28    static jvalue zero_jvalue;
    1.29    static jvalue one_jvalue;
    1.30 @@ -372,6 +376,7 @@
    1.31  
    1.32    unsigned char* bytecode()        const { return _bytecode.adr_at(0); }
    1.33    int            bytecode_length() const { return _bytecode.length(); }
    1.34 +  int            cur_bci()         const { return _bytecode.length(); }
    1.35  
    1.36    // Fake constant pool.
    1.37    int cpool_oop_put(int tag, Handle con) {
    1.38 @@ -436,6 +441,8 @@
    1.39    }
    1.40  
    1.41    void emit_bc(Bytecodes::Code op, int index = 0, int args_size = -1);
    1.42 +  void update_branch_dest(int src, int dst);
    1.43 +  void emit_load(ArgToken arg);
    1.44    void emit_load(BasicType bt, int index);
    1.45    void emit_store(BasicType bt, int index);
    1.46    void emit_load_constant(ArgToken arg);
    1.47 @@ -455,11 +462,14 @@
    1.48    virtual ArgToken make_fetch(BasicType type, klassOop tk, Bytecodes::Code op, const ArgToken& base, const ArgToken& offset, TRAPS);
    1.49    virtual ArgToken make_invoke(methodHandle m, vmIntrinsics::ID iid, Bytecodes::Code op, bool tailcall, int argc, ArgToken* argv, TRAPS);
    1.50  
    1.51 +  // Check for profiling information on a GWT and return true if it's found
    1.52 +  bool fetch_counts(ArgToken a1, ArgToken a2);
    1.53 +
    1.54    // Get a real constant pool.
    1.55    constantPoolHandle get_constant_pool(TRAPS) const;
    1.56  
    1.57    // Get a real methodOop.
    1.58 -  methodHandle get_method_oop(TRAPS) const;
    1.59 +  methodHandle get_method_oop(TRAPS);
    1.60  
    1.61  public:
    1.62    MethodHandleCompiler(Handle root, Symbol* name, Symbol* signature, int invoke_count, bool for_invokedynamic, TRAPS);

mercurial