diff -r 0e4c848d5c06 -r 201c5cde25bb hotspot/src/share/vm/interpreter/bytecodes.cpp --- a/hotspot/src/share/vm/interpreter/bytecodes.cpp Tue Jun 01 11:48:33 2010 -0700 +++ b/hotspot/src/share/vm/interpreter/bytecodes.cpp Wed Jun 02 22:45:42 2010 -0700 @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2009, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 2010, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -37,14 +37,11 @@ bool Bytecodes::_is_initialized = false; const char* Bytecodes::_name [Bytecodes::number_of_codes]; -const char* Bytecodes::_format [Bytecodes::number_of_codes]; -const char* Bytecodes::_wide_format [Bytecodes::number_of_codes]; BasicType Bytecodes::_result_type [Bytecodes::number_of_codes]; s_char Bytecodes::_depth [Bytecodes::number_of_codes]; -u_char Bytecodes::_length [Bytecodes::number_of_codes]; -bool Bytecodes::_can_trap [Bytecodes::number_of_codes]; +u_char Bytecodes::_lengths [Bytecodes::number_of_codes]; Bytecodes::Code Bytecodes::_java_code [Bytecodes::number_of_codes]; -bool Bytecodes::_can_rewrite [Bytecodes::number_of_codes]; +u_short Bytecodes::_flags [(1< 0 && len == (int)len) ? len : -1; } } + // Note: Length functions must return <=0 for invalid bytecodes. return 0; } @@ -124,15 +122,22 @@ void Bytecodes::def(Code code, const char* name, const char* format, const char* wide_format, BasicType result_type, int depth, bool can_trap, Code java_code) { assert(wide_format == NULL || format != NULL, "short form must exist if there's a wide form"); + int len = (format != NULL ? (int) strlen(format) : 0); + int wlen = (wide_format != NULL ? (int) strlen(wide_format) : 0); _name [code] = name; - _format [code] = format; - _wide_format [code] = wide_format; _result_type [code] = result_type; _depth [code] = depth; - _can_trap [code] = can_trap; - _length [code] = format != NULL ? (u_char)strlen(format) : 0; + _lengths [code] = (wlen << 4) | (len & 0xF); _java_code [code] = java_code; - if (java_code != code) _can_rewrite[java_code] = true; + int bc_flags = 0; + if (can_trap) bc_flags |= _bc_can_trap; + if (java_code != code) bc_flags |= _bc_can_rewrite; + _flags[(u1)code+0*(1<