comparison agent/src/share/classes/sun/jvm/hotspot/oops/ConstantPool.java @ 14909:4ca6dc0799b6

Backout jdk9 merge
author Gilles Duboscq <duboscq@ssw.jku.at>
date Tue, 01 Apr 2014 13:57:07 +0200
parents b8a500a7b9bf
children 7848fc12602b
comparison
equal deleted inserted replaced
14908:8db6e76cb658 14909:4ca6dc0799b6
1 /* 1 /*
2 * Copyright (c) 2000, 2014, Oracle and/or its affiliates. All rights reserved. 2 * Copyright (c) 2000, 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.
150 return elementSize; 150 return elementSize;
151 } 151 }
152 152
153 private long indexOffset(long index) { 153 private long indexOffset(long index) {
154 if (Assert.ASSERTS_ENABLED) { 154 if (Assert.ASSERTS_ENABLED) {
155 Assert.that(index >= 0 && index < getLength(), "invalid cp index " + index + " " + getLength()); 155 Assert.that(index > 0 && index < getLength(), "invalid cp index " + index + " " + getLength());
156 } 156 }
157 return (index * getElementSize()) + headerSize; 157 return (index * getElementSize()) + headerSize;
158 } 158 }
159 159
160 public ConstantTag getTagAt(long index) { 160 public ConstantTag getTagAt(long index) {