src/share/vm/interpreter/bytecodeInterpreter.cpp

Print this page




   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
   7  * published by the Free Software Foundation.
   8  *
   9  * This code is distributed in the hope that it will be useful, but WITHOUT
  10  * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
  11  * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
  12  * version 2 for more details (a copy is included in the LICENSE file that
  13  * accompanied this code).
  14  *
  15  * You should have received a copy of the GNU General Public License version
  16  * 2 along with this work; if not, write to the Free Software Foundation,
  17  * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
  18  *
  19  * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
  20  * or visit www.oracle.com if you need additional information or have any
  21  * questions.
  22  *
  23  */
  24 
  25 
  26 // no precompiled headers
  27 #include "incls/_bytecodeInterpreter.cpp.incl"




































  28 

  29 #ifdef CC_INTERP
  30 
  31 /*
  32  * USELABELS - If using GCC, then use labels for the opcode dispatching
  33  * rather -then a switch statement. This improves performance because it
  34  * gives us the oportunity to have the instructions that calculate the
  35  * next opcode to jump to be intermixed with the rest of the instructions
  36  * that implement the opcode (see UPDATE_PC_AND_TOS_AND_CONTINUE macro).
  37  */
  38 #undef USELABELS
  39 #ifdef __GNUC__
  40 /*
  41    ASSERT signifies debugging. It is much easier to step thru bytecodes if we
  42    don't use the computed goto approach.
  43 */
  44 #ifndef ASSERT
  45 #define USELABELS
  46 #endif
  47 #endif
  48 




   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
   7  * published by the Free Software Foundation.
   8  *
   9  * This code is distributed in the hope that it will be useful, but WITHOUT
  10  * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
  11  * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
  12  * version 2 for more details (a copy is included in the LICENSE file that
  13  * accompanied this code).
  14  *
  15  * You should have received a copy of the GNU General Public License version
  16  * 2 along with this work; if not, write to the Free Software Foundation,
  17  * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
  18  *
  19  * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
  20  * or visit www.oracle.com if you need additional information or have any
  21  * questions.
  22  *
  23  */
  24 

  25 // no precompiled headers
  26 #include "classfile/vmSymbols.hpp"
  27 #include "gc_interface/collectedHeap.hpp"
  28 #include "interpreter/bytecodeHistogram.hpp"
  29 #include "interpreter/bytecodeInterpreter.hpp"
  30 #include "interpreter/bytecodeInterpreter.inline.hpp"
  31 #include "interpreter/interpreter.hpp"
  32 #include "interpreter/interpreterRuntime.hpp"
  33 #include "memory/cardTableModRefBS.hpp"
  34 #include "memory/resourceArea.hpp"
  35 #include "oops/objArrayKlass.hpp"
  36 #include "oops/oop.inline.hpp"
  37 #include "prims/jvmtiExport.hpp"
  38 #include "runtime/frame.inline.hpp"
  39 #include "runtime/handles.inline.hpp"
  40 #include "runtime/interfaceSupport.hpp"
  41 #include "runtime/sharedRuntime.hpp"
  42 #include "runtime/threadCritical.hpp"
  43 #include "utilities/exceptions.hpp"
  44 #ifdef TARGET_OS_ARCH_linux_x86
  45 # include "orderAccess_linux_x86.inline.hpp"
  46 #endif
  47 #ifdef TARGET_OS_ARCH_linux_sparc
  48 # include "orderAccess_linux_sparc.inline.hpp"
  49 #endif
  50 #ifdef TARGET_OS_ARCH_linux_zero
  51 # include "orderAccess_linux_zero.inline.hpp"
  52 #endif
  53 #ifdef TARGET_OS_ARCH_solaris_x86
  54 # include "orderAccess_solaris_x86.inline.hpp"
  55 #endif
  56 #ifdef TARGET_OS_ARCH_solaris_sparc
  57 # include "orderAccess_solaris_sparc.inline.hpp"
  58 #endif
  59 #ifdef TARGET_OS_ARCH_windows_x86
  60 # include "orderAccess_windows_x86.inline.hpp"
  61 #endif
  62 
  63 
  64 // no precompiled headers
  65 #ifdef CC_INTERP
  66 
  67 /*
  68  * USELABELS - If using GCC, then use labels for the opcode dispatching
  69  * rather -then a switch statement. This improves performance because it
  70  * gives us the oportunity to have the instructions that calculate the
  71  * next opcode to jump to be intermixed with the rest of the instructions
  72  * that implement the opcode (see UPDATE_PC_AND_TOS_AND_CONTINUE macro).
  73  */
  74 #undef USELABELS
  75 #ifdef __GNUC__
  76 /*
  77    ASSERT signifies debugging. It is much easier to step thru bytecodes if we
  78    don't use the computed goto approach.
  79 */
  80 #ifndef ASSERT
  81 #define USELABELS
  82 #endif
  83 #endif
  84