comparison src/share/vm/c1/c1_Runtime1.cpp @ 10265:92ef81e2f571

8003557: NPG: Klass* const k should be const Klass* k. Summary: With NPG, const KlassOop klass which is in fact a definition converted to Klass* const, which is not the original intention. The right usage is converting them to const Klass*. Reviewed-by: coleenp, kvn Contributed-by: yumin.qi@oracle.com
author minqi
date Fri, 10 May 2013 08:27:30 -0700
parents 46f6f063b272
children 836a62f43af9 b800986664f4
comparison
equal deleted inserted replaced
10262:c272092594bd 10265:92ef81e2f571
1 /* 1 /*
2 * Copyright (c) 1999, 2012, Oracle and/or its affiliates. All rights reserved. 2 * Copyright (c) 1999, 2013, 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.
1259 if ((unsigned int) arrayOop(src)->length() < (unsigned int)src_pos + (unsigned int)length) return ac_failed; 1259 if ((unsigned int) arrayOop(src)->length() < (unsigned int)src_pos + (unsigned int)length) return ac_failed;
1260 if ((unsigned int) arrayOop(dst)->length() < (unsigned int)dst_pos + (unsigned int)length) return ac_failed; 1260 if ((unsigned int) arrayOop(dst)->length() < (unsigned int)dst_pos + (unsigned int)length) return ac_failed;
1261 1261
1262 if (length == 0) return ac_ok; 1262 if (length == 0) return ac_ok;
1263 if (src->is_typeArray()) { 1263 if (src->is_typeArray()) {
1264 Klass* const klass_oop = src->klass(); 1264 Klass* klass_oop = src->klass();
1265 if (klass_oop != dst->klass()) return ac_failed; 1265 if (klass_oop != dst->klass()) return ac_failed;
1266 TypeArrayKlass* klass = TypeArrayKlass::cast(klass_oop); 1266 TypeArrayKlass* klass = TypeArrayKlass::cast(klass_oop);
1267 const int l2es = klass->log2_element_size(); 1267 const int l2es = klass->log2_element_size();
1268 const int ihs = klass->array_header_in_bytes() / wordSize; 1268 const int ihs = klass->array_header_in_bytes() / wordSize;
1269 char* src_addr = (char*) ((oopDesc**)src + ihs) + (src_pos << l2es); 1269 char* src_addr = (char*) ((oopDesc**)src + ihs) + (src_pos << l2es);