--- a/hotspot/src/share/vm/oops/constantPoolOop.hpp Tue Jun 01 11:48:33 2010 -0700
+++ b/hotspot/src/share/vm/oops/constantPoolOop.hpp Wed Jun 02 22:45:42 2010 -0700
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 1997, 2009, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1997, 2010, 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
@@ -434,6 +434,10 @@
// Debugging
const char* printable_name_at(int which) PRODUCT_RETURN0;
+#ifdef ASSERT
+ enum { CPCACHE_INDEX_TAG = 0x10000 }; // helps keep CP cache indices distinct from CP indices
+#endif //ASSERT
+
private:
symbolOop impl_name_ref_at(int which, bool uncached);
@@ -441,7 +445,7 @@
int impl_klass_ref_index_at(int which, bool uncached);
int impl_name_and_type_ref_index_at(int which, bool uncached);
- int remap_instruction_operand_from_cache(int operand);
+ int remap_instruction_operand_from_cache(int operand); // operand must be biased by CPCACHE_INDEX_TAG
// Used while constructing constant pool (only by ClassFileParser)
jint klass_index_at(int which) {