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 // This file contains the platform-independent parts 26 // of the abstract interpreter and the abstract interpreter generator. 27 28 // Organization of the interpreter(s). There exists two different interpreters in hotpot 29 // an assembly language version (aka template interpreter) and a high level language version 30 // (aka c++ interpreter). Th division of labor is as follows: 31 32 // Template Interpreter C++ Interpreter Functionality 33 // 34 // templateTable* bytecodeInterpreter* actual interpretation of bytecodes 35 // 36 // templateInterpreter* cppInterpreter* generation of assembly code that creates 37 // and manages interpreter runtime frames. 38 // Also code for populating interpreter 39 // frames created during deoptimization. 40 // 41 // For both template and c++ interpreter. There are common files for aspects of the interpreter 42 // that are generic to both interpreters. This is the layout: 43 // 44 // abstractInterpreter.hpp: generic description of the interpreter. 239 class Template; 240 class AbstractInterpreterGenerator: public StackObj { 241 protected: 242 InterpreterMacroAssembler* _masm; 243 244 // shared code sequences 245 // Converter for native abi result to tosca result 246 address generate_result_handler_for(BasicType type); 247 address generate_slow_signature_handler(); 248 249 // entry point generator 250 address generate_method_entry(AbstractInterpreter::MethodKind kind); 251 252 void bang_stack_shadow_pages(bool native_call); 253 254 void generate_all(); 255 256 public: 257 AbstractInterpreterGenerator(StubQueue* _code); 258 }; | 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 #ifndef SHARE_VM_INTERPRETER_ABSTRACTINTERPRETER_HPP 26 #define SHARE_VM_INTERPRETER_ABSTRACTINTERPRETER_HPP 27 28 #include "code/stubs.hpp" 29 #include "interpreter/bytecodes.hpp" 30 #include "runtime/vmThread.hpp" 31 #include "utilities/top.hpp" 32 #ifdef TARGET_ARCH_MODEL_x86_32 33 # include "interp_masm_x86_32.hpp" 34 #endif 35 #ifdef TARGET_ARCH_MODEL_x86_64 36 # include "interp_masm_x86_64.hpp" 37 #endif 38 #ifdef TARGET_ARCH_MODEL_sparc 39 # include "interp_masm_sparc.hpp" 40 #endif 41 #ifdef TARGET_ARCH_MODEL_zero 42 # include "interp_masm_zero.hpp" 43 #endif 44 #ifdef TARGET_OS_FAMILY_linux 45 # include "thread_linux.inline.hpp" 46 #endif 47 #ifdef TARGET_OS_FAMILY_solaris 48 # include "thread_solaris.inline.hpp" 49 #endif 50 #ifdef TARGET_OS_FAMILY_windows 51 # include "thread_windows.inline.hpp" 52 #endif 53 54 // This file contains the platform-independent parts 55 // of the abstract interpreter and the abstract interpreter generator. 56 57 // Organization of the interpreter(s). There exists two different interpreters in hotpot 58 // an assembly language version (aka template interpreter) and a high level language version 59 // (aka c++ interpreter). Th division of labor is as follows: 60 61 // Template Interpreter C++ Interpreter Functionality 62 // 63 // templateTable* bytecodeInterpreter* actual interpretation of bytecodes 64 // 65 // templateInterpreter* cppInterpreter* generation of assembly code that creates 66 // and manages interpreter runtime frames. 67 // Also code for populating interpreter 68 // frames created during deoptimization. 69 // 70 // For both template and c++ interpreter. There are common files for aspects of the interpreter 71 // that are generic to both interpreters. This is the layout: 72 // 73 // abstractInterpreter.hpp: generic description of the interpreter. 268 class Template; 269 class AbstractInterpreterGenerator: public StackObj { 270 protected: 271 InterpreterMacroAssembler* _masm; 272 273 // shared code sequences 274 // Converter for native abi result to tosca result 275 address generate_result_handler_for(BasicType type); 276 address generate_slow_signature_handler(); 277 278 // entry point generator 279 address generate_method_entry(AbstractInterpreter::MethodKind kind); 280 281 void bang_stack_shadow_pages(bool native_call); 282 283 void generate_all(); 284 285 public: 286 AbstractInterpreterGenerator(StubQueue* _code); 287 }; 288 289 #endif // SHARE_VM_INTERPRETER_ABSTRACTINTERPRETER_HPP |