hotspot/src/share/vm/oops/generateOopMap.hpp
changeset 33593 60764a78fa5c
parent 24424 2658d7834c6e
child 38177 b0c9cb06506b
equal deleted inserted replaced
33579:01ade4446d96 33593:60764a78fa5c
     1 /*
     1 /*
     2  * Copyright (c) 1997, 2014, Oracle and/or its affiliates. All rights reserved.
     2  * Copyright (c) 1997, 2015, Oracle and/or its affiliates. All rights reserved.
     3  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
     3  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
     4  *
     4  *
     5  * This code is free software; you can redistribute it and/or modify it
     5  * This code is free software; you can redistribute it and/or modify it
     6  * under the terms of the GNU General Public License version 2 only, as
     6  * under the terms of the GNU General Public License version 2 only, as
     7  * published by the Free Software Foundation.
     7  * published by the Free Software Foundation.
    76   static int _init_nof_entries;
    76   static int _init_nof_entries;
    77 
    77 
    78   void add_jsr(int return_bci, int target_bci);   // Adds entry to list
    78   void add_jsr(int return_bci, int target_bci);   // Adds entry to list
    79  public:
    79  public:
    80   RetTable()                                                  { _first = NULL; }
    80   RetTable()                                                  { _first = NULL; }
    81   void compute_ret_table(methodHandle method);
    81   void compute_ret_table(const methodHandle& method);
    82   void update_ret_table(int bci, int delta);
    82   void update_ret_table(int bci, int delta);
    83   RetTableEntry* find_jsrs_for_target(int targBci);
    83   RetTableEntry* find_jsrs_for_target(int targBci);
    84 };
    84 };
    85 
    85 
    86 //
    86 //
   460   void  ret_jump_targets_do                 (BytecodeStream *bcs, jmpFct_t jmpFct, int varNo,int *data);
   460   void  ret_jump_targets_do                 (BytecodeStream *bcs, jmpFct_t jmpFct, int varNo,int *data);
   461   bool  jump_targets_do                     (BytecodeStream *bcs, jmpFct_t jmpFct, int *data);
   461   bool  jump_targets_do                     (BytecodeStream *bcs, jmpFct_t jmpFct, int *data);
   462 
   462 
   463   friend class RelocCallback;
   463   friend class RelocCallback;
   464  public:
   464  public:
   465   GenerateOopMap(methodHandle method);
   465   GenerateOopMap(const methodHandle& method);
   466 
   466 
   467   // Compute the map.
   467   // Compute the map.
   468   void compute_map(TRAPS);
   468   void compute_map(TRAPS);
   469   void result_for_basicblock(int bci);    // Do a callback on fill_stackmap_for_opcodes for basicblock containing bci
   469   void result_for_basicblock(int bci);    // Do a callback on fill_stackmap_for_opcodes for basicblock containing bci
   470 
   470 
   535   static int _nof_rewrites;
   535   static int _nof_rewrites;
   536   static int _nof_relocations;
   536   static int _nof_relocations;
   537 #endif
   537 #endif
   538 
   538 
   539  public:
   539  public:
   540   ResolveOopMapConflicts(methodHandle method) : GenerateOopMap(method) { _must_clear_locals = false; };
   540   ResolveOopMapConflicts(const methodHandle& method) : GenerateOopMap(method) { _must_clear_locals = false; };
   541 
   541 
   542   methodHandle do_potential_rewrite(TRAPS);
   542   methodHandle do_potential_rewrite(TRAPS);
   543   bool must_clear_locals() const { return _must_clear_locals; }
   543   bool must_clear_locals() const { return _must_clear_locals; }
   544 };
   544 };
   545 
   545 
   560                                            CellTypeState* vars,
   560                                            CellTypeState* vars,
   561                                            CellTypeState* stack,
   561                                            CellTypeState* stack,
   562                                            int stack_top)                 {}
   562                                            int stack_top)                 {}
   563   virtual void fill_init_vars             (GrowableArray<intptr_t> *init_vars) {}
   563   virtual void fill_init_vars             (GrowableArray<intptr_t> *init_vars) {}
   564  public:
   564  public:
   565   GeneratePairingInfo(methodHandle method) : GenerateOopMap(method)       {};
   565   GeneratePairingInfo(const methodHandle& method) : GenerateOopMap(method)       {};
   566 
   566 
   567   // Call compute_map(CHECK) to generate info.
   567   // Call compute_map(CHECK) to generate info.
   568 };
   568 };
   569 
   569 
   570 #endif // SHARE_VM_OOPS_GENERATEOOPMAP_HPP
   570 #endif // SHARE_VM_OOPS_GENERATEOOPMAP_HPP