src/share/vm/interpreter/templateInterpreter.cpp

Print this page


   1 /*
   2  * Copyright (c) 1997, 2009, Oracle and/or its affiliates. All rights reserved.
   3  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
   4  *
   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 #include "incls/_precompiled.incl"
  26 #include "incls/_templateInterpreter.cpp.incl"



  27 
  28 #ifndef CC_INTERP
  29 
  30 # define __ _masm->
  31 
  32 void TemplateInterpreter::initialize() {
  33   if (_code != NULL) return;
  34   // assertions
  35   assert((int)Bytecodes::number_of_codes <= (int)DispatchTable::length,
  36          "dispatch table too small");
  37 
  38   AbstractInterpreter::initialize();
  39 
  40   TemplateTable::initialize();
  41 
  42   // generate interpreter
  43   { ResourceMark rm;
  44     TraceTime timer("Interpreter generation", TraceStartupTime);
  45     int code_size = InterpreterCodeSize;
  46     NOT_PRODUCT(code_size *= 4;)  // debug uses extra interpreter code space


   1 /*
   2  * Copyright (c) 1997, 2010, Oracle and/or its affiliates. All rights reserved.
   3  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
   4  *
   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 #include "precompiled.hpp"
  26 #include "interpreter/interpreter.hpp"
  27 #include "interpreter/interpreterGenerator.hpp"
  28 #include "interpreter/interpreterRuntime.hpp"
  29 #include "interpreter/templateTable.hpp"
  30 
  31 #ifndef CC_INTERP
  32 
  33 # define __ _masm->
  34 
  35 void TemplateInterpreter::initialize() {
  36   if (_code != NULL) return;
  37   // assertions
  38   assert((int)Bytecodes::number_of_codes <= (int)DispatchTable::length,
  39          "dispatch table too small");
  40 
  41   AbstractInterpreter::initialize();
  42 
  43   TemplateTable::initialize();
  44 
  45   // generate interpreter
  46   { ResourceMark rm;
  47     TraceTime timer("Interpreter generation", TraceStartupTime);
  48     int code_size = InterpreterCodeSize;
  49     NOT_PRODUCT(code_size *= 4;)  // debug uses extra interpreter code space