comparison src/share/vm/classfile/stackMapFrame.cpp @ 18052:2373a1f4987c

8036533: Method for correct defaults 8036156: Limit default method hierarchy Summary: Fix protected access checks Reviewed-by: coleenp, lfoltan, acorn, ahgross
author hseigel
date Fri, 09 May 2014 15:21:20 -0400
parents 4ee06e614636
children c77d5db18942
comparison
equal deleted inserted replaced
18051:21444610cb92 18052:2373a1f4987c
1 /* 1 /*
2 * Copyright (c) 2003, 2012, Oracle and/or its affiliates. All rights reserved. 2 * Copyright (c) 2003, 2014, 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.
161 // mismatches 161 // mismatches
162 int StackMapFrame::is_assignable_to( 162 int StackMapFrame::is_assignable_to(
163 VerificationType* from, VerificationType* to, int32_t len, TRAPS) const { 163 VerificationType* from, VerificationType* to, int32_t len, TRAPS) const {
164 int32_t i = 0; 164 int32_t i = 0;
165 for (i = 0; i < len; i++) { 165 for (i = 0; i < len; i++) {
166 if (!to[i].is_assignable_from(from[i], verifier(), THREAD)) { 166 if (!to[i].is_assignable_from(from[i], verifier(), false, THREAD)) {
167 break; 167 break;
168 } 168 }
169 } 169 }
170 return i; 170 return i;
171 } 171 }
258 "Operand stack underflow"); 258 "Operand stack underflow");
259 return VerificationType::bogus_type(); 259 return VerificationType::bogus_type();
260 } 260 }
261 VerificationType top = _stack[--_stack_size]; 261 VerificationType top = _stack[--_stack_size];
262 bool subtype = type.is_assignable_from( 262 bool subtype = type.is_assignable_from(
263 top, verifier(), CHECK_(VerificationType::bogus_type())); 263 top, verifier(), false, CHECK_(VerificationType::bogus_type()));
264 if (!subtype) { 264 if (!subtype) {
265 verifier()->verify_error( 265 verifier()->verify_error(
266 ErrorContext::bad_type(_offset, stack_top_ctx(), 266 ErrorContext::bad_type(_offset, stack_top_ctx(),
267 TypeOrigin::implicit(type)), 267 TypeOrigin::implicit(type)),
268 "Bad type on operand stack"); 268 "Bad type on operand stack");
278 ErrorContext::bad_local_index(_offset, index), 278 ErrorContext::bad_local_index(_offset, index),
279 "Local variable table overflow"); 279 "Local variable table overflow");
280 return VerificationType::bogus_type(); 280 return VerificationType::bogus_type();
281 } 281 }
282 bool subtype = type.is_assignable_from(_locals[index], 282 bool subtype = type.is_assignable_from(_locals[index],
283 verifier(), CHECK_(VerificationType::bogus_type())); 283 verifier(), false, CHECK_(VerificationType::bogus_type()));
284 if (!subtype) { 284 if (!subtype) {
285 verifier()->verify_error( 285 verifier()->verify_error(
286 ErrorContext::bad_type(_offset, 286 ErrorContext::bad_type(_offset,
287 TypeOrigin::local(index, this), 287 TypeOrigin::local(index, this),
288 TypeOrigin::implicit(type)), 288 TypeOrigin::implicit(type)),
301 verifier()->verify_error( 301 verifier()->verify_error(
302 ErrorContext::bad_local_index(_offset, index), 302 ErrorContext::bad_local_index(_offset, index),
303 "get long/double overflows locals"); 303 "get long/double overflows locals");
304 return; 304 return;
305 } 305 }
306 bool subtype = type1.is_assignable_from(_locals[index], verifier(), CHECK); 306 bool subtype = type1.is_assignable_from(_locals[index], verifier(), false, CHECK);
307 if (!subtype) { 307 if (!subtype) {
308 verifier()->verify_error( 308 verifier()->verify_error(
309 ErrorContext::bad_type(_offset, 309 ErrorContext::bad_type(_offset,
310 TypeOrigin::local(index, this), TypeOrigin::implicit(type1)), 310 TypeOrigin::local(index, this), TypeOrigin::implicit(type1)),
311 "Bad local variable type"); 311 "Bad local variable type");
312 } else { 312 } else {
313 subtype = type2.is_assignable_from(_locals[index + 1], verifier(), CHECK); 313 subtype = type2.is_assignable_from(_locals[index + 1], verifier(), false, CHECK);
314 if (!subtype) { 314 if (!subtype) {
315 /* Unreachable? All local store routines convert a split long or double 315 /* Unreachable? All local store routines convert a split long or double
316 * into a TOP during the store. So we should never end up seeing an 316 * into a TOP during the store. So we should never end up seeing an
317 * orphaned half. */ 317 * orphaned half. */
318 verifier()->verify_error( 318 verifier()->verify_error(