comparison src/share/vm/interpreter/bytecodes.hpp @ 22916:6b65121b3258

7127066: Class verifier accepts an invalid class file Summary: For *store bytecodes, compare incoming, not outgoing, type state with exception handlers' stack maps. Reviewed-by: acorn, dholmes
author hseigel
date Wed, 25 Mar 2015 08:16:48 -0400
parents 600c44255e5f
children 32b682649973
comparison
equal deleted inserted replaced
22910:3ca53859c3c7 22916:6b65121b3258
1 /* 1 /*
2 * Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved. 2 * Copyright (c) 1997, 2015, Oracle and/or its affiliates. All rights reserved.
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4 * 4 *
5 * This code is free software; you can redistribute it and/or modify it 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 6 * under the terms of the GNU General Public License version 2 only, as
7 * published by the Free Software Foundation. 7 * published by the Free Software Foundation.
418 static bool is_aload (Code code) { return (code == _aload || code == _aload_0 || code == _aload_1 418 static bool is_aload (Code code) { return (code == _aload || code == _aload_0 || code == _aload_1
419 || code == _aload_2 || code == _aload_3); } 419 || code == _aload_2 || code == _aload_3); }
420 static bool is_astore (Code code) { return (code == _astore || code == _astore_0 || code == _astore_1 420 static bool is_astore (Code code) { return (code == _astore || code == _astore_0 || code == _astore_1
421 || code == _astore_2 || code == _astore_3); } 421 || code == _astore_2 || code == _astore_3); }
422 422
423 static bool is_store_into_local(Code code){ return (_istore <= code && code <= _astore_3); }
423 static bool is_const (Code code) { return (_aconst_null <= code && code <= _ldc2_w); } 424 static bool is_const (Code code) { return (_aconst_null <= code && code <= _ldc2_w); }
424 static bool is_zero_const (Code code) { return (code == _aconst_null || code == _iconst_0 425 static bool is_zero_const (Code code) { return (code == _aconst_null || code == _iconst_0
425 || code == _fconst_0 || code == _dconst_0); } 426 || code == _fconst_0 || code == _dconst_0); }
426 static bool is_return (Code code) { return (_ireturn <= code && code <= _return); } 427 static bool is_return (Code code) { return (_ireturn <= code && code <= _return); }
427 static bool is_invoke (Code code) { return (_invokevirtual <= code && code <= _invokedynamic); } 428 static bool is_invoke (Code code) { return (_invokevirtual <= code && code <= _invokedynamic); }