comparison src/share/vm/interpreter/rewriter.cpp @ 8104:f16e75e0cf11

8000797: NPG: is_pseudo_string_at() doesn't work Summary: Zero Symbol* for constant pool strings to indicate pseudo_strings (objects that aren't strings). Clean up JVM_CONSTANT_Object and unused flags. Reviewed-by: sspitsyn, jrose
author coleenp
date Fri, 22 Feb 2013 08:36:42 -0500
parents cc6a617fffd2
children 5fc51c1ecdeb 3efdfd6ddbf2
comparison
equal deleted inserted replaced
8103:5ed317b25e23 8104:f16e75e0cf11
1 /* 1 /*
2 * Copyright (c) 1998, 2012, Oracle and/or its affiliates. All rights reserved. 2 * Copyright (c) 1998, 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.
46 case JVM_CONSTANT_Fieldref : // fall through 46 case JVM_CONSTANT_Fieldref : // fall through
47 case JVM_CONSTANT_Methodref : // fall through 47 case JVM_CONSTANT_Methodref : // fall through
48 add_cp_cache_entry(i); 48 add_cp_cache_entry(i);
49 break; 49 break;
50 case JVM_CONSTANT_String: 50 case JVM_CONSTANT_String:
51 case JVM_CONSTANT_Object:
52 case JVM_CONSTANT_MethodHandle : // fall through 51 case JVM_CONSTANT_MethodHandle : // fall through
53 case JVM_CONSTANT_MethodType : // fall through 52 case JVM_CONSTANT_MethodType : // fall through
54 add_resolved_references_entry(i); 53 add_resolved_references_entry(i);
55 break; 54 break;
56 case JVM_CONSTANT_Utf8: 55 case JVM_CONSTANT_Utf8:
236 if (!reverse) { 235 if (!reverse) {
237 assert((*bcp) == (is_wide ? Bytecodes::_ldc_w : Bytecodes::_ldc), "not ldc bytecode"); 236 assert((*bcp) == (is_wide ? Bytecodes::_ldc_w : Bytecodes::_ldc), "not ldc bytecode");
238 address p = bcp + offset; 237 address p = bcp + offset;
239 int cp_index = is_wide ? Bytes::get_Java_u2(p) : (u1)(*p); 238 int cp_index = is_wide ? Bytes::get_Java_u2(p) : (u1)(*p);
240 constantTag tag = _pool->tag_at(cp_index).value(); 239 constantTag tag = _pool->tag_at(cp_index).value();
241 if (tag.is_method_handle() || tag.is_method_type() || tag.is_string() || tag.is_object()) { 240 if (tag.is_method_handle() || tag.is_method_type() || tag.is_string()) {
242 int ref_index = cp_entry_to_resolved_references(cp_index); 241 int ref_index = cp_entry_to_resolved_references(cp_index);
243 if (is_wide) { 242 if (is_wide) {
244 (*bcp) = Bytecodes::_fast_aldc_w; 243 (*bcp) = Bytecodes::_fast_aldc_w;
245 assert(ref_index == (u2)ref_index, "index overflow"); 244 assert(ref_index == (u2)ref_index, "index overflow");
246 Bytes::put_native_u2(p, ref_index); 245 Bytes::put_native_u2(p, ref_index);