src/share/vm/interpreter/cppInterpreter.cpp
Index Unified diffs Context diffs Sdiffs Patch New Old Previous File Next File 8148630 Sdiff src/share/vm/interpreter

src/share/vm/interpreter/cppInterpreter.cpp

Print this page




  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 #include "precompiled.hpp"
  26 #include "interpreter/bytecodeInterpreter.hpp"
  27 #include "interpreter/cppInterpreterGenerator.hpp"
  28 #include "interpreter/interpreter.hpp"
  29 #include "interpreter/interpreterRuntime.hpp"

  30 
  31 #ifdef CC_INTERP
  32 
  33 #ifdef ZERO
  34 # include "entry_zero.hpp"
  35 #else
  36 #error "Only Zero CppInterpreter is supported"
  37 #endif
  38 
  39 void CppInterpreter::initialize() {
  40   if (_code != NULL) return;
  41   AbstractInterpreter::initialize();
  42 
  43   // generate interpreter
  44   { ResourceMark rm;
  45     TraceTime timer("Interpreter generation", TraceStartupTime);


  46     int code_size = InterpreterCodeSize;
  47     NOT_PRODUCT(code_size *= 4;)  // debug uses extra interpreter code space
  48     _code = new StubQueue(new InterpreterCodeletInterface, code_size, NULL,
  49                            "Interpreter");
  50     CppInterpreterGenerator g(_code);
  51     if (PrintInterpreter) print();
  52   }
  53 
  54   // Allow c++ interpreter to do one initialization now that switches are set, etc.
  55   BytecodeInterpreter start_msg(BytecodeInterpreter::initialize);
  56   if (JvmtiExport::can_post_interpreter_events())
  57     BytecodeInterpreter::runWithChecks(&start_msg);
  58   else
  59     BytecodeInterpreter::run(&start_msg);
  60 }
  61 
  62 
  63 void CppInterpreter::invoke_method(Method* method, address entry_point, TRAPS) {
  64   ((ZeroEntry *) entry_point)->invoke(method, THREAD);
  65 }


  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 #include "precompiled.hpp"
  26 #include "interpreter/bytecodeInterpreter.hpp"
  27 #include "interpreter/cppInterpreterGenerator.hpp"
  28 #include "interpreter/interpreter.hpp"
  29 #include "interpreter/interpreterRuntime.hpp"
  30 #include "logging/log.hpp"
  31 
  32 #ifdef CC_INTERP
  33 
  34 #ifdef ZERO
  35 # include "entry_zero.hpp"
  36 #else
  37 #error "Only Zero CppInterpreter is supported"
  38 #endif
  39 
  40 void CppInterpreter::initialize() {
  41   if (_code != NULL) return;
  42   AbstractInterpreter::initialize();
  43 
  44   // generate interpreter
  45   { ResourceMark rm;
  46     TraceTime timer("Interpreter generation",
  47                     log_is_enabled(Info, startuptime),
  48                     LogTag::_startuptime);
  49     int code_size = InterpreterCodeSize;
  50     NOT_PRODUCT(code_size *= 4;)  // debug uses extra interpreter code space
  51     _code = new StubQueue(new InterpreterCodeletInterface, code_size, NULL,
  52                            "Interpreter");
  53     CppInterpreterGenerator g(_code);
  54     if (PrintInterpreter) print();
  55   }
  56 
  57   // Allow c++ interpreter to do one initialization now that switches are set, etc.
  58   BytecodeInterpreter start_msg(BytecodeInterpreter::initialize);
  59   if (JvmtiExport::can_post_interpreter_events())
  60     BytecodeInterpreter::runWithChecks(&start_msg);
  61   else
  62     BytecodeInterpreter::run(&start_msg);
  63 }
  64 
  65 
  66 void CppInterpreter::invoke_method(Method* method, address entry_point, TRAPS) {
  67   ((ZeroEntry *) entry_point)->invoke(method, THREAD);
  68 }
src/share/vm/interpreter/cppInterpreter.cpp
Index Unified diffs Context diffs Sdiffs Patch New Old Previous File Next File