hotspot/src/share/vm/code/exceptionHandlerTable.hpp
changeset 38133 78b95467b9f1
parent 33160 c59f1676d27e
child 46620 750c6edff33b
equal deleted inserted replaced
38132:ba888a4f352a 38133:78b95467b9f1
     1 /*
     1 /*
     2  * Copyright (c) 1998, 2012, Oracle and/or its affiliates. All rights reserved.
     2  * Copyright (c) 1998, 2016, 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.
    96 
    96 
    97   // (compile-time) construction within compiler
    97   // (compile-time) construction within compiler
    98   ExceptionHandlerTable(int initial_size = 8);
    98   ExceptionHandlerTable(int initial_size = 8);
    99 
    99 
   100   // (run-time) construction from nmethod
   100   // (run-time) construction from nmethod
   101   ExceptionHandlerTable(const nmethod* nm);
   101   ExceptionHandlerTable(const CompiledMethod* nm);
   102 
   102 
   103   // (compile-time) add entries
   103   // (compile-time) add entries
   104   void add_subtable(
   104   void add_subtable(
   105     int                 catch_pco, // the pc offset for the CatchNode
   105     int                 catch_pco, // the pc offset for the CatchNode
   106     GrowableArray<intptr_t>* handler_bcis, // the exception handler entry point bcis
   106     GrowableArray<intptr_t>* handler_bcis, // the exception handler entry point bcis
   113     GrowableArray<intptr_t>* handler_pcos  // pc offsets for the compiled handlers
   113     GrowableArray<intptr_t>* handler_pcos  // pc offsets for the compiled handlers
   114   );
   114   );
   115 
   115 
   116   // nmethod support
   116   // nmethod support
   117   int  size_in_bytes() const { return round_to(_length * sizeof(HandlerTableEntry), oopSize); }
   117   int  size_in_bytes() const { return round_to(_length * sizeof(HandlerTableEntry), oopSize); }
   118   void copy_to(nmethod* nm);
   118   void copy_to(CompiledMethod* nm);
   119   void copy_bytes_to(address addr);
   119   void copy_bytes_to(address addr);
   120 
   120 
   121   // lookup
   121   // lookup
   122   HandlerTableEntry* entry_for(int catch_pco, int handler_bci, int scope_depth) const;
   122   HandlerTableEntry* entry_for(int catch_pco, int handler_bci, int scope_depth) const;
   123 
   123