/*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation.
*
* This code is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
* version 2 for more details (a copy is included in the LICENSE file that
* accompanied this code).
*
* You should have received a copy of the GNU General Public License version
* 2 along with this work; if not, write to the Free Software Foundation,
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
*
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
* or visit www.oracle.com if you need additional information or have any
* questions.
*
*/
#include "precompiled.hpp"
#include "classfile/symbolTable.hpp"
#include "classfile/verificationType.hpp"
#include "classfile/verifier.hpp"
switch (tag) {
case ITEM_Top: return bogus_type();
case ITEM_Integer: return integer_type();
case ITEM_Float: return float_type();
case ITEM_Double: return double_type();
default:
return bogus_type();
}
}
// null is assignable to any reference
return true;
} else if (is_null()) {
return false;
return true;
} else if (is_object()) {
// We need check the class hierarchy to check assignability
// any object or array is assignable to java.lang.Object
return true;
}
if (this_class->is_interface()) {
// We treat interfaces as java.lang.Object, including
// java.lang.Cloneable and java.io.Serializable
return true;
}
}
}
return false;
}
case '[':
case 'L':
default:
// Met an invalid type signature, e.g. [X
return VerificationType::bogus_type();
}
}
default:
if (is_uninitialized_this()) {
} else if (is_uninitialized()) {
} else {
}
}
}