14 * accompanied this code). 15 * 16 * You should have received a copy of the GNU General Public License version 17 * 2 along with this work; if not, write to the Free Software Foundation, 18 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. 19 * 20 * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA 21 * or visit www.oracle.com if you need additional information or have any 22 * questions. 23 * 24 */ 25 26 #include "precompiled.hpp" 27 #include "interpreter/interpreter.hpp" 28 #include "oops/constMethod.hpp" 29 #include "oops/method.hpp" 30 #include "runtime/frame.inline.hpp" 31 #include "utilities/debug.hpp" 32 #include "utilities/macros.hpp" 33 34 // Size of interpreter code. Increase if too small. Interpreter will 35 // fail with a guarantee ("not enough space for interpreter generation"); 36 // if too small. 37 // Run with +PrintInterpreter to get the VM to print out the size. 38 // Max size with JVMTI 39 int TemplateInterpreter::InterpreterCodeSize = 200 * 1024; 40 41 int AbstractInterpreter::BasicType_as_index(BasicType type) { 42 int i = 0; 43 switch (type) { 44 case T_BOOLEAN: i = 0; break; 45 case T_CHAR : i = 1; break; 46 case T_BYTE : i = 2; break; 47 case T_SHORT : i = 3; break; 48 case T_INT : i = 4; break; 49 case T_LONG : i = 5; break; 50 case T_VOID : i = 6; break; 51 case T_FLOAT : i = 7; break; 52 case T_DOUBLE : i = 8; break; 53 case T_OBJECT : i = 9; break; 54 case T_ARRAY : i = 9; break; 55 default : ShouldNotReachHere(); 56 } 57 assert(0 <= i && i < AbstractInterpreter::number_of_result_handlers, 58 "index out of bounds"); 59 return i; | 14 * accompanied this code). 15 * 16 * You should have received a copy of the GNU General Public License version 17 * 2 along with this work; if not, write to the Free Software Foundation, 18 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. 19 * 20 * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA 21 * or visit www.oracle.com if you need additional information or have any 22 * questions. 23 * 24 */ 25 26 #include "precompiled.hpp" 27 #include "interpreter/interpreter.hpp" 28 #include "oops/constMethod.hpp" 29 #include "oops/method.hpp" 30 #include "runtime/frame.inline.hpp" 31 #include "utilities/debug.hpp" 32 #include "utilities/macros.hpp" 33 34 35 int AbstractInterpreter::BasicType_as_index(BasicType type) { 36 int i = 0; 37 switch (type) { 38 case T_BOOLEAN: i = 0; break; 39 case T_CHAR : i = 1; break; 40 case T_BYTE : i = 2; break; 41 case T_SHORT : i = 3; break; 42 case T_INT : i = 4; break; 43 case T_LONG : i = 5; break; 44 case T_VOID : i = 6; break; 45 case T_FLOAT : i = 7; break; 46 case T_DOUBLE : i = 8; break; 47 case T_OBJECT : i = 9; break; 48 case T_ARRAY : i = 9; break; 49 default : ShouldNotReachHere(); 50 } 51 assert(0 <= i && i < AbstractInterpreter::number_of_result_handlers, 52 "index out of bounds"); 53 return i; |