Mercurial > hg > truffle
diff src/share/vm/classfile/verifier.cpp @ 8060:3a531d40ad93
8007736: VerifyError for static method in interface
Reviewed-by: dholmes, acorn
Contributed-by: bharadwaj.yadavalli@oracle.com
author | acorn |
---|---|
date | Thu, 14 Feb 2013 14:33:35 -0500 |
parents | 18fb7da42534 |
children | 729be16a470b |
line wrap: on
line diff
--- a/src/share/vm/classfile/verifier.cpp Thu Feb 14 13:08:15 2013 +0100 +++ b/src/share/vm/classfile/verifier.cpp Thu Feb 14 14:33:35 2013 -0500 @@ -1,5 +1,5 @@ /* - * Copyright (c) 1998, 2012, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1998, 2013, 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 @@ -61,7 +61,8 @@ # include "bytes_ppc.hpp" #endif -#define NOFAILOVER_MAJOR_VERSION 51 +#define NOFAILOVER_MAJOR_VERSION 51 +#define STATIC_METHOD_IN_INTERFACE_MAJOR_VERSION 52 // Access to external entry for VerifyClassCodes - old byte code verifier @@ -2317,6 +2318,11 @@ types = (1 << JVM_CONSTANT_InterfaceMethodref) | (1 << JVM_CONSTANT_Methodref); break; + case Bytecodes::_invokestatic: + types = (_klass->major_version() < STATIC_METHOD_IN_INTERFACE_MAJOR_VERSION) ? + (1 << JVM_CONSTANT_Methodref) : + ((1 << JVM_CONSTANT_InterfaceMethodref) | (1 << JVM_CONSTANT_Methodref)); + break; default: types = 1 << JVM_CONSTANT_Methodref; }