hotspot/src/share/vm/interpreter/rewriter.hpp
changeset 9971 d496ecd7b9de
parent 7397 5b173b4ca846
child 13391 30245956af37
equal deleted inserted replaced
9954:9a04e9b8518b 9971:d496ecd7b9de
    83   // All the work goes in here:
    83   // All the work goes in here:
    84   Rewriter(instanceKlassHandle klass, constantPoolHandle cpool, objArrayHandle methods, TRAPS);
    84   Rewriter(instanceKlassHandle klass, constantPoolHandle cpool, objArrayHandle methods, TRAPS);
    85 
    85 
    86   void compute_index_maps();
    86   void compute_index_maps();
    87   void make_constant_pool_cache(TRAPS);
    87   void make_constant_pool_cache(TRAPS);
    88   void scan_method(methodOop m);
    88   void scan_method(methodOop m, bool reverse = false);
    89   methodHandle rewrite_jsrs(methodHandle m, TRAPS);
       
    90   void rewrite_Object_init(methodHandle m, TRAPS);
    89   void rewrite_Object_init(methodHandle m, TRAPS);
    91   void rewrite_member_reference(address bcp, int offset);
    90   void rewrite_member_reference(address bcp, int offset, bool reverse = false);
    92   void rewrite_invokedynamic(address bcp, int offset);
    91   void rewrite_invokedynamic(address bcp, int offset, bool reverse = false);
    93   void maybe_rewrite_ldc(address bcp, int offset, bool is_wide);
    92   void maybe_rewrite_ldc(address bcp, int offset, bool is_wide, bool reverse = false);
       
    93   // Revert bytecodes in case of an exception.
       
    94   void restore_bytecodes();
    94 
    95 
       
    96   static methodHandle rewrite_jsrs(methodHandle m, TRAPS);
    95  public:
    97  public:
    96   // Driver routine:
    98   // Driver routine:
    97   static void rewrite(instanceKlassHandle klass, TRAPS);
    99   static void rewrite(instanceKlassHandle klass, TRAPS);
    98   static void rewrite(instanceKlassHandle klass, constantPoolHandle cpool, objArrayHandle methods, TRAPS);
   100   static void rewrite(instanceKlassHandle klass, constantPoolHandle cpool, objArrayHandle methods, TRAPS);
    99 
   101 
   100   enum {
   102   enum {
   101     _secondary_entry_tag = nth_bit(30)
   103     _secondary_entry_tag = nth_bit(30)
   102   };
   104   };
       
   105 
       
   106   // Second pass, not gated by is_rewritten flag
       
   107   static void relocate_and_link(instanceKlassHandle klass, TRAPS);
       
   108   // JSR292 version to call with it's own methods.
       
   109   static void relocate_and_link(instanceKlassHandle klass,
       
   110                                 objArrayHandle methods, TRAPS);
       
   111 
   103 };
   112 };
   104 
   113 
   105 #endif // SHARE_VM_INTERPRETER_REWRITER_HPP
   114 #endif // SHARE_VM_INTERPRETER_REWRITER_HPP