src/share/vm/interpreter/templateInterpreterGenerator.hpp

Thu, 17 Mar 2011 18:29:18 -0700

author
jrose
date
Thu, 17 Mar 2011 18:29:18 -0700
changeset 2641
d2134498fd3f
parent 2508
b92c45f2bc75
child 2708
1d1603768966
permissions
-rw-r--r--

7011865: JSR 292 CTW fails: !THREAD->is_Compiler_thread() failed: Can not load classes with the Compiler thre
Reviewed-by: kvn, never

duke@435 1 /*
stefank@2314 2 * Copyright (c) 1997, 2010, Oracle and/or its affiliates. All rights reserved.
duke@435 3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
duke@435 4 *
duke@435 5 * This code is free software; you can redistribute it and/or modify it
duke@435 6 * under the terms of the GNU General Public License version 2 only, as
duke@435 7 * published by the Free Software Foundation.
duke@435 8 *
duke@435 9 * This code is distributed in the hope that it will be useful, but WITHOUT
duke@435 10 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
duke@435 11 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
duke@435 12 * version 2 for more details (a copy is included in the LICENSE file that
duke@435 13 * accompanied this code).
duke@435 14 *
duke@435 15 * You should have received a copy of the GNU General Public License version
duke@435 16 * 2 along with this work; if not, write to the Free Software Foundation,
duke@435 17 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
duke@435 18 *
trims@1907 19 * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
trims@1907 20 * or visit www.oracle.com if you need additional information or have any
trims@1907 21 * questions.
duke@435 22 *
duke@435 23 */
duke@435 24
stefank@2314 25 #ifndef SHARE_VM_INTERPRETER_TEMPLATEINTERPRETERGENERATOR_HPP
stefank@2314 26 #define SHARE_VM_INTERPRETER_TEMPLATEINTERPRETERGENERATOR_HPP
stefank@2314 27
twisti@1040 28 // This file contains the platform-independent parts
duke@435 29 // of the template interpreter generator.
duke@435 30
duke@435 31 #ifndef CC_INTERP
duke@435 32
duke@435 33 class TemplateInterpreterGenerator: public AbstractInterpreterGenerator {
duke@435 34 protected:
duke@435 35
duke@435 36 // entry points for shared code sequence
duke@435 37 address _unimplemented_bytecode;
duke@435 38 address _illegal_bytecode_sequence;
duke@435 39
duke@435 40 // shared code sequences
duke@435 41 // Converter for native abi result to tosca result
duke@435 42 address generate_result_handler_for(BasicType type);
duke@435 43 address generate_slow_signature_handler();
duke@435 44 address generate_error_exit(const char* msg);
duke@435 45 address generate_StackOverflowError_handler();
duke@435 46 address generate_exception_handler(const char* name, const char* message) {
duke@435 47 return generate_exception_handler_common(name, message, false);
duke@435 48 }
duke@435 49 address generate_klass_exception_handler(const char* name) {
duke@435 50 return generate_exception_handler_common(name, NULL, true);
duke@435 51 }
duke@435 52 address generate_exception_handler_common(const char* name, const char* message, bool pass_oop);
duke@435 53 address generate_ClassCastException_handler();
jrose@1145 54 address generate_WrongMethodType_handler();
duke@435 55 address generate_ArrayIndexOutOfBounds_handler(const char* name);
duke@435 56 address generate_continuation_for(TosState state);
jrose@1494 57 address generate_return_entry_for(TosState state, int step);
duke@435 58 address generate_earlyret_entry_for(TosState state);
duke@435 59 address generate_deopt_entry_for(TosState state, int step);
duke@435 60 address generate_safept_entry_for(TosState state, address runtime_entry);
duke@435 61 void generate_throw_exception();
duke@435 62
duke@435 63 // entry point generator
duke@435 64 // address generate_method_entry(AbstractInterpreter::MethodKind kind);
duke@435 65
duke@435 66 // Instruction generation
duke@435 67 void generate_and_dispatch (Template* t, TosState tos_out = ilgl);
duke@435 68 void set_vtos_entry_points (Template* t, address& bep, address& cep, address& sep, address& aep, address& iep, address& lep, address& fep, address& dep, address& vep);
duke@435 69 void set_short_entry_points(Template* t, address& bep, address& cep, address& sep, address& aep, address& iep, address& lep, address& fep, address& dep, address& vep);
duke@435 70 void set_wide_entry_point (Template* t, address& wep);
duke@435 71
duke@435 72 void set_entry_points(Bytecodes::Code code);
duke@435 73 void set_unimplemented(int i);
duke@435 74 void set_entry_points_for_all_bytes();
duke@435 75 void set_safepoints_for_all_bytes();
duke@435 76
duke@435 77 // Helpers for generate_and_dispatch
duke@435 78 address generate_trace_code(TosState state) PRODUCT_RETURN0;
duke@435 79 void count_bytecode() PRODUCT_RETURN;
duke@435 80 void histogram_bytecode(Template* t) PRODUCT_RETURN;
duke@435 81 void histogram_bytecode_pair(Template* t) PRODUCT_RETURN;
duke@435 82 void trace_bytecode(Template* t) PRODUCT_RETURN;
duke@435 83 void stop_interpreter_at() PRODUCT_RETURN;
duke@435 84
duke@435 85 void generate_all();
duke@435 86
duke@435 87 public:
duke@435 88 TemplateInterpreterGenerator(StubQueue* _code);
duke@435 89
stefank@2314 90 #ifdef TARGET_ARCH_x86
stefank@2314 91 # include "templateInterpreterGenerator_x86.hpp"
stefank@2314 92 #endif
stefank@2314 93 #ifdef TARGET_ARCH_sparc
stefank@2314 94 # include "templateInterpreterGenerator_sparc.hpp"
stefank@2314 95 #endif
stefank@2314 96 #ifdef TARGET_ARCH_zero
stefank@2314 97 # include "templateInterpreterGenerator_zero.hpp"
stefank@2314 98 #endif
bobv@2508 99 #ifdef TARGET_ARCH_arm
bobv@2508 100 # include "templateInterpreterGenerator_arm.hpp"
bobv@2508 101 #endif
bobv@2508 102 #ifdef TARGET_ARCH_ppc
bobv@2508 103 # include "templateInterpreterGenerator_ppc.hpp"
bobv@2508 104 #endif
stefank@2314 105
duke@435 106
duke@435 107 };
duke@435 108
duke@435 109 #endif // !CC_INTERP
stefank@2314 110
stefank@2314 111 #endif // SHARE_VM_INTERPRETER_TEMPLATEINTERPRETERGENERATOR_HPP

mercurial